Browse Source

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

huangfuli 3 years ago
parent
commit
0f9c7d5504
56 changed files with 12682 additions and 228 deletions
  1. 3 0
      src/api/V2/outboundManagement/index.js
  2. 35 1
      src/api/V2/profitable/index.js
  3. 4 0
      src/api/V2/taskspost/index.js
  4. 8 1
      src/api/V2/warehouse/index.js
  5. 31 28
      src/components/balanceAlert.vue
  6. 9 7
      src/lang/zh.js
  7. 5 2
      src/model/outboundManagement/index.js
  8. 44 2
      src/model/profitable/index.js
  9. 11 2
      src/model/tasksport/index.js
  10. 13 3
      src/model/warehouse/index.js
  11. 3 1
      src/views/houseSelfCollect/acquisitionManagement.vue
  12. 1 1
      src/views/houseSelfCollect/customerManagementAdd.vue
  13. 5 3
      src/views/houseSelfCollect/newWeighingManagement.vue
  14. 4 4
      src/views/houseSelfCollect/paymentManagement.vue
  15. 4 4
      src/views/houseSelfCollect/weighingManagement.vue
  16. 1 1
      src/views/houseSelfCollect/weightCheck.vue
  17. 3 3
      src/views/houseSelfCollect/weightCheckRecord.vue
  18. 2 2
      src/views/outboundManagement/component/outInspectPrint.vue
  19. 1 1
      src/views/outboundManagement/weighingManagementNew.vue
  20. 15 1
      src/views/outboundManagement/weighingManagementrecord.vue
  21. 743 0
      src/views/profitable/cashout.vue
  22. 432 0
      src/views/profitable/cashoutaduit.vue
  23. 0 33
      src/views/profitable/component/routers/route.js
  24. 294 0
      src/views/profitable/contractcost.vue
  25. 253 0
      src/views/profitable/contractinventory.vue
  26. 396 0
      src/views/profitable/contractprofits.vue
  27. 295 0
      src/views/profitable/contractprofitsdetails.vue
  28. 501 0
      src/views/profitable/expenseallot.vue
  29. 439 0
      src/views/profitable/expenseallotaduit.vue
  30. 475 0
      src/views/profitable/expensemanagement.vue
  31. 468 0
      src/views/profitable/expensemanagementdetails.vue
  32. 717 0
      src/views/profitable/expensemanagentedit.vue
  33. 249 0
      src/views/profitable/expensemanagentlook.vue
  34. 223 0
      src/views/profitable/payment.vue
  35. 409 0
      src/views/profitable/receipt.vue
  36. 284 0
      src/views/profitable/receiptaduit.vue
  37. 300 0
      src/views/profitable/warehousecost.vue
  38. 268 0
      src/views/profitable/warehouseinventory.vue
  39. 406 0
      src/views/profitable/warehouseprofits.vue
  40. 248 0
      src/views/profitable/warehouseprofitsdetails.vue
  41. 78 0
      src/views/taskManagement/component/routers/route.js
  42. 554 0
      src/views/taskManagement/outsupplyofgoods.vue
  43. 530 0
      src/views/taskManagement/outsupplyofgoodsedit.vue
  44. 603 0
      src/views/taskManagement/outsupplyofgoodslook.vue
  45. 539 0
      src/views/taskManagement/supplyofgoods.vue
  46. 564 0
      src/views/taskManagement/supplyofgoodsedit.vue
  47. 516 0
      src/views/taskManagement/supplyofgoodslook.vue
  48. 46 2
      src/views/taskManagement/tranManagementWarehouseInOutTask.vue
  49. 43 8
      src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue
  50. 1 2
      src/views/warehouse/warehouseManagementNoComplete.vue
  51. 3 0
      src/views/warehouse/warehouseManagementPerfectput.vue
  52. 42 58
      src/views/warehouse/warehouseManagementRecord.vue
  53. 28 28
      src/views/warehousenew/component/router/index.js
  54. 671 14
      src/views/warehousenew/inventoryCheck.vue
  55. 861 13
      src/views/warehousenew/warehousingOrder.vue
  56. 1 3
      vue.min.js

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

@@ -40,3 +40,6 @@ export const API_POST_COLLECTION_ADDREMARKS = '/paymentManagement/api/addRemarks
 export const API_POST_NEW_SUBMIT = '/warehouseInOutInfo/api/newInOutWarehouse'
 export const API_POST_NEW_SUBMIT = '/warehouseInOutInfo/api/newInOutWarehouse'
 // 换仓
 // 换仓
 export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`
 export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`
+// 退回
+export const API_POST_GO_BACK = `/weighingManagement/api/outWeightReturn`
+

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

@@ -20,5 +20,39 @@ export const API_POST_AUDITRECORD = '/billOperateHis/query/commonBillOperateHis'
 export const API_GET_WAREHOUSE = '/warehouseBaseInfo/selectWarehouse'
 export const API_GET_WAREHOUSE = '/warehouseBaseInfo/selectWarehouse'
 // 费用管理提交
 // 费用管理提交
 export const API_POST_SUBMIT = '/feeDetailsInfo/submit'
 export const API_POST_SUBMIT = '/feeDetailsInfo/submit'
+// 费用管理查看
+export const API_GET_LOOK = '/feeDetailsInfo/selectInfo'
+// 费用管理付款,确认付款
+export const API_POST_SUBMITPAY = '/feeDetailsInfo/submitPay'
+// 费用管理编辑 、 收款、付款
+export const API_POST_SHOUGUAN = '/feeDetailsInfo/payShou'
 //合同编号下拉
 //合同编号下拉
-export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
+export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
+// 费用管理详情列表
+export const API_GET_EXPENSEINFO = '/expenseInfo/selectInfo'
+// 费用管理请款收款
+export const API_SET_EXPENSEINFO = '/expenseInfo/api/addInfo'
+// 获取仓库的入库单
+export const API_GET_SELECTWAREHOUSINGORDER ='/expenseInfo/selectWarehousingOrder'
+// 费用管理编辑、分配、完成、确认收款、确认分配
+export const API_EDIT_EXPENSEINFO ='/expenseInfo/editInfo'
+// 费用管理查看
+export const API_LOOK_EXPENSEINFO ='/expenseInfo/ExpenseInfo'
+// 费用管理删除
+export const API_DEL_EXPENSEINFO ='/expenseInfo/deleteInfo'
+// 费用管理分配删除
+export const API_DEL_ALLOCATIONINFO ='/expenseInfo/deleteAllocationInfo'
+// 费用管理付款
+export const API_PAYMNET ='/expenseInfo/payment'
+// 合同费用,库点费用
+export const API_GET_CONTRACTEXPENSEINFO ='/contractExpensesInfo/selectContractExpensesInfo'
+// 合同库存、收购库存
+export const API_GET_INVENTORYINFO ='/contractInventoryDistribution/selectContractInventoryInfo'
+// 合同利润详情
+export const API_GET_CONTRACTDETAILS ='/contractManagementInfo/selectContractInfo'
+// 库点利润详情
+export const API_GET_WAREHOUSETAILS ='/warehouseBaseInfo/selectBaseInfo'
+// 费用管理图表
+export const API_EXPENSECHAT ='/expenseInfo/expenseChart'
+// 费用管理收支表
+export const API_EXPENSECHATLIST ='/expenseInfo/expenseList'

+ 4 - 0
src/api/V2/taskspost/index.js

@@ -49,3 +49,7 @@ export const API_POST_DEL_HAULAGE_STAGE= '/tranProcessInfo/api/deleteTranProcess
 export const API_GET_TASKHISTORIES= '/workflowHistory/query/taskHistories'
 export const API_GET_TASKHISTORIES= '/workflowHistory/query/taskHistories'
 // 获取发货人
 // 获取发货人
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
+// 货源提交
+export const API_EDIT_SOURCEOFGOODS = '/warehousingOrder/editSourceOfGoods'
+// 货源查看
+export const API_GET_SOURCEGOOD = 'warehousingOrder/getSourceOfGoodsList'

+ 8 - 1
src/api/V2/warehouse/index.js

@@ -110,4 +110,11 @@ export const API_SEND_BACK ='/warehouseInOutInfo/returnWarehouse'
 export const API_DELETE_WAREHOUSE ='/warehouseInOutInfo/api/deleteWarehouse'
 export const API_DELETE_WAREHOUSE ='/warehouseInOutInfo/api/deleteWarehouse'
 //查看自己负责的仓库
 //查看自己负责的仓库
 export const API_GET_WAREHOUSENAME='/warehouseBaseInfo/selectWarehouseSelf'
 export const API_GET_WAREHOUSENAME='/warehouseBaseInfo/selectWarehouseSelf'
-
+// 入库单列表
+export const API_GET_WAREHOUSINGORDER = '/warehousingOrder/selectInfo'
+// 盘盈、盘亏
+export const API_EDIT_WAREHOUSINGORDER = '/warehousingOrder/editInfo'
+//请款、收款
+export const API_SET_PAYMONEY = 'warehousingOrder/api/payMoney'
+//费用详情
+export const API_GET_EXPENSEINFO = '/expenseInfo/selectInfo'

+ 31 - 28
src/components/balanceAlert.vue

@@ -1,4 +1,3 @@
-
 <template>
 <template>
   <div class="content">
   <div class="content">
     <div class="title" v-if="information.indexOf('毛重') > -1">毛重</div>
     <div class="title" v-if="information.indexOf('毛重') > -1">毛重</div>
@@ -23,7 +22,7 @@ export default {
     return {
     return {
       param: 9600,
       param: 9600,
       grossWeightVal: '',
       grossWeightVal: '',
-      tareVal: '',
+      tareVal: ''
     }
     }
   },
   },
   activated() {},
   activated() {},
@@ -56,16 +55,19 @@ export default {
           // The Web Serial API is supported.
           // The Web Serial API is supported.
           console.log('the Web Serial API is supported.')
           console.log('the Web Serial API is supported.')
           const port = await navigator.serial.requestPort()
           const port = await navigator.serial.requestPort()
-          if (this.deptBudgetList.warehouseName == '白城内陆港'||this.deptBudgetList.warehouseName == '肇东金信库') {
+          if (
+            this.deptBudgetList.warehouseName == '白城内陆港' ||
+            this.deptBudgetList.warehouseName == '肇东金信库'
+          ) {
             this.param = 1200
             this.param = 1200
-          } else if(this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库') {
+          } else if (this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库') {
             this.param = 2400
             this.param = 2400
-          }else {
+          } else {
             this.param = 9600
             this.param = 9600
           }
           }
           console.log(this.param)
           console.log(this.param)
           await port.open({
           await port.open({
-            baudRate: this.param,
+            baudRate: this.param
           }) // set baud rate
           }) // set baud rate
           this.reader = port.readable.getReader()
           this.reader = port.readable.getReader()
           console.log('port  ', port)
           console.log('port  ', port)
@@ -77,7 +79,6 @@ export default {
         }
         }
         // 监听来自串行设备的数据
         // 监听来自串行设备的数据
         while (true) {
         while (true) {
-          
           const { value, done } = await this.reader.read()
           const { value, done } = await this.reader.read()
           // console.log('value',value);
           // console.log('value',value);
           if (done) {
           if (done) {
@@ -109,39 +110,41 @@ export default {
           //     this.deptBudgetList.tare = parseInt(result)
           //     this.deptBudgetList.tare = parseInt(result)
           //   }
           //   }
           // }
           // }
-          
-          if(value.length > 3 ){
-             if(value.length <= 6){
+
+          if (value.length > 3) {
+            if (value.length <= 6) {
               continue
               continue
-             }
-            if(this.deptBudgetList.warehouseName == '肇东金信库' && value.length < 10){
-              var start = (new Date()).getTime();
-              while((new Date()).getTime() - start < 200) {
-              }
+            }
+            if (
+              this.deptBudgetList.warehouseName == '肇东金信库' &&
+              value.length < 10
+            ) {
+              var start = new Date().getTime()
+              while (new Date().getTime() - start < 200) {}
               continue
               continue
             }
             }
             console.log('value23:', value)
             console.log('value23:', value)
-          }
-          else if(this.deptBudgetList.warehouseName == '白城内陆港' ||this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'){
+          } else if (
+            this.deptBudgetList.warehouseName == '白城内陆港' ||
+            this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'
+          ) {
             console.log('value:', value)
             console.log('value:', value)
-            var start = (new Date()).getTime();
-            while((new Date()).getTime() - start < 400) {
-
-            }
-            continue;
+            var start = new Date().getTime()
+            while (new Date().getTime() - start < 400) {}
+            continue
           }
           }
           if (
           if (
             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 == '鲅鱼圈祥腾库' ||
               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 == '肇东金信库' ||
               this.deptBudgetList.warehouseName == '呼兰大金仓')
               this.deptBudgetList.warehouseName == '呼兰大金仓')
-          )) {
+          ) {
             for (var i = 0; i < value.length; i++) {
             for (var i = 0; i < value.length; i++) {
               var tmp = String.fromCharCode(value[i])
               var tmp = String.fromCharCode(value[i])
               if (tmp == '+') {
               if (tmp == '+') {
@@ -259,8 +262,8 @@ export default {
       } else {
       } else {
         console.log('the Web Serial API is not supported.', navigator)
         console.log('the Web Serial API is not supported.', navigator)
       }
       }
-    },
-  },
+    }
+  }
 }
 }
 </script>
 </script>
 
 

+ 9 - 7
src/lang/zh.js

@@ -517,8 +517,6 @@ export default {
 
 
     //仓库管理
     //仓库管理
     warehouseManagementList: '仓库管理',
     warehouseManagementList: '仓库管理',
-    warehousingOrder: '入库单',
-    inventoryCheck:'库存盘点',
     warehouselocation: '成本管理  /  库点费用',
     warehouselocation: '成本管理  /  库点费用',
     weightedsubsidiary: '加权明细',
     weightedsubsidiary: '加权明细',
     costmanagement: '成本管理',
     costmanagement: '成本管理',
@@ -607,6 +605,12 @@ export default {
     tranManagementTransportAdd: '运输任务添加',
     tranManagementTransportAdd: '运输任务添加',
     tranManagementTransportEdit: '运输任务编辑',
     tranManagementTransportEdit: '运输任务编辑',
     tranManagementWarehouseInOutTask: '出入库任务',
     tranManagementWarehouseInOutTask: '出入库任务',
+    supplyofgoods:'出入库任务  /  添加  /  选择货源',
+    outsupplyofgoods:'出入库任务  /  添加  /  选择货源',
+    supplyofgoodslook:'出入库任务  /  审核  /  查看货源',
+    outsupplyofgoodslook:'出入库任务  /  审核  /  查看货源',
+    supplyofgoodsedit:'出入库任务  /  编辑  /  选择货源',
+    outsupplyofgoodsedit:'出入库任务  /  编辑  /  选择货源',
     tranManagementWarehouseInOutTaskAdd: '出入库任务添加',
     tranManagementWarehouseInOutTaskAdd: '出入库任务添加',
     tranManagementWarehouseInOutTaskEdit: '编辑',
     tranManagementWarehouseInOutTaskEdit: '编辑',
     tranManagementWarehouseInOutTaskaudit: '审核',
     tranManagementWarehouseInOutTaskaudit: '审核',
@@ -656,7 +660,8 @@ export default {
     quotesDetail: '报价单详情',
     quotesDetail: '报价单详情',
     purchasDetail: '采购详情',
     purchasDetail: '采购详情',
     billDetail: '备件结算详情',
     billDetail: '备件结算详情',
-
+    warehousingOrder: '入库单',
+    inventoryCheck:'库存盘点',
     sparepartMa: '物料采购',
     sparepartMa: '物料采购',
     applDetailMa: '物料申请详情',
     applDetailMa: '物料申请详情',
     enquiryDetailMa: '物料询价详情',
     enquiryDetailMa: '物料询价详情',
@@ -4896,10 +4901,7 @@ export default {
     warehouseManagementPutOut: '任务',
     warehouseManagementPutOut: '任务',
     warehouseManagementPutOutLook: '查看',
     warehouseManagementPutOutLook: '查看',
     transformation: '折转',
     transformation: '折转',
-    warehouseManagement:'全部仓库',
-    warehousingOrder: '入库单',
-    inventoryCheck:'库存盘点',
-
+    warehouseManagement:'全部仓库'
   },
   },
   //贸易服务
   //贸易服务
   tradeServicesManagement: {
   tradeServicesManagement: {

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

@@ -22,7 +22,8 @@ import {
     API_POST_COLLECTION_MONEY,
     API_POST_COLLECTION_MONEY,
     API_GET_INSPECT_CONTRANCLISTWEIGHING,
     API_GET_INSPECT_CONTRANCLISTWEIGHING,
     API_POST_NEW_SUBMIT,
     API_POST_NEW_SUBMIT,
-    API_POST_CHANE_NO
+    API_POST_CHANE_NO,
+    API_POST_GO_BACK
 }   from '@/api/V2/outboundManagement'
 }   from '@/api/V2/outboundManagement'
 
 
   //质检列表
   //质检列表
@@ -66,4 +67,6 @@ export const remarksAdd = appRx.post(API_POST_COLLECTION_ADDREMARKS, errorCatche
 //新检斤保存
 //新检斤保存
 export const newSubmit = appRx.post(API_POST_NEW_SUBMIT, errorCatcher, errorHandle, filter)
 export const newSubmit = appRx.post(API_POST_NEW_SUBMIT, errorCatcher, errorHandle, filter)
 // 换仓
 // 换仓
-export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)
+export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)
+// 退回
+export const goBack = appRx.post(API_POST_GO_BACK, errorCatcher, errorHandle, filter)

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

@@ -15,7 +15,21 @@ import {
   API_POST_SUBMIT,
   API_POST_SUBMIT,
   API_POST_SHOUGUAN,
   API_POST_SHOUGUAN,
   API_POST_SUBMITPAY,
   API_POST_SUBMITPAY,
-  API_GET_WAREHOUSE_NO
+  API_GET_WAREHOUSE_NO,
+  API_GET_EXPENSEINFO,
+  API_SET_EXPENSEINFO,
+  API_GET_SELECTWAREHOUSINGORDER,
+  API_EDIT_EXPENSEINFO,
+  API_LOOK_EXPENSEINFO,
+  API_DEL_EXPENSEINFO,
+  API_DEL_ALLOCATIONINFO,
+  API_PAYMNET,
+  API_GET_CONTRACTEXPENSEINFO,
+  API_GET_CONTRACTDETAILS,
+  API_GET_INVENTORYINFO,
+  API_GET_WAREHOUSETAILS,
+  API_EXPENSECHAT,
+  API_EXPENSECHATLIST
 } from '@/api/V2/profitable'
 } from '@/api/V2/profitable'
 //收支明细列表
 //收支明细列表
 export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
 export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
@@ -35,7 +49,7 @@ export const getLookInfo = appRx.get(API_GET_LOOKINFO, errorCatcher, errorHandle
 export const woekflowhandle = appRx.post(API_POST_WORKFLOW_API_HANDLE, errorCatcher, errorHandle, filter)
 export const woekflowhandle = appRx.post(API_POST_WORKFLOW_API_HANDLE, errorCatcher, errorHandle, filter)
 // 审核记录
 // 审核记录
 export const getAuditRecord = appRx.get(API_POST_AUDITRECORD, errorCatcher, errorHandle, filter)
 export const getAuditRecord = appRx.get(API_POST_AUDITRECORD, errorCatcher, errorHandle, filter)
-// 审核记录
+// 仓库
 export const getwarehouse= appRx.get(API_GET_WAREHOUSE, errorCatcher, errorHandle, filter)
 export const getwarehouse= appRx.get(API_GET_WAREHOUSE, errorCatcher, errorHandle, filter)
 // 费用管理提交
 // 费用管理提交
 export const setexpense = appRx.post(API_POST_SUBMIT, errorCatcher, errorHandle, filter)
 export const setexpense = appRx.post(API_POST_SUBMIT, errorCatcher, errorHandle, filter)
@@ -47,3 +61,31 @@ export const expenseLook = appRx.post(API_GET_LOOK, errorCatcher, errorHandle, f
 export const expensepay= appRx.post(API_POST_SUBMITPAY, errorCatcher, errorHandle, filter)
 export const expensepay= appRx.post(API_POST_SUBMITPAY, errorCatcher, errorHandle, filter)
 // 费用管理编辑 、 收款、付款
 // 费用管理编辑 、 收款、付款
 export const expenseshougou= appRx.post(API_POST_SHOUGUAN, errorCatcher, errorHandle, filter)
 export const expenseshougou= appRx.post(API_POST_SHOUGUAN, errorCatcher, errorHandle, filter)
+// 费用详情列表
+export const getexenseinfo= appRx.get(API_GET_EXPENSEINFO, errorCatcher, errorHandle, filter)
+// 费用管理请款收款
+export const addexenseinfo= appRx.post(API_SET_EXPENSEINFO, errorCatcher, errorHandle, filter)
+// 获取仓库的入库单
+export const getwarehousingorder= appRx.get(API_GET_SELECTWAREHOUSINGORDER, errorCatcher, errorHandle, filter)
+// 费用管理编辑、分配、完成、确认收款、确认分配
+export const editexenseinfo= appRx.post(API_EDIT_EXPENSEINFO, errorCatcher, errorHandle, filter)
+// 查看
+export const lookexenseinfo= appRx.get(API_LOOK_EXPENSEINFO, errorCatcher, errorHandle, filter)
+// 费用管理删除
+export const delexenseinfo= appRx.post(API_DEL_EXPENSEINFO, errorCatcher, errorHandle, filter)
+// 费用管理分配删除
+export const delallocationinfo= appRx.post(API_DEL_ALLOCATIONINFO, errorCatcher, errorHandle, filter)
+// 费用管理付款
+export const expensepayment= appRx.post(API_PAYMNET, errorCatcher, errorHandle, filter)
+// 合同费用,库点费用
+export const getcontractexpenseinfo= appRx.get(API_GET_CONTRACTEXPENSEINFO, errorCatcher, errorHandle, filter)
+// 合同利润详情
+export const getcontractdetails= appRx.get(API_GET_CONTRACTDETAILS, errorCatcher, errorHandle, filter)
+// 合同库存、收购库存
+export const getinventoryinfo= appRx.get(API_GET_INVENTORYINFO, errorCatcher, errorHandle, filter)
+// 库点利润详情
+export const getwarehousedetails= appRx.get(API_GET_WAREHOUSETAILS, errorCatcher, errorHandle, filter)
+// 费用管理图表
+export const getexpensechat= appRx.get(API_EXPENSECHAT, errorCatcher, errorHandle, filter)
+// 费用管理收支表
+export const getexpensechatlist= appRx.get(API_EXPENSECHATLIST, errorCatcher, errorHandle, filter)

+ 11 - 2
src/model/tasksport/index.js

@@ -25,7 +25,10 @@ import {
     API_POST_DEL_HAULAGE_STAGE,
     API_POST_DEL_HAULAGE_STAGE,
     API_GET_STAFF,
     API_GET_STAFF,
     API_GET_TASKHISTORIES,
     API_GET_TASKHISTORIES,
-    API_POST_WORKFLOW_TASK
+    API_POST_WORKFLOW_TASK,
+    API_EDIT_SOURCEOFGOODS,
+    API_GET_SOURCEGOOD,
+    API_SET_CORRECT
 } from '@/api/V2/taskspost'
 } from '@/api/V2/taskspost'
 //运输任务列表
 //运输任务列表
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
@@ -74,4 +77,10 @@ export const delhaulagestage = appRx.post(API_POST_DEL_HAULAGE_STAGE, errorCatch
 //查询审核记录
 //查询审核记录
 export const gettaskhistories = appRx.get(API_GET_TASKHISTORIES, errorCatcher, errorHandle, filter)
 export const gettaskhistories = appRx.get(API_GET_TASKHISTORIES, errorCatcher, errorHandle, filter)
 //获取发货人
 //获取发货人
-export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
+export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
+//货源提交编辑
+export const editSourceOfGoods = appRx.post(API_EDIT_SOURCEOFGOODS, errorCatcher, errorHandle, filter)
+//货源查看
+export const getSourceOfGoods = appRx.get(API_GET_SOURCEGOOD, errorCatcher, errorHandle, filter)
+//矫正
+export const setcorrect = appRx.get(API_SET_CORRECT, errorCatcher, errorHandle, filter)

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

@@ -54,7 +54,11 @@ import {
     API_GET_WAREHOUSE_ALL,
     API_GET_WAREHOUSE_ALL,
     API_SEND_BACK,
     API_SEND_BACK,
     API_DELETE_WAREHOUSE,
     API_DELETE_WAREHOUSE,
-    API_GET_WAREHOUSENAME
+    API_GET_WAREHOUSENAME,
+    API_GET_WAREHOUSINGORDER,
+    API_EDIT_WAREHOUSINGORDER,
+    API_SET_PAYMONEY,
+    // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
 // import { app } from 'electron'
 // 列表
 // 列表
@@ -164,5 +168,11 @@ export const sendback = appRx.post(API_SEND_BACK,errorCatcher, errorHandle, filt
 export const postdeletewarehouse = appRx.post(API_DELETE_WAREHOUSE,errorCatcher, errorHandle, filter)
 export const postdeletewarehouse = appRx.post(API_DELETE_WAREHOUSE,errorCatcher, errorHandle, filter)
 //查看自己负责的仓库
 //查看自己负责的仓库
 export const getwarehousName = appRx.get(API_GET_WAREHOUSENAME,errorCatcher, errorHandle, filter)
 export const getwarehousName = appRx.get(API_GET_WAREHOUSENAME,errorCatcher, errorHandle, filter)
-
-
+//入库单列表
+export const getwarehousingorder = appRx.get(API_GET_WAREHOUSINGORDER,errorCatcher, errorHandle, filter)
+//盘盈、盘亏/入库重量
+export const editwarehousingorder = appRx.post(API_EDIT_WAREHOUSINGORDER,errorCatcher, errorHandle, filter)
+//请款,收款
+export const paymoney = appRx.post(API_SET_PAYMONEY,errorCatcher, errorHandle, filter)
+// //费用详情
+// export const getexenseinfo = appRx.get(API_GET_EXPENSEINFO,errorCatcher, errorHandle, filter)

+ 3 - 1
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -45,7 +45,9 @@
       <el-table-column prop="deductWeight" label="扣重比"></el-table-column>
       <el-table-column prop="deductWeight" label="扣重比"></el-table-column>
       <el-table-column prop="saleLimit" label="销量上限(年/吨)"></el-table-column>
       <el-table-column prop="saleLimit" label="销量上限(年/吨)"></el-table-column>
       <el-table-column prop="dryGrainPrice" label="干粮收购价"></el-table-column>
       <el-table-column prop="dryGrainPrice" label="干粮收购价"></el-table-column>
-      <el-table-column prop="status" label="状态"></el-table-column>
+      <el-table-column prop="status" label="状态">
+        
+      </el-table-column>
       <el-table-column prop="updateDate" label="通过时间"></el-table-column>
       <el-table-column prop="updateDate" label="通过时间"></el-table-column>
       <el-table-column label="操作" width="300">
       <el-table-column label="操作" width="300">
         <template slot-scope="scope">
         <template slot-scope="scope">

+ 1 - 1
src/views/houseSelfCollect/customerManagementAdd.vue

@@ -487,7 +487,7 @@
           })
           })
           .toPromise()
           .toPromise()
           .then((response) => {
           .then((response) => {
-            if (response.bankNameZhihang.length > 0) {
+            if (response.bankNameZhihang) {
               this.bankList = response.bankNameZhihang
               this.bankList = response.bankNameZhihang
             }
             }
             if (response.bankNo) {
             if (response.bankNo) {

+ 5 - 3
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -251,7 +251,7 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </div>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -1714,7 +1714,8 @@
                     if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' ||
                     if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' ||
                         this
                         this
                         .warehouseName == '哈尔滨依兰库' || this
                         .warehouseName == '哈尔滨依兰库' || this
-                        .warehouseName == '白城内陆港')) {
+                        .warehouseName == '白城内陆港'|| this
+                        .warehouseName == '山东园丰库')) {
                       if (this.weighingList.seller && this.weighingList.buyer) {
                       if (this.weighingList.seller && this.weighingList.buyer) {
                         let cang = {}
                         let cang = {}
                         cang.value = this.weighingList.seller
                         cang.value = this.weighingList.seller
@@ -1787,7 +1788,8 @@
                     this.idPrint = response
                     this.idPrint = response
                     if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
                     if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
                         .warehouseName == '哈尔滨依兰库' || this
                         .warehouseName == '哈尔滨依兰库' || this
-                        .warehouseName == '白城内陆港')) {
+                        .warehouseName == '白城内陆港'|| this
+                        .warehouseName == '山东园丰库')) {
                       if (this.weighingList.seller && this.weighingList.buyer) {
                       if (this.weighingList.seller && this.weighingList.buyer) {
                         let cang = {}
                         let cang = {}
                         cang.value = this.weighingList.seller
                         cang.value = this.weighingList.seller

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

@@ -941,7 +941,7 @@
       },
       },
       async typePrintClick(type) {
       async typePrintClick(type) {
         // type 1批量打印 0单个打印
         // type 1批量打印 0单个打印
-        //  this.isShowPrint = true
+        //  this.isShowPrint = true
         this.selectCustomerList = []
         this.selectCustomerList = []
         this.selectPrintList = []
         this.selectPrintList = []
         if (type == 1) {
         if (type == 1) {
@@ -961,7 +961,7 @@
                   index2 == this.modification.length
                   index2 == this.modification.length
                 ) {
                 ) {
                   this.printData.compName = ''
                   this.printData.compName = ''
-                  // this.isShowPrint = true
+                  // this.isShowPrint = true
                   this.printBig()
                   this.printBig()
                 }
                 }
                 getpaymentexamine({
                 getpaymentexamine({
@@ -987,7 +987,7 @@
                       index2 == this.modification.length
                       index2 == this.modification.length
                     ) {
                     ) {
                       this.printData.compName = ''
                       this.printData.compName = ''
-                      // this.isShowPrint = true
+                      // this.isShowPrint = true
                       this.printBig()
                       this.printBig()
                     }
                     }
                   })
                   })
@@ -1908,4 +1908,4 @@
     border-top-right-radius: 0px;
     border-top-right-radius: 0px;
     border-bottom-right-radius: 0px;
     border-bottom-right-radius: 0px;
   }
   }
-</style>
+</style>

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

@@ -136,7 +136,7 @@
         <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
         <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
           <div>收货单位:</div>
           <div>收货单位:</div>
           <!-- <div>{{companyName}}</div> -->
           <!-- <div>{{companyName}}</div> -->
-          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;" v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;" v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
             <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
             <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
           </el-select>
           </el-select>
           <el-select v-model="companyName1" placeholder="请选择" style="width: 75%;" v-else>
           <el-select v-model="companyName1" placeholder="请选择" style="width: 75%;" v-else>
@@ -144,7 +144,7 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </div>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -546,7 +546,7 @@
                 this.dialogDataList.push(_datas)
                 this.dialogDataList.push(_datas)
              }else{
              }else{
               // this.dialogData.compName = this.companyName
               // this.dialogData.compName = this.companyName
-               if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'){
+               if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库'){
                  this.dialogData.companyName = this.companyName
                  this.dialogData.companyName = this.companyName
                }else{
                }else{
                  this.dialogData.companyName = this.companyName1
                  this.dialogData.companyName = this.companyName1
@@ -574,7 +574,7 @@
               .toPromise()
               .toPromise()
               .then((response) => {
               .then((response) => {
                 index1++;
                 index1++;
-                if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'){
+                if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库'){
                   response.compName = this.companyName
                   response.compName = this.companyName
                }else{
                }else{
                  response.compName = this.companyName1
                  response.compName = this.companyName1

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

@@ -200,7 +200,7 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </div>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||this.warehouseName=='山东园丰库'">
           <div class="print-type-ew">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>

+ 3 - 3
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -105,7 +105,7 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </div>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -581,7 +581,7 @@
             return
             return
           }
           }
           for (let _num = 0; _num < this.modification.length; _num++) {
           for (let _num = 0; _num < this.modification.length; _num++) {
-            if (this.modification[_num].serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库')) {
+            if (this.modification[_num].serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库')) {
               if (this.modification[_num].seller && this.modification[_num].buyer) {
               if (this.modification[_num].seller && this.modification[_num].buyer) {
                 let cang = {}
                 let cang = {}
                 cang.value = this.modification[_num].seller
                 cang.value = this.modification[_num].seller
@@ -600,7 +600,7 @@
           }
           }
           this.isShowPrintType = true
           this.isShowPrintType = true
         } else {
         } else {
-          if (row.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库')) {
+          if (row.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库')) {
             if (row.seller && row.buyer) {
             if (row.seller && row.buyer) {
               let cang = {}
               let cang = {}
               cang.value = row.seller
               cang.value = row.seller

+ 2 - 2
src/views/outboundManagement/component/outInspectPrint.vue

@@ -15,7 +15,7 @@
         <td class="col col-bgc">发货单位</td>
         <td class="col col-bgc">发货单位</td>
         <td class="col" colspan="2">{{ printData.contractManagement ? printData.contractManagement.seller:"" }}</td>
         <td class="col" colspan="2">{{ printData.contractManagement ? printData.contractManagement.seller:"" }}</td>
         <td class="col col-bgc">联系人</td>
         <td class="col col-bgc">联系人</td>
-        <td class="col" colspan="2">{{ printData.contractManagement ? printData.contractManagement.feedbackLeader:"" }}</td>
+        <td class="col" colspan="2">{{ printData.contractManagement ? printData.contractManagement.wo1kan:"" }}</td>
         <td class="col col-bgc">联系电话</td>
         <td class="col col-bgc">联系电话</td>
         <td class="col">{{ printData.contractManagement ? printData.contractManagement.sellerPhone:"" }}</td>
         <td class="col">{{ printData.contractManagement ? printData.contractManagement.sellerPhone:"" }}</td>
       </tr>
       </tr>
@@ -39,7 +39,7 @@
         <td v-if="printData.contractManagement.priceType == '定价销售'" class="col col-bgc">单价(元/公斤)</td>
         <td v-if="printData.contractManagement.priceType == '定价销售'" class="col col-bgc">单价(元/公斤)</td>
         <td v-else class="col col-bgc">待定单价(元/公斤)</td>
         <td v-else class="col col-bgc">待定单价(元/公斤)</td>
         <!-- <td v-if="printData.type == '潮粮'" class="col">{{ printData.tidalGrainPrice }}</td> -->
         <!-- <td v-if="printData.type == '潮粮'" class="col">{{ printData.tidalGrainPrice }}</td> -->
-        <td class="col">{{ contractManagement ? printData.contractManagement.unitContractPrice:"" }}</td>
+        <td class="col">{{ printData.contractManagement ? printData.contractManagement.unitContractPrice:"" }}</td>
       </tr>
       </tr>
       <tr class="row">
       <tr class="row">
         <td class="col col-bgc">杂质(%)</td>
         <td class="col col-bgc">杂质(%)</td>

+ 1 - 1
src/views/outboundManagement/weighingManagementNew.vue

@@ -2122,4 +2122,4 @@
   /deep/.title_css .el-dialog__header {
   /deep/.title_css .el-dialog__header {
     text-align: center !important;
     text-align: center !important;
   }
   }
-</style>
+</style>

+ 15 - 1
src/views/outboundManagement/weighingManagementrecord.vue

@@ -76,6 +76,7 @@
           <el-button @click="del(scope.row)" v-if="scope.row.status == '已称皮重'"
           <el-button @click="del(scope.row)" v-if="scope.row.status == '已称皮重'"
             v-hasPermission="`outbound.acquisitionWeightOut.view`">删除</el-button>
             v-hasPermission="`outbound.acquisitionWeightOut.view`">删除</el-button>
              <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称皮重'">换仓</el-button>
              <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称皮重'">换仓</el-button>
+             <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="returnBack(scope.row)" v-if="scope.row.status == '已称毛重'">退回</el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -132,7 +133,8 @@
     selectWarehouseSelf,
     selectWarehouseSelf,
     delelteWeighing,
     delelteWeighing,
     getweighing,
     getweighing,
-    changeNo
+    changeNo,
+    goBack
   } from '@/model/outboundManagement/index'
   } from '@/model/outboundManagement/index'
   import {
   import {
     EventBus
     EventBus
@@ -183,6 +185,18 @@
       this.showType = this.isShow
       this.showType = this.isShow
     },
     },
     methods: {
     methods: {
+      returnBack(item){   
+          goBack({id:item.id}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '退回成功',
+                })
+                this.getList()
+						}) .catch(() => {
+            return false
+          })
+      },
        binNumberChange(e){
        binNumberChange(e){
         this.binNumber = e
         this.binNumber = e
         for(let i = 0 ; i < this.binnumberList.length ; i++){
         for(let i = 0 ; i < this.binnumberList.length ; i++){

+ 743 - 0
src/views/profitable/cashout.vue

@@ -0,0 +1,743 @@
+//请款
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">请款</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+     
+      <div>
+        <el-form label-position="left"><div style='margin:30px 0 30px;'>基本信息</div>
+          <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" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="合同费用"' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select v-model="deptBudgetList.type" placeholder="" class="typeselect" >
+                <ws-option label="粮款" value="粮款" style="color: #8890b1" />
+                <ws-option label="非粮款" value="非粮款" style="color: #8890b1" />
+                <ws-option label="保证金" value="保证金" 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">
+            <el-select v-model="deptBudgetList.contractNo" placeholder="选择合同" class="typeselect" @change="selectcontract">
+              <el-option v-for="item in contractList" :key="item.contractNo" :label="item.contractNo" :value="item.contractNo"
+                style="color: #8890b1" />
+            </el-select>
+          </el-form-item>
+           <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓库名称" span="1" prop="contractNo" class="readonly">
+            <el-select v-model="deptBudgetList.warehouseName" placeholder="选择仓库" class="typeselect" @change="selectwarehouse">
+              <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
+                style="color: #8890b1" />
+            </el-select>
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            <el-input class='input50 input_css' placeholder="输入费用名称,1-15个字" v-model="deptBudgetList.expenseName"></el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            <el-input class='input50 input_css' placeholder="输入请款金额" v-model="deptBudgetList.amountMoney"></el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+            :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        </el-form>
+        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' class='expensetitle'>费用分配</div>
+        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' style='margin:0  auto 10px;width:90%;'>
+            <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">
+          <ws-option v-for="item in wareList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <ws-select v-if='deptBudgetList.purpose==2' v-model="goods" placeholder="费用分配产品" class="typeselect" @change="selectproductType"
+          :value="searchType">
+          <ws-option v-for="item in goodsList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+         <ws-select v-model="dates" placeholder="费用分配日期" class="typeselect" @change="selecttaskType"
+          :value="searchType">
+          <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-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>
+        <el-table 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">
+            <template slot-scope="scope">
+              <ws-select 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"
+                  style="color: #8890b1" />
+              </ws-select>
+            </template>
+          </el-table-column>
+          <el-table-column 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)})">
+                <ws-option v-for="item in datelist" :key="item.time" :label="item.time" :value="item.time"
+                  style="color: #8890b1" />
+              </ws-select>
+            </template>
+          </el-table-column>
+          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+            <template slot-scope="scope">
+                <el-date-picker @change="receiptDocDatechange" 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="货源">
+              <template slot-scope="scope">
+                <ws-select v-model="scope.row.orderId" 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.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="入库量(吨)">
+            <template slot-scope="scope">
+               <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column 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">
+            <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="">
+            </template>
+          </el-table-column>
+        </el-table>
+       <div style='text-align:right;margin-right:30px;'>
+        <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交
+        </el-button>
+    </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        mode:'全部分配',
+        moneys:'按重量自动分配',
+        dataList:[],
+        goodsList:[],
+        disabled:false,
+        warecontractList:[],
+        dateRange: this.disabledDate(),
+        feeDetailsDistributions:[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0}],
+        deptBudgetList:{purpose:"合同费用",type:'粮款'},
+        makeWordData: {},
+        warehouseList:[],
+        contractList:[],
+        choosablewareList:[],
+        paymentScreenshot:[],
+        goodsourcelist:[],
+        signingDate:'',
+        datelist:[],
+        modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
+        wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
+        datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
+        moneysList:[{key:1,value:'按重量自动分配'},{key:2,value:'指定分配金额'}],
+        goodsList:[{key:1,value:'全部货品'},{key:2,value:'指定货品'}],
+        
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+
+    },
+    activated() {
+      // this.makeWordData = this.getData(2)
+      // this.initCharts()
+      // this.getPassYearFormatDate()
+      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)
+          }
+        }
+        return num
+      }
+    },
+    methods: {
+      selectwarehouse(e){
+      },
+      disabledDate() {
+        let that = this
+        return {
+          disabledDate(time) {
+            var firstDay = new Date(new Date(that.signingDate).getTime());
+            var lastDay = new Date(new Date().getTime());
+            lastDay.setFullYear(lastDay.getFullYear() + 1);
+            firstDay = that.timeFun(firstDay) //转格式 yyyy-MM-dd
+            lastDay = that.timeFun(lastDay) //转格式 yyyy-MM-dd
+            return time.getTime() < new Date(firstDay).getTime()
+                   ||
+                   time.getTime() > new Date(lastDay).getTime()
+          }
+        }
+      },
+      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)      
+      },
+      selectware(e,item){
+        this.datelist=[]
+        getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
+          .then(response => {
+            for (let i = 0; i < response.length; i++) {
+              this.datelist.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+            }
+          })
+      },
+      selectgoodsSource(e,item){
+        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=''
+            }
+          }
+          this.$message({
+                message: '请输入金额之后进行操作',
+                type: 'warning',
+              })
+          return
+        }
+        for (let i = 0; i < this.goodsourcelist.length; i++) {
+          if(this.goodsourcelist[i].id==e){
+            item.goodsSource=this.goodsourcelist[i].goodsSource
+            item.inWarehouseWeight=this.goodsourcelist[i].weight
+            item.goodsName=this.goodsourcelist[i].goodsName
+            item.goodsNameKey=this.goodsourcelist[i].goodsNameKey
+            }
+        }
+        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++) {
+            // console.log(weight,this.feeDetailsDistributions[i].inWarehouseWeight)
+            if(i=this.feeDetailsDistributions.length-1&&i!=0){
+              console.log(i)
+              this.feeDetailsDistributions[i].distributionMoney=this.deptBudgetList.amountMoney-money
+            }else{
+              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+              money+=this.feeDetailsDistributions[i].distributionMoney
+            }
+            
+          }
+        }
+      },
+      selecttime(e,item){
+        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.$message({
+                message: '请输入金额之后进行操作',
+                type: 'warning',
+              })
+          return
+        }
+        for (let i = 0; i < this.datelist.length; i++) {
+          if(this.datelist[i].time==e){
+            item.orderId=this.datelist[i].id
+            item.inWarehouseWeight=this.datelist[i].weight
+          }
+        }
+        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++) {
+            // console.log(weight,this.feeDetailsDistributions[i].inWarehouseWeight)
+            if(i=this.feeDetailsDistributions.length-1&&i!=0){
+              this.feeDetailsDistributions[i].distributionMoney=this.deptBudgetList.amountMoney-money
+            }else{
+              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+              money+=this.feeDetailsDistributions[i].distributionMoney
+            }
+          }
+        }
+        // console.log(this.feeDetailsDistributions)
+      },
+      receiptDocDatechange(e){
+        this.goodsourcelist=[]
+        getwarehousingorder({warehouseName:this.deptBudgetList.warehouseName,receiptDocDate:e}).toPromise()
+          .then(response => {
+            for (let i = 0; i < response.length; i++) {
+              this.goodsourcelist.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
+            }
+          })
+      },
+      selectcontent(e){
+
+      },
+      selectcontract(e){
+        console.log(e)
+        for (let i = 0; i < this.contractList.length; i++) {
+          console.log(this.contractList[i])
+          if(this.contractList[i].contractNo==e){
+            this.signingDate=this.contractList[i].signingDate
+            // this.disabledDate()
+          }
+        }
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      handlefujian(file) {
+        // console.log(file)
+        this.paymentScreenshot.push(file.url)
+        // this.dialogVisible = true
+      },
+      handleRemove(file) {
+        // console.log(file)
+        for (let i = 0; i < this.paymentScreenshot.length; i++) {
+          if(this.paymentScreenshot[i]==response.url){
+            this.paymentScreenshot.splice(i, 1)
+          }
+          
+        }
+      },
+      // 获取当前年月日
+			getdate() {
+				var date = new Date()
+				var year = date.getFullYear() //获取完整的年份(4位)
+				var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+				var datetime = date.getDate() //获取当前日(1-31)
+				var hour = date.getHours()
+				var minutes = date.getMinutes()
+				var seconds = date.getSeconds()
+				if (mouth < 10) {
+					mouth = '0' + mouth
+				}
+				if (datetime < 10) {
+					datetime = '0' + datetime
+				}
+				if (hour < 10) {
+					hour = '0' + hour
+				}
+				if (minutes < 10) {
+					minutes = '0' + minutes
+				}
+				if (seconds < 10) {
+					seconds = '0' + seconds
+				}
+				return year + '' + mouth + datetime + hour + minutes + seconds
+			},
+      MathRand() {
+				var Num = ''
+				for (var i = 0; i < 4; i++) {
+					Num += Math.floor(Math.random() * 10)
+				}
+				return Num
+			},
+      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
+          this.deptBudgetList.costNo='HTF'+this.getdate()+this.MathRand()
+        }else if(this.deptBudgetList.purpose=='库点费用'){
+          this.deptBudgetList.expensesPurpose=3
+          this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
+           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()
+        }
+        if(this.deptBudgetList.expensesPurpose==1){
+          if(this.deptBudgetList.type=='粮款'){
+            this.deptBudgetList.costType=1
+            this.deptBudgetList.expenseAllocationInfoList=[]
+          }else if(this.deptBudgetList.type=='非粮款'){
+            this.deptBudgetList.costType=3
+            this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
+          }else if(this.deptBudgetList.type=='保证金'){
+            this.deptBudgetList.expensesPurpose=5
+            this.deptBudgetList.expenseAllocationInfoList=[]
+          }
+        }
+         if(this.deptBudgetList.expensesPurpose==1){
+        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
+              })
+              if(repetition.length==0){
+                data.push(this.feeDetailsDistributions[i])
+              }else{
+                this.$message({
+                    message: '货源重复!',
+                    type: 'warning',
+                  })
+                  return
+              }
+              // for (let q = 0; q < data.length; q++) {
+              //   if(data[q].warehouseName==this.feeDetailsDistributions[i].warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==data[q].receiptDocDate){
+              //     this.$message({
+              //       message: '请不要选择一样的入库单!',
+              //       type: 'warning',
+              //     })
+              //   }
+              // }
+            }
+            
+          }
+        }
+        if(this.deptBudgetList.expensesPurpose==3){
+        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
+              })
+              if(repetition.length==0){
+                data.push(this.feeDetailsDistributions[i])
+              }else{
+                this.$message({
+                    message: '货源重复!',
+                    type: 'warning',
+                  })
+                  return
+              }
+              // for (let q = 0; q < data.length; q++) {
+              //   if(data[q].warehouseName==this.feeDetailsDistributions[i].warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==data[q].receiptDocDate){
+              //     this.$message({
+              //       message: '请不要选择一样的入库单!',
+              //       type: 'warning',
+              //     })
+              //   }
+              // }
+            }
+            
+          }
+        }
+        this.deptBudgetList.expensesType=2
+        if(!this.deptBudgetList.contractNo&&this.deptBudgetList.expensesPurpose==1){
+          this.$message({
+                message: '合同编号不能为空!',
+                type: 'warning',
+              })
+              return
+        }
+        if(!this.deptBudgetList.warehouse&&this.deptBudgetList.expensesPurpose==3){
+          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.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: '费用名称不能为空!',
+                type: 'warning',
+          })
+          return
+        }
+        if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
+          this.$message({
+                message: '费用名称输入错误!',
+                type: 'warning',
+          })
+        }
+        if(!this.deptBudgetList.amountMoney){
+          this.$message({
+                message: '金额不能为空!',
+                type: 'warning',
+          })
+          return
+        }
+        if(this.deptBudgetList.amountMoney<0.01||this.deptBudgetList.amountMoney>100000000){
+          this.$message({
+                message: '金额输入错误!',
+                type: 'warning',
+          })
+          return
+        }
+        this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
+        this.$confirm('确定提交请款信息', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+        addexenseinfo(this.deptBudgetList).toPromise()
+          .then(response => {
+            this.$message({
+              message: '提交成功!',
+              type: 'success',
+            })
+            this.$router.go(-1)
+          })
+          })
+      },
+      modeselect(e){
+        if(e=='全部分配'){
+          this.moneys='按重量自动分配'
+          this.disabled=false
+        }else if(e=='部分分配'){
+          this.moneys='指定分配金额'
+          this.disabled=true
+        }
+      },
+      goodsNameselect(e){
+          console.log(e)
+      },
+      addlist(){
+        this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
+      },
+      dellist(row){
+        if(this.feeDetailsDistributions.length>1){
+          this.feeDetailsDistributions.splice(row.index,1)
+        }else{
+          this.$message({
+            message: '至少保留一条!',
+            type: 'warning',
+          })
+        }
+      },
+      getList() {
+        getcontract({
+        compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+        getwarehouse({
+        compId:localStorage.getItem('ws-pf_compId'),
+        warehouseType:1
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList=response
+        })
+
+      },
+      detail(){
+        this.$router.push({name:'contractprofitsdetails'})
+      },
+      pickerOptions() {
+
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+  }
+  .expensetitle{
+    margin:0  auto 10px;width:90%;border-top:1px solid #D8DCE6;padding-top:30px;
+  }
+  /deep/.input50>.el-input__inner{
+    width:50%;
+  }
+  /deep/.typeselect.el-select{
+    width:50%;
+  }
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+    .el-form-item__label{
+      color:#8890B1;
+    }
+  }
+
+  /deep/.el-form-item {
+    width: 50%;
+}
+.add,.del{
+  width:25px;height:25px;
+}
+</style>

+ 432 - 0
src/views/profitable/cashoutaduit.vue

@@ -0,0 +1,432 @@
+//审核请款
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">审核请款</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <div >
+        <el-form label-position="left">
+          <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="3"
+                style="color: #8890b1" />
+                <ws-option label="经营性费用" value="5"
+                style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose==1' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select disabled v-model="deptBudgetList.costType" placeholder="" class="typeselect" >
+                <ws-option label="粮款" value="1" style="color: #8890b1" />
+                <ws-option label="非粮款" value="3" style="color: #8890b1" />
+                <ws-option label="保证金" value="5" style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
+          {{deptBudgetList.warehouse}}
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==1' label-width='100px' label="合同编号" span="1" prop="contractNo" class="readonly">
+          {{deptBudgetList.contractNo}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            {{deptBudgetList.expenseName}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            {{deptBudgetList.amountMoney}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            disabled
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <div>
+            <span v-for='item in srcList'><el-image
+              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
+              :src="item"
+               :preview-src-list="srcList"></el-image></span>
+             
+          </div>
+        </el-form-item>
+        </el-form>
+        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==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="deptBudgetList.expenseAllocationInfoList">
+            <el-table-column v-if='deptBudgetList.purpose=="合同费用"' 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"
+                    style="color: #8890b1" />
+                </ws-select>
+              </template>
+            </el-table-column>
+            <el-table-column v-if='deptBudgetList.expensesPurpose==1' 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"
+                    style="color: #8890b1" />
+                </ws-select>
+              </template>
+            </el-table-column>
+            <el-table-column 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>
+              </template>
+            </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-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="货名">
+              <template slot-scope="scope">
+                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column 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="分配金额(元)">
+              <template slot-scope="scope">
+                  <el-input disabled placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
+              </template>
+            </el-table-column>
+          </el-table>
+
+      </div>
+      <div>
+        <div style='width:90%;margin:10px auto;text-align:right;'>
+          <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>
+        </div>
+      
+    </div>
+    <el-dialog
+      title="驳回"
+      :visible.sync="rejectshow"
+      width="30%"
+      :before-close="handleClose">
+      <span>驳回原因</span>
+      <div><el-input
+  type="textarea"
+  :rows="2"
+  placeholder="请输入驳回原因"
+  v-model="textarea">
+</el-input>
+</div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="rejectclick">确 定</el-button>
+      </span>
+    </el-dialog>
+    </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,lookexenseinfo} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        mode:'全部分配',
+        ware:'指定仓库',
+        dates:'固定日期',
+        moneys:'按重量自动分配',
+        goods:'全部货品',
+        goodsList:[],
+        warecontractList:[],
+        feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
+        deptBudgetList:{},
+        makeWordData: {},
+        warehouseList:[],
+        rejectshow:false,
+        modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
+        wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
+        datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
+        moneysList:[{key:1,value:'按重量自动分配'},{key:2,value:'指定分配金额'}],
+        goodsList:[{key:1,value:'全部货品'},{key:2,value:'指定货品'}],
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      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)
+          }
+        }
+        return num
+      }
+    },
+    methods: {
+      pass(){
+         this.$confirm('确认通过请款信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            woekflowhandle({
+                taskId: this.deptBudgetList.taskId,
+                approved: true,
+                auditMind: '34',
+                needReapply: false,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$message({
+                  message: '通过成功!',
+                  type: 'success',
+                })
+                this.$router.go(-1)
+              }).catch((response) => {
+                this.$message({
+                  message: '通过失败!',
+                  type: 'success',
+                })
+              })
+          })
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      reject(){
+        this.rejectshow=true
+      },
+      rejectclick(){
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: '34',
+          needReapply: false,
+        }).toPromise()
+        .then((response) => {
+          this.$message({
+            message: '驳回成功!',
+            type: 'success',
+          })
+          this.$router.go(-1)
+        }).catch((response) => {
+          this.$message({
+            message: '驳回失败!',
+            type: 'success',
+          })
+        })
+      },
+      modeselect(e){
+          console.log(e)
+      },selectware(e){
+          console.log(e)
+      },
+      goodsNameselect(e){
+          console.log(e)
+      },
+      addlist(){
+        this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
+      },
+      dellist(row){
+          this.feeDetailsDistributions.splice(row.index,1)
+      },
+      getList() {
+       getcontract({
+        compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+        getwarehouse({
+        compId:localStorage.getItem('ws-pf_compId'),
+        warehouseType:1
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList=response
+        })
+        lookexenseinfo({
+         id:this.$route.query.id
+        })
+        .toPromise()
+        .then((response) => {
+          if(response.costType==1){
+            response.type='粮款'
+          }else if(response.costType==3){
+            response.type='非粮款'
+          }else if(response.costType==5){
+            response.type='保证金'
+          }
+          this.deptBudgetList=response 
+          if(response.addressUrl){
+            var arr=[]
+            var srcs=response.addressUrl.split(',')
+            this.srcList=srcs
+          }
+          if(response.expenseAllocationInfoList){
+            this.feeDetailsDistributions=response.expenseAllocationInfoList
+          }
+          
+          
+        })
+
+      },
+      detail(){
+        this.$router.push({name:'contractprofitsdetails'})
+      },
+      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 (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
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+    .el-form-item__label{
+      color:#8890B1;
+    }
+  }
+  /deep/.el-form-item {
+    width: 50%;
+}
+</style>

+ 0 - 33
src/views/profitable/component/routers/route.js

@@ -249,39 +249,6 @@ const profitableRouter = {
     //   },
     //   },
     //   hidden:true,
     //   hidden:true,
     // },
     // },
-    // // 费用管理收款
-    // {
-    //   path: 'receipt',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/profitable/receipt'),
-    //   name: 'receipt',
-    //   meta: {
-    //     title: 'receipt',
-    //     shortcutEntrance: 'profitable',
-    //     module: 'contractManagement.exContract.exContractInfo.view',
-    //     permissicon: [],
-    //     keepAlive: true
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden:true,
-    // }, 
-    
-    // // 费用管理收款确认
-    // {
-    //   path: 'receiptaduit',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/profitable/receiptaduit'),
-    //   name: 'receiptaduit',
-    //   meta: {
-    //     title: 'receiptaduit',
-    //     shortcutEntrance: 'profitable',
-    //     module: 'contractManagement.exContract.exContractInfo.view',
-    //     permissicon: [],
-    //     keepAlive: true
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden:true,
-    // }, 
     // // 费用管理付款
     // // 费用管理付款
     // {
     // {
     //   path: 'payment',
     //   path: 'payment',

+ 294 - 0
src/views/profitable/contractcost.vue

@@ -0,0 +1,294 @@
+//合同费用
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">合同费用</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+ <ws-select v-model="contractNo" placeholder="" class="typeselect"  @change='changecontract'>
+          <ws-option v-for="item in contractList"  :key="item.id" :label="item.contractNo+item.contractType==2?'(采购)':item.contractType==1?'(销售)':item.contractType==3?'(代收)':'(代储)'" :value="item.contractNo"
+            style="color: #8890b1" />
+        </ws-select>
+        <span>{{name}}</span>
+            <!-- <el-input placeholder="可按合同名称、买方名称、卖方名称查找" class="input_css" v-model="searchKeyWord"></el-input> -->
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+          </div>
+        </el-col>
+      </el-row>
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="18">
+        支出粮款:{{foodExpenditure}}元   收入粮款:{{grainIncome}}元    费用收入:{{expenseIncome}}元    费用支出:{{expensesPay}}元    当期利润: {{currentProfit}}元 
+        </el-col>
+        <el-col :span="6">
+
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="index" label="序号">
+            <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="feeType" label="类型">
+            <template slot-scope="scope">
+              <div v-if='scope.row.expensesType==1'>收入</div>
+              <div v-if='scope.row.expensesType==2'>支出</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="expensesName" label="费用名称"></el-table-column>
+          <el-table-column prop="warehouseName" label="所属库点"></el-table-column>
+          <el-table-column prop="expensesPrice" label="费用金额"></el-table-column>
+          <el-table-column prop="personName" label="请款人/收款人"></el-table-column>
+          <el-table-column prop="payDeadline" label="日期"></el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+    
+  </div>
+</template>
+<script>
+  import {
+    getcontractexpenseinfo,
+    getcontract
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        contractList:[],
+        taskTypeList:[],
+        searchType:"",
+        contractNo:'',
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        outtotal:0,
+        intotal:0,
+        foodExpenditure:0,
+        grainIncome:0,
+        expenseIncome:0,
+        expensesPay:0,
+        currentProfit:0,
+      }
+    },
+    activated() {
+      this.contractNo=this.$route.query.contractNo
+        //  this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      changecontract(e){
+          for (let i = 0; i < this.contractList.length; i++) {
+            if(this.contractList[i].contractNo==e){
+              if(this.contractList[i].contractType==2){
+                this.name=this.contractList[i].seller
+              }else{
+                this.name=this.contractList[i].buyer
+              }
+            }
+          }
+        },
+      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 (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
+          this.value=[this.startDate,this.endDate]
+        },
+      getList() {
+         getcontract({
+        compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+         getcontractexpenseinfo({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            contractNo:this.contractNo,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            costType:1
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+            if(this.tableData){
+              this.foodExpenditure=0
+              this.grainIncome=0
+              this.expenseIncome=0
+              this.expensesPay=0
+              this.currentProfit=0
+              for (let i = 0; i < this.tableData.length; i++) {
+                if(this.tableData[i].foodExpenditure){
+                  this.foodExpenditure+=Number(this.tableData[i].foodExpenditure)
+                }
+                if(this.tableData[i].grainIncome){
+                  this.grainIncome+=Number(this.tableData[i].grainIncome)
+                }
+                if(this.tableData[i].expenseIncome){
+                  this.expenseIncome+=Number(this.tableData[i].expenseIncome)
+                }
+                if(this.tableData[i].expensesPay){
+                  this.expensesPay+=Number(this.tableData[i].expensesPay)
+                }
+                if(this.tableData[i].currentProfit){
+                  this.currentProfit+=Number(this.tableData[i].currentProfit)
+                }
+              }
+            }
+            
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+</style>

+ 253 - 0
src/views/profitable/contractinventory.vue

@@ -0,0 +1,253 @@
+//合同库存
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">库存分布</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+        <ws-select v-model="contractNo" placeholder="" class="typeselect" @change='changecontract'>
+          <ws-option v-for="item in contractList"  :key="item.id" :label="item.contractNo+item.contractType==2?'(采购)':item.contractType==1?'(销售)':item.contractType==3?'(代收)':'(代储)'" :value="item.contractNo"
+            style="color: #8890b1" />
+        </ws-select>
+         <span>{{name}}</span>
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="index" label="序号">
+            <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="warehouse" label="仓库名称"></el-table-column>
+          <el-table-column prop="inStorage" label="入库量(吨)"></el-table-column>
+          <el-table-column prop="saleStorage" label="销售量(吨)"></el-table-column>
+          <el-table-column prop="removeStorage" label="移出量(吨)"></el-table-column>
+          <el-table-column prop="loss" label="盘亏(吨)"></el-table-column>
+          <el-table-column prop="surplus" label="盘盈(吨)"></el-table-column>
+          <el-table-column prop="cost" label="成本(元/吨)"></el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    getinventoryinfo,
+    getcontract
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        contractList:[],
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        taskTypeList:[],
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        name:'',
+        outtotal:0,
+        intotal:0,
+      }
+    },
+    activated() {
+         this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      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 (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
+          this.value=[this.startDate,this.endDate]
+        },
+        changecontract(e){
+          for (let i = 0; i < this.contractList.length; i++) {
+            if(this.contractList[i].contractNo==e){
+              if(this.contractList[i].contractType==2){
+                this.name=this.contractList[i].seller
+              }else{
+                this.name=this.contractList[i].buyer
+              }
+            }
+          }
+        },
+      getList() {
+        getcontract({
+        compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+         getinventoryinfo({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            inventoryType:1,
+            searchType:this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+            
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+</style>

+ 396 - 0
src/views/profitable/contractprofits.vue

@@ -0,0 +1,396 @@
+//合同利润
+<template>
+  <div class="container">
+    <!-- <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">盈收概览</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row> -->
+    <div class="center">
+      <el-row class='row_top'>
+      <el-col :span="12">
+        <div class="datascreen">
+        <el-date-picker v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+        
+
+
+        
+      </div>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button type='primary' @click='detail'>利润详情</el-button></el-col>
+    </el-row>
+      <div class="chart_css">
+        <div class="table">
+          <div ref="myEchart7" style="height: 410px;"></div>
+        </div>
+        <div class="makeWord_css">
+          <!-- <div ref="myEchart6" style="height: 410px"></div> -->
+        </div>
+      </div>
+      <div class="table_css">
+        <div style='margin:0 auto;' ><div class='title' style='margin-bottom:10px;'>合同利润汇总表</div>
+        <div class='time' style=''>{{value[0]}}-{{value[1]}}</div></div>
+        <ws-form>
+          <ws-info-table>
+          <ws-form-item label="采购重量(吨)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="销售重量(吨)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+          <ws-form-item label="支付粮款(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="收入粮款(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+          <ws-form-item label="其他支付(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="其他收入(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+          <ws-form-item label="运费(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="总利润(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+        </ws-info-table>
+        </ws-form>
+        
+        
+        <!-- <el-table :data="valueData" style="width: 100%">
+          <el-table-column prop="date" label="货名/货值" min-width="110">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">期初货值(元)</span>
+              <span v-if="scope.$index == 1">期末货值(元)</span>
+            </div>
+
+          </el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="合计" min-width="130">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">合计:</span>
+              <span v-if="scope.$index == 1">合计:1000000000</span>
+            </div>
+          </el-table-column>
+        </el-table> -->
+
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        deptBudgetList:{},
+        makeWordData: {},
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.makeWordData = this.getData(2)
+      this.initCharts()
+      this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      getList() {
+        // getceshi({
+        //  driverId:'8f1f3c624d7946d79a9d44a4057d969b'
+        // })
+        // .toPromise()
+        // .then((response) => {
+        // debugger
+        // console.log(response)
+        // })
+
+      },
+      detail(){
+        this.$router.push({name:'contractprofitsdetails'})
+      },
+      getPassYearFormatDate() {
+        var nowDate = new Date()
+        var _date = new Date()
+        var year = nowDate.getFullYear()-1
+        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
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+      initCharts() {
+        let app = this;
+        let myChart7 = app.$echarts.init(this.$refs.myEchart7);
+        var option;
+        option = {
+            // title: {
+            //   text: 'Rainfall vs Evaporation',
+            //   subtext: 'Fake Data'
+            // },
+            tooltip: {
+              trigger: 'axis'
+            },
+            legend: {
+              data: ['支出', '收入']
+            },
+            toolbox: {
+              show: true,
+              feature: {
+                dataView: {
+                  show: false,
+                  readOnly: false
+                },
+                magicType: {
+                  show: false,
+                  type: ['line', 'bar']
+                },
+                restore: {
+                  show: false
+                },
+                saveAsImage: {
+                  show: false
+                }
+              }
+            },
+            calculable: true,
+            xAxis: [{
+              name: '种类',
+              type: 'category',
+              // prettier-ignore
+              data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']
+            }],
+            yAxis: [{
+              name: '利润(万元)',
+              type: 'value'
+            }],
+            series: [{
+                name: '支出',
+                type: 'bar',
+                right: 0,
+                // label: {
+                //   show: true,
+                //   position: 'inside'
+                // },
+                 label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: [
+                  6.0, 60.9, 90.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0
+                ],
+                color: ['#5878E8 '],
+                formatter: '{value} 元',
+
+              },
+              {
+                name: '收入',
+                type: 'bar',
+                right: 20,
+                label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: [
+                  102.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8
+                ],
+                color: ['#FF9F24'],
+                formatter: '{value} 元',
+              }
+            ]
+          },
+          myChart7.setOption(option)
+      },
+      getData(count) {
+        // prettier-ignore
+        const nameList = [
+          '支出', '收入'
+        ];
+        const legendData = [];
+        const seriesData = [];
+        for (var i = 0; i < count; i++) {
+          var name = nameList[i]
+          // Math.random() > 0.65 ?  makeWord(4, 1) + '·' + makeWord(3, 0) :  makeWord(2, 1);
+          legendData.push(name);
+          seriesData.push({
+            name: name,
+            value: Math.round(Math.random() * 100000)
+          });
+        }
+
+        return {
+          legendData: legendData,
+          seriesData: seriesData
+        };
+
+        // function makeWord(max, min) {
+        //   debugger
+        //   const nameLen = Math.ceil(Math.random() * max + min);
+        //   const name = [];
+        //   for (var i = 0; i < nameLen; i++) {
+        //     name.push(nameList[Math.round(Math.random() * nameList.length - 1)]);
+        //   }
+        //   return name.join('');
+        // }
+
+      }
+    },
+  }
+</script>
+<style lang="scss" scoped>
+/deep/.ws-info-table{
+  border-left: 1px solid #D8DCE6;
+  border-top: 1px solid #D8DCE6;
+.el-form-item {
+    border-right: 1px solid #D8DCE6;
+    border-bottom: 1px solid #D8DCE6;
+}
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+    background-color: #F6F7FB;
+}
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+    margin-bottom:30px;
+  }
+  .flex-between{
+    justify-content: space-between;
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+  }
+  /deep/.el-form-item {
+    width: 50%;
+}
+.title{
+  background:#F6F7FC;
+  padding:20px 10px;
+  text-align:left;
+  position:relative;
+  font-size:18px;
+}
+.title::before{
+  content:'';
+  display:block;
+  background:#5473E8;
+  width:5px;height:30px;
+  position:absolute;
+  left:0;
+  top:50%;
+  transform: translateY(-50%);
+}
+.time{
+  text-align:right;
+  width:90%;
+  margin:10px auto;
+  color:#8890B1;
+}
+</style>

+ 295 - 0
src/views/profitable/contractprofitsdetails.vue

@@ -0,0 +1,295 @@
+//合同利润详情
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">利润详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+          <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+            <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-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>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="18">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="searchType == ''?'primary':''">全部合同</el-button>
+          <el-button @click="typeChange(2)" :type="searchContractType == 2?'primary':''">采购合同</el-button>
+          <el-button @click="typeChange(1)" :type="searchContractType == 1?'primary':''">销售合同</el-button>
+          <el-button @click="typeChange(3)" :type="searchContractType == 3?'primary':''">代收合同</el-button>
+          <el-button @click="typeChange(4)" :type="searchContractType == 4?'primary':''">代储合同</el-button>
+          <!-- <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">收储合同</el-button> -->
+        </el-col>
+        <el-col :span="6">
+
+        </el-col>
+      </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 @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>
+          <el-button @click="typeChange1(2)" :type="searchTypeCon == 2?'primary':''">已完成</el-button>
+        </el-col>
+        <el-col :span="6">
+
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%" @selection-change="handleSelectionChange">
+          <el-table-column
+          type="selection"
+          width="55">
+        </el-table-column>
+          <el-table-column type="index" label="序号">
+            <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="contractNo" label="合同编号"></el-table-column>
+          <el-table-column prop="contractType" label="合同类型">
+            <template slot-scope="scope">
+              <span v-if='scope.row.contractType==1'>销售</span>
+              <span v-if='scope.row.contractType==2'>采购</span>
+            </template>
+          </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>
+          <el-table-column prop="profit" 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 prop="address" label="操作" width="200">
+            <template slot-scope="scope">
+              <el-button @click="inventory(scope.row)" type="primary">库存</el-button>
+              <el-button @click="cost(scope.row)" type="primary">费用</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    getcontractdetails
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        agreementType:'',
+        deptCircularPage: {},
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        searchContractType:'',
+        searchTypeCon:'',
+        endDate:"",
+        outtotal:0,
+        intotal:0,
+      }
+    },
+    activated() {
+         this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      typeChange(num){
+        this.searchContractType= num
+        this.getList()
+      },
+      typeChange1(num){
+        this.searchTypeCon= num
+        this.getList()
+      },
+      inventory(row){
+        this.$router.push({name:'contractinventory',query:{warehouseName:row.warehouseName}})
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      cost(){
+        this.$router.push({name:'contractcost',query:{contractNo:row.contractNo}})
+      },
+      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 (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
+          this.value=[this.startDate,this.endDate]
+        },
+      getList() {
+         getcontractdetails({
+            // warehouseType: 1,
+            agreementType: this.agreementType,
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            searchType:this.searchType,
+            searchContractType:this.searchContractType,
+            searchTypeCon:this.searchTypeCon
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+            if(this.tableData.length > 0){
+              this.intotal = Number(this.tableData[0].inContractMoney) + Number(this.tableData[0].inWarehouseMoney) + Number(this.tableData[0].inManageMoney)
+            this.outtotal = Number(this.tableData[0].outContractMoney) + Number(this.tableData[0].outWarehouseMoney) + Number(this.tableData[0].outManageMoney)
+            }
+            
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+</style>

+ 501 - 0
src/views/profitable/expenseallot.vue

@@ -0,0 +1,501 @@
+//费用分配
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">费用分配</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+     
+      <div>
+        <el-form label-position="left">
+          <div style='margin:10px auto; '>基本信息</div>
+          <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="3"
+                style="color: #8890b1" />
+                <ws-option label="经营性费用" value="5"
+                style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose==1' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select disabled v-model="deptBudgetList.costType" placeholder="" class="typeselect" >
+                <ws-option label="粮款" value="1" style="color: #8890b1" />
+                <ws-option label="非粮款" value="3" style="color: #8890b1" />
+                <ws-option label="保证金" value="5" style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
+          {{deptBudgetList.warehouse}}
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==1' label-width='100px' label="合同编号" span="1" prop="contractNo" class="readonly">
+          {{deptBudgetList.contractNo}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            {{deptBudgetList.expenseName}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            {{deptBudgetList.amountMoney}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            disabled
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <div>
+            <span v-for='item in srcList'><el-image
+              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
+              :src="item"
+               :preview-src-list="srcList"></el-image></span>
+             
+          </div>
+        </el-form-item>
+        </el-form>
+        <div style='margin:10px auto;width:90%;'>费用分配</div>
+        <div style='margin:10px auto;width:90%;'>
+            <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-option v-for="item in moneysList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        合计分配:{{amount}}元
+        </div>
+        <el-table v-if='mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
+          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
+            <template slot-scope="scope">
+              <ws-select 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"
+                  style="color: #8890b1" />
+              </ws-select>
+            </template>
+          </el-table-column>
+          <el-table-column 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)})">
+                <ws-option v-for="item in datelist" :key="item.time" :label="item.time" :value="item.time"
+                  style="color: #8890b1" />
+              </ws-select>
+            </template>
+          </el-table-column>
+          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+            <template slot-scope="scope">
+                <el-date-picker @change="receiptDocDatechange" 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="货源">
+              <template slot-scope="scope">
+                <ws-select v-model="scope.row.orderId" 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.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="入库量(吨)">
+            <template slot-scope="scope">
+               <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column 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">
+            <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="">
+            </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="returnsales()">驳回
+        </el-button>
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">通过
+        </el-button>
+        </div>
+      
+    </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        mode:'全部分配',
+        ware:'指定仓库',
+        dates:'固定日期',
+        moneys:'按重量自动分配',
+        goods:'全部货品',
+        goodsList:[],
+        srcList:[],
+        warecontractList:[],
+        feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
+        deptBudgetList:{},
+        makeWordData: {},
+        warehouseList:[],
+        goodsourcelist:[],
+        signingDate:'',
+        datelist:[],
+        disabled:false,
+        modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
+        wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
+        datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
+        moneysList:[{key:1,value:'按重量自动分配'},{key:2,value:'指定分配金额'}],
+        goodsList:[{key:1,value:'全部货品'},{key:2,value:'指定货品'}],
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      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)
+          }
+        }
+        return num
+      }
+    },
+    methods: {
+      modeselect(e){
+        if(e=='全部分配'){
+          this.moneys='按重量自动分配'
+          this.disabled=false
+        }else if(e=='部分分配'){
+          this.moneys='指定分配金额'
+          this.disabled=true
+        }
+      },selectware(e){
+          console.log(e)
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+       submit(){
+          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.expenseAllocationInfoList=this.feeDetailsDistributions
+         if(this.deptBudgetList.expensesPurpose==1){
+        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
+              })
+              if(repetition.length==0){
+                data.push(this.feeDetailsDistributions[i])
+              }else{
+                this.$message({
+                    message: '货源重复!',
+                    type: 'warning',
+                  })
+                  return
+              }
+              // for (let q = 0; q < data.length; q++) {
+              //   if(data[q].warehouseName==this.feeDetailsDistributions[i].warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==data[q].receiptDocDate){
+              //     this.$message({
+              //       message: '请不要选择一样的入库单!',
+              //       type: 'warning',
+              //     })
+              //   }
+              // }
+            }
+            
+          }
+        }
+        if(this.deptBudgetList.expensesPurpose==3){
+        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
+              })
+              if(repetition.length==0){
+                data.push(this.feeDetailsDistributions[i])
+              }else{
+                this.$message({
+                    message: '货源重复!',
+                    type: 'warning',
+                  })
+                  return
+              }
+
+            }
+            
+          }
+        }
+        if(this.mode=='全部分配'){
+          if(this.amount!=this.deptBudgetList.amountMoney){
+            this.$message({
+                message: '请款金额与分配金额不相等!',
+                type: 'warning',
+          })
+          return
+          }
+        }
+        if(this.mode=='部分分配'){
+          if(this.amount>this.deptBudgetList.amountMoney){
+            this.$message({
+                message: '分配金额不可超过请款金额!',
+                type: 'warning',
+          })
+          return
+          }
+        }
+       
+        this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
+        this.deptBudgetList.flag=3
+        this.$confirm('确定提交分配信息', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+        editexenseinfo(this.deptBudgetList).toPromise()
+          .then(response => {
+            this.$message({
+              message: '提交成功!',
+              type: 'success',
+            })
+            this.$router.go(-1)
+          })
+          })
+      },
+      goodsNameselect(e){
+          console.log(e)
+      },
+      addlist(){
+        this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
+      },
+      dellist(row){
+          this.feeDetailsDistributions.splice(row.index,1)
+      },
+      getList() {
+        getcontract({
+          compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+        getwarehouse({
+        compId:localStorage.getItem('ws-pf_compId'),
+        warehouseType:1
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList=response
+        })
+        lookexenseinfo({
+         id:this.$route.query.id
+        })
+        .toPromise()
+        .then((response) => {
+          if(response.costType==1){
+            response.type='粮款'
+          }else if(response.costType==3){
+            response.type='非粮款'
+          }else if(response.costType==5){
+            response.type='保证金'
+          }
+          this.deptBudgetList=response 
+          if(response.addressUrl){
+            var arr=[]
+            var srcs=response.addressUrl.split(',')
+            this.paymentScreenshot=srcs
+            this.srcList=srcs
+          }
+          if(response.expenseAllocationInfoList){
+            this.feeDetailsDistributions=response.expenseAllocationInfoList
+          }
+          
+          
+        })
+      },
+      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 (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
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+.add,.del{
+  width:25px;height:25px;
+}
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+    padding-top:30px;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+  }
+  /deep/.el-form-item {
+    width: 50%;
+}
+</style>

+ 439 - 0
src/views/profitable/expenseallotaduit.vue

@@ -0,0 +1,439 @@
+//确认分配
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">确认分配</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <div >
+        <el-form label-position="left">
+          <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="3"
+                style="color: #8890b1" />
+                <ws-option label="经营性费用" value="5"
+                style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose==1' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select disabled v-model="deptBudgetList.costType" placeholder="" class="typeselect" >
+                <ws-option label="粮款" value="1" style="color: #8890b1" />
+                <ws-option label="非粮款" value="3" style="color: #8890b1" />
+                <ws-option label="保证金" value="5" style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
+          {{deptBudgetList.warehouse}}
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==1' label-width='100px' label="合同编号" span="1" prop="contractNo" class="readonly">
+          {{deptBudgetList.contractNo}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            {{deptBudgetList.expenseName}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            {{deptBudgetList.amountMoney}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            disabled
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <div>
+            <span v-for='item in srcList'><el-image
+              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
+              :src="item"
+               :preview-src-list="srcList"></el-image></span>
+             
+          </div>
+        </el-form-item>
+        </el-form>
+        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==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="deptBudgetList.expenseAllocationInfoList">
+            <el-table-column v-if='deptBudgetList.purpose=="合同费用"' 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"
+                    style="color: #8890b1" />
+                </ws-select>
+              </template>
+            </el-table-column>
+            <el-table-column v-if='deptBudgetList.expensesPurpose==1' 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"
+                    style="color: #8890b1" />
+                </ws-select>
+              </template>
+            </el-table-column>
+            <el-table-column 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>
+              </template>
+            </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-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="货名">
+              <template slot-scope="scope">
+                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column 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="分配金额(元)">
+              <template slot-scope="scope">
+                  <el-input disabled placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
+              </template>
+            </el-table-column>
+          </el-table>
+
+      </div>
+      <div>
+        <div style='width:90%;margin:10px auto;text-align:right;'>
+          <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>
+        </div>
+      
+    </div>
+    <el-dialog
+      title="驳回"
+      :visible.sync="rejectshow"
+      width="30%"
+      :before-close="handleClose">
+      <span>驳回原因</span>
+      <div><el-input
+  type="textarea"
+  :rows="2"
+  placeholder="请输入驳回原因"
+  v-model="textarea">
+</el-input>
+</div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="rejectclick">确 定</el-button>
+      </span>
+    </el-dialog>
+    </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,lookexenseinfo} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        mode:'全部分配',
+        ware:'指定仓库',
+        dates:'固定日期',
+        moneys:'按重量自动分配',
+        goods:'全部货品',
+        goodsList:[],
+        warecontractList:[],
+        feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
+        deptBudgetList:{},
+        makeWordData: {},
+        warehouseList:[],
+        rejectshow:false,
+        modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
+        wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
+        datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
+        moneysList:[{key:1,value:'按重量自动分配'},{key:2,value:'指定分配金额'}],
+        goodsList:[{key:1,value:'全部货品'},{key:2,value:'指定货品'}],
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      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)
+          }
+        }
+        return num
+      }
+    },
+    methods: {
+      pass(){
+        this.$confirm('确认通过分配信息?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.deptBudgetList.flag=2
+          editexenseinfo(this.deptBudgetList).toPromise()
+          .then((response) => {
+            woekflowhandle({
+              taskId: this.deptBudgetList.taskId,
+              approved: true,
+              auditMind: '34',
+              needReapply: false,
+            }).toPromise()
+            .then((response) => {
+              this.$message({
+                message: '通过成功!',
+                type: 'success',
+              })
+              this.$router.go(-1)
+            }).catch((response) => {
+              this.$message({
+                message: '通过失败!',
+                type: 'success',
+              })
+            })
+          })
+        })
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      reject(){
+        this.rejectshow=true
+      },
+      rejectclick(){
+        this.deptBudgetList.flag=5
+        this.deptBudgetList.rejectionReason=this.textarea
+          editexenseinfo(this.deptBudgetList).toPromise()
+          .then((response) => {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: '34',
+          needReapply: false,
+        }).toPromise()
+        .then((response) => {
+          this.$message({
+            message: '驳回成功!',
+            type: 'success',
+          })
+          this.$router.go(-1)
+        }).catch((response) => {
+          this.$message({
+            message: '驳回失败!',
+            type: 'success',
+          })
+        })
+        })
+      },
+      modeselect(e){
+          console.log(e)
+      },selectware(e){
+          console.log(e)
+      },
+      goodsNameselect(e){
+          console.log(e)
+      },
+      addlist(){
+        this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
+      },
+      dellist(row){
+          this.feeDetailsDistributions.splice(row.index,1)
+      },
+      getList() {
+       getcontract({
+        compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+        getwarehouse({
+        compId:localStorage.getItem('ws-pf_compId'),
+        warehouseType:1
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList=response
+        })
+        lookexenseinfo({
+         id:this.$route.query.id
+        })
+        .toPromise()
+        .then((response) => {
+          if(response.costType==1){
+            response.type='粮款'
+          }else if(response.costType==3){
+            response.type='非粮款'
+          }else if(response.costType==5){
+            response.type='保证金'
+          }
+          this.deptBudgetList=response 
+          if(response.addressUrl){
+            var arr=[]
+            var srcs=response.addressUrl.split(',')
+            this.srcList=srcs
+          }
+          if(response.expenseAllocationInfoList){
+            this.feeDetailsDistributions=response.expenseAllocationInfoList
+          }
+          
+          
+        })
+
+      },
+      detail(){
+        this.$router.push({name:'contractprofitsdetails'})
+      },
+      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 (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
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+    .el-form-item__label{
+      color:#8890B1;
+    }
+  }
+  /deep/.el-form-item {
+    width: 50%;
+}
+</style>

+ 475 - 0
src/views/profitable/expensemanagement.vue

@@ -0,0 +1,475 @@
+//费用管理
+<template>
+  <div class="container">
+    <!-- <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">盈收概览</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row> -->
+    <div class="center">
+      <el-row class='row_top'>
+      <el-col :span="12">
+        <div class="datascreen">
+         <div style='align-items:center;' class='flex'>
+            <div :class='{"forbidden":forbidden==true}' @click='minus'><i class="el-icon-arrow-left"></i></div>
+            <ws-select v-model="year" placeholder="" @change="yearChange" :value="searchType" style="margin: 0 10px">
+              <ws-option v-for="item in yearList" :key="item.value" :label="item.value" :value="item.value"
+                style="color: #8890b1" />
+            </ws-select>
+            <div :class='{"forbidden":forbidden1==true}' @click='add'><i class="el-icon-arrow-right"></i></div>
+          </div>
+        
+      </div>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button type='primary' @click='detail'>费用详情</el-button></el-col>
+    </el-row>
+      <div class="chart_css">
+        <div class="table">
+          <div ref="myEchart7" style="height: 440px;"></div>
+        </div>
+        <div class="makeWord_css">
+          <!-- <div ref="myEchart6" style="height: 410px"></div> -->
+        </div>
+      </div>
+        <div class='title' style='margin-bottom:10px;'>费用收支一览表</div>
+      <div class="table_css">
+        <div style='width:90%;margin:10px auto;'>
+          <div style='width:15%;'><el-date-picker v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"></el-date-picker></div>
+        </div>
+        <ws-form>
+          <ws-info-table>
+          <ws-form-item label="合同费用收入(万元)" span="1" prop="contractNo" class="readonly">
+            {{tablelist.contractIn}}
+          </ws-form-item>
+          <ws-form-item label="库点费用收入(万元)" span="1" prop="settlementMethod">
+          </ws-form-item>
+          <ws-form-item label="合同费用支出(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="库点费用支出(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+          <ws-form-item label="经营性收入(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="贸易利润(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+          <ws-form-item label="经营性支出(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="净利润(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+        </ws-info-table>
+        </ws-form>
+        
+        
+        <!-- <el-table :data="valueData" style="width: 100%">
+          <el-table-column prop="date" label="货名/货值" min-width="110">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">期初货值(元)</span>
+              <span v-if="scope.$index == 1">期末货值(元)</span>
+            </div>
+
+          </el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="合计" min-width="130">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">合计:</span>
+              <span v-if="scope.$index == 1">合计:1000000000</span>
+            </div>
+          </el-table-column>
+        </el-table> -->
+
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {getexpensechat,getexpensechatlist} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        deptBudgetList:{},
+        start: 2021,
+        yearList:[],
+        tablelist:{},
+        monthlist:[],
+        incomelist:[],
+        expenditurelist:[],
+        year: '',
+        makeWordData: {},
+        forbidden:false,
+        forbidden1:false,
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.getPassYearFormatDate()
+      // this.makeWordData = this.getData(2)
+      this.year = new Date().getFullYear()
+      this.getList()
+      for (var i = this.start; i <= this.year; i++) {
+        this.yearList.push({
+          value: i
+        })
+      }
+      if (this.year >= new Date().getFullYear()) {
+        this.forbidden1 = true
+      }
+      if (this.year <= this.start) {
+        this.forbidden = true
+      }
+    },
+    methods: {
+      getList() {
+        getexpensechat({
+         compId:localStorage.getItem('ws-pf_compId'),
+         year:this.year
+        })
+        .toPromise()
+        .then((response) => {
+          for (let i = 0; i < response.length; i++) {
+            // if(response[i]){
+              this.monthlist.push(response[i].month+'月')
+            // }
+              this.incomelist.push((response[i].income/10000).toFixed(4))
+              this.expenditurelist.push((response[i].expenditure/10000).toFixed(4))
+            this.initCharts()
+          }
+        })
+        getexpensechatlist({
+         compId:localStorage.getItem('ws-pf_compId'),
+         startDate:this.startDate,
+         endDate:this.endDate
+        })
+        .toPromise()
+        .then((response) => {
+          this.tablelist=response[0]
+          console.log(response)
+        })
+
+      },
+      minus() {
+
+        if (this.year <= this.start) {
+          this.forbidden = true
+        } else {
+          this.year--
+        }
+      },
+      add() {
+
+        if (this.year >= new Date().getFullYear()) {
+          this.forbidden1 = true
+        } else {
+          this.year++
+        }
+      },
+      detail(){
+        this.$router.push({name:'expensemanagementdetails'})
+      },
+      getPassYearFormatDate() {
+        var nowDate = new Date()
+        var _date = new Date()
+        var year = nowDate.getFullYear()-1
+        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
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+      initCharts() {
+        console.log(this.monthlist)
+        let app = this;
+        let myChart7 = app.$echarts.init(this.$refs.myEchart7);
+        var option;
+        option = {
+            // title: {
+            //   text: 'Rainfall vs Evaporation',
+            //   subtext: 'Fake Data'
+            // },
+            tooltip: {
+              trigger: 'axis'
+            },
+            legend: {
+              data: ['支出', '收入']
+            },
+            toolbox: {
+              show: true,
+              feature: {
+                dataView: {
+                  show: false,
+                  readOnly: false
+                },
+                magicType: {
+                  show: false,
+                  type: ['line', 'bar']
+                },
+                restore: {
+                  show: false
+                },
+                saveAsImage: {
+                  show: false
+                }
+              }
+            },
+            calculable: true,
+            xAxis: [{
+              // type: 'category',
+              // prettier-ignore
+              type: 'category',
+              axisLabel: {
+            //x轴文字的配置
+            show: true,
+            interval: 0,//使x轴文字显示全
+},
+              data: this.monthlist
+            }],
+            yAxis: [{
+              name: '费用(万元)',
+              
+            }],
+            tooltip: {
+    trigger: 'axis',
+    formatter: function (data) {
+      if(!data[0].data){
+        data[0].data=0
+      }
+      if(!data[1].data){
+        data[1].data=0
+      }
+      return '收入:'+data[0].data+ '<br/>' +'支出:'+data[1].data+ '<br/>' +'利润:'+(data[0].data-data[1].data)
+    },
+  },
+
+            series: [
+              {
+                name: '收入',
+                type: 'bar',
+                right: 20,
+                label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: this.incomelist,
+                color: ['#FF9F24'],
+                formatter: '{value} 元',
+              },{
+                name: '支出',
+                type: 'bar',
+                right: 0,
+                // label: {
+                //   show: true,
+                //   position: 'inside'
+                // },
+                 label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data:this.expenditurelist,
+                color: ['#5878E8 '],
+                formatter: '{value} 元',
+
+              }
+              
+            ]
+          },
+          myChart7.setOption(option)
+      },
+      // getData(count) {
+      //   // prettier-ignore
+      //   const nameList = [
+      //     '支出', '收入'
+      //   ];
+      //   const legendData = [];
+      //   const seriesData = [];
+      //   for (var i = 0; i < count; i++) {
+      //     var name = nameList[i]
+      //     // Math.random() > 0.65 ?  makeWord(4, 1) + '·' + makeWord(3, 0) :  makeWord(2, 1);
+      //     legendData.push(name);
+      //     seriesData.push({
+      //       name: name,
+      //       value: Math.round(Math.random() * 100000)
+      //     });
+      //   }
+
+      //   return {
+      //     legendData: legendData,
+      //     seriesData: seriesData
+      //   };
+
+      //   // function makeWord(max, min) {
+      //   //   debugger
+      //   //   const nameLen = Math.ceil(Math.random() * max + min);
+      //   //   const name = [];
+      //   //   for (var i = 0; i < nameLen; i++) {
+      //   //     name.push(nameList[Math.round(Math.random() * nameList.length - 1)]);
+      //   //   }
+      //   //   return name.join('');
+      //   // }
+
+      // }
+    },
+  }
+</script>
+<style lang="scss" scoped>
+/deep/.ws-info-table{
+  border-left: 1px solid #D8DCE6;
+  border-top: 1px solid #D8DCE6;
+.el-form-item {
+    border-right: 1px solid #D8DCE6;
+    border-bottom: 1px solid #D8DCE6;
+}
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+    background-color: #F6F7FB;
+}
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+    margin-bottom:10px;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+  }
+  /deep/.el-form-item {
+    width: 50%;
+}
+.title{
+  background:#F6F7FC;
+  padding:20px 10px;
+  text-align:left;
+  position:relative;
+  font-size:18px;
+}
+.title::before{
+  content:'';
+  display:block;
+  background:#5473E8;
+  width:5px;height:30px;
+  position:absolute;
+  left:0;
+  top:50%;
+  transform: translateY(-50%);
+}
+</style>

+ 468 - 0
src/views/profitable/expensemanagementdetails.vue

@@ -0,0 +1,468 @@
+//费用详情
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">费用详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+          <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+            <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-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>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="18">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="searchType == ''?'primary':''">全部</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">收入</el-button>
+          <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">支出</el-button>
+        </el-col>
+        <el-col style='text-align:right;' :span="6">
+          <el-button style="margin-left:10px" @click="cashout('')">请款</el-button>
+          <el-button style="margin-right:10px" @click="receipt(1)" >收款</el-button>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="index" label="序号">
+            <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="costNo" label="编号">
+          </el-table-column>
+          <el-table-column prop="feeType" label="类型">
+            <template slot-scope="scope">
+              <div v-if='scope.row.expensesType==1'>收入</div>
+              <div v-if='scope.row.expensesType==2'>支出</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="purpose" label="用途">
+            <template slot-scope="scope">
+              <div v-if='scope.row.expensesPurpose==1'>合同费用<span v-if='scope.row.costType==1'>-粮款</span></div>
+              <div v-if='scope.row.expensesPurpose==3'>库点费用<span v-if='scope.row.costType==1'>-粮款</span></div>
+              <div v-if='scope.row.expensesPurpose==5'>经营性费用<span v-if='scope.row.costType==1'>-粮款</span></div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="expenseName" label="费用名称"></el-table-column>
+          <el-table-column prop="amountMoney" width="120" label="费用金额(元)"></el-table-column>
+          <el-table-column prop="unallocatedAmount" width="100" label="未分配(元)"></el-table-column>
+          <el-table-column prop="expenseRemarks" label="附件">
+              <template slot-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.addressUrlArray != null">
+            {{
+              scope.row.addressUrlArray.length == 0
+                ? ''
+                : scope.row.addressUrlArray.length
+            }}
+          </span>
+        </template>
+          </el-table-column>
+          <el-table-column prop="agent" label="经办人"></el-table-column>
+          <el-table-column prop="expenseDate" label="发起日期"></el-table-column>
+          <el-table-column prop="status" label="费用状态">
+            <template slot-scope="scope">
+              <span v-if='scope.row.approveStatus'>{{scope.row.approveStatus}}</span><span v-else>{{scope.row.status}}</span>
+              <i @click="handlerecord(scope.row)" class="el-icon-s-claim"></i>
+            </template>
+          </el-table-column>
+          <el-table-column prop="address" label="操作" width="500">
+            <template slot-scope="scope">
+              <el-button @click="look(scope.row)" type="primary">查看</el-button>
+              <el-button @click="shoukuanqueren(scope.row)" type="primary">确认</el-button>
+              <!-- <el-button v-if='scope.row.approveStatus=="待确认"' @click="accomplish(scope.row)" type="primary">完成</el-button> -->
+              <el-button v-if='scope.row.expensesPurpose==1&&scope.row.approveStatus=="已收款"||scope.row.expensesPurpose==1&&scope.row.approveStatus=="已付款"' @click="accomplish(scope.row)" type="primary">完成</el-button>
+              <el-button  @click="expenseedit(scope.row)" type="primary">编辑</el-button>
+              <!-- <el-button v-if='scope.row.status=="已驳回"' @click="expenseedit(scope.row)" type="primary">编辑</el-button> -->
+              <el-button v-if='scope.row.distributionStatus=="未完成"&&scope.row.allocatedAmount>0' @click="allot(scope.row)" type="primary">分配</el-button>
+              <!-- <el-button v-if='scope.row.approveStatus=="已驳回"' @click="del(0,scope.row)" type="primary">删除</el-button> -->
+              <el-button @click="del(0,scope.row)" type="primary">删除</el-button>
+              <el-button @click="aduit(scope.row)" type="primary">审核</el-button>
+              <el-button @click="payment(scope.row)" type="primary">付款</el-button>
+            </template>
+          </el-table-column>
+          <el-table-column prop="expenseRemarks" label="分配状态">
+            <template slot-scope="scope">
+              <span>{{scope.row.distributionStatus}}</span>
+              <el-tooltip class="item" effect="dark" :content="scope.row.rejectionReason" placement="top-start">
+                <i class="el-icon-question"></i>
+              </el-tooltip>
+              
+            </template>
+          </el-table-column>
+          <el-table-column prop="address" label="分配相关" width="300">
+            <template slot-scope="scope">
+              <el-button @click="allotaduit(scope.row)" type="primary">确认</el-button>
+              <el-button @click="allot(scope.row)" type="primary">编辑</el-button>
+              <el-button @click="del(1,scope.row)" type="primary">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>diann1
+    <el-dialog width='50%' :visible.sync="dialogVisible1" title="审核记录">
+      <div v-for="item in recordList">
+        <div style='width:100%;justify-content: space-between;' class='flex'>
+          <div style='width:33.333%;text-align:center;'>{{item.operateUser}}</div>
+          <div style='width:33.333%;text-align:center;'>{{item.dealMsg}}</div>
+          <div style='width:33.333%;text-align:center;'>{{item.createDate}}</div>
+        </div>
+        <div style='width:100%;text-align:center;'>{{item.verifyRemark}}</div>
+      </div>
+    </el-dialog>
+    <WinseaContentModal v-model="fujianshow" :title="title"
+      @on-cancel="handleClose">
+     <span v-for='item in appendixIdss'><el-image
+              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
+              :src="item"
+               :preview-src-list="appendixIdss"></el-image></span>
+    </WinseaContentModal>
+  </div>
+</template>
+<script>
+  import {
+    getInOutDetailed,
+    getexenseinfo,
+    delexenseinfo,
+    delallocationinfo,editexenseinfo
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        recordList:[],
+        dialogVisible1:false,
+        deptCircularPage: {},
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        title:'附件',
+        outtotal:0,
+        intotal:0,
+        fujianshow:false,
+        appendixIdss:[],
+      }
+    },
+    activated() {
+         this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      handlerecord(row){
+        billoperatehis({id: row.id}).toPromise()
+                .then((response) => {
+                  this.recordList=response
+                  this.dialogVisible1=true
+                }).catch((response) => {})
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      handleClose() {
+        this.fujianshow = false
+      },
+      fujian(row) {
+        this.id = row.id
+        this.fujianshow = true
+        if(row.addressUrl){
+          this.appendixIdss = row.addressUrl.split(',')
+        }
+      },
+      look(row){
+        this.$router.push({name:'expensemanagentlook',query:{id:row.id}})
+      },
+      del(status,row){
+        var title=''
+          if(status==1){
+            title='确定删除分配信息?'
+          }else{
+            if(row.expensesType==1){
+              title='确定删除收款信息?'
+            }else{
+              title='确定删除请款信息?'
+            }
+            
+          }
+           this.$confirm(title, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            if(status==1){
+              delallocationinfo({id:row.id}).toPromise()
+              .then(response => {
+                this.$message({
+                message: '删除成功',
+                type: 'success',
+              })
+                this.getList()
+              }).catch(response => {
+                this.$message({
+                message: '删除失败',
+                type: 'warning',
+              })
+              })
+            }else{
+              delexenseinfo({id:row.id}).toPromise()
+              .then(response => {
+                this.$message({
+                message: '删除成功',
+                type: 'success',
+              })
+                this.getList()
+              }).catch(response => {
+                this.$message({
+                message: '删除失败',
+                type: 'warning',
+              })
+              })
+            }
+          })
+      },
+      accomplish(row){
+        var title1=''
+        if(row.unallocatedAmount>0){
+          title1='尚有未分配的金额,是否确认不在分配?'
+        }else{
+          title1='确定将费用状态修改为已完成?'
+        }
+          this.$confirm(title1, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            row.flag=1
+            editexenseinfo(row).toPromise()
+          .then(response => {
+            this.$message({
+              message: '提交成功!',
+              type: 'success',
+            })
+            this.getList()
+            // this.$router.go(-1)
+          })
+          })
+      },
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      expenseedit(row){
+        this.$router.push({name:'expensemanagentedit',query:{id:row.id}})
+      },
+      shoukuanqueren(row){
+        this.$router.push({name:'receiptaduit',query:{id:row.id}})
+      },
+      aduit(row){
+        this.$router.push({name:'cashoutaduit',query:{id:row.id}})
+      },
+      allotaduit(row){
+        this.$router.push({name:'expenseallotaduit',query:{id:row.id}})
+      },
+      payment(row){
+        this.$router.push({name:'payment',query:{id:row.id}})
+      },
+      allot(row){
+        this.$router.push({name:'expenseallot',query:{id:row.id}})
+      },
+      cashout(){
+        this.$router.push({name:'cashout'})
+      },
+      receipt(){
+        this.$router.push({name:'receipt'})
+      },
+      // inventory(){
+      //   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 (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
+          this.value=[this.startDate,this.endDate]
+        },
+      getList() {
+         getexenseinfo({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            searchType:this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            if(response.records.length>0){
+              for (let i = 0; i < response.records.length; i++) {
+                if(response.records[i].addressUrl){
+                  response.records[i].addressUrlArray=response.records[i].addressUrl.split(',')
+                }
+                
+              }
+            }
+            this.tableData = response.records
+            
+            if(this.tableData.length > 0){
+              this.intotal = Number(this.tableData[0].inContractMoney) + Number(this.tableData[0].inWarehouseMoney) + Number(this.tableData[0].inManageMoney)
+            this.outtotal = Number(this.tableData[0].outContractMoney) + Number(this.tableData[0].outWarehouseMoney) + Number(this.tableData[0].outManageMoney)
+            }
+            
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+</style>

+ 717 - 0
src/views/profitable/expensemanagentedit.vue

@@ -0,0 +1,717 @@
+//费用编辑
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">编辑</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+     
+     <div class="center">
+     
+      <div>
+        <el-form label-position="left"><div style='margin:30px 0 30px;'>基本信息</div>
+          <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" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="合同费用"' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select v-model="deptBudgetList.type" placeholder="" class="typeselect" >
+                <ws-option label="粮款" value="粮款" style="color: #8890b1" />
+                <ws-option label="非粮款" value="非粮款" style="color: #8890b1" />
+                <ws-option label="保证金" value="保证金" 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">
+            <el-select v-model="deptBudgetList.contractNo" placeholder="选择合同" class="typeselect" @change="selectcontract">
+              <el-option v-for="item in contractList" :key="item.contractNo" :label="item.contractNo" :value="item.contractNo"
+                style="color: #8890b1" />
+            </el-select>
+          </el-form-item>
+           <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓库名称" span="1" prop="contractNo" class="readonly">
+            <el-select v-model="deptBudgetList.warehouseName" placeholder="选择仓库" class="typeselect" @change="selectwarehouse">
+              <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
+                style="color: #8890b1" />
+            </el-select>
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            <el-input class='input50 input_css' placeholder="输入费用名称,1-15个字" v-model="deptBudgetList.expenseName"></el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            <el-input class='input50 input_css' placeholder="输入请款金额" v-model="deptBudgetList.amountMoney"></el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <el-upload ref='uploadfiles' :file-list='srcList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+            :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        </el-form>
+        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' class='expensetitle'>费用分配</div>
+        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' style='margin:0  auto 10px;width:90%;'>
+            <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">
+          <ws-option v-for="item in wareList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <ws-select v-if='deptBudgetList.purpose==2' v-model="goods" placeholder="费用分配产品" class="typeselect" @change="selectproductType"
+          :value="searchType">
+          <ws-option v-for="item in goodsList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+         <ws-select v-model="dates" placeholder="费用分配日期" class="typeselect" @change="selecttaskType"
+          :value="searchType">
+          <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-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>
+        <el-table 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">
+            <template slot-scope="scope">
+              <ws-select 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"
+                  style="color: #8890b1" />
+              </ws-select>
+            </template>
+          </el-table-column>
+          <el-table-column 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)})">
+                <ws-option v-for="item in datelist" :key="item.time" :label="item.time" :value="item.time"
+                  style="color: #8890b1" />
+              </ws-select>
+            </template>
+          </el-table-column>
+          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">
+            <template slot-scope="scope">
+                <el-date-picker @change="receiptDocDatechange" 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="货源">
+              <template slot-scope="scope">
+                <ws-select v-model="scope.row.orderId" 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.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="入库量(吨)">
+            <template slot-scope="scope">
+               <span>{{scope.row.inWarehouseWeight?scope.row.inWarehouseWeight:'自动获取'}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column 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">
+            <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="">
+            </template>
+          </el-table-column>
+        </el-table>
+       <div style='text-align:right;margin-right:30px;'>
+        <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交
+        </el-button>
+    </div>
+      </div>
+    </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        mode:'全部分配',
+        moneys:'按重量自动分配',
+        dataList:[],
+        goodsList:[],
+        disabled:false,
+        warecontractList:[],
+        // dateRange: this.disabledDate(),
+        feeDetailsDistributions:[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0}],
+        deptBudgetList:{purpose:"合同费用",type:'粮款'},
+        makeWordData: {},
+        warehouseList:[],
+        contractList:[],
+        choosablewareList:[],
+        paymentScreenshot:[],
+        goodsourcelist:[],
+        signingDate:'',
+        datelist:[],
+        modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
+        wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
+        datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
+        moneysList:[{key:1,value:'按重量自动分配'},{key:2,value:'指定分配金额'}],
+        goodsList:[{key:1,value:'全部货品'},{key:2,value:'指定货品'}],
+        
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+
+    },
+    activated() {
+      // this.makeWordData = this.getData(2)
+      // this.initCharts()
+      // this.getPassYearFormatDate()
+      this.getList()
+    },
+     computed: {
+    // 计算属性的 getter
+      amount: function () {
+        // `this` 指向 vm 实例
+        var num=0
+        for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
+          num+=Number(this.feeDetailsDistributions[i].distributionMoney)
+        }
+        return num
+      }
+    },
+    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)      
+      },
+      selectware(e,item){
+        this.datelist=[]
+        getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
+          .then(response => {
+            for (let i = 0; i < response.length; i++) {
+              this.datelist.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+            }
+          })
+      },
+      selectgoodsSource(e,item){
+        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=''
+            }
+          }
+          this.$message({
+                message: '请输入金额之后进行操作',
+                type: 'warning',
+              })
+          return
+        }
+        for (let i = 0; i < this.goodsourcelist.length; i++) {
+          if(this.goodsourcelist[i].id==e){
+            item.goodsSource=this.goodsourcelist[i].goodsSource
+            item.inWarehouseWeight=this.goodsourcelist[i].weight
+            item.goodsName=this.goodsourcelist[i].goodsName
+            item.goodsNameKey=this.goodsourcelist[i].goodsNameKey
+            }
+        }
+        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++) {
+            // console.log(weight,this.feeDetailsDistributions[i].inWarehouseWeight)
+            if(i=this.feeDetailsDistributions.length-1&&i!=0){
+              console.log(i)
+              this.feeDetailsDistributions[i].distributionMoney=this.deptBudgetList.amountMoney-money
+            }else{
+              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+              money+=this.feeDetailsDistributions[i].distributionMoney
+            }
+            
+          }
+        }
+      },
+      selecttime(e,item){
+        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.$message({
+                message: '请输入金额之后进行操作',
+                type: 'warning',
+              })
+          return
+        }
+        for (let i = 0; i < this.datelist.length; i++) {
+          if(this.datelist[i].time==e){
+            item.orderId=this.datelist[i].id
+            item.inWarehouseWeight=this.datelist[i].weight
+          }
+        }
+        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++) {
+            // console.log(weight,this.feeDetailsDistributions[i].inWarehouseWeight)
+            if(i=this.feeDetailsDistributions.length-1&&i!=0){
+              this.feeDetailsDistributions[i].distributionMoney=this.deptBudgetList.amountMoney-money
+            }else{
+              this.feeDetailsDistributions[i].distributionMoney=Math.round((this.feeDetailsDistributions[i].inWarehouseWeight/weight)*this.deptBudgetList.amountMoney)
+              money+=this.feeDetailsDistributions[i].distributionMoney
+            }
+          }
+        }
+        // console.log(this.feeDetailsDistributions)
+      },
+      receiptDocDatechange(e){
+        this.goodsourcelist=[]
+        getwarehousingorder({warehouseName:this.deptBudgetList.warehouseName,receiptDocDate:e}).toPromise()
+          .then(response => {
+            for (let i = 0; i < response.length; i++) {
+              this.goodsourcelist.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
+            }
+          })
+      },
+      selectcontent(e){
+
+      },
+      selectcontract(e){
+        console.log(e)
+        for (let i = 0; i < this.contractList.length; i++) {
+          console.log(this.contractList[i])
+          if(this.contractList[i].contractNo==e){
+            this.signingDate=this.contractList[i].signingDate
+            // this.disabledDate()
+          }
+        }
+      },
+      handlefujian(file) {
+        // console.log(file)
+        this.paymentScreenshot.push(file.url)
+        // this.dialogVisible = true
+      },
+      submit(){
+        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){
+              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
+            }
+          }
+        }
+        if(this.deptBudgetList.purpose=='合同费用'){
+          this.deptBudgetList.expensesPurpose=1
+        }else if(this.deptBudgetList.purpose=='库点费用'){
+          this.deptBudgetList.expensesPurpose=3
+        }else if(this.deptBudgetList.purpose=='经营性费用'){
+          this.deptBudgetList.expensesPurpose=5
+        }
+        if(this.deptBudgetList.expensesPurpose==1){
+          if(this.deptBudgetList.type=='粮款'){
+            this.deptBudgetList.costType=1
+            this.deptBudgetList.expenseAllocationInfoList=[]
+          }else if(this.deptBudgetList.type=='非粮款'){
+            this.deptBudgetList.costType=3
+            this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
+          }else if(this.deptBudgetList.type=='保证金'){
+            this.deptBudgetList.expensesPurpose=5
+            this.deptBudgetList.expenseAllocationInfoList=[]
+          }
+        }
+         if(this.deptBudgetList.expensesPurpose==1){
+        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
+              })
+              if(repetition.length==0){
+                data.push(this.feeDetailsDistributions[i])
+              }else{
+                this.$message({
+                    message: '货源重复!',
+                    type: 'warning',
+                  })
+                  return
+              }
+              // for (let q = 0; q < data.length; q++) {
+              //   if(data[q].warehouseName==this.feeDetailsDistributions[i].warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==data[q].receiptDocDate){
+              //     this.$message({
+              //       message: '请不要选择一样的入库单!',
+              //       type: 'warning',
+              //     })
+              //   }
+              // }
+            }
+            
+          }
+        }
+        if(this.deptBudgetList.expensesPurpose==3){
+        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
+              })
+              if(repetition.length==0){
+                data.push(this.feeDetailsDistributions[i])
+              }else{
+                this.$message({
+                    message: '货源重复!',
+                    type: 'warning',
+                  })
+                  return
+              }
+              // for (let q = 0; q < data.length; q++) {
+              //   if(data[q].warehouseName==this.feeDetailsDistributions[i].warehouseName&&this.feeDetailsDistributions[i].receiptDocDate==data[q].receiptDocDate){
+              //     this.$message({
+              //       message: '请不要选择一样的入库单!',
+              //       type: 'warning',
+              //     })
+              //   }
+              // }
+            }
+            
+          }
+        }
+        this.deptBudgetList.expensesType=2
+        if(!this.deptBudgetList.contractNo&&this.deptBudgetList.expensesPurpose==1){
+          this.$message({
+                message: '合同编号不能为空!',
+                type: 'warning',
+              })
+              return
+        }
+        if(!this.deptBudgetList.warehouse&&this.deptBudgetList.expensesPurpose==3){
+          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.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: '费用名称不能为空!',
+                type: 'warning',
+          })
+          return
+        }
+        if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
+          this.$message({
+                message: '费用名称输入错误!',
+                type: 'warning',
+          })
+        }
+        if(!this.deptBudgetList.amountMoney){
+          this.$message({
+                message: '金额不能为空!',
+                type: 'warning',
+          })
+          return
+        }
+        if(this.deptBudgetList.amountMoney<0.01||this.deptBudgetList.amountMoney>100000000){
+          this.$message({
+                message: '金额输入错误!',
+                type: 'warning',
+          })
+          return
+        }
+        this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
+        this.deptBudgetList.flag=4
+        editexenseinfo(this.deptBudgetList).toPromise()
+          .then(response => {
+            this.$message({
+              message: '提交成功!',
+              type: 'success',
+            })
+            this.$router.go(-1)
+          })
+      },
+      modeselect(e){
+          console.log(e)
+      },selectware(e){
+          console.log(e)
+      },
+      goodsNameselect(e){
+          console.log(e)
+      },
+      addlist(){
+        this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
+      },
+      dellist(row){
+        if(this.feeDetailsDistributions.length>1){
+          this.feeDetailsDistributions.splice(row.index,1)
+        }
+      },
+      getList() {
+        getcontract({
+        compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+        getwarehouse({
+        compId:localStorage.getItem('ws-pf_compId'),
+        warehouseType:1
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList=response
+        })
+        lookexenseinfo({
+         id:this.$route.query.id
+        })
+        .toPromise()
+        .then((response) => {
+          if(response.costType==1){
+            response.type='粮款'
+          }else if(response.costType==3){
+            response.type='非粮款'
+          }else if(response.costType==5){
+            response.type='保证金'
+          }
+          this.deptBudgetList=response 
+          if(response.addressUrl){
+            var arr=[]
+            var srcs=response.addressUrl.split(',')
+            this.paymentScreenshot=srcs
+            for (let i = 0; i < srcs.length; i++) {
+              arr.push({url:srcs[i]})
+              
+            }
+            this.srcList=arr
+          }
+          if(response.expenseAllocationInfoList){
+            this.feeDetailsDistributions=response.expenseAllocationInfoList
+          }
+          
+          
+        })
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      handlefujian(file) {
+        // console.log(file)
+        this.paymentScreenshot.push(file.url)
+        // this.dialogVisible = true
+      },
+      handleRemove(file) {
+        // console.log(file)
+        for (let i = 0; i < this.paymentScreenshot.length; i++) {
+          if(this.paymentScreenshot[i]==response.url){
+            this.paymentScreenshot.splice(i, 1)
+          }
+          
+        }
+      },
+      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 (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
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+  .expensetitle{
+    margin:0  auto 10px;width:90%;border-top:1px solid #D8DCE6;padding-top:30px;
+  }
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+  }
+  /deep/.el-form-item {
+    width: 50%;
+}
+</style>

+ 249 - 0
src/views/profitable/expensemanagentlook.vue

@@ -0,0 +1,249 @@
+//查看
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">查看收款信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+     <div style='margin:0 auto 10px;width:90%;'>基本信息</div>
+      <div>
+        <el-form label-position="left">
+          <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="3"
+                style="color: #8890b1" />
+                <ws-option label="经营性费用" value="5"
+                style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose==1' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select disabled v-model="deptBudgetList.costType" placeholder="" class="typeselect" >
+                <ws-option label="粮款" value="1" style="color: #8890b1" />
+                <ws-option label="非粮款" value="3" style="color: #8890b1" />
+                <ws-option label="保证金" value="5" style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
+          {{deptBudgetList.warehouse}}
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==1' label-width='100px' label="合同编号" span="1" prop="contractNo" class="readonly">
+          {{deptBudgetList.contractNo}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            {{deptBudgetList.expenseName}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            {{deptBudgetList.amountMoney}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            disabled
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <div>
+            <span v-for='item in srcList'><el-image
+              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
+              :src="item"
+               :preview-src-list="srcList"></el-image></span>
+             
+          </div>
+        </el-form-item>
+        </el-form>
+        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==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=="合同费用"' 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"
+                    style="color: #8890b1" />
+                </ws-select>
+              </template>
+            </el-table-column>
+            <el-table-column v-if='deptBudgetList.expensesPurpose==1' 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"
+                    style="color: #8890b1" />
+                </ws-select>
+              </template>
+            </el-table-column>
+            <el-table-column 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>
+              </template>
+            </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-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="货名">
+              <template slot-scope="scope">
+                <span>{{scope.row.goodsName?scope.row.goodsName:'自动获取'}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column 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="分配金额(元)">
+              <template slot-scope="scope">
+                  <el-input disabled placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {lookexenseinfo} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        deptBudgetList:{},
+        makeWordData: {},
+        srcList:[],
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      getList() {
+        lookexenseinfo({
+         id:this.$route.query.id
+        })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList=response
+          this.srcList=response.addressUrl.split(',')
+        })
+
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      detail(){
+        this.$router.push({name:'contractprofitsdetails'})
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    border-radius: 4px;
+    margin-top: 10px;
+    padding-top:30px;
+    overflow-y: scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:10px auto;
+  }
+  
+  /deep/.el-form-item {
+    width: 50%;
+}
+</style>

+ 223 - 0
src/views/profitable/payment.vue

@@ -0,0 +1,223 @@
+//付款
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">付款</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+     <div style='margin:0 auto 10px;width:90%;'>基本信息</div>
+      <div>
+        <el-form label-position="left">
+          <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="3"
+                style="color: #8890b1" />
+                <ws-option label="经营性费用" value="5"
+                style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose==1' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select disabled v-model="deptBudgetList.costType" placeholder="" class="typeselect" >
+                <ws-option label="粮款" value="1" style="color: #8890b1" />
+                <ws-option label="非粮款" value="3" style="color: #8890b1" />
+                <ws-option label="保证金" value="5" style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
+          {{deptBudgetList.warehouse}}
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==1' label-width='100px' label="合同编号" span="1" prop="contractNo" class="readonly">
+          {{deptBudgetList.contractNo}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            {{deptBudgetList.expenseName}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            {{deptBudgetList.amountMoney}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            disabled
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <div>
+            <span v-for='item in srcList'><el-image
+              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
+              :src="item"
+               :preview-src-list="srcList"></el-image></span>
+             
+          </div>
+        </el-form-item>
+        </el-form>
+        <div style='width:90%;margin:10px auto;text-align:right;'>
+        <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交
+        </el-button></div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {lookexenseinfo,expensepayment} from '@/model/profitable/index'
+  import {woekflowhandle,} from '@/model/tasksport/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        rejectshow:false,
+        deptBudgetList:{},
+        makeWordData: {},
+        srcList:[],
+        textarea:'',
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      getList() {
+        lookexenseinfo({
+         id:this.$route.query.id
+        })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList=response
+          this.srcList=response.addressUrl.split(',')
+        })
+
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      submit(){
+        this.$confirm('确定提交付款信息?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          expensepayment(this.deptBudgetList)
+          .toPromise()
+          .then((response) => {
+            this.$message({
+              message: '提交成功!',
+              type: 'success',
+            })
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '提交失败!',
+              type: 'success',
+            })
+          })
+        })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    border-radius: 4px;
+    margin-top: 10px;
+    padding-top:30px;
+    overflow-y: scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:10px auto;
+  }
+  
+  /deep/.el-form-item {
+    width: 50%;
+}
+</style>

+ 409 - 0
src/views/profitable/receipt.vue

@@ -0,0 +1,409 @@
+//收款
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">收款</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <div>
+        <el-form label-position='left'><div style='margin:30px 0;'>基本信息</div>
+          <el-form-item  label-width='100px' label="用途" span="1" prop="contractNo" class="readonly">
+            <ws-select v-model="deptBudgetList.purpose" 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" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="合同费用"' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select v-model="deptBudgetList.type" 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" />
+            </ws-select>
+          </el-form-item>
+           <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="合同费用"' label="合同编号" span="1" prop="contractNo" class="readonly">
+            <el-select v-model="deptBudgetList.contractNo" placeholder="选择合同" class="typeselect">
+              <el-option v-for="item in contractList" :key="item.contractNo" :label="item.contractNo" :value="item.contractNo"
+                style="color: #8890b1" />
+            </el-select>
+          </el-form-item>
+           <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓库名称" span="1" prop="contractNo" class="readonly">
+            <el-select v-model="deptBudgetList.warehouseName" placeholder="选择仓库" class="typeselect">
+              <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
+                style="color: #8890b1" />
+            </el-select>
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            <el-input placeholder="输入费用名称,1-15个字" class="input_css input50" v-model="deptBudgetList.expenseName"></el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            <el-input placeholder="输入请款金额" class="input_css input50" v-model="deptBudgetList.amountMoney"></el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+            :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        </el-form>
+        </div>
+        <div style='text-align:right;margin-right:30px;'>
+            <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交
+            </el-button>
+        </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        mode:'全部分配',
+        ware:'指定仓库',
+        dates:'固定日期',
+        moneys:'按重量自动分配',
+        goods:'全部货品',
+        amount:0,
+        goodsList:[],
+        dataList:[],
+        warecontractList:[],
+        feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
+        deptBudgetList:{purpose:'合同费用',type:'粮款'},
+        makeWordData: {},
+        warehouseList:[],
+        contractList:[],
+        paymentScreenshot:[],
+        modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
+        wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
+        datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
+        moneysList:[{key:1,value:'按重量自动分配'},{key:2,value:'指定分配金额'}],
+        goodsList:[{key:1,value:'全部货品'},{key:2,value:'指定货品'}],
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      returnsales(){
+        this.$router.go(-1)
+      },
+      // 获取当前年月日
+			getdate() {
+				var date = new Date()
+				var year = date.getFullYear() //获取完整的年份(4位)
+				var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+				var datetime = date.getDate() //获取当前日(1-31)
+				var hour = date.getHours()
+				var minutes = date.getMinutes()
+				var seconds = date.getSeconds()
+				if (mouth < 10) {
+					mouth = '0' + mouth
+				}
+				if (datetime < 10) {
+					datetime = '0' + datetime
+				}
+				if (hour < 10) {
+					hour = '0' + hour
+				}
+				if (minutes < 10) {
+					minutes = '0' + minutes
+				}
+				if (seconds < 10) {
+					seconds = '0' + seconds
+				}
+				return year + '' + mouth + datetime + hour + minutes + seconds
+			},
+      MathRand() {
+				var Num = ''
+				for (var i = 0; i < 4; i++) {
+					Num += Math.floor(Math.random() * 10)
+				}
+				return Num
+			},
+      // selectcontract(e){
+      //   console.log(e)
+      //   for (let i = 0; i < this.contractList.length; i++) {
+      //     console.log(this.contractList[i])
+      //     if(this.contractList[i].contractNo==e){
+      //       this.signingDate=this.contractList[i].signingDate
+      //       // this.disabledDate()
+      //     }
+      //   }
+      // },
+      handlefujian(file) {
+        // console.log(file)
+        this.paymentScreenshot.push(file.url)
+        // this.dialogVisible = true
+      },
+      handleRemove(file) {
+        // console.log(file)
+        for (let i = 0; i < this.paymentScreenshot.length; i++) {
+          if(this.paymentScreenshot[i]==response.url){
+            this.paymentScreenshot.splice(i, 1)
+          }
+          
+        }
+      },
+      submit(){
+        this.deptBudgetList.compId=localStorage.getItem('ws-pf_compId')
+        this.deptBudgetList.agent=localStorage.getItem('ws-pf_staffName')
+        this.deptBudgetList.totalDistribution=this.amount
+       if(this.deptBudgetList.purpose=='合同费用'){
+          this.deptBudgetList.expensesPurpose=1
+          this.deptBudgetList.costNo='HTF'+this.getdate()+this.MathRand()
+        }else if(this.deptBudgetList.purpose=='库点费用'){
+          this.deptBudgetList.expensesPurpose=3
+          this.deptBudgetList.expenseAllocationInfoList=[]
+           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()
+        }
+        if(this.deptBudgetList.expensesPurpose==1){
+          if(this.deptBudgetList.type=='粮款'){
+            this.deptBudgetList.costType=1
+            this.deptBudgetList.expenseAllocationInfoList=[]
+          }else if(this.deptBudgetList.type=='非粮款'){
+            this.deptBudgetList.costType=3
+            this.deptBudgetList.expenseAllocationInfoList=[]
+          }else if(this.deptBudgetList.type=='保证金'){
+            this.deptBudgetList.expensesPurpose=5
+            this.deptBudgetList.expenseAllocationInfoList=[]
+          }
+        }
+        this.deptBudgetList.expensesType=1
+        if(!this.deptBudgetList.contractNo&&this.deptBudgetList.expensesPurpose==1){
+          this.$message({
+                message: '合同编号不能为空!',
+                type: 'warning',
+              })
+        }
+        if(!this.deptBudgetList.warehouse&&this.deptBudgetList.expensesPurpose==3){
+          this.$message({
+                message: '仓库名称不能为空!',
+                type: 'warning',
+              })
+        }
+        if(!this.deptBudgetList.expenseName){
+          this.$message({
+                message: '费用名称不能为空!',
+                type: 'warning',
+          })
+        }
+        if(this.deptBudgetList.expenseName.length<1||this.deptBudgetList.expenseName.length>15){
+          this.$message({
+                message: '费用名称输入错误!',
+                type: 'warning',
+          })
+        }
+        if(!this.deptBudgetList.amountMoney){
+          this.$message({
+                message: '金额不能为空!',
+                type: 'warning',
+          })
+        }
+        if(this.deptBudgetList.amountMoney<0.01||this.deptBudgetList.amountMoney>100000000){
+          this.$message({
+                message: '金额输入错误!',
+                type: 'warning',
+          })
+        }
+        this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
+        addexenseinfo(this.deptBudgetList).toPromise()
+          .then(response => {
+            this.$message({
+              message: '提交成功!',
+              type: 'success',
+            })
+            this.$router.go(-1)
+            })
+      },
+      modeselect(e){
+          console.log(e)
+      },selectware(e){
+          console.log(e)
+      },
+      goodsNameselect(e){
+          console.log(e)
+      },
+      addlist(){
+        this.feeDetailsDistributions.push({proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:this.feeDetailsDistributions.length})
+      },
+      dellist(row){
+          this.feeDetailsDistributions.splice(row.index,1)
+      },
+      getList() {
+         getcontract({
+        compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+        getwarehouse({
+        compId:localStorage.getItem('ws-pf_compId'),
+        warehouseType:1
+        })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList=response
+        })
+
+      },
+      detail(){
+        this.$router.push({name:'contractprofitsdetails'})
+      },
+      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 (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
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+  }
+  /deep/.input50>.el-input__inner{
+    width:50%;
+  }
+  /deep/.typeselect.el-select{
+    width:50%;
+  }
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+    .el-form-item__label{
+      color:#8890B1;
+    }
+  }
+  /deep/.el-form-item {
+    width: 50%;
+}
+</style>

+ 284 - 0
src/views/profitable/receiptaduit.vue

@@ -0,0 +1,284 @@
+//确认收款
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">确认收款</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+     <div style='margin:0 auto 10px;width:90%;'>基本信息</div>
+      <div>
+        <el-form label-position="left">
+          <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="3"
+                style="color: #8890b1" />
+                <ws-option label="经营性费用" value="5"
+                style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose==1' label="类型" span="1" prop="contractNo" class="readonly">
+            <ws-select disabled v-model="deptBudgetList.costType" placeholder="" class="typeselect" >
+                <ws-option label="粮款" value="1" style="color: #8890b1" />
+                <ws-option label="非粮款" value="3" style="color: #8890b1" />
+                <ws-option label="保证金" value="5" style="color: #8890b1" />
+            </ws-select>
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==3' label-width='100px' label="仓库名称" span="1" prop="warehouse" class="readonly">
+          {{deptBudgetList.warehouse}}
+          </el-form-item>
+          <el-form-item v-if='deptBudgetList.expensesPurpose==1' label-width='100px' label="合同编号" span="1" prop="contractNo" class="readonly">
+          {{deptBudgetList.contractNo}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="费用名称" span="1" prop="settlementMethod">
+            {{deptBudgetList.expenseName}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
+            {{deptBudgetList.amountMoney}}
+          </el-form-item>
+          <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
+            <el-input
+            disabled
+            type="textarea"
+            :rows="5"
+            placeholder="选填,不超过50个字"
+            v-model="deptBudgetList.remark">
+            </el-input>
+          </el-form-item>
+          <el-form-item label-width='100px' label="附件">
+          <div>
+            <span v-for='item in srcList'><el-image
+              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
+              :src="item"
+               :preview-src-list="srcList"></el-image></span>
+             
+          </div>
+        </el-form-item>
+        </el-form>
+        <div style='width:90%;margin:10px auto;text-align:right;'><el-button class="bg-bottom" type="primary" size="small" @click="reject()">驳回
+        </el-button>
+        <el-button class="bg-bottom" type="primary" size="small" @click="submit()">确认收款
+        </el-button></div>
+        <el-dialog
+      title="驳回"
+      :visible.sync="rejectshow"
+      width="30%"
+      :before-close="handleClose">
+      <span>驳回原因</span>
+      <div><el-input
+  type="textarea"
+  :rows="2"
+  placeholder="请输入驳回原因"
+  v-model="textarea">
+</el-input>
+</div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="rejectclick">确 定</el-button>
+      </span>
+    </el-dialog>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {lookexenseinfo,editexenseinfo} from '@/model/profitable/index'
+  import {woekflowhandle,} from '@/model/tasksport/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        rejectshow:false,
+        deptBudgetList:{},
+        makeWordData: {},
+        srcList:[],
+        textarea:'',
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      getList() {
+        lookexenseinfo({
+         id:this.$route.query.id
+        })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList=response
+          this.srcList=response.addressUrl.split(',')
+        })
+
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      submit(){
+          this.$confirm('确定提交确认收款信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+        this.deptBudgetList.flag=0
+        editexenseinfo(this.deptBudgetList)
+        .toPromise()
+        .then((response) => {
+          // woekflowhandle({
+          //       taskId: this.deptBudgetList.taskId,
+          //       approved: true,
+          //       auditMind: '34',
+          //       needReapply: false,
+          //     })
+          //     .toPromise()
+          //     .then((response) => {
+                this.$message({
+                  message: '确认成功!',
+                  type: 'success',
+                })
+                this.$router.go(-1)
+        }).catch((response) => {
+                this.$message({
+                  message: '确认失败!',
+                  type: 'success',
+                })
+              })
+        // })
+        })
+      },
+      rejectclick(){
+        // woekflowhandle({
+        //   taskId: this.deptBudgetList.taskId,
+        //   approved: true,
+        //   auditMind: '34',
+        //   needReapply: false,
+        // }).toPromise()
+        // .then((response) => {
+          this.deptBudgetList.flag=6
+          this.deptBudgetList.reason=this.testarea
+        editexenseinfo(this.deptBudgetList)
+        .toPromise()
+        .then((response) => {
+          this.$message({
+            message: '驳回成功!',
+            type: 'success',
+          })
+          this.$router.go(-1)
+        }).catch((response) => {
+          this.$message({
+            message: '驳回失败!',
+            type: 'success',
+          })
+        })
+      },
+      reject(){
+        this.rejectshow=true
+      },
+      detail(){
+        this.$router.push({name:'contractprofitsdetails'})
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    border-radius: 4px;
+    margin-top: 10px;
+    padding-top:30px;
+    overflow-y: scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:10px auto;
+  }
+  
+  /deep/.el-form-item {
+    width: 50%;
+}
+</style>

+ 300 - 0
src/views/profitable/warehousecost.vue

@@ -0,0 +1,300 @@
+//库点费用
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">合同费用</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+          <el-date-picker v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期">
+        </el-date-picker>
+        <ws-select v-model="warehouseName" placeholder="" class="typeselect" @change="selectwarehouse">
+          <ws-option v-for="item in warehouse" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+          </div>
+        </el-col>
+      </el-row>
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="18">
+       支出粮款:{{foodExpenditure}}元   收入粮款:{{grainIncome}}元    费用收入:{{expenseIncome}}元    费用支出:{{expensesPay}}元    当期利润: {{currentProfit}}元 
+        </el-col>
+        <el-col :span="6">
+
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="index" label="序号">
+            <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="feeType" label="类型">
+            <template slot-scope="scope">
+              <div v-if='scope.row.expensesType==1'>收入</div>
+              <div v-if='scope.row.expensesType==2'>支出</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="expensesName" label="费用名称"></el-table-column>
+          <el-table-column prop="warehouseName" label="所属库点"></el-table-column>
+          <el-table-column prop="expensesPrice" label="费用金额"></el-table-column>
+          <el-table-column prop="personName" label="请款人/收款人"></el-table-column>
+          <el-table-column prop="payDeadline" label="日期"></el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    getInOutDetailed,
+    getwarehouse
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        taskTypeList:[],
+        warehouse:[],
+        warehouseName:'',
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        outtotal:0,
+        intotal:0,
+         foodExpenditure:0,
+        grainIncome:0,
+        expenseIncome:0,
+        expensesPay:0,
+        currentProfit:0,
+      }
+    },
+    activated() {
+      this.warehouseName=this.$route.query.warehouseName
+         this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      selectwarehouse(){
+        this.getList()
+      },
+      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 (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
+          this.value=[this.startDate,this.endDate]
+        },
+      getList() {
+        getwarehouse({ compId: localStorage.getItem('ws-pf_compId'),warehouseType:1}).toPromise()
+          .then(response => {
+            this.warehouse = response
+          
+          })
+        //   getcontract({
+        // compId:localStorage.getItem('ws-pf_compId'),
+        // })
+        // .toPromise()
+        // .then((response) => {
+        //   this.contractList=response
+        // })
+         getcontractexpenseinfo({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate:this.startDate,
+            endDate:this.endDate,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            costType:3
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+            if(this.tableData){
+              this.foodExpenditure=0
+              this.grainIncome=0
+              this.expenseIncome=0
+              this.expensesPay=0
+              this.currentProfit=0
+              for (let i = 0; i < this.tableData.length; i++) {
+                if(this.tableData[i].foodExpenditure){
+                  this.foodExpenditure+=Number(this.tableData[i].foodExpenditure)
+                }
+                if(this.tableData[i].grainIncome){
+                  this.grainIncome+=Number(this.tableData[i].grainIncome)
+                }
+                if(this.tableData[i].expenseIncome){
+                  this.expenseIncome+=Number(this.tableData[i].expenseIncome)
+                }
+                if(this.tableData[i].expensesPay){
+                  this.expensesPay+=Number(this.tableData[i].expensesPay)
+                }
+                if(this.tableData[i].currentProfit){
+                  this.currentProfit+=Number(this.tableData[i].currentProfit)
+                }
+              }
+            }
+            
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+</style>

+ 268 - 0
src/views/profitable/warehouseinventory.vue

@@ -0,0 +1,268 @@
+//库点库存
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">库存分布</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+ <ws-select v-model="searchTypeText" placeholder="" class="typeselect" @change="selecttaskType"
+          :value="searchType">
+          <ws-option v-for="item in taskTypeList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+            <el-input placeholder="可按合同名称、买方名称、卖方名称查找" class="input_css" v-model="searchKeyWord"></el-input>
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="index" label="序号">
+            <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="warehouseName" label="所属仓库"></el-table-column>
+          <el-table-column prop="createDate" label="所在仓库"></el-table-column>
+          <el-table-column prop="amountMoney" label="货名"></el-table-column>
+          <el-table-column prop="expenseName" label="剩余库存(吨)"></el-table-column>
+          <el-table-column prop="expenseRemarks" label="成本(元/吨)"></el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+    import {
+    getinventoryinfo,
+    getcontract
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        taskTypeList:[],
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        outtotal:0,
+        intotal:0,
+         foodExpenditure:0,
+        grainIncome:0,
+        expenseIncome:0,
+        expensesPay:0,
+        currentProfit:0,
+      }
+    },
+    activated() {
+         this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      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 (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
+          this.value=[this.startDate,this.endDate]
+        },
+      getList() {
+        getcontract({
+        compId:localStorage.getItem('ws-pf_compId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.contractList=response
+        })
+         getinventoryinfo({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            inventoryType:3,
+            searchType:this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+             if(this.tableData){
+              this.foodExpenditure=0
+              this.grainIncome=0
+              this.expenseIncome=0
+              this.expensesPay=0
+              this.currentProfit=0
+              for (let i = 0; i < this.tableData.length; i++) {
+                if(this.tableData[i].foodExpenditure){
+                  this.foodExpenditure+=Number(this.tableData[i].foodExpenditure)
+                }
+                if(this.tableData[i].grainIncome){
+                  this.grainIncome+=Number(this.tableData[i].grainIncome)
+                }
+                if(this.tableData[i].expenseIncome){
+                  this.expenseIncome+=Number(this.tableData[i].expenseIncome)
+                }
+                if(this.tableData[i].expensesPay){
+                  this.expensesPay+=Number(this.tableData[i].expensesPay)
+                }
+                if(this.tableData[i].currentProfit){
+                  this.currentProfit+=Number(this.tableData[i].currentProfit)
+                }
+              }
+            }
+            
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+</style>

+ 406 - 0
src/views/profitable/warehouseprofits.vue

@@ -0,0 +1,406 @@
+//库点
+<template>
+  <div class="container">
+    <!-- <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">盈收概览</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row> -->
+    <div class="center">
+      <el-row class='row_top'>
+      <el-col :span="12">
+        <div class="datascreen">
+        <el-date-picker v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+        
+      </div>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button  type='primary' @click='detail'>利润详情</el-button></el-col>
+    </el-row>
+      <div class="chart_css">
+        <div class="table">
+          <div ref="myEchart7" style="height: 410px;"></div>
+        </div>
+        <div class="makeWord_css">
+          <!-- <div ref="myEchart6" style="height: 410px"></div> -->
+        </div>
+      </div>
+      <div class="table_css">
+        <div  style='margin:0 auto'>
+          <div class='title' style='margin-bottom:10px;'>库点利润汇总表</div>
+          <div class='time'>{{value[0]}}-{{value[1]}}</div>
+        </div>
+        <ws-form>
+          <ws-info-table>
+          <ws-form-item label="收购重量(吨)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="销售重量(吨)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+          <ws-form-item label="支付粮款(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="收入粮款(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+          <ws-form-item label="其他支付(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="其他收入(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+          <ws-form-item label="运费(万元)" span="1" prop="contractNo" class="readonly">
+            
+          </ws-form-item>
+          <ws-form-item label="总利润(万元)" span="1" prop="settlementMethod">
+            
+          </ws-form-item>
+        </ws-info-table>
+        </ws-form>
+        
+        
+        <!-- <el-table :data="valueData" style="width: 100%">
+          <el-table-column prop="date" label="货名/货值" min-width="110">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">期初货值(元)</span>
+              <span v-if="scope.$index == 1">期末货值(元)</span>
+            </div>
+
+          </el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="合计" min-width="130">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">合计:</span>
+              <span v-if="scope.$index == 1">合计:1000000000</span>
+            </div>
+          </el-table-column>
+        </el-table> -->
+
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        deptBudgetList:{},
+        makeWordData: {},
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.makeWordData = this.getData(2)
+      this.initCharts()
+      this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      getList() {
+        // getceshi({
+        //  driverId:'8f1f3c624d7946d79a9d44a4057d969b'
+        // })
+        // .toPromise()
+        // .then((response) => {
+        // debugger
+        // console.log(response)
+        // })
+
+      },
+      detail(){
+        this.$router.push({name:'warehouseprofitsdetails'})
+      },
+       getPassYearFormatDate() {
+        var nowDate = new Date()
+        var _date = new Date()
+        var year = nowDate.getFullYear()-1
+        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
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+      initCharts() {
+        let app = this;
+        let myChart7 = app.$echarts.init(this.$refs.myEchart7);
+        var option;
+        option = {
+            // title: {
+            //   text: 'Rainfall vs Evaporation',
+            //   subtext: 'Fake Data'
+            // },
+            tooltip: {
+              trigger: 'axis'
+            },
+            legend: {
+              data: ['支出', '收入']
+            },
+            toolbox: {
+              show: true,
+              feature: {
+                dataView: {
+                  show: false,
+                  readOnly: false
+                },
+                magicType: {
+                  show: false,
+                  type: ['line', 'bar']
+                },
+                restore: {
+                  show: false
+                },
+                saveAsImage: {
+                  show: false
+                }
+              }
+            },
+            calculable: true,
+            xAxis: [{
+              name: '种类',
+              type: 'category',
+              // prettier-ignore
+              data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']
+            }],
+            yAxis: [{
+              name: '储量(吨)',
+              type: 'value'
+            }],
+            series: [{
+                name: '支出',
+                type: 'bar',
+                right: 0,
+                // label: {
+                //   show: true,
+                //   position: 'inside'
+                // },
+                 label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: [
+                  6.0, 60.9, 90.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0
+                ],
+                color: ['#5878E8 '],
+                formatter: '{value} 元',
+
+              },
+              {
+                name: '收入',
+                type: 'bar',
+                right: 20,
+                label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: [
+                  102.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8
+                ],
+                color: ['#FF9F24'],
+                formatter: '{value} 元',
+              }
+            ]
+          },
+          myChart7.setOption(option)
+      },
+      getData(count) {
+        // prettier-ignore
+        const nameList = [
+          '支出', '收入'
+        ];
+        const legendData = [];
+        const seriesData = [];
+        for (var i = 0; i < count; i++) {
+          var name = nameList[i]
+          // Math.random() > 0.65 ?  makeWord(4, 1) + '·' + makeWord(3, 0) :  makeWord(2, 1);
+          legendData.push(name);
+          seriesData.push({
+            name: name,
+            value: Math.round(Math.random() * 100000)
+          });
+        }
+
+        return {
+          legendData: legendData,
+          seriesData: seriesData
+        };
+
+        // function makeWord(max, min) {
+        //   debugger
+        //   const nameLen = Math.ceil(Math.random() * max + min);
+        //   const name = [];
+        //   for (var i = 0; i < nameLen; i++) {
+        //     name.push(nameList[Math.round(Math.random() * nameList.length - 1)]);
+        //   }
+        //   return name.join('');
+        // }
+
+      }
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+    overflow:scroll;
+  }
+
+  .row_top {
+    // background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+  .bg-right {
+      padding-right: 10px;
+      text-align: right;
+      height:60px;
+      padding-top:15px;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    text-align:center;
+    margin-bottom:10px;
+  }
+  /deep/.el-form{
+    width:90%;
+    margin:0 auto;
+  }
+  /deep/.el-form-item {
+    width: 50%;
+}
+.title{
+  background:#F6F7FC;
+  padding:20px 10px;
+  text-align:left;
+  position:relative;
+  font-size:18px;
+}
+.title::before{
+  content:'';
+  display:block;
+  background:#5473E8;
+  width:5px;height:30px;
+  position:absolute;
+  left:0;
+  top:50%;
+  transform: translateY(-50%);
+}
+.time{
+  text-align:right;
+  width:90%;
+  color:#8890B1;
+  margin:10px auto;
+}
+/deep/.ws-info-table{
+  border-left: 1px solid #D8DCE6;
+  border-top: 1px solid #D8DCE6;
+.el-form-item {
+    border-right: 1px solid #D8DCE6;
+    border-bottom: 1px solid #D8DCE6;
+}
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+    background-color: #F6F7FB;
+}
+</style>

+ 248 - 0
src/views/profitable/warehouseprofitsdetails.vue

@@ -0,0 +1,248 @@
+//合同利润详情
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">利润详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+          <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+            <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-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>
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%"  @selection-change="handleSelectionChange">
+          <el-table-column
+          type="selection"
+          width="55">
+        </el-table-column>
+          <el-table-column type="index" label="序号">
+            <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="warehouseName" label="仓库名"></el-table-column>
+          <el-table-column prop="acquisitionWeight" label="收购量(吨)"></el-table-column>
+          <el-table-column prop="saleWeight" label="销量(吨)"></el-table-column>
+          <el-table-column prop="salesVolume" label="销售额(万元)"></el-table-column>
+          <el-table-column prop="cost" label="成本(万元)"></el-table-column>
+          <el-table-column prop="profit" label="利润(万元)"></el-table-column>
+          <el-table-column prop="address" label="操作" width="200">
+            <template slot-scope="scope">
+              <el-button @click="inventory(1)" type="primary">库存</el-button>
+              <el-button @click="typeChange(1)" type="primary">费用</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    getwarehousedetails,
+    getwarehouse
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        warehouse:[],
+        deptCircularPage: {},
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        outtotal:0,
+        intotal:0,
+      }
+    },
+    activated() {
+         this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      inventory(row){
+        this.$router.push({name:'warehouseinventory',query:{warehouseName:row.warehouseName}})
+      },
+      cost(){
+        this.$router.push({name:'warehousecost',query:{warehouseName:row.warehouseName}})
+      },
+      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 (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
+          this.value=[this.startDate,this.endDate]
+        },
+      getList() {
+        
+         getInOutDetailed({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+</style>

+ 78 - 0
src/views/taskManagement/component/routers/route.js

@@ -127,6 +127,84 @@ const tranManagementRouter = {
       },
       },
       hidden: true
       hidden: true
     },
     },
+    //出入库任务出库选择货源
+    {
+      path: 'supplyofgoods',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/supplyofgoods'),
+      name: 'supplyofgoods',
+      meta: {
+        title: 'supplyofgoods',
+        shortcutEntrance: 'tranManagement',
+        module: 'warehouseManagement.warehouse.warehouseInfoTask.View',
+      },
+      hidden: true
+    },
+     //出入库任务退库选择货源
+     {
+      path: 'outsupplyofgoods',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/outsupplyofgoods'),
+      name: 'outsupplyofgoods',
+      meta: {
+        title: 'outsupplyofgoods',
+        shortcutEntrance: 'tranManagement',
+        module: 'warehouseManagement.warehouse.warehouseInfoTask.View',
+      },
+      hidden: true
+    },
+    //出入库任务出库查看货源
+    {
+      path: 'supplyofgoodslook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/supplyofgoodslook'),
+      name: 'supplyofgoodslook',
+      meta: {
+        title: 'supplyofgoodslook',
+        shortcutEntrance: 'tranManagement',
+        module: 'warehouseManagement.warehouse.warehouseInfoTask.View',
+      },
+      hidden: true
+    },
+     //出入库任务退库查看货源
+     {
+      path: 'outsupplyofgoodslook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/outsupplyofgoodslook'),
+      name: 'outsupplyofgoodslook',
+      meta: {
+        title: 'outsupplyofgoodslook',
+        shortcutEntrance: 'tranManagement',
+        module: 'warehouseManagement.warehouse.warehouseInfoTask.View',
+      },
+      hidden: true
+    },
+        //出入库任务出库编辑选择货源
+        {
+          path: 'supplyofgoodsedit',
+          component: () =>
+            import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/supplyofgoodsedit'),
+          name: 'supplyofgoodsedit',
+          meta: {
+            title: 'supplyofgoodsedit',
+            shortcutEntrance: 'tranManagement',
+            module: 'warehouseManagement.warehouse.warehouseInfoTask.View',
+          },
+          hidden: true
+        },
+         //出入库任务退库编辑选择货源
+         {
+          path: 'outsupplyofgoodsedit',
+          component: () =>
+            import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/outsupplyofgoodsedit'),
+          name: 'outsupplyofgoodsedit',
+          meta: {
+            title: 'outsupplyofgoodsedit',
+            shortcutEntrance: 'tranManagement',
+            module: 'warehouseManagement.warehouse.warehouseInfoTask.View',
+          },
+          hidden: true
+        },
     //出入库任务添加
     //出入库任务添加
     {
     {
       path: 'tranManagementWarehouseInOuttaskAdd',
       path: 'tranManagementWarehouseInOuttaskAdd',

+ 554 - 0
src/views/taskManagement/outsupplyofgoods.vue

@@ -0,0 +1,554 @@
+<!--出入库任务-->
+<template>
+  <div class="container">
+    	<el-row>
+			<el-col :span="12">
+				<h2 class="bg-left title">选择货源</h2>
+			</el-col>
+			<el-col :span="12" class="bg-right">
+				<el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+					<img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+						src="../../../public/img/lujing.png" alt />返回
+				</el-button>
+			</el-col>
+		</el-row>
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+          <div style='width:50%;margin-right:10px;'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+  
+          </div>
+      </template>
+      <template slot="right">
+        <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按车牌号查找" clearable maxlength="300" 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>
+      </template>
+    </BaseHeaderLayout>
+    <el-row style='margin:10px;'>
+        <el-col :span="12">已选 10 条,合计出库重量  {{num}}吨,</el-col>
+        <el-col style='text-align:right;' :span="12">
+            <ws-button type="primary" @click="preview()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">预览
+        </ws-button>
+         <ws-button type="primary" @click="cancelpreview()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">取消预览
+        </ws-button>
+         <ws-button type="primary" @click="submit()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">提交
+        </ws-button>
+        </el-col>
+    </el-row>   
+      <el-table class="wenzi" :data="gainList.records" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+          <el-table-column
+      type="selection"
+      width="55">
+    </el-table-column>
+        <el-table-column type="index" label="序号">
+          <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="inOutTaskNo" label="车牌号" width="160"></el-table-column>
+        <el-table-column prop="contractNo" label="出库时间" width="160">
+        </el-table-column>
+        <el-table-column prop="warehouseName" class="table_td" label="净重(吨)"></el-table-column>
+        <el-table-column prop="inOutType" class="table_td" label="出货库"></el-table-column>
+        <el-table-column prop="goodsName" class="table_td" label="货源"></el-table-column>
+      </el-table>
+      <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>
+</template>
+<script>
+  import {
+    getoreditoutput,
+    outdelete,
+    movestates
+  } from '@/model/tasksport/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        gainList: [],
+        num:0,
+        currentPage: 1,
+        primary: '1',
+                pickerOptions: {
+          shortcuts: [{
+              text: '本周',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                var thisDay = start.getDay()
+                var thisDate = start.getDate()
+                if (thisDay != 0) {
+                  start.setDate(thisDate - thisDay)
+                }
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本月',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                start.setDate(1)
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本季度',
+              onClick(picker) {
+                var oDate = new Date()
+
+                var thisYear = oDate.getFullYear()
+                var thisMonth = oDate.getMonth() + 1
+
+                var n = Math.ceil(thisMonth / 3) // 季度
+
+                var Month = n * 3 - 1
+
+                var start = new Date(thisYear, Month - 2, 1)
+                var end = new Date()
+
+                picker.$emit('pick', [start, end])
+              },
+            },
+          ],
+        },
+        value1: '',
+        value2: '',
+        pageSize: 10,
+        searchType: 1,
+        searchTypeText: '待审核',
+        searchKeyWord: '',
+        inOutType:'',
+        contractType: 2,
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        warehouseName: '',
+        deptBudgetTotal: 0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    activated() {
+      this.getList()
+      this.showType = this.isShow
+    },
+    mounted() {
+      this.getList()
+      this.showType = this.isShow
+    },
+    methods: {
+      selectinOutType(){
+        this.getList()
+      },
+      preview(){
+        this.gainList=this.multipleSelection
+         this.deptBudgetTotal=this.multipleSelection.length
+      },
+      cancelpreview(){
+        this.getList()
+      },
+       handleSelectionChange(val) {
+         this.num=0
+         for (let i = 0; i < val.length; i++) {
+          this.num+=val[i].outWeight;
+         }
+        this.multipleSelection = val;
+      },
+      //添加
+      handleAdd() {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskAdd'
+        })
+      },
+      //查找
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+
+      getList() {
+        getoreditoutput({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            searchKeyWord: this.searchKeyWord,
+            inOutType:this.inOutType
+          })
+          .toPromise()
+          .then((response) => {
+            this.gainList = response
+            this.currentPage = response.current
+            this.pageSize = response.size
+            this.deptBudgetTotal = response.total
+          })
+      },
+      getSpanArr(data) {
+        let that = this
+
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+        that.spanArr = []
+
+        that.pos = 0
+
+        //遍历数据
+
+        data.forEach((item, index) => {
+          //判断是否是第一项
+
+          // if (index === 0) {
+          //   this.spanArr.push(1)
+          //   this.pos = 0
+          // } else {
+          //不是第一项时,就根据标识去存储
+          if (data[index].warehouseNumViewList.length > 1) {
+            // 查找到符合条件的数据时每次要把之前存储的数据+1
+            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+            this.spanArr.push(0)
+          } else {
+            // 没有符合的数据时,要记住当前的index
+            this.spanArr.push(1)
+            this.pos = index
+          }
+          // }
+        })
+      },
+      //查看//传参
+      nocomplete(row) {
+        this.$router.push({
+          path: 'inOutWarehousetaskEdit',
+          query: {
+            relevanceId: row.relevanceId,
+            businessKey: row.id,
+            workflowId: row.workflowId,
+          },
+        })
+      },
+       submit(){
+         for (let i = 0; i < this.multipleSelection.length; i++) {
+          if(!this.multipleSelection[i].outWeight){
+              this.$message({
+              message: '预计出库重量不能为空',
+              type: 'error'
+              });
+              return
+
+          }
+          if(this.multipleSelection[i].outWeight>this.multipleSelection[i].surplusWeight){
+            this.$message({
+              message: '预计出库重量不能超过剩余重量',
+              type: 'error'
+              });
+              return
+          }   
+          if(this.multipleSelection[i].outWeight.indexOf('.')!=-1&&this.multipleSelection[i].outWeight.substring(this.multipleSelection[i].outWeight.indexOf('.')+1, this.multipleSelection[i].outWeight.length).length>3){
+            this.$message({
+              message: '预计出库重量输入错误',
+              type: 'error'
+              });
+              return
+          }
+          
+        }
+        var that=this
+        this.$confirm(`确定提交货源信息?`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+        editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
+          .then((response) => {
+            this.$message({
+					message: '提交成功',
+					type: 'success'
+					});
+            localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
+            that.$router.go(-1)
+          }).catch((response) => {
+             this.$message({
+              message: '提交失败',
+              type: 'error'
+              }); 
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+     
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+        this.currentPage = 1,
+          this.getList()
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .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;
+  }
+ 	.title {
+		position: relative;
+		padding-left: 10px;
+	}
+
+	.title::before {
+		content: '';
+		display: inline-block;
+		width: 5px;
+		height: 30px;
+		background: #5473e8;
+		position: absolute;
+		left: 0;
+	}
+  
+	.bg-right {
+		text-align: right;
+		padding: 16px 20px;
+	}
+  /deep/.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    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;
+  }
+
+  .completed.el-button--default {
+    border-color: #5878e8;
+    background-color: #f6f7fc;
+    color: #5878e8;
+  }
+
+  .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: 50px;
+  }
+
+  .findValue {
+    // width: 0%;
+    margin-left: 10px;
+  }
+
+  .search {
+    margin-left: -250px;
+  }
+
+  .Value {
+    width: 300px;
+    margin-left: 766px;
+  }
+
+  .el-pagination {
+    text-align: center;
+  }
+
+  .winseaview-main {
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .spans {
+    display: table-caption;
+    width: 17px;
+    line-height: 19px;
+  }
+
+  //执行样式
+  .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;
+  }
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  .corles {
+    color: #5878e8;
+    font-size: 14px;
+  }
+</style>

+ 530 - 0
src/views/taskManagement/outsupplyofgoodsedit.vue

@@ -0,0 +1,530 @@
+<!--出入库任务-->
+<template>
+  <div class="container">
+    	<el-row>
+			<el-col :span="12">
+				<h2 class="bg-left title">选择货源</h2>
+			</el-col>
+			<el-col :span="12" class="bg-right">
+				<el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+					<img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+						src="../../../public/img/lujing.png" alt />返回
+				</el-button>
+			</el-col>
+		</el-row>
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+          <div style='width:50%;margin-right:10px;'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+  
+          </div>
+      </template>
+      <template slot="right">
+        <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按车牌号查找" clearable maxlength="300" 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>
+      </template>
+    </BaseHeaderLayout>
+    <el-row style='margin:10px;'>
+        <el-col :span="12">已选 10 条,合计出库重量  {{num}}吨,</el-col>
+        <el-col style='text-align:right;' :span="12">
+            <ws-button type="primary" @click="preview()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">预览
+        </ws-button>
+         <ws-button type="primary" @click="cancelpreview()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">取消预览
+        </ws-button>
+         <ws-button type="primary" @click="submit()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">提交
+        </ws-button>
+        </el-col>
+    </el-row>   
+      <el-table class="wenzi" :data="gainList.records" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+          <el-table-column
+      type="selection"
+      width="55">
+    </el-table-column>
+        <el-table-column type="index" label="序号">
+          <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="inOutTaskNo" label="车牌号" width="160"></el-table-column>
+        <el-table-column prop="contractNo" label="出库时间" width="160">
+        </el-table-column>
+        <el-table-column prop="warehouseName" class="table_td" label="净重(吨)"></el-table-column>
+        <el-table-column prop="inOutType" class="table_td" label="出货库"></el-table-column>
+        <el-table-column prop="goodsName" class="table_td" label="货源"></el-table-column>
+      </el-table>
+      <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>
+</template>
+<script>
+  import {
+    getoreditoutput,
+    outdelete,
+    movestates
+  } from '@/model/tasksport/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        gainList: [],
+        num:0,
+        currentPage: 1,
+        primary: '1',
+                pickerOptions: {
+          shortcuts: [{
+              text: '本周',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                var thisDay = start.getDay()
+                var thisDate = start.getDate()
+                if (thisDay != 0) {
+                  start.setDate(thisDate - thisDay)
+                }
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本月',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                start.setDate(1)
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本季度',
+              onClick(picker) {
+                var oDate = new Date()
+
+                var thisYear = oDate.getFullYear()
+                var thisMonth = oDate.getMonth() + 1
+
+                var n = Math.ceil(thisMonth / 3) // 季度
+
+                var Month = n * 3 - 1
+
+                var start = new Date(thisYear, Month - 2, 1)
+                var end = new Date()
+
+                picker.$emit('pick', [start, end])
+              },
+            },
+          ],
+        },
+        value1: '',
+        value2: '',
+        pageSize: 10,
+        searchType: 1,
+        searchTypeText: '待审核',
+        searchKeyWord: '',
+        inOutType:'',
+        contractType: 2,
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        warehouseName: '',
+        deptBudgetTotal: 0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    activated() {
+      this.getList()
+      this.showType = this.isShow
+    },
+    mounted() {
+      this.getList()
+      this.showType = this.isShow
+    },
+    methods: {
+      selectinOutType(){
+        this.getList()
+      },
+      preview(){
+        this.gainList=this.multipleSelection
+         this.deptBudgetTotal=this.multipleSelection.length
+      },
+      cancelpreview(){
+        this.getList()
+      },
+       handleSelectionChange(val) {
+         this.num=0
+         for (let i = 0; i < val.length; i++) {
+          this.num+=val[i].outWeight;
+         }
+        this.multipleSelection = val;
+      },
+      //添加
+      handleAdd() {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskAdd'
+        })
+      },
+      //查找
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+
+      getList() {
+        getoreditoutput({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            searchKeyWord: this.searchKeyWord,
+            inOutType:this.inOutType
+          })
+          .toPromise()
+          .then((response) => {
+            this.gainList = response
+            this.currentPage = response.current
+            this.pageSize = response.size
+            this.deptBudgetTotal = response.total
+          })
+      },
+      getSpanArr(data) {
+        let that = this
+
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+        that.spanArr = []
+
+        that.pos = 0
+
+        //遍历数据
+
+        data.forEach((item, index) => {
+          //判断是否是第一项
+
+          // if (index === 0) {
+          //   this.spanArr.push(1)
+          //   this.pos = 0
+          // } else {
+          //不是第一项时,就根据标识去存储
+          if (data[index].warehouseNumViewList.length > 1) {
+            // 查找到符合条件的数据时每次要把之前存储的数据+1
+            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+            this.spanArr.push(0)
+          } else {
+            // 没有符合的数据时,要记住当前的index
+            this.spanArr.push(1)
+            this.pos = index
+          }
+          // }
+        })
+      },
+      //查看//传参
+      nocomplete(row) {
+        this.$router.push({
+          path: 'inOutWarehousetaskEdit',
+          query: {
+            relevanceId: row.relevanceId,
+            businessKey: row.id,
+            workflowId: row.workflowId,
+          },
+        })
+      },
+       submit(){
+  
+        var that=this
+        this.$confirm(`确定提交货源信息?`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+        editSourceOfGoods({orderList:this.multipleSelection,taskFlag:1}).toPromise()
+          .then((response) => {
+            this.$message({
+					message: '提交成功',
+					type: 'success'
+					});
+            localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
+            that.$router.go(-1)
+          }).catch((response) => {
+             this.$message({
+              message: '提交失败',
+              type: 'error'
+              }); 
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+     
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+        this.currentPage = 1,
+          this.getList()
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .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;
+  }
+ 	.title {
+		position: relative;
+		padding-left: 10px;
+	}
+
+	.title::before {
+		content: '';
+		display: inline-block;
+		width: 5px;
+		height: 30px;
+		background: #5473e8;
+		position: absolute;
+		left: 0;
+	}
+  
+	.bg-right {
+		text-align: right;
+		padding: 16px 20px;
+	}
+  /deep/.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    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;
+  }
+
+  .completed.el-button--default {
+    border-color: #5878e8;
+    background-color: #f6f7fc;
+    color: #5878e8;
+  }
+
+  .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: 50px;
+  }
+
+  .findValue {
+    // width: 0%;
+    margin-left: 10px;
+  }
+
+  .search {
+    margin-left: -250px;
+  }
+
+  .Value {
+    width: 300px;
+    margin-left: 766px;
+  }
+
+  .el-pagination {
+    text-align: center;
+  }
+
+  .winseaview-main {
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .spans {
+    display: table-caption;
+    width: 17px;
+    line-height: 19px;
+  }
+
+  //执行样式
+  .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;
+  }
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  .corles {
+    color: #5878e8;
+    font-size: 14px;
+  }
+</style>

+ 603 - 0
src/views/taskManagement/outsupplyofgoodslook.vue

@@ -0,0 +1,603 @@
+<!--出入库任务-->
+<template>
+  <div class="container">
+    	<el-row>
+			<el-col :span="12">
+				<h2 class="bg-left title">查看货源</h2>
+			</el-col>
+			<el-col :span="12" class="bg-right">
+				<el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+					<img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+						src="../../../public/img/lujing.png" alt />返回
+				</el-button>
+			</el-col>
+		</el-row>
+    <el-row style='margin:10px;'>
+        <el-col :span="12">已选 10 条,合计出库重量  100吨,玉米(潮粮)50吨,玉米(机收)20吨,玉米 30吨</el-col>
+        <el-col style='text-align:right;' :span="12">
+        </el-col>
+    </el-row>   
+      <el-table class="wenzi" :data="gainList.records" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+          <el-table-column
+      type="selection"
+      width="55">
+    </el-table-column>
+        <el-table-column type="index" label="序号">
+          <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="carNo" label="车牌号" width="160"></el-table-column>
+        <el-table-column prop="inOutDate" label="出库时间" width="160">
+        </el-table-column>
+        <el-table-column prop="warehouseName" class="table_td" label="净重(吨)"></el-table-column>
+        <el-table-column prop="deliverywarehouse" class="table_td" label="出货库"></el-table-column>
+        <el-table-column prop="goodsSource" class="table_td" label="货源"></el-table-column>
+      </el-table>
+      <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>
+</template>
+<script>
+  import {
+    getoreditoutput,
+    outdelete,
+    movestates
+  } from '@/model/tasksport/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        gainList: [],
+        currentPage: 1,
+        primary: '1',
+                pickerOptions: {
+          shortcuts: [{
+              text: '本周',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                var thisDay = start.getDay()
+                var thisDate = start.getDate()
+                if (thisDay != 0) {
+                  start.setDate(thisDate - thisDay)
+                }
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本月',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                start.setDate(1)
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本季度',
+              onClick(picker) {
+                var oDate = new Date()
+
+                var thisYear = oDate.getFullYear()
+                var thisMonth = oDate.getMonth() + 1
+
+                var n = Math.ceil(thisMonth / 3) // 季度
+
+                var Month = n * 3 - 1
+
+                var start = new Date(thisYear, Month - 2, 1)
+                var end = new Date()
+
+                picker.$emit('pick', [start, end])
+              },
+            },
+          ],
+        },
+        value1: '',
+        value2: '',
+        pageSize: 10,
+        searchType: 1,
+        searchTypeText: '待审核',
+        searchKeyWord: '',
+        inOutType:'',
+        inOutTypeList:[
+          {
+            value: '销售出库',
+            type: 1
+          },
+          {
+            value: '移库出库',
+            type: 3
+          },
+          {
+            value: '暂存出库',
+            type: 2
+          },
+          {
+            value: '贸易服务出库',
+            type: 4
+          },
+          {
+            value: '采购出库',
+            type: 5
+          },
+          {
+            value: '采购入库',
+            type: 6
+          },
+          {
+            value: '移库入库',
+            type: 7
+          },
+          {
+            value: '暂存入库',
+            type: 8
+          },
+          {
+            value: '贸易服务入库',
+            type: 9
+          },
+          {
+            value: '退库',
+            type: 10
+          },
+        ],
+        contractType: 2,
+        taskTypeList: [{
+            value: '待审核',
+            type: 1
+          },
+          {
+            value: '执行中',
+            type: 3
+          },
+          {
+            value: '已驳回',
+            type: 2
+          },
+          {
+            value: '已完成',
+            type: 4
+          },
+          {
+            value: '全部任务',
+            type: ''
+          },
+        ],
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        warehouseName: '',
+        deptBudgetTotal: 0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    activated() {
+      this.getList()
+      this.showType = this.isShow
+    },
+    mounted() {
+      this.getList()
+      this.showType = this.isShow
+    },
+    methods: {
+      selectinOutType(){
+        this.getList()
+      },
+       handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      //添加
+      handleAdd() {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskAdd'
+        })
+      },
+      //查找
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+      deleteclick(row) {
+        var text = ''
+        if (
+          (row.taskTypeKey == 3 && row.inOutType == '移库出库') ||
+          (row.taskTypeKey == 4 && row.inOutType == '销售出库') ||
+          (row.taskTypeKey == 4 && row.inOutType == '退库')
+        ) {
+          text = '相同任务编号的任务将一并删除且不可恢复,是否确定删除?'
+        } else {
+          text = `任务删除后不可恢复,是否确定删除?`
+        }
+        //cancelButtonClass: "btn-custom-cancel"
+        this.$confirm(text, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            outdelete({
+                id: row.id,
+                relevanceId: row.relevanceId,
+                inOutFlag: row.inOutFlag,
+              })
+              .toPromise()
+              .then((response) => {
+                this.getList()
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      getList() {
+        getoreditoutput({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            searchKeyWord: this.searchKeyWord,
+            inOutType:this.inOutType
+          })
+          .toPromise()
+          .then((response) => {
+            this.gainList = response
+            this.currentPage = response.current
+            this.pageSize = response.size
+            this.deptBudgetTotal = response.total
+          })
+      },
+      //编辑
+      delivery(item) {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskedit',
+          query: {
+            relevanceId: item.relevanceId,
+            inOutFlag: item.inOutFlag
+          },
+        })
+      },
+      audit(item) {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskaudit',
+          query: {
+            relevanceId: item.relevanceId,
+            taskId: item.taskId,
+            businessKey: item.id,
+            workflowId: item.workflowId,
+          },
+        })
+      },
+      getSpanArr(data) {
+        let that = this
+
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+        that.spanArr = []
+
+        that.pos = 0
+
+        //遍历数据
+
+        data.forEach((item, index) => {
+          //判断是否是第一项
+
+          // if (index === 0) {
+          //   this.spanArr.push(1)
+          //   this.pos = 0
+          // } else {
+          //不是第一项时,就根据标识去存储
+          if (data[index].warehouseNumViewList.length > 1) {
+            // 查找到符合条件的数据时每次要把之前存储的数据+1
+            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+            this.spanArr.push(0)
+          } else {
+            // 没有符合的数据时,要记住当前的index
+            this.spanArr.push(1)
+            this.pos = index
+          }
+          // }
+        })
+      },
+      //查看//传参
+      nocomplete(row) {
+        this.$router.push({
+          path: 'inOutWarehousetaskEdit',
+          query: {
+            relevanceId: row.relevanceId,
+            businessKey: row.id,
+            workflowId: row.workflowId,
+          },
+        })
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      editClick(row) {
+        var status = ''
+        if (row.taskStatus == '待审核' || row.taskStatus == '已完成') {
+          status = '执行中'
+        } else if (row.taskStatus == '执行中') {
+          status = '已完成'
+        }
+        //cancelButtonClass: "btn-custom-cancel"
+        this.$confirm(`是否将状态改为${status}`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            movestates({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+        this.currentPage = 1,
+          this.getList()
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .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;
+  }
+ 	.title {
+		position: relative;
+		padding-left: 10px;
+	}
+
+	.title::before {
+		content: '';
+		display: inline-block;
+		width: 5px;
+		height: 30px;
+		background: #5473e8;
+		position: absolute;
+		left: 0;
+	}
+  
+	.bg-right {
+		text-align: right;
+		padding: 16px 20px;
+	}
+  /deep/.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    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;
+  }
+
+  .completed.el-button--default {
+    border-color: #5878e8;
+    background-color: #f6f7fc;
+    color: #5878e8;
+  }
+
+  .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: 50px;
+  }
+
+  .findValue {
+    // width: 0%;
+    margin-left: 10px;
+  }
+
+  .search {
+    margin-left: -250px;
+  }
+
+  .Value {
+    width: 300px;
+    margin-left: 766px;
+  }
+
+  .el-pagination {
+    text-align: center;
+  }
+
+  .winseaview-main {
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .spans {
+    display: table-caption;
+    width: 17px;
+    line-height: 19px;
+  }
+
+  //执行样式
+  .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;
+  }
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  .corles {
+    color: #5878e8;
+    font-size: 14px;
+  }
+</style>

+ 539 - 0
src/views/taskManagement/supplyofgoods.vue

@@ -0,0 +1,539 @@
+<!--出入库任务-->
+<template>
+  <div class="container">
+      	<el-row>
+			<el-col :span="12">
+				<h2 class="bg-left title">选择货源</h2>
+			</el-col>
+			<el-col :span="12" class="bg-right">
+				<el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+					<img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+						src="../../../public/img/lujing.png" alt />返回
+				</el-button>
+			</el-col>
+		</el-row>
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+          <div style='width:50%;margin-right:10px;'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+  
+          </div>
+        <ws-button type="primary" @click="getList()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">按日期排序
+        </ws-button>
+        <ws-button type="primary" @click="costsort()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">按成本排序
+        </ws-button>
+      </template>
+      <template slot="right">
+        <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按合同编号或任务编号查找" clearable maxlength="300" 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>
+      </template>
+    </BaseHeaderLayout>
+    <el-row style='margin:10px;'>
+        <el-col :span="12">已选 {{this.multipleSelection.length}} 条,合计出库重量  {{num}}吨,{{content}}</el-col>
+        <el-col style='text-align:right;' :span="12">
+             <ws-button type="primary" @click="preview()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">预览
+        </ws-button>
+         <ws-button type="primary" @click="cancelpreview()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">取消预览
+        </ws-button>
+         <ws-button type="primary" @click="submit()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">提交
+        </ws-button>
+        </el-col>
+    </el-row>   
+      <el-table class="wenzi" :data="gainList" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+          <el-table-column
+      type="selection"
+      width="55">
+    </el-table-column>
+        <el-table-column type="index" label="序号">
+          <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="goodsSource" label="货源" width="160"></el-table-column>
+        <el-table-column prop="goodsName" label="货名" width="160">
+        </el-table-column>
+        <el-table-column prop="surplusWeight" class="table_td" label="剩余重量(吨)"></el-table-column>
+        <el-table-column prop="avgCost" class="table_td" label="平均成本(吨)"></el-table-column>
+        <el-table-column prop="goodsName" class="table_td" label="入库单日期"></el-table-column>
+        <el-table-column prop="outWeight" class="table_td" label="预计出库重量(吨)">
+            <template slot-scope="scope">
+                <el-input v-model="scope.row.outWeight" placeholder="输入本次出库重量"></el-input>
+            </template>
+        </el-table-column>
+      </el-table>
+      <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>
+</template>
+<script>
+  import {
+    editSourceOfGoods
+  } from '@/model/tasksport/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+   import {
+  getwarehousingorder,
+  paymoney
+} from '@/model/warehouse/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        gainList: [],
+        gainList1:[],
+        currentPage: 1,
+        primary: '1',
+                pickerOptions: {
+          shortcuts: [{
+              text: '本周',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                var thisDay = start.getDay()
+                var thisDate = start.getDate()
+                if (thisDay != 0) {
+                  start.setDate(thisDate - thisDay)
+                }
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本月',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                start.setDate(1)
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本季度',
+              onClick(picker) {
+                var oDate = new Date()
+
+                var thisYear = oDate.getFullYear()
+                var thisMonth = oDate.getMonth() + 1
+
+                var n = Math.ceil(thisMonth / 3) // 季度
+
+                var Month = n * 3 - 1
+
+                var start = new Date(thisYear, Month - 2, 1)
+                var end = new Date()
+
+                picker.$emit('pick', [start, end])
+              },
+            },
+          ],
+        },
+        value1: '',
+        value2: '',
+        pageSize: 10,
+        searchType: 1,
+        searchTypeText: '待审核',
+        multipleSelection:[],
+        searchKeyWord: '',
+        inOutType:'',
+        num:0,
+        content:'',
+        contractType: 2,
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        warehouseName: '',
+        baseId:'',
+        deptBudgetTotal: 0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    // activated(//) {
+      // this.getList()
+      // this.showType = this.isShow
+    // },
+    mounted() {
+      this.baseId=this.$route.query.baseId
+      this.getList()
+      this.showType = this.isShow
+    },
+    methods: {
+      selectinOutType(){
+        this.getList()
+      },
+      preview(){
+        this.gainList=this.multipleSelection
+         this.deptBudgetTotal=this.multipleSelection.length
+      },
+      cancelpreview(){
+        this.getList()
+      },
+       handleSelectionChange(val) {
+         this.num=0
+         this.content=''
+         for (let i = 0; i < val.length; i++) {
+          this.num+=val[i].outWeight;
+          this.content=this.content?this.content:''+val[i].goodsName+val[i].outWeight+','
+         }
+        this.multipleSelection = val;
+      },
+      //添加
+      handleAdd() {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskAdd'
+        })
+      },
+      //查找
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+      costsort(){
+          this.gainList.sort(function(a,b){
+              var x = a['avgCost'];
+              var y = b[avgCost];
+              return ((y<x)?-1:(x>y)?1:0)   //从小到大排序
+          })
+      
+      },
+      
+      getList() {
+         getwarehousingorder({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            searchKeyWord: this.searchKeyWord,
+            inOutType:this.inOutType,
+            baseId:this.baseId
+          })
+          .toPromise()
+          .then((response) => {
+            this.gainList = response.records
+            this.deptBudgetTotal = response.total
+          })
+      },
+      submit(){
+        var that=this
+        this.$confirm(`确定提交货源信息?`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+        editSourceOfGoods({orderList:this.multipleSelection,taskFlag:0}).toPromise()
+          .then((response) => {
+            this.$message({
+					message: '提交成功',
+					type: 'success'
+					});
+            localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
+            that.$router.go(-1)
+          }).catch((response) => {
+             this.$message({
+              message: '提交失败',
+              type: 'error'
+              }); 
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      getSpanArr(data) {
+        let that = this
+
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+        that.spanArr = []
+
+        that.pos = 0
+
+        //遍历数据
+
+        data.forEach((item, index) => {
+          //判断是否是第一项
+
+          // if (index === 0) {
+          //   this.spanArr.push(1)
+          //   this.pos = 0
+          // } else {
+          //不是第一项时,就根据标识去存储
+          if (data[index].warehouseNumViewList.length > 1) {
+            // 查找到符合条件的数据时每次要把之前存储的数据+1
+            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+            this.spanArr.push(0)
+          } else {
+            // 没有符合的数据时,要记住当前的index
+            this.spanArr.push(1)
+            this.pos = index
+          }
+          // }
+        })
+      },
+      //查看//传参
+      nocomplete(row) {
+        this.$router.push({
+          path: 'inOutWarehousetaskEdit',
+          query: {
+            relevanceId: row.relevanceId,
+            businessKey: row.id,
+            workflowId: row.workflowId,
+          },
+        })
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .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;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+	.title {
+		position: relative;
+		padding-left: 10px;
+	}
+
+	.title::before {
+		content: '';
+		display: inline-block;
+		width: 5px;
+		height: 30px;
+		background: #5473e8;
+		position: absolute;
+		left: 0;
+	}
+    
+	.bg-right {
+		text-align: right;
+		padding: 16px 20px;
+	}
+  /deep/.findValue .el-input__inner {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+
+  .completed.el-button--default {
+    border-color: #5878e8;
+    background-color: #f6f7fc;
+    color: #5878e8;
+  }
+
+  .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: 50px;
+  }
+
+  .findValue {
+    // width: 0%;
+    margin-left: 10px;
+  }
+
+  .search {
+    margin-left: -250px;
+  }
+
+  .Value {
+    width: 300px;
+    margin-left: 766px;
+  }
+
+  .el-pagination {
+    text-align: center;
+  }
+
+  .winseaview-main {
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .spans {
+    display: table-caption;
+    width: 17px;
+    line-height: 19px;
+  }
+
+  //执行样式
+  .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;
+  }
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  .corles {
+    color: #5878e8;
+    font-size: 14px;
+  }
+</style>

+ 564 - 0
src/views/taskManagement/supplyofgoodsedit.vue

@@ -0,0 +1,564 @@
+<!--出入库任务-->
+<template>
+  <div class="container">
+      	<el-row>
+			<el-col :span="12">
+				<h2 class="bg-left title">选择货源</h2>
+			</el-col>
+			<el-col :span="12" class="bg-right">
+				<el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+					<img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+						src="../../../public/img/lujing.png" alt />返回
+				</el-button>
+			</el-col>
+		</el-row>
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+          <div style='width:50%;margin-right:10px;'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+  
+          </div>
+        <ws-button type="primary" @click="getList()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">按日期排序
+        </ws-button>
+        <ws-button type="primary" @click="costsort()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">按成本排序
+        </ws-button>
+      </template>
+      <template slot="right">
+        <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按合同编号或任务编号查找" clearable maxlength="300" 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>
+      </template>
+    </BaseHeaderLayout>
+    <el-row style='margin:10px;'>
+        <el-col :span="12">已选 {{this.multipleSelection.length}} 条,合计出库重量  {{num}}吨,{{content}}</el-col>
+        <el-col style='text-align:right;' :span="12">
+             <ws-button type="primary" @click="preview()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">预览
+        </ws-button>
+         <ws-button type="primary" @click="cancelpreview()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">取消预览
+        </ws-button>
+         <ws-button type="primary" @click="submit()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">提交
+        </ws-button>
+        </el-col>
+    </el-row>   
+      <el-table class="wenzi" :data="gainList" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+          <el-table-column
+      type="selection"
+      width="55">
+    </el-table-column>
+        <el-table-column type="index" label="序号">
+          <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="goodsSource" label="货源" width="160"></el-table-column>
+        <el-table-column prop="goodsName" label="货名" width="160">
+        </el-table-column>
+        <el-table-column prop="surplusWeight" class="table_td" label="剩余重量(吨)"></el-table-column>
+        <el-table-column prop="avgCost" class="table_td" label="平均成本(吨)"></el-table-column>
+        <el-table-column prop="goodsName" class="table_td" label="入库单日期"></el-table-column>
+        <el-table-column prop="outWeight" class="table_td" label="预计出库重量(吨)">
+            <template slot-scope="scope">
+                <el-input v-model="scope.row.outWeight" placeholder="输入本次出库重量"></el-input>
+            </template>
+        </el-table-column>
+      </el-table>
+      <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>
+</template>
+<script>
+  import {
+    editSourceOfGoods
+  } from '@/model/tasksport/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+   import {
+  getwarehousingorder,
+  paymoney
+} from '@/model/warehouse/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        gainList: [],
+        gainList1:[],
+        currentPage: 1,
+        primary: '1',
+                pickerOptions: {
+          shortcuts: [{
+              text: '本周',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                var thisDay = start.getDay()
+                var thisDate = start.getDate()
+                if (thisDay != 0) {
+                  start.setDate(thisDate - thisDay)
+                }
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本月',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                start.setDate(1)
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本季度',
+              onClick(picker) {
+                var oDate = new Date()
+
+                var thisYear = oDate.getFullYear()
+                var thisMonth = oDate.getMonth() + 1
+
+                var n = Math.ceil(thisMonth / 3) // 季度
+
+                var Month = n * 3 - 1
+
+                var start = new Date(thisYear, Month - 2, 1)
+                var end = new Date()
+
+                picker.$emit('pick', [start, end])
+              },
+            },
+          ],
+        },
+        value1: '',
+        value2: '',
+        pageSize: 10,
+        searchType: 1,
+        searchTypeText: '待审核',
+        multipleSelection:[],
+        searchKeyWord: '',
+        inOutType:'',
+        num:0,
+        content:'',
+        contractType: 2,
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        warehouseName: '',
+        baseId:'',
+        deptBudgetTotal: 0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    // activated(//) {
+      // this.getList()
+      // this.showType = this.isShow
+    // },
+    mounted() {
+      this.baseId=this.$route.query.baseId
+      this.getList()
+      this.showType = this.isShow
+    },
+    methods: {
+      selectinOutType(){
+        this.getList()
+      },
+      preview(){
+        this.gainList=this.multipleSelection
+         this.deptBudgetTotal=this.multipleSelection.length
+      },
+      cancelpreview(){
+        this.getList()
+      },
+       handleSelectionChange(val) {
+         this.num=0
+         this.content=''
+         for (let i = 0; i < val.length; i++) {
+          this.num+=val[i].outWeight;
+          this.content=this.content?this.content:''+val[i].goodsName+val[i].outWeight+','
+         }
+        this.multipleSelection = val;
+      },
+      //添加
+      handleAdd() {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskAdd'
+        })
+      },
+      //查找
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+      costsort(){
+          this.gainList.sort(function(a,b){
+              var x = a['avgCost'];
+              var y = b[avgCost];
+              return ((y<x)?-1:(x>y)?1:0)   //从小到大排序
+          })
+      
+      },
+      
+      getList() {
+         getwarehousingorder({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            searchKeyWord: this.searchKeyWord,
+            inOutType:this.inOutType,
+            baseId:this.baseId
+          })
+          .toPromise()
+          .then((response) => {
+            this.gainList = response.records
+            this.deptBudgetTotal = response.total
+          })
+      },
+      submit(){
+        for (let i = 0; i < this.multipleSelection.length; i++) {
+          if(!this.multipleSelection[i].outWeight){
+              this.$message({
+              message: '预计出库重量不能为空',
+              type: 'error'
+              });
+              return
+
+          }
+          if(this.multipleSelection[i].outWeight>this.multipleSelection[i].surplusWeight){
+            this.$message({
+              message: '预计出库重量不能超过剩余重量',
+              type: 'error'
+              });
+              return
+          }   
+          if(this.multipleSelection[i].outWeight.indexOf('.')!=-1&&this.multipleSelection[i].outWeight.substring(this.multipleSelection[i].outWeight.indexOf('.')+1, this.multipleSelection[i].outWeight.length).length>3){
+            this.$message({
+              message: '预计出库重量输入错误',
+              type: 'error'
+              });
+              return
+          }
+          
+        }
+        var that=this
+        this.$confirm(`确定提交货源信息?`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+        editSourceOfGoods({orderList:this.multipleSelection,taskFlag:1}).toPromise()
+          .then((response) => {
+            this.$message({
+					message: '提交成功',
+					type: 'success'
+					});
+            localStorage.setItem("supplygoods",JSON.stringify(this.multipleSelection));
+            that.$router.go(-1)
+          }).catch((response) => {
+             this.$message({
+              message: '提交失败',
+              type: 'error'
+              }); 
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      getSpanArr(data) {
+        let that = this
+
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+        that.spanArr = []
+
+        that.pos = 0
+
+        //遍历数据
+
+        data.forEach((item, index) => {
+          //判断是否是第一项
+
+          // if (index === 0) {
+          //   this.spanArr.push(1)
+          //   this.pos = 0
+          // } else {
+          //不是第一项时,就根据标识去存储
+          if (data[index].warehouseNumViewList.length > 1) {
+            // 查找到符合条件的数据时每次要把之前存储的数据+1
+            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+            this.spanArr.push(0)
+          } else {
+            // 没有符合的数据时,要记住当前的index
+            this.spanArr.push(1)
+            this.pos = index
+          }
+          // }
+        })
+      },
+      //查看//传参
+      nocomplete(row) {
+        this.$router.push({
+          path: 'inOutWarehousetaskEdit',
+          query: {
+            relevanceId: row.relevanceId,
+            businessKey: row.id,
+            workflowId: row.workflowId,
+          },
+        })
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .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;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+	.title {
+		position: relative;
+		padding-left: 10px;
+	}
+
+	.title::before {
+		content: '';
+		display: inline-block;
+		width: 5px;
+		height: 30px;
+		background: #5473e8;
+		position: absolute;
+		left: 0;
+	}
+    
+	.bg-right {
+		text-align: right;
+		padding: 16px 20px;
+	}
+  /deep/.findValue .el-input__inner {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+
+  .completed.el-button--default {
+    border-color: #5878e8;
+    background-color: #f6f7fc;
+    color: #5878e8;
+  }
+
+  .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: 50px;
+  }
+
+  .findValue {
+    // width: 0%;
+    margin-left: 10px;
+  }
+
+  .search {
+    margin-left: -250px;
+  }
+
+  .Value {
+    width: 300px;
+    margin-left: 766px;
+  }
+
+  .el-pagination {
+    text-align: center;
+  }
+
+  .winseaview-main {
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .spans {
+    display: table-caption;
+    width: 17px;
+    line-height: 19px;
+  }
+
+  //执行样式
+  .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;
+  }
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  .corles {
+    color: #5878e8;
+    font-size: 14px;
+  }
+</style>

+ 516 - 0
src/views/taskManagement/supplyofgoodslook.vue

@@ -0,0 +1,516 @@
+<!--出入库任务-->
+<template>
+  <div class="container">
+      	<el-row>
+			<el-col :span="12">
+				<h2 class="bg-left title">查看货源</h2>
+			</el-col>
+			<el-col :span="12" class="bg-right">
+				<el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
+					<img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+						src="../../../public/img/lujing.png" alt />返回
+				</el-button>
+			</el-col>
+		</el-row>
+    <el-row style='margin:10px;'>
+        <el-col :span="12">共 {{this.gainList.length}} 条,合计出库重量  100吨,玉米(潮粮)50吨,玉米(机收)20吨,玉米 30吨</el-col>
+        <el-col style='text-align:right;' :span="12">
+        </el-col>
+    </el-row>   
+      <el-table class="wenzi" :data="gainList" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+          <el-table-column
+      type="selection"
+      width="55">
+    </el-table-column>
+        <el-table-column type="index" label="序号">
+          <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="goodsSource" label="货源" width="160"></el-table-column>
+        <el-table-column prop="goodsName" label="货名" width="160">
+        </el-table-column>
+        <el-table-column prop="surplusWeight" class="table_td" label="剩余重量(吨)"></el-table-column>
+        <el-table-column prop="avgCost" class="table_td" label="平均成本(吨)"></el-table-column>
+        <el-table-column prop="goodsName" class="table_td" label="入库单日期"></el-table-column>
+        <el-table-column prop="estimateOutWarehouseWeight" class="table_td" label="预计出库重量(吨)">
+            <template slot-scope="scope">
+                <el-input v-model="scope.row.estimateOutWarehouseWeight" placeholder="输入本次出库重量"></el-input>
+            </template>
+        </el-table-column>
+      </el-table>
+      <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>
+</template>
+<script>
+  import {
+    getoreditoutput,
+    outdelete,
+    movestates,
+    getSourceOfGoods
+  } from '@/model/tasksport/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        gainList: [],
+        gainList1: [],
+        currentPage: 1,
+        primary: '1',
+                pickerOptions: {
+          shortcuts: [{
+              text: '本周',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                var thisDay = start.getDay()
+                var thisDate = start.getDate()
+                if (thisDay != 0) {
+                  start.setDate(thisDate - thisDay)
+                }
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本月',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                start.setDate(1)
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本季度',
+              onClick(picker) {
+                var oDate = new Date()
+
+                var thisYear = oDate.getFullYear()
+                var thisMonth = oDate.getMonth() + 1
+
+                var n = Math.ceil(thisMonth / 3) // 季度
+
+                var Month = n * 3 - 1
+
+                var start = new Date(thisYear, Month - 2, 1)
+                var end = new Date()
+
+                picker.$emit('pick', [start, end])
+              },
+            },
+          ],
+        },
+        value1: '',
+        value2: '',
+        pageSize: 10,
+        searchType: 1,
+        searchTypeText: '待审核',
+        searchKeyWord: '',
+        inOutType:'',
+        contractType: 2,
+        // 提交类型
+        submitType: true,
+        size: 10,
+        spanArr: [],
+        warehouseName: '',
+        multipleSelection:[],
+        deptBudgetTotal: 0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    activated() {
+      this.getList()
+      this.showType = this.isShow
+    },
+    mounted() {
+      this.getList()
+      this.showType = this.isShow
+    },
+    methods: {
+      selectinOutType(){
+        this.getList()
+      },
+       handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      //添加
+      handleAdd() {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskAdd'
+        })
+      },
+      //查找
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+     
+      getList() {
+        getSourceOfGoods({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            searchKeyWord: this.searchKeyWord,
+            inOutType:this.inOutType
+          })
+          .toPromise()
+          .then((response) => {
+            this.gainList = response
+            this.currentPage = response.current
+            this.pageSize = response.size
+            this.deptBudgetTotal = response.total
+          })
+      },
+      //编辑
+      delivery(item) {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskedit',
+          query: {
+            relevanceId: item.relevanceId,
+            inOutFlag: item.inOutFlag
+          },
+        })
+      },
+      audit(item) {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskaudit',
+          query: {
+            relevanceId: item.relevanceId,
+            taskId: item.taskId,
+            businessKey: item.id,
+            workflowId: item.workflowId,
+          },
+        })
+      },
+      getSpanArr(data) {
+        let that = this
+
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+        that.spanArr = []
+
+        that.pos = 0
+
+        //遍历数据
+
+        data.forEach((item, index) => {
+          //判断是否是第一项
+
+          // if (index === 0) {
+          //   this.spanArr.push(1)
+          //   this.pos = 0
+          // } else {
+          //不是第一项时,就根据标识去存储
+          if (data[index].warehouseNumViewList.length > 1) {
+            // 查找到符合条件的数据时每次要把之前存储的数据+1
+            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+            this.spanArr.push(0)
+          } else {
+            // 没有符合的数据时,要记住当前的index
+            this.spanArr.push(1)
+            this.pos = index
+          }
+          // }
+        })
+      },
+      //查看//传参
+      nocomplete(row) {
+        this.$router.push({
+          path: 'inOutWarehousetaskEdit',
+          query: {
+            relevanceId: row.relevanceId,
+            businessKey: row.id,
+            workflowId: row.workflowId,
+          },
+        })
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      editClick(row) {
+        var status = ''
+        if (row.taskStatus == '待审核' || row.taskStatus == '已完成') {
+          status = '执行中'
+        } else if (row.taskStatus == '执行中') {
+          status = '已完成'
+        }
+        //cancelButtonClass: "btn-custom-cancel"
+        this.$confirm(`是否将状态改为${status}`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            movestates({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+        this.currentPage = 1,
+          this.getList()
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .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;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+	.title {
+		position: relative;
+		padding-left: 10px;
+	}
+
+	.title::before {
+		content: '';
+		display: inline-block;
+		width: 5px;
+		height: 30px;
+		background: #5473e8;
+		position: absolute;
+		left: 0;
+	}
+    
+	.bg-right {
+		text-align: right;
+		padding: 16px 20px;
+	}
+  /deep/.findValue .el-input__inner {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+
+  .completed.el-button--default {
+    border-color: #5878e8;
+    background-color: #f6f7fc;
+    color: #5878e8;
+  }
+
+  .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: 50px;
+  }
+
+  .findValue {
+    // width: 0%;
+    margin-left: 10px;
+  }
+
+  .search {
+    margin-left: -250px;
+  }
+
+  .Value {
+    width: 300px;
+    margin-left: 766px;
+  }
+
+  .el-pagination {
+    text-align: center;
+  }
+
+  .winseaview-main {
+    background: #e8ecf6;
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .spans {
+    display: table-caption;
+    width: 17px;
+    line-height: 19px;
+  }
+
+  //执行样式
+  .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;
+  }
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+
+  /deep/.typeselect .el-input__inner {
+    color: #8890b1;
+  }
+
+  .corles {
+    color: #5878e8;
+    font-size: 14px;
+  }
+</style>

+ 46 - 2
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -109,10 +109,17 @@
                 scope.row.taskStatus == '执行中' ||
                 scope.row.taskStatus == '执行中' ||
                 scope.row.taskStatus == '已驳回'
                 scope.row.taskStatus == '已驳回'
               " @click="delivery(scope.row)">编辑</span>
               " @click="delivery(scope.row)">编辑</span>
-            <span v-hasPermission="`warehouseManagement.warehouse.warehouseInfoTask.delete`">
+              <span v-hasPermission="`warehouseManagement.warehouse.warehouseInfoTask.delete`">
               <el-divider direction="vertical" v-if="scope.row.taskId == null"></el-divider>
               <el-divider direction="vertical" v-if="scope.row.taskId == null"></el-divider>
             </span>
             </span>
 
 
+            <span class="corles" v-hasPermission="
+                `warehouseManagement.warehouse.warehouseInfoTask.delete`
+              " v-if="scope.row.show" @click="rectify(scope.row)">矫正</span>
+            <span v-hasPermission="`warehouseManagement.warehouse.warehouseInfoTask.delete`">
+              <el-divider direction="vertical" v-if="scope.row.show"></el-divider>
+            </span>
+
             <span class="corles" v-hasPermission="
             <span class="corles" v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.delete`
                 `warehouseManagement.warehouse.warehouseInfoTask.delete`
               " v-if="scope.row.taskId == null" @click="deleteclick(scope.row)">删除</span>
               " v-if="scope.row.taskId == null" @click="deleteclick(scope.row)">删除</span>
@@ -127,7 +134,8 @@
   import {
   import {
     getoreditoutput,
     getoreditoutput,
     outdelete,
     outdelete,
-    movestates
+    movestates,
+    setcorrect
   } from '@/model/tasksport/index'
   } from '@/model/tasksport/index'
   import {
   import {
     downloadFile
     downloadFile
@@ -265,6 +273,30 @@
       this.showType = this.isShow
       this.showType = this.isShow
     },
     },
     methods: {
     methods: {
+      rectify(){
+        this.$confirm('确定矫正出库任务重量并结束任务?', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            setcorrect({id:row.id}).toPromise()
+              .then((response) => {
+                 this.$notify.success({
+                  title: '成功',
+                  message: '矫正成功',
+                })
+                this.getList()
+              }).catch(() => {
+                 this.$notify.error({
+                  title: '失败',
+                  message: '矫正失败',
+                })
+              })
+          }).catch(() => {
+            return false
+          })
+      },
       selectinOutType(){
       selectinOutType(){
         this.getList()
         this.getList()
       },
       },
@@ -322,6 +354,18 @@
           })
           })
           .toPromise()
           .toPromise()
           .then((response) => {
           .then((response) => {
+            for (let i = 0; i < response.records.length; i++) {
+              if(response.records[i].taskStatus=='执行中'&&response.records[i].inOutType=='销售出库'&&response.records[i].completedQuantity<response.records[i].weight
+              ||response.records[i].taskStatus=='执行中'&&response.records[i].inOutType=='移库出库'&&response.records[i].completedQuantity<response.records[i].weight){
+                response.records[i].show=true
+              }else if(response.records[i].taskStatus=='已完成'&&response.records[i].inOutType=='销售出库'&&response.records[i].completedQuantity<response.records[i].weight
+               ||response.records[i].taskStatus=='执行中'&&response.records[i].inOutType=='移库出库'&&response.records[i].completedQuantity<response.records[i].weight){
+                 response.records[i].show=true
+              }else{
+                response.records[i].show=false
+              }
+              
+            }
             this.gainList = response
             this.gainList = response
             this.currentPage = response.current
             this.currentPage = response.current
             this.pageSize = response.size
             this.pageSize = response.size

+ 43 - 8
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -73,6 +73,7 @@
 							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
 							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
 								:value="item.constValue"></el-option>
 								:value="item.constValue"></el-option>
 						</el-select>
 						</el-select>
+						<el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
 					</el-form-item>
 					</el-form-item>
 					<!--重量(吨)-->
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
 					<el-form-item label="重量(吨)">
@@ -164,18 +165,21 @@
 						</el-select>
 						</el-select>
 					</el-form-item>
 					</el-form-item>
 					<el-form-item v-if="dataList1.taskTypeKey == 3" label="移库任务编号">
 					<el-form-item v-if="dataList1.taskTypeKey == 3" label="移库任务编号">
-						<el-input disabled v-model="dataList1.moveTaskNo" placeholder="请输入移库任务编号" class="typeselect">
+						<el-select disabled v-model="dataList1.moveTaskNo" placeholder="请输入移库任务编号" class="typeselect">
 							<el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
 							<el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
 								:value="item.contractNo"></el-option>
 								:value="item.contractNo"></el-option>
-						</el-input>
+						</el-select>
 					</el-form-item>
 					</el-form-item>
 					<!-- 货名 -->
 					<!-- 货名 -->
-					<el-form-item label="货" class="huom">
-						<el-select :disabled="dataList.taskTypeKey != 3 || dataList.taskTypeKey == 3" filterable clearable
+					<el-form-item label="货" class="huom">
+						<!-- <el-select :disabled="dataList.taskTypeKey != 3 || dataList.taskTypeKey == 3" filterable clearable
 							v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1">
 							v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1">
 							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
 							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
 								:value="item.constValue"></el-option>
 								:value="item.constValue"></el-option>
-						</el-select>
+						</el-select> -->
+						<el-input disabled v-model="dataList.sourceId" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
+						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
 					</el-form-item>
 					</el-form-item>
 					<!--重量(吨)-->
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
 					<el-form-item label="重量(吨)">
@@ -279,11 +283,14 @@
 					</el-form-item>
 					</el-form-item>
 					<!-- 货名 -->
 					<!-- 货名 -->
 					<el-form-item label="货名" class="huom">
 					<el-form-item label="货名" class="huom">
-						<el-select :disabled="dataList.taskTypeKey != 3" v-model="dataList.goodsName" placeholder="货名"
+						<!-- <el-select :disabled="dataList.taskTypeKey != 3" v-model="dataList.goodsName" placeholder="货名"
 							class="huom" @change="selectgoodsName " filterable clearable>
 							class="huom" @change="selectgoodsName " filterable clearable>
 							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
 							<el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
-								:value="item.constValue"></el-option>
-						</el-select>
+								:value="item.constValue"></el-option> 
+						</el-select>-->
+						<el-input disabled v-model="dataList.sourceId" placeholder="请选择货源"
+							maxlength="120" size="small" class="huom" />
+						<!-- <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
 					</el-form-item>
 					</el-form-item>
 					<!--重量(吨)-->
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
 					<el-form-item label="重量(吨)">
@@ -451,6 +458,7 @@
 				warehouseNameList1: [],
 				warehouseNameList1: [],
 				appendixIdsAdd: '',
 				appendixIdsAdd: '',
 				uploadSuccess: {},
 				uploadSuccess: {},
+				baseId:'',
 				deletetask: false,
 				deletetask: false,
 				warehouseInOutDetail: {},
 				warehouseInOutDetail: {},
 				onChange: {},
 				onChange: {},
@@ -475,6 +483,7 @@
 				contractList: [],
 				contractList: [],
 				inOutTaskNo: '',
 				inOutTaskNo: '',
 				inOutTaskNo1: '',
 				inOutTaskNo1: '',
+				sourceId:'',
 				dataList: {
 				dataList: {
 					taskTypeKey: '1'
 					taskTypeKey: '1'
 				},
 				},
@@ -494,12 +503,37 @@
 		},
 		},
 		activated() {
 		activated() {
 			this.getList()
 			this.getList()
+			var goods=''
+			this.sourceId=''
+			if(localStorage.setItem("supplygoods")){
+				var supplygoods=JSON.parse(localStorage.setItem("supplygoods"))
+				for (let i = 0; i < supplygoods.length; i++) {
+					goods+=supplygoods[i].goodsName
+					this.sourceId=this.sourceId+','+supplygoods[i].id
+				}
+			}
+			
 		},
 		},
 		methods: {
 		methods: {
 			//返回按钮
 			//返回按钮
 			revert() {
 			revert() {
 				this.$router.go(-1)
 				this.$router.go(-1)
 			},
 			},
+			supplygoods(){
+				if(this.dataList.warehouseName){
+					if(this.dataList.taskTypeKey==4){
+						this.$router.push({name:'outsupplyofgoods',query:{baseId:this.baseId}})
+					}else{
+						this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
+					}
+				}else{
+					this.$message({
+					message: '请先选择仓库',
+					type: 'warning'
+					});
+
+				}
+      		},
 			returnsales() {
 			returnsales() {
 				this.dataList = {
 				this.dataList = {
 								taskTypeKey: 1
 								taskTypeKey: 1
@@ -659,6 +693,7 @@
 				}
 				}
 			},
 			},
 			selectwarehouseName(e) {
 			selectwarehouseName(e) {
+				this.baseId=e
 				for (var i = 0; i < this.warehouseNameList.length; i++) {
 				for (var i = 0; i < this.warehouseNameList.length; i++) {
 					if (this.warehouseNameList[i].id == e) {
 					if (this.warehouseNameList[i].id == e) {
 						this.dataList.warehouseName = this.warehouseNameList[i].warehouseName
 						this.dataList.warehouseName = this.warehouseNameList[i].warehouseName

+ 1 - 2
src/views/warehouse/warehouseManagementNoComplete.vue

@@ -16,8 +16,7 @@
             style="vertical-align: bottom; margin-right: 3px"
             style="vertical-align: bottom; margin-right: 3px"
             src="../../../public/img/lujing.png"
             src="../../../public/img/lujing.png"
             alt=""
             alt=""
-          />返回</el-button
-        >
+          />返回</el-button>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
     <ws-form ref="deptBudgetList" :v-model="deptBudgetList">
     <ws-form ref="deptBudgetList" :v-model="deptBudgetList">

+ 3 - 0
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -951,6 +951,9 @@ export default {
             this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
             this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
             this.carstatus=true
             this.carstatus=true
           }
           }
+          if(this.outContractNo[i].shipInfoList){
+               this.shipInfoList = this.outContractNo[i].shipInfoList
+            }
         }
         }
       }
       }
     },
     },

+ 42 - 58
src/views/warehouse/warehouseManagementRecord.vue

@@ -302,7 +302,11 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </div>
         </div>
-        <div v-if="deptBudgetList.warehouseName=='鲅鱼圈金信库'||deptBudgetList.warehouseName=='白城内陆港'||deptBudgetList.warehouseName=='哈尔滨依兰库'">
+<<<<<<< HEAD
+        <div v-if="deptBudgetList.warehouseName=='鲅鱼圈金信库'||deptBudgetList.warehouseName=='白城内陆港'||deptBudgetList.warehouseName=='哈尔滨依兰库'||this.warehouseName=='山东园丰库'">
+=======
+        <div v-if="deptBudgetList.warehouseName=='鲅鱼圈金信库'||deptBudgetList.warehouseName=='白城内陆港'">
+>>>>>>> 32173094c0b5517c2d64af85d92ed9b3864725d5
           <div class="print-type-ew">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -456,8 +460,8 @@
           label: '厦门建发物产有限公司'
           label: '厦门建发物产有限公司'
         }],
         }],
         companyName: '黑龙江利润元粮食贸易有限公司',
         companyName: '黑龙江利润元粮食贸易有限公司',
-        companyNameEW: '厦门建发物产有限公司',
-        ewCustomer: '黑龙江利润元粮食贸易有限公司',
+        companyNameEW: "厦门建发物产有限公司",
+        ewCustomer: "黑龙江利润元粮食贸易有限公司",
         ddchecked: false,
         ddchecked: false,
         checked: false,
         checked: false,
         isShowPrintType: false,
         isShowPrintType: false,
@@ -466,7 +470,6 @@
         deptBudgetTotal: 0,
         deptBudgetTotal: 0,
         currentPage: 1,
         currentPage: 1,
         pageSize: 10,
         pageSize: 10,
-        capacity: '',
         contractType: 2,
         contractType: 2,
         // 提交类型
         // 提交类型
         submitType: true,
         submitType: true,
@@ -494,7 +497,7 @@
         modification: [],
         modification: [],
         printList: [], //批量打印数据
         printList: [], //批量打印数据
         onePrint: false, //单个打印开关
         onePrint: false, //单个打印开关
-        idPrint:'',
+        idPrint:"",
       }
       }
     },
     },
 
 
@@ -509,9 +512,6 @@
       this.getList()
       this.getList()
       this.getPassYearFormatDate()
       this.getPassYearFormatDate()
       this.showType = this.isShow
       this.showType = this.isShow
-      if(this.binNumber == '全部仓位'){
-        this.deptBudgetList.positionId = ''
-      }
     },
     },
     updated() {
     updated() {
       this.$nextTick(() => {
       this.$nextTick(() => {
@@ -528,6 +528,7 @@
         }
         }
       },
       },
       changeEw(e) {
       changeEw(e) {
+        debugger
         this.ddchecked = false
         this.ddchecked = false
 
 
         if (e) {
         if (e) {
@@ -546,31 +547,32 @@
         localStorage.setItem('ewWarehouseBatchPrint', JSON.stringify(_printList))
         localStorage.setItem('ewWarehouseBatchPrint', JSON.stringify(_printList))
       },
       },
       async typePrintClick() {
       async typePrintClick() {
+        debugger
         this.printList = []
         this.printList = []
-        // if (this.onePrint) {
-        //   sessionStorage.removeItem('ck_bd_printData')
-        //   getPrintInfo({
-        //       id: this.idPrint
-        //     })
-        //     .toPromise()
-        //     .then((response) => {
-        //       if (response) {
-        //         if (this.checked || this.ddchecked) {
-        //           var arrayPrint = response
-        //           // for (let i = 0; i < arrayPrint.length; i++) {
-        //             // let _data = arrayPrint[i];
-        //             arrayPrint.companyName = this.companyNameEW;
-        //             arrayPrint.customer = this.ewCustomer
-        //           // }
-        //           localStorage.setItem('ck_bd_printData', JSON.stringify(arrayPrint))
-        //           window.open('../../../../static/weightCheckInOut.html?type=2')
-        //           return
-        //         }
-        //         localStorage.setItem('ck_bd_printData', JSON.stringify(response))
-        //         window.open('../../../../static/weightCheckInOut.html?type=2')
-        //       }
-        //     })
-        // } else {
+        if (this.onePrint) {
+          sessionStorage.removeItem('ck_bd_printData')
+          getPrintInfo({
+              id: this.idPrint
+            })
+            .toPromise()
+            .then((response) => {
+              if (response) {
+                if (this.checked || this.ddchecked) {
+                  var arrayPrint = response
+                  // for (let i = 0; i < arrayPrint.length; i++) {
+                    // let _data = arrayPrint[i];
+                    arrayPrint.companyName = this.companyNameEW;
+                    arrayPrint.customer = this.ewCustomer
+                  // }
+                  localStorage.setItem('ck_bd_printData', JSON.stringify(arrayPrint))
+                  window.open('../../../../static/weightCheckInOut.html?type=2')
+                  return
+                }
+                localStorage.setItem('ck_bd_printData', JSON.stringify(response))
+                window.open('../../../../static/weightCheckInOut.html?type=2')
+              }
+            })
+        } else {
           var count = 0
           var count = 0
           for (var i = 0; i < this.modification.length; i++) {
           for (var i = 0; i < this.modification.length; i++) {
             await getPrintInfo({
             await getPrintInfo({
@@ -586,14 +588,14 @@
                     this.makeEWjjSelectPrintList()
                     this.makeEWjjSelectPrintList()
                     //  this.selectEW = true;
                     //  this.selectEW = true;
                   }
                   }
-                  localStorage.setItem('warehouseBatchPrint', JSON.stringify(this.printList))
+                  localStorage.setItem("warehouseBatchPrint", JSON.stringify(this.printList))
                   window.open('../../../../static/warehouseBatchPrint.html?selectEW=' + this.checked +
                   window.open('../../../../static/warehouseBatchPrint.html?selectEW=' + this.checked +
                     '&selectEWDD=' + this.ddchecked)
                     '&selectEWDD=' + this.ddchecked)
                 }
                 }
               })
               })
 
 
           }
           }
-        // }
+        }
 
 
 
 
 
 
@@ -680,9 +682,10 @@
 				
 				
 			// },
 			// },
       batchPrint() {
       batchPrint() {
+      
         this.printList = []
         this.printList = []
         if (this.modification.length == 0) {
         if (this.modification.length == 0) {
-          this.$message.error('请勾选要打印的条目!')
+          this.$message.error("请勾选要打印的条目!")
         } else {
         } else {
 
 
           this.isShowPrintType = true
           this.isShowPrintType = true
@@ -710,7 +713,7 @@
       },
       },
       handleSelectionChange(val) {
       handleSelectionChange(val) {
         this.modification = val
         this.modification = val
-        console.log('sfasa', this.modification)
+        console.log("sfasa", this.modification)
       },
       },
       selectInit(row){
       selectInit(row){
 				 //在这里一定要记得类型匹配的上。
 				 //在这里一定要记得类型匹配的上。
@@ -803,28 +806,9 @@
         this.value2 = [formatDate, nowData] // 默认赋值一年时间
         this.value2 = [formatDate, nowData] // 默认赋值一年时间
       },
       },
       print(row) {
       print(row) {
-        // this.onePrint = true
-        // this.isShowPrintType = true
-        // this.idPrint = row.id
-         sessionStorage.removeItem('ck_bd_printData')
-          getPrintInfo({
-              id: row.id
-            })
-            .toPromise()
-            .then((response) => {
-              if (response) {
-                // if (this.checked || this.ddchecked) {
-                //   var arrayPrint = response
-                //     arrayPrint.companyName = this.companyNameEW;
-                //     arrayPrint.customer = this.ewCustomer
-                //   localStorage.setItem('ck_bd_printData', JSON.stringify(arrayPrint))
-                //   window.open('../../../../static/weightCheckInOut.html?type=2')
-                //   return
-                // }
-                localStorage.setItem('ck_bd_printData', JSON.stringify(response))
-                window.open('../../../../static/weightCheckInOut.html?type=2')
-              }
-            })
+        this.onePrint = true
+        this.isShowPrintType = true
+        this.idPrint = row.id
 
 
       },
       },
       //返回按钮
       //返回按钮

+ 28 - 28
src/views/warehousenew/component/router/index.js

@@ -419,34 +419,34 @@ const warehouseManagementRouter = {
       },
       },
       hidden: true
       hidden: true
     },  
     },  
-    {
-      path: 'warehousingOrder',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/warehousingOrder'),
-      name: 'warehousingOrder',
-      meta: {
-        title: 'warehousingOrder',
-        shortcutEntrance: 'warehousingOrder',
-        module: 'warehouseManagement.warehouse.warehouseInfo',
-        permissicon: [],
-        keepAlive: true
-        // module: 'procurement.sparepart.applDetail'
-      },
-    },
-    {
-      path: 'inventoryCheck',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/inventoryCheck'),
-      name: 'inventoryCheck',
-      meta: {
-        title: 'inventoryCheck',
-        shortcutEntrance: 'inventoryCheck',
-        module: 'warehouseManagement.warehouse.warehouseInfo',
-        permissicon: [],
-        keepAlive: true
-        // module: 'procurement.sparepart.applDetail'
-      },
-    },        
+    // {
+    //   path: 'warehousingOrder',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/warehousingOrder'),
+    //   name: 'warehousingOrder',
+    //   meta: {
+    //     title: 'warehousingOrder',
+    //     shortcutEntrance: 'warehousingOrder',
+    //     module: 'warehouseManagement.warehousingOrder',
+    //     permissicon: [],
+    //     keepAlive: true
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    // },
+    // {
+    //   path: 'inventoryCheck',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/inventoryCheck'),
+    //   name: 'inventoryCheck',
+    //   meta: {
+    //     title: 'inventoryCheck',
+    //     shortcutEntrance: 'inventoryCheck',
+    //     module: 'warehouseManagement.warehousingOrder',
+    //     permissicon: [],
+    //     keepAlive: true
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    // },        
   ],
   ],
 };
 };
 export default warehouseManagementRouter;
 export default warehouseManagementRouter;

+ 671 - 14
src/views/warehousenew/inventoryCheck.vue

@@ -1,20 +1,677 @@
+<!--出入库任务-->
 <template>
 <template>
-  <div></div>
+  <div class="container">
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+          <div style='width:50%;margin-right:10px;'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+  
+          </div>
+      </template>
+      <template slot="right">
+        <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按货源查找" clearable maxlength="300" 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>
+      </template>
+    </BaseHeaderLayout>
+    <el-row style='margin:10px;'>
+        <el-col :span="12">
+             <ws-button :type="flag===''?'primary':''" @click="handleAdd()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">全部
+        </ws-button>
+         <ws-button :type="flag===0?'primary':''" @click="handleAdd()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">盘盈
+        </ws-button>
+         <ws-button :type="flag===1?'primary':''" @click="handleAdd()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">盘亏
+        </ws-button>
+        </el-col>
+        <el-col style='text-align:right;' :span="12">
+          
+        </el-col>
+    </el-row>
+    <div v-for='item in gainList' style='margin:10px;border:1px solid #ccc;padding:10px;'>
+      <div style='width:100%;justify-content:space-between;align-items:center;margin-bottom:10px;' class="flex">
+        <div>2022-10-22</div>
+        <div>{{item.warehouseName}}</div>
+        <div>
+          <ws-button type="primary" @click="profit(item.warehouseName)" v-hasPermission="
+            `warehouseManagement.warehousingOrder.surplus`
+          ">盘盈
+        </ws-button>
+         <ws-button type="primary" @click="lose(item.warehouseName)" v-hasPermission="
+            `warehouseManagement.warehousingOrder.loss`
+          ">盘亏
+        </ws-button>
+        </div>
+      </div>
+      <el-table ref='multipleTable' class="wenzi" :data="item.goodssourcelist" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+        <el-table-column  width="40">
+          <template scope="scope">
+            <el-radio @change='radiochange(scope.row)' v-model="scope.row.select" :label="scope.row.id"><span></span></el-radio>
+          </template>
+    </el-table-column>
+        <el-table-column type="index" label="序号">
+          <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="goodsSource" label="货源" width="80"></el-table-column>
+        <el-table-column prop="deliveryWarehouse" label="发货库" width="80"></el-table-column>
+        <el-table-column prop="goodsName" label="货名" width="80">
+        </el-table-column>
+        <el-table-column prop="inWarehouseWeight"  width="130" class="table_td" label="入库重量(吨)"></el-table-column>
+        <el-table-column prop="outWarehouseWOOeight"  width="130" class="table_td" label="出库重量(吨)"></el-table-column>
+        <el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)">
+           <template slot-scope="scope">
+           <span>{{scope.row.profitAndLoss}}</span>
+           <i @click="handlerecord(scope.row)" class="el-icon-s-claim"></i>
+        </template>
+        </el-table-column>
+        <el-table-column prop="surplusWeight" width="130" class="table_td" label="剩余重量(吨)"></el-table-column>
+        <el-table-column prop="approveStatus" label="状态" width="90">
+          <template slot-scope="scope">
+            <template>
+              <span slot="reference">
+                <span v-if="scope.row.taskStatus == '待审核'" class="executory"></span>
+                <span v-if="scope.row.taskStatus == '执行中'" class="inExecution"></span>
+                <span v-if="scope.row.taskStatus == '已完成'" class="done"></span>
+                {{ scope.row.taskStatus }}
+              </span>
+            </template>
+            <img v-if="scope.row.taskStatus == '执行中'" width="17" height="18"
+              style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
+              @click="editClick(scope.row)" alt />
+          </template>
+        </el-table-column>
+        <el-table-column prop="seller" label="操作" width="230">
+          <template slot-scope="scope">
+             <ws-button type="primary" v-if="scope.row.taskStatus == '待审核'" @click="aduit(scope.row)" v-hasPermission="
+            `warehouseManagement.warehousingOrder.adiut`
+          ">审核
+        </ws-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </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>
+        <el-dialog
+        :title="title"
+        :visible.sync="aduitshow"
+        width="50%"
+        :before-close="handleClose">
+        <div>
+          <el-form ref="form" :model="form" label-width="120px">
+            <el-form-item label="计算剩余(吨)">
+              <el-input disabled v-model="form.surplusWeight"></el-input>
+            </el-form-item>
+            <el-form-item label="实际剩余(吨)">
+              <el-input :disabled='disabled' v-model="form.num"></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+        <span v-if='title=="审核"' slot="footer" class="dialog-footer">
+          <el-button @click="reject">驳回</el-button>
+          <el-button type="primary" @click="pass">通过</el-button>
+        </span>
+        <span v-else slot="footer" class="dialog-footer">
+          <el-button @click="aduitshow = false">取消</el-button>
+          <el-button type="primary" @click="loseprofit">提交</el-button>
+        </span>
+      </el-dialog>
+          <el-dialog width='30%' :visible.sync="dialogVisible1" title="审核记录" top="20vh">
+      <div v-for="(item,index) in recordList" :key="index" class="audit">
+        <div class="audit_item">
+          <div class="audit_left">
+            <span class="audit_name">{{item.dealMsg}}</span>
+          </div>
+          <span class="audit_date">{{item.verifyRemark}}</span>
+        </div>
+        <div class="audit_item">
+          <div class="audit_left">
+            <span class="audit_name">{{item.operateUser}}</span>
+          </div>
+          <span class="audit_date">{{item.createDate}}</span>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 </template>
 <script>
 <script>
-export default {
-  data() {
-    return {}
-  },
-  activated() {
-    this.getList()
-  },
-  methods: {
-    getList(){
+  import {
+    getoreditoutput,
+    outdelete,
+    movestates,
+    gettaskhistories,
+    woekflowhandle
+  } from '@/model/tasksport/index'
+    import {
+  getwarehousingorder,
+  editwarehousingorder
+} from '@/model/warehouse/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        form:{},
+        // 表格显示数据
+        tableDate: [],
+
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        title:'',
+        disabled:false,
+        gainList: [],
+        currentPage: 1,
+        primary: '1',
+        pickerOptions: {
+          shortcuts: [{
+              text: '本周',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                var thisDay = start.getDay()
+                var thisDate = start.getDate()
+                if (thisDay != 0) {
+                  start.setDate(thisDate - thisDay)
+                }
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本月',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                start.setDate(1)
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本季度',
+              onClick(picker) {
+                var oDate = new Date()
+
+                var thisYear = oDate.getFullYear()
+                var thisMonth = oDate.getMonth() + 1
+
+                var n = Math.ceil(thisMonth / 3) // 季度
+
+                var Month = n * 3 - 1
+
+                var start = new Date(thisYear, Month - 2, 1)
+                var end = new Date()
+
+                picker.$emit('pick', [start, end])
+              },
+            },
+          ],
+        },
+        value1: '',
+        value2: '',
+        pageSize: 10,
+        searchType: 1,
+        searchTypeText: '待审核',
+        searchKeyWord: '',
+        inOutType:'',
+        contractType: 2,
+        multipleSelection:{},
+        // 提交类型
+        submitType: true,
+        size: 10,
+        form:{},
+        spanArr: [],
+        aduitList:[],
+        flag:'',
+        warehouseName: '',
+        deptBudgetTotal: 0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        historyList: [],
+        aduitshow:false,
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        recordList:[],
+        dialogVisible1:false,
+        accessoryTFs: false,
+      }
+    },
+    // activated() {
+    //   this.getList()
+    //   this.showType = this.isShow
+    // },
+    mounted() {
       
       
-    }
-  },
-}
+      this.getList()
+      this.value2=this.getNowTime()
+      this.showType = this.isShow
+    },
+    methods: {
+      handlerecord(row){
+        gettaskhistories({ businessKey: row.id,
+            workflowId: row.workflowId}).toPromise()
+                .then((response) => {
+                  this.recordList=response
+                  this.dialogVisible1=true
+                }).catch((response) => {})
+        
+      },
+      getNowTime() {
+      const start = new Date(new Date().getTime() - 3600 * 1000 * 24*30 )
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0] //默认开始时间30天前
+      const end = new Date(new Date().getTime())
+        .toISOString()
+        .replace('T', ' ')
+        .split('.')[0]//默认结束时间今天
+      console.log([start, end])
+      return [start, end]
+    },
+      selectinOutType(){
+        this.getList()
+      },
+      radiochange(row){
+
+        this.multipleSelection[row.warehouseName]=row
+      },
+       handleSelectionChange(val) {
+         console.log(this.$refs)
+  this.$refs.multipleTable.clearSelection()
+        this.multipleSelection = val;
+      },
+      aduit(row){
+        this.aduitList=row
+        this.form.id=row.id
+        this.form.surplusWeight=row.surplusWeight
+        this.title='审核'
+        this.aduitshow=true
+        this.disabled=true
+      },
+      lose(ware){
+        if(this.multipleSelection[ware]){
+          this.form.id=this.multipleSelection[ware].id
+          this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
+          this.title='盘亏'
+          this.slecetwarehouseName=''
+          this.aduitshow=true
+          this.disabled=false
+        }else{
+          this.$notify.warning({
+            title: '警告',
+            message: '未选择要盘点的入库记录',
+          })
+        }
+        
+      },
+      profit(ware){
+        if(this.multipleSelection[ware]){
+        this.form.id=this.multipleSelection[ware].id
+        this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
+        this.title='盘盈'
+        this.aduitshow=true
+        this.disabled=false
+        }else{
+          this.$notify.warning({
+            title: '警告',
+            message: '未选择要盘点的入库记录',
+          })
+        }
+      },
+      loseprofit(){
+        if(this.form.num<0){
+            this.$notify.warning({
+              title: '警告',
+              message: '实际剩余应大于0',
+            })
+            return
+          }
+        if(this.title=='盘盈'){
+          this.form.profitAndLoss=this.form.surplusWeight-this.form.num
+          this.form.flag=0
+          if(this.form.num<this.form.surplusWeight){
+            this.$notify.warning({
+              title: '警告',
+              message: '实际剩余不能小于计算剩余',
+            })
+            return
+          }
+        }
+        if(this.title=='盘亏'){
+          this.form.profitAndLoss=-this.form.surplusWeight-this.form.num
+          this.form.flag=1
+          if(this.form.num>this.form.surplusWeight){
+            this.$notify.warning({
+              title: '警告',
+              message: '实际剩余不能大于计算剩余',
+            })
+            return
+          }
+        }
+        editwarehousingorder(this.form).toPromise()
+              .then((response) => {
+                this.aduitshow=false
+                this.getList()
+              })
+      },
+      pass(){
+        this.$confirm('确定通过盘点操作?', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            woekflowhandle({
+                taskId: this.aduitList.taskId,
+                approved: true,
+                auditMind: '34',
+                needReapply: false,
+              }).toPromise()
+              .then((response) => {
+                this.aduitshow=false
+                this.getList()
+              })
+          }).catch(() => {
+            return false
+          })
+
+      },
+      reject(){
+        this.$confirm('确定驳回盘点操作?', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            woekflowhandle({
+                taskId: this.aduitList.taskId,
+                approved: false,
+                auditMind: '驳回',
+                needReapply: false,
+              }).toPromise()
+              .then((response) => {
+                this.aduitshow=false
+                this.getList()
+              })
+              }).catch(() => {
+            return false
+          })
+      },
+      //查找
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+      copare(arr){
+        // 缓存用于记录
+        const newArr = [];
+        for (const t of arr) {
+          // 检查缓存中是否已经存在
+          if (
+            newArr.find(
+              (c) =>
+                c.warehouseName === t.warehouseName 
+            )
+          ) {
+            // 已经存在说明以前记录过,现在这个就是多余的,直接忽略
+            continue;
+          }
+          // 不存在就说明以前没遇到过,把它记录下来
+          newArr.push(t);
+        }
+
+        // 记录结果就是过滤后的结果
+        return newArr;
+      },
+      getList() {
+        getwarehousingorder({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            searchKeyWord: this.searchKeyWord,
+            inOutType:this.inOutType,
+            flag:this.flag
+          })
+          .toPromise()
+          .then((response) => {
+            var arr=this.copare(response.records)
+            for (let i = 0; i < response.records.length; i++) {
+              response.records[i].surplusWeight=response.records[i].inWarehouseWeight-response.records[i].outWarehouseWeight+response.records[i].profitAndLoss
+              response.records[i].select=''
+              
+            }
+            for (let i = 0; i < arr.length; i++) {
+              // if(arr[i].warehouseName){
+                var arr1=response.records.filter(function(item,index){
+                  return arr[i].warehouseName==item.warehouseName
+                })
+                arr[i].goodssourcelist=JSON.parse(JSON.stringify(arr1))
+                console.log(arr1)
+              // }
+            }
+
+            this.gainList = arr
+            // this.currentPage = response.current
+            // this.pageSize = response.size
+            console.log(arr)
+            this.deptBudgetTotal = arr.length
+          })
+      },
+      //编辑
+      delivery(item) {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskedit',
+          query: {
+            relevanceId: item.relevanceId,
+            inOutFlag: item.inOutFlag
+          },
+        })
+      },
+      audit(item) {
+        this.$router.push({
+          path: 'tranManagementWarehouseInOuttaskaudit',
+          query: {
+            relevanceId: item.relevanceId,
+            taskId: item.taskId,
+            businessKey: item.id,
+            workflowId: item.workflowId,
+          },
+        })
+      },
+      getSpanArr(data) {
+        let that = this
+
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+        that.spanArr = []
+
+        that.pos = 0
+
+        //遍历数据
+
+        data.forEach((item, index) => {
+          //判断是否是第一项
+
+          // if (index === 0) {
+          //   this.spanArr.push(1)
+          //   this.pos = 0
+          // } else {
+          //不是第一项时,就根据标识去存储
+          if (data[index].warehouseNumViewList.length > 1) {
+            // 查找到符合条件的数据时每次要把之前存储的数据+1
+            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+            this.spanArr.push(0)
+          } else {
+            // 没有符合的数据时,要记住当前的index
+            this.spanArr.push(1)
+            this.pos = index
+          }
+          // }
+        })
+      },
+      //查看//传参
+      nocomplete(row) {
+        this.$router.push({
+          path: 'inOutWarehousetaskEdit',
+          query: {
+            relevanceId: row.relevanceId,
+            businessKey: row.id,
+            workflowId: row.workflowId,
+          },
+        })
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+        this.currentPage = 1,
+          this.getList()
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+    },
+  }
 </script>
 </script>
-<style  lang="scss" scoped>
+<style lang="scss" scoped>
+ 
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+.audit {
+    margin-bottom: 20px;
+    border-bottom: 1px solid #AFB3BF;
+    height: 70px;
+
+    .audit_item {
+      width: 100%;
+      display: flex;
+      height: 30px;
+
+      .audit_name {
+        margin-right: 30px;
+        font-size: 16px;
+        font-weight: 600;
+      }
+
+      .audit_left {
+        width: 60%;
+      }
+
+      .audit_date {
+        width: 40%;
+        justify-content: flex-end;
+        display: flex;
+        color: #AFB3BF;
+      }
+    }
+
+    .audit_opinion {}
+  }
 </style>
 </style>

+ 861 - 13
src/views/warehousenew/warehousingOrder.vue

@@ -1,18 +1,866 @@
+<!--出入库任务-->
 <template>
 <template>
-  <div></div>
+  <div class="container">
+    <BaseHeaderLayout :leftSpan="16">
+      <template slot="left">
+          <div style='width:50%;margin-right:10px;'>
+            <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+  
+          </div>
+      </template>
+      <template slot="right">
+        <ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按货源查找" clearable maxlength="300" 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>
+      </template>
+    </BaseHeaderLayout>
+    <el-row style='margin:10px;'>
+        <el-col :span="12">
+             <ws-button :type="searchType===''?'primary':''" @click="handleAdd()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">全部
+        </ws-button>
+         <ws-button :type="searchType==='1'?'primary':''" @click="handleAdd()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">未付款
+        </ws-button>
+        </el-col>
+        <el-col style='text-align:right;' :span="12">
+          <!-- <el-button type="primary" @click="warehousingorder()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">出单
+        </el-button> -->
+        </el-col>
+    </el-row>
+    <div v-for="item in gainList" style='margin:10px;border:1px solid #ccc;padding:10px;'>
+      <div style='width:100%;justify-content:space-between;align-items:center;margin-bottom:10px;' class="flex">
+        <div>2022-10-22</div>
+        <div v-if=''>{{item.warehouseName}}入库单</div>
+        <div>
+          <ws-button v-if='item.payshow' type="primary" @click="payout(item)" v-hasPermission="
+            `warehouseManagement.warehousingOrder.appl`
+          ">请款
+        </ws-button>
+         <ws-button v-if='!item.payshow' type="primary" @click="cancel()" v-hasPermission="
+            `warehouseManagement.warehousingOrder.appl`
+          ">取消
+        </ws-button>
+        <ws-button v-if='!item.payshow' type="primary" @click="submit(item)" v-hasPermission="
+            `warehouseManagement.warehousingOrder.appl`
+          ">提交
+        </ws-button>
+        <ws-button type="primary" @click="aduit(item)" v-hasPermission="
+            `warehouseManagement.warehousingOrder.View`
+          ">审核
+        </ws-button>
+         <ws-button type="primary" @click="payment(item)" v-hasPermission="
+            `warehouseManagement.warehousingOrder.pay`
+          ">付款
+        </ws-button>
+        </div>
+      </div>
+      <el-table class="wenzi" :data="item.goodssourcelist" style="width: 100%"  @selection-change="handleSelectionChange" height="calc(100% - 110px)">
+          <el-table-column
+          :selectable='selectInit'
+      type="selection"
+      width="55">
+    </el-table-column>
+        <el-table-column type="index" label="序号">
+          <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="goodsSource" label="货源" width="80"></el-table-column>
+        <el-table-column prop="deliveryWarehouse" label="发货库" width="80"></el-table-column>
+        <el-table-column prop="goodsName" label="货名" width="80">
+        </el-table-column>
+        <el-table-column prop="inWarehouseWeight"  width="130" class="table_td" label="入库重量(吨)">
+          <template scope="scope">
+            <span>{{scope.row.inWarehouseWeight}}</span>
+            <i @click="changeWeight(scope.row)" v-if="
+                scope.row.weightedit&&scope.row.weightshow" class="iconfont icon-dui"></i>
+            <img v-if="!scope.row.weightedit&&scope.row.weightshow" width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="editWeight(scope.row)" alt="" />
+          </template>
+        </el-table-column>
+        <el-table-column prop="outWarehouseWOOeight"  width="130" class="table_td" label="出库重量(吨)"></el-table-column>
+        <el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)"></el-table-column>
+        <el-table-column prop="surplusWeight" width="130" class="table_td" label="剩余重量(吨)"></el-table-column>
+        <el-table-column prop="grainFund"  width="130" class="table_td" label="粮款(元)"></el-table-column>
+        <el-table-column prop="amountEdPayable"  width="130" class="table_td" label="已付(元)">
+          <template scope="scope">
+            <span >{{scope.row.amountEdPayable}}</span>
+            <img v-if='scope.row.addressUrl' width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
+          </template>
+        </el-table-column>
+        <el-table-column prop="amountNotPayable" class="table_td" label="未付(元)"></el-table-column>
+        <el-table-column prop="amountMoney" width="130" class="table_td" label="费用(元)">
+          <template scope="scope">
+            <span @click='costclick(scope.row)'>{{scope.row.amountMoney}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="avgCost"  width="130" class="table_td" label="平均成本(元/吨)"></el-table-column>
+        <el-table-column prop="requestFunds"  width="130" class="table_td" label="请款">
+          <template scope="scope">
+            <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
+            <el-input v-else v-model='scope.row.requestFunds'></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column prop="taskStatus" label="请款状态" width="90">
+          <template slot-scope="scope">
+            <template>
+              <span slot="reference">
+                <span v-if="scope.row.taskStatus == '待审核'" class="executory"></span>
+                <span v-if="scope.row.taskStatus == '执行中'" class="inExecution"></span>
+                <span v-if="scope.row.taskStatus == '已完成'" class="done"></span>
+                {{ scope.row.taskStatus }}
+              </span>
+            </template>
+            <img v-if="scope.row.taskStatus == '执行中'" width="17" height="18"
+              style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
+              @click="editClick(scope.row)" alt />
+          </template>
+        </el-table-column>
+      </el-table>
+    </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>
+        <el-dialog
+        title="付款"
+        :visible.sync="aduitshow"
+        width="50%"
+        :before-close="handleClose">
+        <div>
+          <el-form ref="form" :model="form" label-width="120px">
+            <el-form-item label="合计金额">
+              <el-input disabled v-model="form.name"></el-input>
+            </el-form-item>
+            <el-form-item label="附件">
+          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+            :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+          </el-form>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="aduitshow = false">取消</el-button>
+          <el-button type="primary" @click="paymentsubmit">确定</el-button>
+        </span>
+      </el-dialog>
+      <!-- <el-dialog
+  title="提示"
+  :visible.sync="dialogVisible"
+  width="30%"
+  :before-close="handleClose">
+  <div> 
+    <el-time-picker
+    v-model="value1"
+      format='HH:mm'
+    value-format="HH:mm"
+
+    
+    placeholder="任意时间点"> </el-time-picker>
+    <ws-button type="primary" @click="handleAdd()" v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          ">修改
+        </ws-button>
+  </div>
+</el-dialog> -->
+<el-dialog width='50%' :visible.sync="dialogVisible1" title="附件" top="20vh">
+      <div v-for="(item,index) in appendixIdss" :key="'fujian'+index" >
+       <el-image 
+        style="width: 100px; height: 100px"
+        :src="item" 
+        :preview-src-list="appendixIdss">
+      </el-image>
+      </div>
+    </el-dialog>
+  <el-dialog width='30%' :visible.sync="dialogVisible1" title="费用" top="20vh">
+      <div v-for="(item,index) in costlist" :key="index" class="audit">
+        <div class="audit_item">
+          <div class="audit_left">
+            <span class="audit_name">{{item.costNo}}</span>
+          </div>
+          <div class='audit_date'><span>{{item.expenseDate}}</span></div>
+        </div>
+        <div class="audit_item">
+          <div class="audit_left">
+            <span class="audit_name">{{item.expensesName}}</span>
+          </div>
+          <div class='audit_date'><span>{{item.expensesPrice}}</span></div>
+        </div>
+      </div>
+    </el-dialog>
+</div>
+  </div>
 </template>
 </template>
 <script>
 <script>
-export default {
-  data() {
-    return {}
-  },
-  activated() {
-    this.getList()
-  },
-  methods: {
-    getList,
-  },
-}
+  import {
+    getoreditoutput,
+    outdelete,
+    movestates,
+    woekflowhandle
+  } from '@/model/tasksport/index'
+  import {
+  getwarehousingorder,
+  paymoney,
+  editwarehousingorder,
+  getexenseinfo
+} from '@/model/warehouse/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+import { findLastIndexOfIterate } from 'xe-utils/methods'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        currectdata:{},
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        dataList:[],
+        // 船舶类型
+        monetaryKey: null,
+        form:{},
+        // 表格显示数据
+        tableDate: [],
+
+        // 是否显示
+        showType: true,
+        dialogVisible:false,
+        // 年
+        year: '',
+        title:'',
+        disabled:false,
+        gainList: [],
+        currentPage: 1,
+        primary: '1',
+        dialogVisible1:false,
+        pickerOptions: {
+          shortcuts: [{
+              text: '本周',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                var thisDay = start.getDay()
+                var thisDate = start.getDate()
+                if (thisDay != 0) {
+                  start.setDate(thisDate - thisDay)
+                }
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本月',
+              onClick(picker) {
+                const end = new Date()
+                const start = new Date()
+                start.setDate(1)
+                picker.$emit('pick', [start, end])
+              },
+            },
+            {
+              text: '本季度',
+              onClick(picker) {
+                var oDate = new Date()
+
+                var thisYear = oDate.getFullYear()
+                var thisMonth = oDate.getMonth() + 1
+
+                var n = Math.ceil(thisMonth / 3) // 季度
+
+                var Month = n * 3 - 1
+
+                var start = new Date(thisYear, Month - 2, 1)
+                var end = new Date()
+
+                picker.$emit('pick', [start, end])
+              },
+            },
+          ],
+        },
+        value1: '',
+        value:'',
+        value2: '',
+        pageSize: 9999,
+        searchType: '',
+        searchTypeText: '待审核',
+        searchKeyWord: '',
+        inOutType:'',
+        contractType: 2,
+        // 提交类型
+        submitType: true,
+        multipleSelection:[],
+        size: 10,
+        spanArr: [],
+        id:'',
+        appendixIdss:[],
+        accessoryTFs:'',
+        paymentScreenshot:[],
+        warehouseName: '',
+        deptBudgetTotal: 0,
+        compId: localStorage.getItem('ws-pf_compId'),
+        historyList: [],
+        aduitshow:false,
+        costlist:[],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    // activated() {
+    //   this.getList()
+    //   this.showType = this.isShow
+    // },
+    mounted() {
+      this.getList()
+      this.value2=this.getNowTime()
+      this.showType = this.isShow
+    },
+    methods: {
+      fujian(row) {
+        this.id = row.id
+        this.accessoryTFs = true
+        this.appendixIdss = row.addressUrl.split(',')
+        console.log(this.appendixIdss)
+      },
+      selectinOutType(){
+        this.getList()
+      },
+       handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      editWeight(row){
+        row.weightedit=true
+      },
+      changeWeight(row){
+        if(row.inWarehouseWeight<row.outWarehouseWOOeight){
+          this.$message({
+            message: '入库量不能小于出库量',
+            type: 'warning'
+          });
+          return 
+        }
+        this.$confirm('确定提交入库重量?', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editwarehousingorder({id:row.id,inWarehouseWeight:row.inWarehouseWeight}).toPromise()
+              .then((response) => {
+                // row.weightedit=false
+                this.getList()
+              })
+          })
+      },
+      payout(item){
+        if(this.multipleSelection.length>0){
+          item.payshow=false
+          for (let i = 0; i < this.multipleSelection.length; i++) {
+            this.multipleSelection[i].select=true
+            
+          }
+        }else{
+           this.$message({
+          message: '至少选择一条待请款条目',
+          type: 'warning'
+        });
+        }
+        
+      },
+      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, end])
+      return [start, end]
+    },
+      cancel(item){
+        item.payshow=true
+      },
+      costclick(row){
+        this.costlist=row.expenseAllocationInfoList
+        // getexenseinfo({id:row.id}).toPromise()
+        //   .then((response) => {
+        //     this.costlist=response
+        //   }).catch(() => {
+        //   })
+      },
+      selectInit(row,index){
+        if(localStorage.getItem('ws-pf_roleName')=='内勤'){
+          if(row.inType=='移库入库'||row.inType=='退库入库'){
+            return false
+          }else{
+            if(row.amountNotPayable>0){
+              if(row.taskStatus!='请款中'){
+                return true
+              }else{
+                return false
+              }
+            }else{
+              return false
+            }
+          }
+          
+        }else if(localStorage.getItem('ws-pf_roleName')=='采购副总'){
+          return true
+        }else if(localStorage.getItem('ws-pf_roleName')=='财务'){
+          return true
+        }else if(localStorage.getItem('ws-pf_roleName')=='出纳'){
+          return true
+        }else{
+          return false
+        }
+      },
+      handlefujian(file) {
+        // console.log(file)
+        this.paymentScreenshot.push(file.url)
+        // this.dialogVisible = true
+      },
+      handleRemove(file) {
+        // console.log(file)
+        for (let i = 0; i < this.paymentScreenshot.length; i++) {
+          if(this.paymentScreenshot[i]==response.url){
+            this.paymentScreenshot.splice(i, 1)
+          }
+          
+        }
+      },
+      submit(item){
+        var arr1=this.multipleSelection.filter(function(items,index){
+                  return item.warehouseName==items.warehouseName
+                })
+        for (let i = 0; i < arr1.length; i++) {
+          if(!arr1[i].requestFunds){
+            this.$message({
+              message: '请款金额不能为空!',
+              type: 'warning'
+            });
+            return
+          }
+           if(arr[i].requestFunds>arr[i].amountNotPayable){
+            this.$message({
+              message: '请款金额不能大于未付金额!',
+              type: 'warning'
+            });
+            return
+          }
+        }
+            this.$confirm('确认提交请款信息', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {  
+            paymoney({flag:1,warehousingOrderList:arr1}).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '提交成功',
+              type: 'success'
+            });
+          }).catch(() => {
+           this.$message({
+              message: '提交失败',
+              type: 'warning'
+            });
+          })
+          }).catch(() => {
+            return false
+          })
+      },
+      paymentsubmit(){
+         var arr2=this.multipleSelection.filter(function(items,index){
+                  return this.currectdata.warehouseName==items.warehouseName
+                })
+          if(this.paymentScreenshot.length==0){
+            this.$message({
+              message: '请上传付款截图',
+              type: 'warning'
+            });
+            return
+          }
+          for (let i = 0; i < arr2.length; i++) {
+            arr2[i].addressUrl=this.paymentScreenshot.toString()
+            
+          }
+            paymoney({flag:0,warehousingOrderList:arr2}).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '付款成功',
+              type: 'success'
+            });
+          }).catch(() => {
+           this.$message({
+              message: '付款失败',
+              type: 'warning'
+            });
+          })
+  
+      },
+      payment(item){
+        this.currectdata=item
+        this.aduitshow=true
+        
+      },
+      aduit(row){
+        var arr2=this.multipleSelection.filter(function(items,index){
+          return row.warehouseName==items.warehouseName
+        })
+        if(arr2.length==0){
+          if(localStorage.getItem('ws-pf_roleName')=='采购副总'){
+            this.$message({
+              message: '至少选择一条待决策人审核的条目',
+              type: 'eroor'
+            });
+            return
+          }else if(localStorage.getItem('ws-pf_roleName')=='财务'){
+            this.$message({
+              message: '至少选择一条待财务审核的条目',
+              type: 'eroor'
+            });
+            return
+          }
+           
+        }
+          this.$confirm('审核请款信息', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            this.aduithandle(arr2,0,true)
+          }).catch(() => {
+            this.aduithandle(arr2,0,false)
+          })       
+      },
+      aduithandle(item,index,status){
+        if(index<item.length){
+          woekflowhandle({
+                taskId: item[index].taskId,
+                approved:status,
+                auditMind: '34',
+                needReapply: false,
+              }).toPromise()
+              .then((response) => {
+               this.aduithandle(item,index+1,status)
+              }).catch(() => {
+                if(status){
+                  this.$message({
+                    message: '通过失败',
+                    type: 'error'
+                  });
+                }else{
+                  this.$message({
+                    message: '驳回失败',
+                    type: 'error'
+                  });
+                }
+              })  
+        }else{
+          if(status){
+            this.$message({
+              message: '通过成功',
+              type: 'success'
+            });
+          }else{
+            this.$message({
+              message: '驳回成功',
+              type: 'success'
+            });
+          }
+        }
+          
+      },
+      //查找
+      lookUp() {
+        this.currentPage = 1
+        this.getList()
+      },
+      warehousingorder(){
+        this.dialogVisible=true
+      },
+      getList() {
+        getwarehousingorder({
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType,
+            searchKeyWord: this.searchKeyWord,
+          })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < response.records.length; i++) {
+              response.records[i].select=false
+              response.records[i].surplusWeight=response.records[i].inWarehouseWeight-response.records[i].outWarehouseWeight+response.records[i].profitAndLoss
+              response.records[i].weightedit=false
+              if(response.records[i].warehouseName.indexOf('临')){
+                response.records[i].weightshow=true
+              }else{
+                response.records[i].weightshow=false
+              }
+            }
+            var arr=this.copare(response.records)
+            for (let i = 0; i < arr.length; i++) {
+              arr[i].payshow=true
+              // if(arr[i].warehouseName){
+                var arr1=response.records.filter(function(item,index){
+                  return arr[i].warehouseName==item.warehouseName
+                })
+                arr[i].goodssourcelist=JSON.parse(JSON.stringify(arr1))
+                console.log(arr1)
+              // }
+            }
+
+            this.gainList = arr
+            // this.currentPage = response.current
+            // this.pageSize = response.size
+            console.log(arr)
+            this.deptBudgetTotal = arr.length
+          })
+      },
+      copare(arr){
+        // 缓存用于记录
+        const newArr = [];
+        for (const t of arr) {
+          // 检查缓存中是否已经存在
+          if (
+            newArr.find(
+              (c) =>
+                c.warehouseName === t.warehouseName 
+            )
+          ) {
+            // 已经存在说明以前记录过,现在这个就是多余的,直接忽略
+            continue;
+          }
+          // 不存在就说明以前没遇到过,把它记录下来
+          newArr.push(t);
+        }
+
+        // 记录结果就是过滤后的结果
+        return newArr;
+      },
+      getSpanArr(data) {
+        let that = this
+
+        //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+        that.spanArr = []
+
+        that.pos = 0
+
+        //遍历数据
+
+        data.forEach((item, index) => {
+          //判断是否是第一项
+
+          // if (index === 0) {
+          //   this.spanArr.push(1)
+          //   this.pos = 0
+          // } else {
+          //不是第一项时,就根据标识去存储
+          if (data[index].warehouseNumViewList.length > 1) {
+            // 查找到符合条件的数据时每次要把之前存储的数据+1
+            this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+            this.spanArr.push(0)
+          } else {
+            // 没有符合的数据时,要记住当前的index
+            this.spanArr.push(1)
+            this.pos = index
+          }
+          // }
+        })
+      },
+      //查看//传参
+      nocomplete(row) {
+        this.$router.push({
+          path: 'inOutWarehousetaskEdit',
+          query: {
+            relevanceId: row.relevanceId,
+            businessKey: row.id,
+            workflowId: row.workflowId,
+          },
+        })
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      editClick(row) {
+        var status = ''
+        if (row.taskStatus == '待审核' || row.taskStatus == '已完成') {
+          status = '执行中'
+        } else if (row.taskStatus == '执行中') {
+          status = '已完成'
+        }
+        //cancelButtonClass: "btn-custom-cancel"
+        this.$confirm(`是否将状态改为${status}`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            movestates({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+        this.currentPage = 1,
+          this.getList()
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+    },
+  }
 </script>
 </script>
-<style  lang="scss" scoped>
+<style lang="scss" scoped>
+ 
+
+  .el-select {
+    width: 30%;
+    margin-right: 10px;
+  }
+.audit {
+    margin-bottom: 20px;
+    border-bottom: 1px solid #AFB3BF;
+    height: 70px;
+
+    .audit_item {
+      width: 100%;
+      display: flex;
+      height: 30px;
+
+      .audit_name {
+        margin-right: 30px;
+        font-size: 16px;
+        font-weight: 600;
+      }
+
+      .audit_left {
+        width: 60%;
+      }
+
+      .audit_date {
+        width: 40%;
+        justify-content: flex-end;
+        display: flex;
+        color: #AFB3BF;
+      }
+    }
+
+    .audit_opinion {}
+  }
 </style>
 </style>

File diff suppressed because it is too large
+ 1 - 3
vue.min.js


Some files were not shown because too many files changed in this diff