Ver Fonte

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

# Conflicts:
#	src/api/V2/profitable/index.js
#	src/model/profitable/index.js
#	src/views/profitable/contractprofitsdetails.vue
zhongtianhaoyuan há 1 ano atrás
pai
commit
cffda1e74b
59 ficheiros alterados com 6933 adições e 931 exclusões
  1. 47 34
      public/static/payprint1.html
  2. 2 0
      src/api/V2/contract/index.js
  3. 6 0
      src/api/V2/profitable/index.js
  4. 18 0
      src/api/V2/warehouse/index.js
  5. 4 5
      src/components/WsUpload/index.vue
  6. 3 1
      src/components/pdf/pdf.vue
  7. 14 5
      src/lang/zh.js
  8. 4 2
      src/model/contarct/index.js
  9. 5 2
      src/model/houseSelfCollect/index.js
  10. 10 1
      src/model/profitable/index.js
  11. 26 1
      src/model/warehouse/index.js
  12. 142 32
      src/views/contractManagement/acquisitionContract.vue
  13. 769 0
      src/views/contractManagement/acquisitionContractAudit.vue
  14. 76 3
      src/views/contractManagement/collectionContract.vue
  15. 760 0
      src/views/contractManagement/collectionContractAudit.vue
  16. 85 0
      src/views/contractManagement/component/routers/route.js
  17. 165 51
      src/views/contractManagement/purchaseContract.vue
  18. 852 0
      src/views/contractManagement/purchaseContractAudit.vue
  19. 202 33
      src/views/contractManagement/salesContract.vue
  20. 978 0
      src/views/contractManagement/salesContractAudit.vue
  21. 105 3
      src/views/contractManagement/storageContract.vue
  22. 784 0
      src/views/contractManagement/storageContractAudit.vue
  23. 5 3
      src/views/customerFundManagement/customerFundEdit.vue
  24. 7 6
      src/views/houseSelfCollect/inspectionManagementNew.vue
  25. 13 4
      src/views/outboundManagement/weighingManagementNew.vue
  26. 12 3
      src/views/outboundManagement/weighingManagementrecord.vue
  27. 1 1
      src/views/personnelManagement/component/router/route.js
  28. 39 13
      src/views/profitable/cashout.vue
  29. 9 6
      src/views/profitable/cashoutaduit.vue
  30. 13 9
      src/views/profitable/cashoutaduitNQ.vue
  31. 34 5
      src/views/profitable/cashoutedit.vue
  32. 60 28
      src/views/profitable/component/routers/route.js
  33. 41 7
      src/views/profitable/contractprofits.vue
  34. 374 413
      src/views/profitable/contractprofitsdetails.vue
  35. 8 0
      src/views/profitable/expenseallot.vue
  36. 6 1
      src/views/profitable/expenseallotaduit.vue
  37. 46 9
      src/views/profitable/expensemanagement.vue
  38. 30 51
      src/views/profitable/expensemanagementdetails.vue
  39. 30 8
      src/views/profitable/expensemanagentedit.vue
  40. 5 1
      src/views/profitable/expensemanagentlook.vue
  41. 73 29
      src/views/profitable/payment.vue
  42. 274 0
      src/views/profitable/pettyAccount.vue
  43. 424 0
      src/views/profitable/pettyCash.vue
  44. 7 2
      src/views/profitable/receipt.vue
  45. 4 1
      src/views/profitable/receiptaduit.vue
  46. 10 10
      src/views/statisticalReport/autoSettlementList.vue
  47. 2 2
      src/views/statisticalReport/component/routers/route.js
  48. 5 0
      src/views/statisticalReport/huoyunList.vue
  49. 5 0
      src/views/statisticalReport/shippingList.vue
  50. 49 14
      src/views/statisticalReport/stockPurchaseReceiptReportList.vue
  51. 40 8
      src/views/statisticalReport/stockSaleOutReportList.vue
  52. 9 8
      src/views/taskManagement/supplyofgoods.vue
  53. 1 0
      src/views/taskManagement/supplyofgoodslook.vue
  54. 1 1
      src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue
  55. 18 3
      src/views/tranManagement/tranManagementVehicleDispatching.vue
  56. 63 63
      src/views/warehousenew/component/router/index.js
  57. 57 13
      src/views/warehousenew/goodsrollIn.vue
  58. 89 30
      src/views/warehousenew/warehouseManagementList.vue
  59. 12 6
      src/views/warehousenew/warehousingOrder.vue

+ 47 - 34
public/static/payprint1.html

@@ -19,9 +19,11 @@
         .simple {
             height: 120vh !important;
         }
+        
         .simple2 {
             height: 99vh !important;
         }
+        
         .content {
             width: 1000px;
             margin: auto;
@@ -177,11 +179,23 @@
         }
         
         .center {
-            height: 99.5vh;
+            height: 90vh;
+            page-break-after: always
         }
         
         .part2 {
             height: 99.5vh;
+            page-break-after: always
+            /* background: red; */
+        }
+        
+        .part1 {
+            page-break-after: always
+            /* background: red; */
+        }
+        
+        .bankcard {
+            page-break-after: always
             /* background: red; */
         }
         
@@ -312,7 +326,7 @@
                             </tr>
                             <tr class="row">
                                 <td class="col col-bgc">纯重</td>
-                                <td class="col col-bgc" >
+                                <td class="col col-bgc">
                                     单价
                                 </td>
                                 <td class="col col-bgc">扣单价</td>
@@ -390,14 +404,14 @@
                             <tr class="row">
                                 <td class="col col-bgc">实付金额</td>
                                 <td class="col " colspan="2">
-                                    
+
                                 </td>
                                 <td class="col col-bgc" colspan="3">人民币(大写)</td>
                                 <td class="col " v-if="!pengyuPrint" colspan="4">
                                     {{printData1[index].capitalize}}
                                 </td>
                                 <td class="col " v-if="pengyuPrint" colspan="4">
-                                    
+
                                 </td>
                             </tr>
                         </table>
@@ -597,7 +611,7 @@
                 </div>
                 <img :src="printData.paymentScreenshot" class="paymentScreenshot" />
             </div> -->
-            <div class="center part1" v-if="isShowPrintType3&&!isShowPrintType6" :class="printData.extra2? 'simple2':!selectPrint? 'simple':''" >
+            <div class="center part1" v-if="isShowPrintType3&&!isShowPrintType6" :class="printData.extra2? 'simple2':!selectPrint? 'simple':''">
                 <div class="header1">{{ printData.compName}}结算凭证</div>
                 <div class="line"></div>
                 <div class="line"></div>
@@ -766,7 +780,7 @@
                         <td class="col " v-if="pengyuPrint&&printData.type != '潮粮'">
                             {{Number(printData.unitContractPrice/1000*printData.weighingManagement.netWeight).toFixed(2)}}
                         </td>
-                        
+
                         <td class="col " v-if="!pengyuPrint">
                             {{printData.calculationPayable}}
                         </td>
@@ -784,7 +798,7 @@
                             {{printData.capitalize}}
                         </td>
                         <td class="col " v-if="pengyuPrint" colspan="4">
-                            
+
                         </td>
                     </tr>
                 </table>
@@ -818,7 +832,7 @@
                 </div>
             </div>
 
-            <div class="center part1" v-if="isShowPrintType3&&printData.extra2||isShowPrintType6"  :class="printData.extra2? 'simple2':!selectPrint? 'simple':''" >
+            <div class="center part1" v-if="isShowPrintType3&&printData.extra2||isShowPrintType6" :class="printData.extra2? 'simple2':!selectPrint? 'simple':''">
                 <div class="header1">{{ print_company_name_ew}}结算凭证</div>
                 <div class="line"></div>
                 <div class="line"></div>
@@ -836,12 +850,12 @@
                     <div class="number">{{dealNo(printData.paymentNo)}}</div>
                 </div>
                 <table class="table">
-                        <td rowspan="2" class="col col-bgc">买方</td>
-                        <td class="col col-bgc">单位名称</td>
-                        <td class="col" colspan="3">{{ print_company_name_ew}}</td>
-                        <td rowspan="4" class="col col-bgc">客户</td>
-                        <td class="col col-bgc">姓名</td>
-                        <td class="col" colspan="4" >{{printData.customerName}}</td>
+                    <td rowspan="2" class="col col-bgc">买方</td>
+                    <td class="col col-bgc">单位名称</td>
+                    <td class="col" colspan="3">{{ print_company_name_ew}}</td>
+                    <td rowspan="4" class="col col-bgc">客户</td>
+                    <td class="col col-bgc">姓名</td>
+                    <td class="col" colspan="4">{{printData.customerName}}</td>
                     </tr>
                     <tr class="row">
                         <td class="col col-bgc">收货仓库</td>
@@ -849,7 +863,7 @@
                         <td v-if="!pengyuPrint" class="col" colspan="3">{{printData.warehouseName=='洮南新友谊兴旺库'?'建发农产品-洮南安定自管仓':printData.warehouseName}}</td>
                         <td class="col col-bgc">身份证号</td>
                         <td class="col" colspan="4">
-                           {{ printData.identityAuthenticationInfo.customerNumberCard}}
+                            {{ printData.identityAuthenticationInfo.customerNumberCard}}
                         </td>
                     </tr>
                     <tr class="row">
@@ -994,7 +1008,7 @@
                             {{printData.capitalize}}
                         </td>
                         <td class="col " v-if="pengyuPrint" colspan="4">
-                            
+
                         </td>
                     </tr>
                 </table>
@@ -1360,7 +1374,7 @@
             isShowPrintType3: false,
             isShowPrintType4: false,
             isShowPrintType5: false,
-            isShowPrintType6:false,
+            isShowPrintType6: false,
             showType: [],
             printData: {},
             printData1: [],
@@ -1380,10 +1394,10 @@
             onlyShowPz: false,
             tableData: [],
             compId: '',
-            print_company_name:'',
-            print_company_name_ew:'',
-            print_customer_name_ew:'',
-            pengyuPrint:'false'
+            print_company_name: '',
+            print_company_name_ew: '',
+            print_customer_name_ew: '',
+            pengyuPrint: 'false'
         },
         computed: {},
         methods: {
@@ -1417,27 +1431,26 @@
         },
         mounted() {
             this.pengyuPrint = localStorage.getItem('pengyuPrint')
-            if(localStorage.getItem('print_company_name')){
-                this.print_company_name=localStorage.getItem('print_company_name')
+            if (localStorage.getItem('print_company_name')) {
+                this.print_company_name = localStorage.getItem('print_company_name')
             }
-            if(localStorage.getItem('print_company_name_ew')){
-                this.print_company_name_ew=localStorage.getItem('print_company_name_ew')
+            if (localStorage.getItem('print_company_name_ew')) {
+                this.print_company_name_ew = localStorage.getItem('print_company_name_ew')
             }
-            if(localStorage.getItem('print_customer_name_ew')){
-                this.print_customer_name_ew=localStorage.getItem('print_customer_name_ew')
+            if (localStorage.getItem('print_customer_name_ew')) {
+                this.print_customer_name_ew = localStorage.getItem('print_customer_name_ew')
             }
-            if(this.pengyuPrint == 'true'){
+            if (this.pengyuPrint == 'true') {
                 this.pengyuPrint = true
-            }
-            else{
+            } else {
                 this.pengyuPrint = false
             }
             //公司id
             this.compId = localStorage.getItem('ws-pf_compId')
-            if(this.compId == '5d164edcef03476dba6630f86dc96496'){
+            if (this.compId == '5d164edcef03476dba6630f86dc96496') {
                 this.compId = '6a713699e08c4cbc97a87f7648a95e3d'
             }
-            
+
             this.date = new Date().toLocaleString()
                 // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
             let _data = {}
@@ -1559,8 +1572,8 @@
             } else {
                 this.isShowPrintType3 = true
             }
-            if(localStorage.getItem('print_alone_extra')=='true'){
-                this.isShowPrintType6=true
+            if (localStorage.getItem('print_alone_extra') == 'true') {
+                this.isShowPrintType6 = true
             }
             if (_type == 2) {
                 this.bigContent = true

+ 2 - 0
src/api/V2/contract/index.js

@@ -120,3 +120,5 @@ export const API_GET_SETTLEMENTPRICE ='/contractManagementInfo/settlementPrice'
 
 // 发起人撤回
 export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
+// 编辑合同流程信息
+export const API_EDIT_PROCESS ='/contractProcessInfo/editInfo'

+ 6 - 0
src/api/V2/profitable/index.js

@@ -120,3 +120,9 @@ export const API_GET_COALPARAGRAPH_RECORD = '/expenseInfo/selectRequestRecordInf
 export const API_GET_EXPORT_TEXT = '/contractManagementInfo/settlementExport'
 //查看附件
 export const API_GET_LOOK_ANNEX = '/appendix/query/getFileList'
+//备用金列表
+export const API_GET_PETTCASHLIST = '/expenseInfo/selectPettyCashInfo'
+//备用金账户列表
+export const API_GET_PETTACCOUNTLIST = '/pettyCashInfo/selectPettyAccountInfo'
+//备用金账户下拉列表
+export const API_GET_GETACCOUNTLIST = '/pettyCashInfo/getPettyAccountList'

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

@@ -173,3 +173,21 @@ export const API_GET_CUSACTIONINFO='/cargoTitleDetails/selectCusActionInfo'
 export const API_GET_CUSACTIONINFO_REJECT='/cargoTitleDetails/api/rejection'
 // 货权转入
 export const API_SET_ROLLIN='/cargoTitleDetails/api/toChangeInto'
+//查看自己负责的仓库new
+export const API_GET_WAREHOUSENAME_NEW='/warehouseBaseInfo/selectWarehouseSelfNew'
+
+//物料出入库  编辑
+export const API_POST_EDITMATERIAL='/materialWarehouseInOut/api/editMaterial'
+//物料出入库  记录
+export const API_GET_MATERIALRECORD='/materialWarehouseInOut/selectMaterialWarehousePage'
+//物料出入库  毛重
+export const API_POST_ADDMATERIAL='/materialWarehouseInOut/api/addMaterial'
+//物料出入库  记录删除
+export const API_POST_DELMATERIAL='/materialWarehouseInOut/api/deleteMaterialInfo'
+//物料出入库  查看
+export const API_GET_LOOKMATERIAL='/materialWarehouseInOut/getMaterialInfo'
+
+//折算纯重
+export const API_GET_GETQUALITYZHE = '/warehouseBaseInfo/getQuantityZhe'
+//实际重量
+export const API_GET_GETQUALITYREAL = '/warehouseBaseInfo/getQuantityReal'

+ 4 - 5
src/components/WsUpload/index.vue

@@ -267,7 +267,6 @@ export default {
   },
   mounted() {
     this.getDefaultFiles(this.appendixIds)
-
     const handleChange = this.$refs.elUpload.$refs['upload-inner'].handleChange
     this.$refs.elUpload.$refs['upload-inner'].handleChange = (ev) => {
       this.initFileList = []
@@ -411,7 +410,7 @@ export default {
         const index = this.fileList.findIndex((itm) => itm.uid === file.uid)
         this.fileList.splice(index, 1)
       }
-      this.$emit('onChange', this.fileList.length)
+      this.$emit('onChange', this.fileList.length,this.fileList)
     },
 
     // 自定义上传过程
@@ -480,7 +479,7 @@ export default {
           })
         )
         this.tempFileList = []
-        this.$emit('onChange', this.fileList.length)
+        this.$emit('onChange', this.fileList.length,this.fileList)
         this.hideLoading()
       }
     },
@@ -570,7 +569,7 @@ export default {
 
     // 获取文件样式
     getFileClass(file) {
-      const ext = this.getExtName(file.name)
+      const ext = this.getExtName(file.name).toLowerCase()
       return 'ext ' + ext
     },
     // 是否为图片
@@ -796,7 +795,7 @@ $ctrl-margin-left: 10px;
   .doc {
     background-image: url('~@/assets/images/common/upload/doc.png');
   }
-  .docx {
+  .docx,.DocX,.DOCX  {
     background-image: url('~@/assets/images/common/upload/docx.png');
   }
   .eml {

+ 3 - 1
src/components/pdf/pdf.vue

@@ -37,8 +37,10 @@ export default {
   },
   methods: {
     pdfTask (pdfUrl) {
-      var loadingTask = pdf.createLoadingTask(pdfUrl)
+        let CMAP_URL = 'https://unpkg.com/pdfjs-dist@2.0.943/cmaps/'
+      var loadingTask = pdf.createLoadingTask({url: pdfUrl,withCredentials: false,cMapUrl: CMAP_URL,cMapPacked: true})
       loadingTask.promise.then(pdf => {
+        
         this.pdfUrl = loadingTask
         this.numPages = pdf.numPages
       }).catch((err) => {

+ 14 - 5
src/lang/zh.js

@@ -484,16 +484,19 @@ export default {
     purchaseContract: '采购合同',
     collectionContract: '代收合同',
     purchaseContractAdd: '采购合同  /  添加',
+    purchaseContractAudit: '采购合同  /  审核',
     purchaseContractcost:'采购合同  /  费用',
     collectionContractAdd: '代收合同  /  添加',
     purchaseContractEdit: '采购合同  /  编辑',
     collectionContractEdit: '代收合同  /  编辑',
     collectionContractExamine:'代收合同  /  查看',
     collectionContractRecord:'代收合同  /  记录',
+    collectionContractAudit:'代收合同  /  审核',
     storageContract:'代储合同',
     storageContractAdd: '代储合同  /  添加',
     storageContractEdit: '代储合同  /  编辑',
     storageContractExamine: '代储合同  /  查看',
+    storageContractAudit: '代储合同  /  审核',
     storageContractRecord:'代储合同  /  代储费',
     storageContractRecord:'代储合同  /  记录',
     purchaseContractExamine: '采购合同  /  查看',
@@ -501,6 +504,7 @@ export default {
     acquisitionContractAdd: '收购合同  /  添加',
     acquisitionContractEdit: '收购合同  /  编辑',
     acquisitionContractExamine: '收购合同  /  查看',
+    acquisitionContractAudit:'收购合同  /  审核',
     salesContract: '销售合同',
     salesContractEdit: '销售合同  /  编辑',
     salesContractcost: '销售合同  /  费用',
@@ -544,8 +548,10 @@ export default {
     transformation: '折转',
     warehouseManagement:'全部仓库',
     dryWarehousing:'烘干入库',
-    addCar:"常用车辆",
-    dryRecord:"入库记录",
+    materialInOutWarehouse:'物料出入库',
+    materialInOutRecord:'物料出入库记录',
+    addCar:'常用车辆',
+    dryRecord:'入库记录',
 
     //客户管理
     customerList: '客户管理',
@@ -682,6 +688,8 @@ export default {
     storageCharge:'仓储费',
     earnestmoney:'保证金',
     oilcost:'油费',
+    pettyCash:'备用金',
+    pettyAccount:'备用金账户',
     coalCost:'煤费',
     inventoryCheck:'库存盘点',
     sparepartMa: '物料采购',
@@ -1086,7 +1094,7 @@ export default {
     //利润核算
     profitable:'利润核算',
     contractOtherMoney: '合同外费用',
-    contractprofitsdetails:'合同利润  /  利润详情',
+    contractprofitsdetailsoverview:'合同利润  /  合同利润概览',
     warehouseprofitsdetails:'库点利润  /  利润详情',
     expensemanagementdetails:'费用管理  /  费用详情',
     contractinventory:'合同利润  /  利润详情  /  库存',
@@ -1107,6 +1115,7 @@ export default {
     contractprofits: '合同利润',
     warehouseprofits: '库点利润',
     expensemanagement: '费用管理',
+    summaryOfIncomeAndExpenditure:'费用管理  /  收支概览',
     inOutDetailed: '收支明细',
     fixedAssets:'固定资产',
 
@@ -4927,8 +4936,8 @@ export default {
     transformation: '折转',
     warehouseManagement:'全部仓库',
     dryWarehousing:'烘干入库',
-    addCar:"常用车辆",
-    dryRecord:"入库记录",
+    addCar:'常用车辆',
+    dryRecord:'入库记录',
   },
   //贸易服务
   tradeServicesManagement: {

+ 4 - 2
src/model/contarct/index.js

@@ -51,7 +51,8 @@ import {
     API_PAYMENT,
     API_GET_SETTLEMENTPRICE,
     API_GET_STAFF_ALL,
-    API_SPONSOR_WITHDRAW
+    API_SPONSOR_WITHDRAW,
+    API_EDIT_PROCESS
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -172,5 +173,6 @@ export const getsettlementprice = appRx.get(API_GET_SETTLEMENTPRICE, errorCatche
 
 // 发起人撤回
 export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
-
+// 编辑合同流程信息
+export const editProcessInfo = appRx.post(API_EDIT_PROCESS, errorCatcher, errorHandle, filter)
 

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

@@ -71,7 +71,8 @@ import {
     API_POST_GETVIDEO,
     API_POST_GETCARNUMBER,
     API_POST_GETOKEN,
-    API_POST_GEROM
+    API_POST_GEROM,
+    API_GETQUALITY
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -213,4 +214,6 @@ export const changeCustomer = appRx.post(API_POST_CUSTOMER, errorCatcher, errorH
 export const getwarehouse = appRx.get(API_GET_WAREHOUSE, errorCatcher, errorHandle, filter)
 
 export const getToken = appRx.post(API_POST_GETOKEN, errorCatcher, errorHandle, filter)
-export const getRom = appRx.post(API_POST_GEROM, errorCatcher, errorHandle, filter)
+export const getRom = appRx.post(API_POST_GEROM, errorCatcher, errorHandle, filter)
+// 查询交易量
+export const getquality = appRx.get(API_GETQUALITY, errorCatcher, errorHandle, filter)

+ 10 - 1
src/model/profitable/index.js

@@ -60,7 +60,10 @@ import {
   API_GET_COALPARAGRAPH,
   API_GET_COALPARAGRAPH_RECORD,
   API_GET_EXPORT_TEXT,
-  API_GET_LOOK_ANNEX
+  API_GET_LOOK_ANNEX,
+  API_GET_PETTCASHLIST,
+  API_GET_PETTACCOUNTLIST,
+  API_GET_GETACCOUNTLIST
 } from '@/api/V2/profitable'
 //收支明细列表
 export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
@@ -183,3 +186,9 @@ export const coalPaymentRecord = appRx.get(API_GET_COALPARAGRAPH_RECORD, errorCa
 export const exportText = appRx.get(API_GET_EXPORT_TEXT)
 //查看附件
 export const getAnnex = appRx.get(API_GET_LOOK_ANNEX, errorCatcher, errorHandle, filter)
+// 备用金列表
+export const pettCashList = appRx.get(API_GET_PETTCASHLIST, errorCatcher, errorHandle, filter)
+// 备用金账户列表
+export const pettAccountList = appRx.get(API_GET_PETTACCOUNTLIST, errorCatcher, errorHandle, filter)
+// 备用金账户下拉列表
+export const getAccountList = appRx.get(API_GET_GETACCOUNTLIST, errorCatcher, errorHandle, filter)

+ 26 - 1
src/model/warehouse/index.js

@@ -84,7 +84,15 @@ import {
     API_GETROLL,
     API_GET_CUSACTIONINFO,
     API_GET_CUSACTIONINFO_REJECT,
-    API_SET_ROLLIN
+    API_SET_ROLLIN,
+    API_GET_WAREHOUSENAME_NEW,
+    API_GET_MATERIALRECORD,
+    API_POST_ADDMATERIAL,
+    API_POST_EDITMATERIAL,
+    API_POST_DELMATERIAL,
+    API_GET_LOOKMATERIAL,
+    API_GET_GETQUALITYZHE,
+    API_GET_GETQUALITYREAL
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -259,3 +267,20 @@ export const getcusationinfo = appRx.get(API_GET_CUSACTIONINFO, errorCatcher, er
 export const rejectcusationinfo = appRx.post(API_GET_CUSACTIONINFO_REJECT, errorCatcher, errorHandle, filter)
 // 货源转入
 export const setrollin = appRx.post(API_SET_ROLLIN, errorCatcher, errorHandle, filter)
+//查看自己负责的仓库new
+export const getwarehousNameNew = appRx.get(API_GET_WAREHOUSENAME_NEW,errorCatcher, errorHandle, filter)
+
+//物料出入库  记录
+export const getMaterialRecord = appRx.get(API_GET_MATERIALRECORD,errorCatcher, errorHandle, filter)
+//物料出入库  添加
+export const addMaterial = appRx.post(API_POST_ADDMATERIAL,errorCatcher, errorHandle, filter)
+//物料出入库  编辑
+export const editMaterial = appRx.post(API_POST_EDITMATERIAL,errorCatcher, errorHandle, filter)
+//物料出入库  记录删除
+export const delMaterial = appRx.post(API_POST_DELMATERIAL,errorCatcher, errorHandle, filter)
+//物料出入库 查看
+export const lookMaterial = appRx.get(API_GET_LOOKMATERIAL, errorCatcher, errorHandle, filter)
+//折算纯重
+export const getQualityZhe = appRx.get(API_GET_GETQUALITYZHE, errorCatcher, errorHandle, filter)
+//实际重量
+export const getQualityReal = appRx.get(API_GET_GETQUALITYREAL, errorCatcher, errorHandle, filter)

+ 142 - 32
src/views/contractManagement/acquisitionContract.vue

@@ -150,9 +150,23 @@
       <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
       
       <!-- <el-table-column width='130' prop="mildewGrain" label="已付款(元)"> -->
-      </el-table-column>
+      <!-- </el-table-column> -->
       <el-table-column prop="amountEdPayable" label="已付运费"> </el-table-column>
-      <el-table-column width='130' prop="goodsNames" label="已开发票 (元)">
+      <el-table-column width='120' prop="goodsNames" label="已开发票 (元)">
+        <template slot-scope="scope">
+             <div class="inputChenge">
+              <!-- readonly -->
+              <el-input v-model="scope.row.invoiced" v-if="scope.row.identification1 == 'true'"></el-input>
+              <div v-if="scope.row.identification1 == 'false'" class="inputs">
+                {{ scope.row.invoiced }}
+              </div>
+            </div>
+             <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="whether(scope.row)"
+              v-if="scope.row.identification1 == 'false'" alt="" />
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification1 == 'true'" @click="varietyClick(scope.row)"></i>
+        </template>
       </el-table-column>
       <el-table-column prop="addressUrl" label="附件">
         <template slot-scope="scope">
@@ -167,8 +181,48 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="160">
+      <el-table-column prop="address" label="操作" width="150">
         <template slot-scope="scope">
+          <el-link v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.view`
+            " target="_blank" type="primary" :underline="false" @click="handleExamine(scope.row)"
+            >查看</el-link>
+            <el-divider direction="vertical"></el-divider>
+            <el-link v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.edit`
+            " target="_blank" type="primary" :underline="false" @click="handleEdit(scope.row)"
+              :disabled="scope.row.approveStatus">编辑</el-link>
+              <el-dropdown>
+              <span class="btn_css">•••</span>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.delete`
+            "><el-link target="_blank" type="primary" :underline="false" @click="handleDelete(scope.row)"
+              :disabled="scope.row.approveStatus">删除</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.edit`
+            ">
+                  <el-link  target="_blank" type="primary" :underline="false" @click="withdraw(scope.row)"
+              :disabled="scope.row.approveStatus && scope.row.approveStatus=='发起人撤回'">撤回</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.view`
+            ">
+                  <el-link target="_blank" type="primary" :underline="false" @click="handleaudit(scope.row)"
+              :disabled="!scope.row.taskId">审核</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handlecost(scope.row)">费用详情</el-link>
+              </el-dropdown-item>
+              <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handleprofit(scope.row)">利润详情</el-link>
+              </el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+              
+              
+              
            <!-- <img width="16" height="17" style="
                 vertical-align: text-top;
                 position: relative;
@@ -178,33 +232,6 @@
                v-hasPermission="
               `contractManagement.nonContract.nonContractInfo.view`"
              @click="handlecost(scope.row)" alt="" /> -->
-             
-          <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
-            src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
-              `contractManagement.buyContract.buyContractInfo.view`
-            " alt="" />
-          <div v-if="
-              (scope.row.approveStatus != '待决策人审核' &&
-                !scope.row.approveStatus || scope.row.approveStatus == '发起人撤回')
-            " style="display: inline-block">
-            <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px"
-              src="../../../public/img/bianji.png" @click="handleEdit(scope.row)" v-hasPermission="
-                `contractManagement.buyContract.buyContractInfo.edit`
-              " alt="" />
-          </div>
-          <img width="16" height="17" style="
-              vertical-align: text-top;
-              position: relative;
-              top: -1px;
-              margin: 0 6px;
-            " v-if="scope.row.status == '待执行'&&!scope.row.approveStatus||scope.row.status == '已驳回'" src="../../../public/img/shanchu.png"
-            v-hasPermission="
-              `contractManagement.buyContract.buyContractInfo.delete`
-            " @click="handleDelete(scope.row)" alt="" />
-            <div v-show="scope.row.showFlag" v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
-              <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px" src="../../../public/img/chehui.png"
-                @click="withdraw(scope.row)" v-hasPermission="`contractManagement.buyContract.buyContractInfo.edit`" alt="" />
-            </div>
             <!-- <ws-button v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" type="primary" @click="withdraw(scope.row)" >撤回</ws-button> -->
         </template>
       </el-table-column>
@@ -236,7 +263,8 @@
     editInfo,
     getsettlementprice,
     getstafffind,
-    sponsorWithdraw
+    sponsorWithdraw,
+    editProcessInfo
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -392,6 +420,31 @@
 
     },
     methods: {
+      handleaudit(row) {
+      this.$router.push({
+        name: 'acquisitionContractAudit',
+        query: {
+          id: row.id,
+          status: row.status,
+        },
+      })
+    },
+    handlecost(row) {
+      this.$router.push({
+        name: 'expensemanagementdetails',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
+    handleprofit(row) {
+      this.$router.push({
+        name: 'contractprofits',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
       withdraw(row) {
       this.$confirm(`撤回成功后,可再次提交,确定撤回该合同吗?`, {
         cancelButtonText: '取消',
@@ -417,6 +470,17 @@
           this.persionList = response
         })
     },
+      // handlecost(row){
+      //    this.$router.push({
+      //     name: 'buyContractcost',
+      //     query: {
+      //       id: row.id,
+      //       contractNo: row.contractNo,
+      //       status:row.status,
+      //       seller:row.seller
+      //     },
+      //   })
+      // },
       handlecost(row){
          this.$router.push({
           name: 'buyContractcost',
@@ -427,6 +491,38 @@
             seller:row.seller
           },
         })
+      },
+       whether(row) {
+          row.identification1 = 'true'
+      },
+      //修改开票金额
+      varietyClick(row) {
+        var title = ''
+        var data = {}
+        title = '确定要修改已开发票金额?'
+        data = {
+            goodsName: row.invoiced,
+            id: row.id
+          }
+        this.$confirm(title, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editProcessInfo(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '修改成功',
+                })
+                this.getList()
+              })
+              .catch(() => {
+                return false
+              })
+          })
       },
       onChange() {
         this.$refs.upload
@@ -541,6 +637,7 @@
           .toPromise()
           .then((response) => {
             for (var i = 0; i < response.records.length; i++) {
+              response.records[i].identification1 = 'false'
               if (response.records[i].creator == localStorage.getItem('ws-pf_staffName')) {
                 response.records[i].showFlag = true
               }
@@ -824,7 +921,14 @@
   //   padding: 3px;
   //   border-radius: 2px;
   // }
-
+ .inputChenge {
+    width: 100%;
+    display: inline-flex;
+    margin-left: -28%;
+  }
+    .inputs {
+    margin: 0 auto;
+  }
   .wrap {
     width: 400px;
     position: absolute;
@@ -1094,4 +1198,10 @@
     color: #8890b1;
     width:100%;
   }
+  .btn_css {
+    color: #409eff;
+    cursor: pointer;
+    position:relative;
+    top:2px;
+  }
 </style>

+ 769 - 0
src/views/contractManagement/acquisitionContractAudit.vue

@@ -0,0 +1,769 @@
+<!--采购合同查看-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<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>
+
+    <ws-form class="ws-form" ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
+      <div class="title-top">
+        收购合同<span class="title-number">【编号:{{ deptBudgetList.contractNo }}】</span>
+        <div class="icon" v-if="deptBudgetList.status">
+          <template>
+            <el-popover placement="right" :width="285" trigger="click" visible-arrow="false"
+              @show="history(deptBudgetList.id)">
+              <template>
+                <div slot="reference"> {{deptBudgetList.status }}</div>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div v-if="index != historyList.length - 1" class="vertical-line"></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
+                </div>
+              </div>
+            </el-popover>
+          </template>
+        </div>
+      </div>
+      <div class="remark">
+        <h3>基本信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          {{deptBudgetList.transactionSubject}}
+        </ws-form-item>
+        <ws-form-item label="收购方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <ws-form-item label="卖方" span="1" prop="buyer">
+          {{ deptBudgetList.sellerer }}
+        </ws-form-item>
+        <ws-form-item label="交货方式" span="1" prop="deliverType1">{{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营方" span="1" prop="seller">{{ deptBudgetList.jointVentureParties }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <ws-form-item label="收购方电话" span="1" prop="buyerPhone">{{ deptBudgetList.buyerPhone }}
+        </ws-form-item>
+        <ws-form-item label="卖方电话" span="1" prop="buyerPhone">{{ deptBudgetList.sellerPhone }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营方电话" span="1" prop="sellerPhone">
+          {{ deptBudgetList.jointPhone }}
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营加价" span="1" prop="seller" class="readonly">
+          {{ deptBudgetList.jointVentureMarkup }}
+        </ws-form-item>
+        <ws-form-item label="价格类型" span="1" prop="priceType">
+          {{ deptBudgetList.priceType }}
+        </ws-form-item>
+        <ws-form-item label="合同单价(元/吨)" span="1" prop="unitContractPrice" v-if="deptBudgetList.priceType == '定价收购'">
+          {{ deptBudgetList.unitContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          {{ deptBudgetList.weight }}
+        </ws-form-item>
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice" v-if="deptBudgetList.priceType == '定价收购'">
+          {{ deptBudgetList.totalContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          {{ deptBudgetList.overShort }}
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
+          {{ deptBudgetList.finalTradingVolume }}
+        </ws-form-item>
+        <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+          {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+        </ws-form-item>
+      </ws-info-table>
+      <!--面试信息-->
+      <div class="remark">
+        <h3>货物信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="货名" span="1" prop="waterContent">
+          {{ deptBudgetList.contractGoodsInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+          {{ deptBudgetList.contractGoodsInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="品级" span="1" prop="grade">
+          {{ deptBudgetList.contractGoodsInfo.grade }}
+        </ws-form-item>
+        <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+          {{ deptBudgetList.contractGoodsInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+          {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+        </ws-form-item>
+        <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain" class="result">
+          {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+        </ws-form-item>
+        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+          {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+        </ws-form-item>
+        <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain" class="result">
+          {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>流程信息</h3>
+      </div>
+      <ws-info-table>
+        <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
+          {{deptBudgetList.contractProcessInfo.mildewGrain}}
+        </ws-form-item>
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          {{ deptBudgetList.contractProcessInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">{{ deptBudgetList.contractProcessInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity">{{ deptBudgetList.contractProcessInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item label="已完成发运量(吨)" span="1" prop="imperfectGrain" class="result">
+          {{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+        </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">{{ deptBudgetList.contractProcessInfo.grade }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>备注信息</h3>
+      </div>
+    <div style=" color: #afb5cb;margin-left: 20px;margin-bottom: 20px;">
+        <ws-input v-model="deptBudgetList.remarks" disabled type="textarea" :row="3" autosize placeholder="暂无备注信息"
+          maxlength="200" />
+      </div>
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+
+    </ws-form>
+
+    <div style="text-align: right; padding: 10px">
+      <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>
+    <el-dialog :title="title" :visible.sync="dialogTableVisible">
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-form-item :label="title">
+          <el-input size="medium" type="textarea" placeholder="请输入审核原因" maxlength="1000" show-word-limit v-model="form.auditMind"></el-input>
+        </el-form-item>
+        <el-form-item label="附件">
+          <ws-upload ref="upload" :size-limit="size"  @onChange="onChange" @uploadSuccess="uploadSuccess" :comp-id="compId" :appendix-ids="appendixIdss1"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="dialogTableVisible=false">取消</el-button>
+          <el-button type="primary" @click="onSubmit">确定</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    packList,
+    xiala,
+    examineList,
+    billoperatehis,
+  } from '@/model/contarct/index'
+  import {
+    gettaskhistories
+  } from '@/model/tasksport/index'
+  import {
+  woekflowhandle
+} from '@/model/tasksport/index'
+import WsUpload from '@/components/WsUpload'
+  export default {
+    name: 'viewSpareMoney',
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    components: {
+      WsUpload,
+    },
+    data() {
+      
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        status: '',
+        // 提交类型
+        submitType: true,
+        historyList: [],
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        dialogTableVisible:false,
+        
+        ruleDeptBudget: [],
+        taskhistories: [],
+        deptBudgetList: {
+          contractProcessInfo: {},
+          contractGoodsInfo: {},
+        },
+        size: 10,
+        form:{},
+        fileList:[],
+        title:'',
+        mainReportAdd: {},
+        list: {},
+        compId: localStorage.getItem('ws-pf_compId'),
+      }
+    },
+
+    activated() {
+      this.status = this.$route.query.status
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+      onSubmit() {
+      if (this.title == '驳回原因') {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: false,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '驳回成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '驳回失败!',
+              type: 'error',
+            })
+          })
+      } else {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '通过成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '通过失败!',
+              type: 'error',
+            })
+          })
+      }
+
+    },
+      onChange(file,fileList) {
+        for (let i = 0; i < fileList.length; i++) {
+          this.fileList.push(fileList[i].appendixPath)
+        }
+        
+        console.log(file,fileList)
+            // this.deptBudgetList.addressUrl = response
+            // this.deptBudgetList.id = this.id
+            // this.deptBudgetList.flag = 1
+            // editInfo(this.deptBudgetList)
+            //   .toPromise()
+            //   .then((response) => {
+            //     this.accessoryTFs = false
+            //     this.$message.success('上传成功')
+            //     this.getList()
+            //   })
+      },
+      reject(){
+        this.title='驳回原因'
+        this.dialogTableVisible=true
+      },
+      pass(){
+        this.title='通过原因'
+        this.dialogTableVisible=true
+      },
+      loaddata() {
+        gettaskhistories({
+            businessKey: this.$route.query.id,
+            workflowId: this.$route.query.workflowId
+          }).toPromise()
+          .then((response) => {
+            this.taskhistories = response
+          })
+        // 数据
+        examineList({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }
+            else if (this.deptBudgetList.deliverType == 3) {
+              this.deptBudgetList.deliverType1 = '对方送货(临时库)'
+            }
+          })
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+      getUnitList() {
+        xiala({
+            compId: localStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+      history(id1) {
+        billoperatehis({
+            id: id1
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      returnsales() {
+        this.$router.push({
+          path: 'acquisitionContract'
+        })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  // .status-orange,
+  // .status-bule,
+  // .status-green {
+  //   border: 1px solid;
+  //   border-radius: 30px;
+  //   padding: 3px 10px;
+  //   font-size: 16px;
+  // }
+
+  // .status-orange {
+  //   border-color: #ff9f24;
+  //   color: #ff9f24;
+  //   background: #ffedd5;
+  // }
+
+  // .status-bule {
+  //   border-color: #5473e8;
+  //   color: #5473e8;
+  //   background: #f0f3fe;
+  // }
+
+  // .status-green {
+  //   border-color: #50cad4;
+  //   color: #50cad4;
+  //   background: #ecfeff;
+  // }
+
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+    color: #afb5cb;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  // .button-container {
+  //   display: flex;
+  //   flex-wrap: nowrap;
+  //   justify-content: space-between;
+  //   align-items: center;
+  //   background-color: #fff;
+  //   width: 100%;
+  //   height: 50px;
+  //   padding: 0 10px;
+
+  //   &>div {
+  //     margin-left: 10px;
+  //     display: flex;
+  //     flex-wrap: nowrap;
+  //     flex-direction: row;
+
+  //     &>span {
+  //       line-height: 50px;
+  //     }
+  //   }
+
+  //   /deep/.auditFlow-box {
+  //     position: unset;
+  //     margin-left: 10px;
+
+  //     &/deep/.auditFlow-icon {
+  //       width: auto;
+  //       padding-right: 30px;
+  //     }
+
+  //     &/deep/.auditFlow-main {
+  //       position: absolute;
+  //     }
+  //   }
+  // }
+
+  // .box-app {
+  //   display: inline-block;
+  //   float: left;
+  //   margin-left: 30px;
+  //   line-height: 50px;
+  // }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .wenzi {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 900px;
+    margin: 0 auto;
+  }
+.ws-form.el-form{
+  padding:0 15%;
+}
+  .ws-info-table .el-form-item {
+    width: 50%;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  // .hide-sel {
+  //   .el-input__inner {
+  //     border: 0px;
+  //   }
+
+  //   .el-icon-arrow-up {
+  //     display: none;
+  //   }
+
+  //   .el-textarea__inner {
+  //     background-color: #fff !important;
+  //     border: 0;
+  //   }
+
+  //   .el-date-editor {
+  //     i {
+  //       display: none;
+  //     }
+  //   }
+
+  //   .is-disabled {
+  //     .el-input__inner:hover {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //     }
+
+  //     color: #606266;
+
+  //     .el-input__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+
+  //     .el-textarea__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+  //   }
+  // }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .vertical-text {
+    margin: 0 10px;
+    color: #8890b1;
+    font-size: 12px;
+    margin-top: -4px;
+  }
+
+  .vertical-line {
+    height: 100px;
+    border-left: 2px solid #e9ecf7;
+    margin-left: 4px;
+    padding: 0 3px;
+  }
+
+  .vertical-circle {
+    width: 10px;
+    height: 10px;
+    border: 2px solid #5878e8;
+    background-color: #ffffff;
+    -webkit-border-radius: 100px;
+  }
+
+  .vertical-circle:first-child {
+    color: red;
+  }
+
+  .icon {
+    display: inline-block;
+    width: 60px;
+    background: #ecfeff;
+    border-radius: 12px;
+    border: 1px solid #50cad4;
+    position: relative;
+    font-size: 14px;
+    color: #50cad4;
+    padding: 1px 7px;
+  }
+
+  .title-top {
+    margin-top: 20px;
+    font-size: 21px;
+    font-weight: 600;
+  }
+
+  .title-number {
+    font-size: 14px;
+    font-weight: 400;
+  }
+</style>

+ 76 - 3
src/views/contractManagement/collectionContract.vue

@@ -111,9 +111,51 @@
         </template>
       </el-table-column>
       <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
-      <el-table-column prop="address" label="操作" width="160">
+      <el-table-column class="handle" prop="address" label="操作" width="150">
         <template slot-scope="scope">
-          <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
+          <el-link v-hasPermission="
+              `contractManagement.dsContract.dsContractInfo.view`
+            " target="_blank" type="primary" :underline="false" @click="handleExamine(scope.row)"
+            >查看</el-link>
+            <el-divider direction="vertical"></el-divider>
+            <el-link v-hasPermission="
+              `contractManagement.dsContract.dsContractInfo.edit`
+            " target="_blank" type="primary" :underline="false" @click="handleEdit(scope.row)"
+              :disabled="scope.row.approveStatus">编辑</el-link>
+              <el-dropdown>
+              <span class="btn_css">•••</span>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.dsContract.dsContractInfo.delete`
+            "><el-link target="_blank" type="primary" :underline="false" @click="handleDelete(scope.row)"
+              :disabled="scope.row.approveStatus">删除</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.dsContract.dsContractInfo.edit`
+            ">
+                  <el-link  target="_blank" type="primary" :underline="false" @click="withdraw(scope.row)"
+              :disabled="scope.row.approveStatus && scope.row.approveStatus=='发起人撤回'">撤回</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.dsContract.dsContractInfo.list`
+            ">
+                  <el-link target="_blank" type="primary" :underline="false" @click="handleRecord(scope.row)">记录</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.dsContract.dsContractInfo.view`
+            ">
+                  <el-link target="_blank" type="primary" :underline="false" @click="handleaudit(scope.row)"
+              :disabled="!scope.row.taskId">审核</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handlecost(scope.row)">费用详情</el-link>
+              </el-dropdown-item>
+              <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handleprofit(scope.row)">利润详情</el-link>
+              </el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          <!-- <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
             src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
               `contractManagement.dsContract.dsContractInfo.view`
             " alt="" />
@@ -147,7 +189,7 @@
               <div v-show="scope.row.showFlag" v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
                 <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px" src="../../../public/img/chehui.png"
                   @click="withdraw(scope.row)" v-hasPermission="`contractManagement.dsContract.dsContractInfo.edit`" alt="" />
-              </div>
+              </div> -->
         </template>
       </el-table-column>
     </el-table>
@@ -320,6 +362,31 @@
       this.persionXiaLa()
     },
     methods: {
+      handleaudit(row) {
+      this.$router.push({
+        name: 'collectionContractAudit',
+        query: {
+          id: row.id,
+          status: row.status,
+        },
+      })
+    },
+    handlecost(row) {
+      this.$router.push({
+        name: 'expensemanagementdetails',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
+    handleprofit(row) {
+      this.$router.push({
+        name: 'contractprofits',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
       withdraw(row) {
       this.$confirm(`撤回成功后,可再次提交,确定撤回该合同吗?`, {
         cancelButtonText: '取消',
@@ -978,4 +1045,10 @@
   /deep/.typeselect .el-input__inner {
     color: #8890b1;
   }
+  .btn_css {
+    color: #409eff;
+    cursor: pointer;
+    position:relative;
+    top:2px;
+  }
 </style>

+ 760 - 0
src/views/contractManagement/collectionContractAudit.vue

@@ -0,0 +1,760 @@
+<!--采购合同查看-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<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>
+
+    <ws-form class="ws-form" ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
+      <div class="title-top">
+        代收合同<span class="title-number">【编号:{{ deptBudgetList.contractNo }}】</span>
+        <div class="icon" v-if="deptBudgetList.status">
+          <template>
+            <el-popover placement="right" :width="285" trigger="click" visible-arrow="false"
+              @show="history(deptBudgetList.id)">
+              <template>
+                <div slot="reference"> {{deptBudgetList.status }}</div>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div v-if="index != historyList.length - 1" class="vertical-line"></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
+                </div>
+              </div>
+            </el-popover>
+          </template>
+        </div>
+      </div>
+      <div class="remark">
+        <h3>基本信息</h3>
+      </div>
+      <ws-info-table>
+
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod">{{ deptBudgetList.settlementMethod }}
+        </ws-form-item>
+        <ws-form-item label="买方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          {{ deptBudgetList.overShort }}
+        </ws-form-item>
+        <ws-form-item label="卖方" span="1" prop="seller">{{ deptBudgetList.seller }}
+        </ws-form-item>
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          {{ deptBudgetList.acceptanceMethod }}
+        </ws-form-item>
+        <ws-form-item label="买方电话" span="1" prop="buyerPhone">{{ deptBudgetList.buyerPhone }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          {{ deptBudgetList.sellerPhone }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          {{ deptBudgetList.weight }}
+        </ws-form-item>
+
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+        <ws-form-item label="交货地所在地区" span="1">
+          {{ deptBudgetList.deliveryProvince }}
+          {{ deptBudgetList.deliveryCity }}
+          {{ deptBudgetList.deliveryArea }}
+        </ws-form-item>
+        <ws-form-item label="交货地详细地址" span="1" prop=" placeDelivery">
+          {{ deptBudgetList.placeDelivery }}
+        </ws-form-item>
+        <ws-form-item label="代收费(元/吨)" span="1" prop="agencyCharge">
+          {{deptBudgetList.agencyCharge}}
+        </ws-form-item>
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
+          {{ deptBudgetList.finalTradingVolume }}
+        </ws-form-item>
+        <ws-form-item label="代收库负责人" span="1" prop="personCharge" v-if="deptBudgetList.deliverType == 1">
+          {{ deptBudgetList.personCharge }}
+        </ws-form-item>
+        <!--客户送粮上限(元/吨)-->
+        <ws-form-item label="客户送粮上限(吨)" span="1" prop="grainDelivery">
+          {{deptBudgetList.grainDelivery}}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>货物信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="货名" span="1" prop="waterContent">
+          {{ deptBudgetList.contractGoodsInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+          {{ deptBudgetList.contractGoodsInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="品级" span="1" prop="grade">
+          {{ deptBudgetList.contractGoodsInfo.grade }}
+        </ws-form-item>
+        <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+          {{ deptBudgetList.contractGoodsInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+          {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+        </ws-form-item>
+        <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain" class="result">
+          {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+        </ws-form-item>
+        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+          {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+        </ws-form-item>
+        <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain" class="result">
+          {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>流程信息</h3>
+      </div>
+      <ws-info-table>
+        <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
+          {{deptBudgetList.contractProcessInfo.mildewGrain}}
+        </ws-form-item>
+        <ws-form-item label="已开销售发票(元)" span="1" prop="goodsName">
+          {{ deptBudgetList.contractProcessInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">{{ deptBudgetList.contractProcessInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="未开销售发票(元)" span="1" prop="impurity">{{ deptBudgetList.contractProcessInfo.impurity }}
+        </ws-form-item>
+       <!--未回款(元)-->
+       <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
+         {{deptBudgetList.contractProcessInfo.mildewGrain}}
+       </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">{{ deptBudgetList.contractProcessInfo.grade }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>备注信息</h3>
+      </div>
+      <div style=" color: #afb5cb;margin-left: 20px;">
+        <ws-input v-model="deptBudgetList.remarks" autosize disabled type="textarea" row="3" placeholder="暂无备注"
+          maxlength="3000" />
+      </div>
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </ws-form>
+
+    <div style="text-align: right; padding: 10px">
+      <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>
+    <el-dialog :title="title" :visible.sync="dialogTableVisible">
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-form-item :label="title">
+          <el-input size="medium" type="textarea" placeholder="请输入审核原因" maxlength="1000" show-word-limit v-model="form.auditMind"></el-input>
+        </el-form-item>
+        <el-form-item label="附件">
+          <ws-upload ref="upload" :size-limit="size"  @onChange="onChange" @uploadSuccess="uploadSuccess" :comp-id="compId" :appendix-ids="appendixIdss1"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="dialogTableVisible=false">取消</el-button>
+          <el-button type="primary" @click="onSubmit">确定</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    packList,
+    xiala,
+    examineList,
+    billoperatehis,
+  } from '@/model/contarct/index'
+  import {
+    gettaskhistories
+  } from '@/model/tasksport/index'
+  import WsUpload from '@/components/WsUpload'
+  import {
+  woekflowhandle
+} from '@/model/tasksport/index'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+    },
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        status: '',
+        // 提交类型
+        submitType: true,
+        historyList: [],
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        ruleDeptBudget: [],
+        taskhistories: [],
+        deptBudgetList: {
+          contractProcessInfo: {},
+          contractGoodsInfo: {},
+        },
+        mainReportAdd: {},
+        list: {},
+        size: 10,
+        form:{},
+        fileList:[],
+        title:'',
+        dialogTableVisible:false,
+        compId: localStorage.getItem('ws-pf_compId'),
+      }
+    },
+
+    activated() {
+      this.status = this.$route.query.status
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+      onSubmit() {
+      if (this.title == '驳回原因') {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: false,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '驳回成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '驳回失败!',
+              type: 'error',
+            })
+          })
+      } else {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '通过成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '通过失败!',
+              type: 'error',
+            })
+          })
+      }
+    },
+      onChange(file,fileList) {
+        for (let i = 0; i < fileList.length; i++) {
+          this.fileList.push(fileList[i].appendixPath)
+        }
+        
+        console.log(file,fileList)
+            // this.deptBudgetList.addressUrl = response
+            // this.deptBudgetList.id = this.id
+            // this.deptBudgetList.flag = 1
+            // editInfo(this.deptBudgetList)
+            //   .toPromise()
+            //   .then((response) => {
+            //     this.accessoryTFs = false
+            //     this.$message.success('上传成功')
+            //     this.getList()
+            //   })
+      },
+      reject(){
+        this.title='驳回原因'
+        this.dialogTableVisible=true
+      },
+      pass(){
+        this.title='通过原因'
+        this.dialogTableVisible=true
+      },
+      loaddata() {
+        gettaskhistories({
+            businessKey: this.$route.query.id,
+            workflowId: this.$route.query.workflowId
+          }).toPromise()
+          .then((response) => {
+            this.taskhistories = response
+          })
+        // 数据
+        examineList({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }
+          })
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+      getUnitList() {
+        xiala({
+            compId: localStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+      history(id1) {
+        billoperatehis({
+            id: id1
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      returnsales() {
+        this.$router.go(-1)
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  // .status-orange,
+  // .status-bule,
+  // .status-green {
+  //   border: 1px solid;
+  //   border-radius: 30px;
+  //   padding: 3px 10px;
+  //   font-size: 16px;
+  // }
+
+  // .status-orange {
+  //   border-color: #ff9f24;
+  //   color: #ff9f24;
+  //   background: #ffedd5;
+  // }
+
+  // .status-bule {
+  //   border-color: #5473e8;
+  //   color: #5473e8;
+  //   background: #f0f3fe;
+  // }
+
+  // .status-green {
+  //   border-color: #50cad4;
+  //   color: #50cad4;
+  //   background: #ecfeff;
+  // }
+
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  // .readonly {
+  //   position: relative;
+  // }
+
+  // .readonly:after {
+  //   content: '*';
+  //   color: #ff2727;
+  //   position: absolute;
+  //   right: 8px;
+  //   z-index: 10;
+  //   top: 21%;
+  //   font-size: 20px;
+  // }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+    color: #afb5cb;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  // .button-container {
+  //   display: flex;
+  //   flex-wrap: nowrap;
+  //   justify-content: space-between;
+  //   align-items: center;
+  //   background-color: #fff;
+  //   width: 100%;
+  //   height: 50px;
+  //   padding: 0 10px;
+
+  //   &>div {
+  //     margin-left: 10px;
+  //     display: flex;
+  //     flex-wrap: nowrap;
+  //     flex-direction: row;
+
+  //     &>span {
+  //       line-height: 50px;
+  //     }
+  //   }
+
+  //   /deep/.auditFlow-box {
+  //     position: unset;
+  //     margin-left: 10px;
+
+  //     &/deep/.auditFlow-icon {
+  //       width: auto;
+  //       padding-right: 30px;
+  //     }
+
+  //     &/deep/.auditFlow-main {
+  //       position: absolute;
+  //     }
+  //   }
+  // }
+
+  .box-app {
+    display: inline-block;
+    float: left;
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .wenzi {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 900px;
+    margin: 0 auto;
+  }
+  .ws-form.el-form{
+  padding:0 15%;
+}
+  .ws-info-table .el-form-item {
+    width: 50%;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  // .hide-sel {
+  //   .el-input__inner {
+  //     border: 0px;
+  //   }
+
+  //   .el-icon-arrow-up {
+  //     display: none;
+  //   }
+
+  //   .el-textarea__inner {
+  //     background-color: #fff !important;
+  //     border: 0;
+  //   }
+
+  //   .el-date-editor {
+  //     i {
+  //       display: none;
+  //     }
+  //   }
+
+  //   .is-disabled {
+  //     .el-input__inner:hover {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //     }
+
+  //     color: #606266;
+
+  //     .el-input__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+
+  //     .el-textarea__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+  //   }
+  // }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .vertical-text {
+    margin: 0 10px;
+    color: #8890b1;
+    font-size: 12px;
+    margin-top: -4px;
+  }
+
+  .vertical-line {
+    height: 100px;
+    border-left: 2px solid #e9ecf7;
+    margin-left: 4px;
+    padding: 0 3px;
+  }
+
+  .vertical-circle {
+    width: 10px;
+    height: 10px;
+    border: 2px solid #5878e8;
+    background-color: #ffffff;
+    -webkit-border-radius: 100px;
+  }
+
+  .vertical-circle:first-child {
+    color: red;
+  }
+
+  .icon {
+    display: inline-block;
+    width: 60px;
+    background: #ecfeff;
+    border-radius: 12px;
+    border: 1px solid #50cad4;
+    position: relative;
+    font-size: 14px;
+    color: #50cad4;
+    padding: 1px 7px;
+  }
+
+  .title-top {
+    margin-top: 20px;
+    font-size: 21px;
+    font-weight: 600;
+  }
+
+  .title-number {
+    font-size: 14px;
+    font-weight: 400;
+  }
+</style>

+ 85 - 0
src/views/contractManagement/component/routers/route.js

@@ -61,6 +61,23 @@ const contractManagementRouter = {
       },
       hidden: true
     },
+    //现货采购合同审核
+    {
+      path: 'purchaseContractAudit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/purchaseContractAudit'),
+      name: 'purchaseContractAudit',
+      meta: {
+        title: 'purchaseContractAudit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract.buyContractInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'采购合同审核'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
     //现货采购合同编辑
     {
       path: 'purchaseContractEdit',
@@ -213,6 +230,23 @@ const contractManagementRouter = {
       },
       hidden: true
     },
+    //现货销售合同审核
+    {
+      path: 'salesContractAudit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/salesContractAudit'),
+      name: 'salesContractAudit',
+      meta: {
+        title: 'salesContractAudit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.salesContract.salesContractInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'销售合同审核'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
     //现货销售合同编辑
     {
       path: 'salesContractEdit',
@@ -279,6 +313,23 @@ const contractManagementRouter = {
       },
       hidden: true
     },
+    //收购合同审核
+    {
+      path: 'acquisitionContractAudit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractAudit'),
+      name: 'acquisitionContractAudit',
+      meta: {
+        title: 'acquisitionContractAudit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract.buyContractInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同审核'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
     //收购合同编辑
     {
       path: 'acquisitionContractEdit',
@@ -498,6 +549,23 @@ const contractManagementRouter = {
       },
       hidden: true
     },
+    //代收合同审核
+    {
+      path: 'collectionContractAudit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/collectionContractAudit'),
+      name: 'collectionContractAudit',
+      meta: {
+        title: 'collectionContractAudit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.dsContract.dsContractInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'代收合同审核'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
     //代收合同记录
     {
       path: 'collectionContractRecord',
@@ -579,6 +647,23 @@ const contractManagementRouter = {
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
+    },
+     //代储合同审核
+     {
+      path: 'storageContractAudit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/storageContractAudit'),
+      name: 'storageContractAudit',
+      meta: {
+        title: 'storageContractAudit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.dcContract.dcContractInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'代储合同查看'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
     },
     //代储合同记录
     {

+ 165 - 51
src/views/contractManagement/purchaseContract.vue

@@ -152,15 +152,26 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column width='130' prop="goodsNames" label="已开发票 (元)">
+      <el-table-column width='120' prop="goodsNames" label="已开发票 (元)">
         <template slot-scope="scope">
-          <div v-if="!scope.row.editgoodsNames" style="display:inline-block;">
-            <span @dblclick="scope.row.editgoodsNames=true">{{ scope.row.invoiced?scope.row.invoiced:0 }}</span>
-            <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+          <div v-if="!scope.row.editgoodsNames">
+            <div class="inputChenge">
+              <!-- readonly -->
+              <el-input v-model="scope.row.invoiced" v-if="scope.row.identification1 == 'true'"></el-input>
+              <div v-if="scope.row.identification1 == 'false'" class="inputs">
+                {{ scope.row.invoiced }}
+              </div>
+            </div>
+            <!-- <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/fujian.png" @click="invoiceUploade(scope.row)" alt="" />
             <span v-if="scope.row.invoiceUrl != null">
               {{ scope.row.invoiceUrl ? scope.row.invoiceUrl.split(",").length : "" }}
-            </span>
+            </span> -->
+             <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="whether(scope.row)"
+              v-if="scope.row.identification1 == 'false'" alt="" />
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification1 == 'true'" @click="varietyClick(scope.row)"></i>
           </div>
           <div v-if="scope.row.editgoodsNames">
             <el-input class="goodsnamesinput" v-model="scope.row.invoiced" placeholder="输入累计开票金额" ></el-input>
@@ -181,7 +192,7 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="160">
+      <el-table-column prop="address" label="操作" width="150">
         <template slot-scope="scope">
           <!-- <img width="16" height="17" style="
                 vertical-align: text-top;
@@ -192,35 +203,46 @@
                v-hasPermission="
               `contractManagement.nonContract.nonContractInfo.view`"
              @click="handlecost(scope.row)" alt="" /> -->
-
-          <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
-            src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
+             <el-link v-hasPermission="
               `contractManagement.buyContract.buyContractInfo.view`
-            " alt="" />
-          <div v-if="
-            (scope.row.approveStatus != '待决策人审核' &&
-              !scope.row.approveStatus || scope.row.approveStatus == '发起人撤回')
-          " style="display: inline-block">
-            <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px"
-              src="../../../public/img/bianji.png" @click="handleEdit(scope.row)" v-hasPermission="
-                `contractManagement.buyContract.buyContractInfo.edit`
-              " alt="" />
-          </div>
-          <img width="16" height="17" style="
-              vertical-align: text-top;
-              position: relative;
-              top: -1px;
-              margin: 0 6px;
-            " v-if="scope.row.status == '待执行' && !scope.row.approveStatus || scope.row.status == '已驳回'"
-            src="../../../public/img/shanchu.png" v-hasPermission="
+            " target="_blank" type="primary" :underline="false" @click="handleExamine(scope.row)"
+            >查看</el-link>
+            <el-divider direction="vertical"></el-divider>
+            <el-link v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.edit`
+            " target="_blank" type="primary" :underline="false" @click="handleEdit(scope.row)"
+              :disabled="(scope.row.approveStatus!=null)">编辑</el-link>
+              <el-dropdown>
+              <span class="btn_css">•••</span>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item v-hasPermission="
               `contractManagement.buyContract.buyContractInfo.delete`
-            " @click="handleDelete(scope.row)" alt="" />
-                         <div v-show="scope.row.showFlag" v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
-              <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px" src="../../../public/img/chehui.png"
-                @click="withdraw(scope.row)" v-hasPermission="
-                            `contractManagement.buyContract.buyContractInfo.edit`
-                          " alt="" />
-            </div>
+            "><el-link target="_blank" type="primary" :underline="false" @click="handleDelete(scope.row)"
+              :disabled="(scope.row.approveStatus!=null)">删除</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.edit`
+            ">
+                  <el-link  target="_blank" type="primary" :underline="false" @click="withdraw(scope.row)"
+              :disabled="scope.row.approveStatus && scope.row.approveStatus=='发起人撤回'">撤回</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.view`
+            ">
+                  <el-link target="_blank" type="primary" :underline="false" @click="handleaudit(scope.row)"
+              :disabled="!scope.row.taskId">审核</el-link>
+                </el-dropdown-item>
+              <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handlecost(scope.row)">费用详情</el-link>
+              </el-dropdown-item>
+              <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handleprofit(scope.row)">利润详情</el-link>
+              </el-dropdown-item>
+              <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link :disabled="scope.row.amountEdPayable=='他运'" target="_blank" type="primary" :underline="false" @click="handletransport(scope.row)">运输详情</el-link>
+              </el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
             <!-- <ws-button v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" type="primary" @click="withdraw(scope.row)" >撤回</ws-button> -->
         </template>
       </el-table-column>
@@ -242,18 +264,16 @@
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
     </WinseaContentModal>
     <!-- 结算单 -->
-    <WinseaContentModal v-model="countMoney" title="结算单信息"
+    <!-- <WinseaContentModal v-model="countMoney" title="结算单信息"
       @on-cancel="handleClose">
-      <div v-if="jiestatus">
+      <div v-if="jiesuanstatus">
         <ws-upload ref="upload" :size-limit="size" @onChange="onChange1" :comp-id="compId" :appendix-ids="appendixIdss"
           accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar"
           v-hasPermission="`contractManagement.buyContract.buyContractInfo.jiedan`" />
-     <!-- <div>1111{{appendixIdss}}</div>  -->
-
       </div>
       <ws-upload v-else ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
-    </WinseaContentModal>
+    </WinseaContentModal> -->
      <!-- 上传已开发票  -->
      <WinseaContentModal v-model="invoiceSwitch" title="发票信息"
       @on-cancel="handleClose">
@@ -277,11 +297,15 @@ import {
   editInfo,
   getsettlementprice,
   getstafffind,
-  sponsorWithdraw
+  sponsorWithdraw,
+  editProcessInfo
 } from '@/model/contarct/index'
 import {
   downloadFile
 } from '@/utils/batchDown'
+import {
+    gettask,
+  } from '@/model/outboundManagement/index'
 import { allRoles } from '@/utils/util'
 import { hasPermission } from '../../utils/getHasPermission'
 import Pagination from '@/components/Pagination'
@@ -460,6 +484,38 @@ export default {
               this.getList()
             })
     },
+     whether(row) {
+          row.identification1 = 'true'
+      },
+      //修改开票金额
+      varietyClick(row) {
+        var title = ''
+        var data = {}
+        title = '确定要修改已开发票金额?'
+        data = {
+            goodsName: row.invoiced,
+            id: row.id
+          }
+        this.$confirm(title, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editProcessInfo(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '修改成功',
+                })
+                this.getList()
+              })
+              .catch(() => {
+                return false
+              })
+          })
+      },
     persionXiaLa() {
       getstafffind({
         roles: 'b96299bb5dcf461e916b72b64c6943b0'
@@ -485,17 +541,17 @@ export default {
           })
       })
     },
-    handlecost(row) {
-      this.$router.push({
-        name: 'buyContractcost',
-        query: {
-          id: row.id,
-          contractNo: row.contractNo,
-          status: row.status,
-          seller: row.seller
-        },
-      })
-    },
+    // handlecost(row) {
+    //   this.$router.push({
+    //     name: 'buyContractcost',
+    //     query: {
+    //       id: row.id,
+    //       contractNo: row.contractNo,
+    //       status: row.status,
+    //       seller: row.seller
+    //     },
+    //   })
+    // },
     onChange() {
       this.$refs.upload
         .handleSaveBill()
@@ -684,6 +740,7 @@ export default {
         .toPromise()
         .then((response) => {
           for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification1 = 'false'
             if (response.records[i].status) {
               response.records[i].currectstatus = response.records[i].status
             }
@@ -808,6 +865,50 @@ export default {
         },
       })
     },
+    handleaudit(row) {
+      this.$router.push({
+        name: 'purchaseContractAudit',
+        query: {
+          id: row.id,
+          status: row.status,
+        },
+      })
+    },
+    handlecost(row) {
+      this.$router.push({
+        name: 'expensemanagementdetails',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
+    handleprofit(row) {
+      this.$router.push({
+        name: 'contractprofits',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
+    handletransport(row) {
+  gettask({contractNo:row.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+        if(!response||response==0){
+          this.$message({
+            message: '联系内勤创建运输任务',
+            type: 'warning',
+                      
+          });
+        }else{
+          this.$router.push({
+            name: 'autoSettlementList',
+            query: {
+              contractNo: row.contractNo,
+            },
+          })
+        }
+      })
+    },
+    
     // 关闭 dialog时 处理文件url 初始化upload组件
     history(row) {
       console.log(row)
@@ -1096,7 +1197,14 @@ export default {
 .findValue {
   margin: 0 10px;
 }
-
+.inputChenge {
+    width: 100%;
+    display: inline-flex;
+    margin-left: -28%;
+  }
+    .inputs {
+    margin: 0 auto;
+  }
 /deep/.findValue .el-input__inner {
   border-top-right-radius: 0px;
   border-bottom-right-radius: 0px;
@@ -1247,4 +1355,10 @@ export default {
   color: #8890b1;
   width: 100%;
 }
+.btn_css {
+    color: #409eff;
+    cursor: pointer;
+    position:relative;
+    top:2px;
+  }
 </style>

+ 852 - 0
src/views/contractManagement/purchaseContractAudit.vue

@@ -0,0 +1,852 @@
+<!--采购合同查看-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<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>
+
+    <ws-form class="ws-form" ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
+      <div class="title-top">
+        采购合同<span class="title-number">【编号:{{ deptBudgetList.contractNo }}】</span>
+        <div class="icon" v-if="deptBudgetList.status">
+          <template>
+            <el-popover placement="right" :width="285" trigger="click" visible-arrow="false"
+              @show="history(deptBudgetList.id)">
+              <template>
+                <div slot="reference"> {{deptBudgetList.status }}</div>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div v-if="index != historyList.length - 1" class="vertical-line"></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
+                </div>
+              </div>
+            </el-popover>
+          </template>
+        </div>
+      </div>
+      <div class="remark">
+        <h3>基本信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="合同类型" span="1" prop="agreementType">
+          {{ deptBudgetList.agreementType }}
+        </ws-form-item>
+        <ws-form-item label="合同编号" v-if="deptBudgetList.agreementType=='采购合同'" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          {{deptBudgetList.transactionSubject}}
+        </ws-form-item>
+        <ws-form-item  v-if="deptBudgetList.transactionSubject == '合营'" class="readonly" label="合营方" span="1" prop="seller">{{ deptBudgetList.jointVentureParties }}
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营方电话" span="1" prop="jointPhone">
+          {{deptBudgetList.jointPhone}}
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营加价" span="1" prop="seller" class="readonly">
+          {{ deptBudgetList.jointVentureMarkup }}
+        </ws-form-item>
+        <ws-form-item label="关联合同" v-if="deptBudgetList.agreementType=='补充协议'" span="1" prop="agreementNo">
+          {{ deptBudgetList.agreementNo }}
+        </ws-form-item>
+        <ws-form-item label="补充协议编号" v-if="deptBudgetList.agreementType=='补充协议'" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          {{ deptBudgetList.shippingType }}
+        </ws-form-item>
+        <ws-form-item label="买方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod">{{ deptBudgetList.settlementMethod }}
+        </ws-form-item>
+        <ws-form-item label="卖方" span="1" prop="seller">{{ deptBudgetList.seller }}
+        </ws-form-item>
+        <ws-form-item label="交货方式" span="1" prop="deliverType1">{{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <ws-form-item label="买方电话" span="1" prop="buyerPhone">{{ deptBudgetList.buyerPhone }}
+        </ws-form-item>
+         <ws-form-item label="发货反馈负责人" span="1" prop="feedbackLeader" v-if="deptBudgetList.deliverType1 == '对方送货'">{{ deptBudgetList.feedbackLeader }}
+        </ws-form-item>
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          {{ deptBudgetList.packingMethod }}
+        </ws-form-item>
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          {{ deptBudgetList.sellerPhone }}
+        </ws-form-item>
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          {{ deptBudgetList.acceptanceMethod }}
+        </ws-form-item>
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          {{ deptBudgetList.weight }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          {{ deptBudgetList.overShort }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+        <ws-form-item label="价格类型" span="1" prop="priceType">
+          {{ deptBudgetList.priceType }}
+        </ws-form-item>
+        <ws-form-item label="合同单价(元/吨)" span="1" prop="unitContractPrice" v-if="deptBudgetList.priceType == '定价采购'">
+          {{ deptBudgetList.unitContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice" v-if="deptBudgetList.priceType == '定价采购'">
+          {{ deptBudgetList.totalContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="货源所在地区" span="1">
+          {{ deptBudgetList.sourceProvince }}
+          {{ deptBudgetList.sourceCity }}
+          {{ deptBudgetList.sourceArea }}
+        </ws-form-item>
+        <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+          {{ deptBudgetList.sourceGoods }}
+        </ws-form-item>
+        <ws-form-item label="交货地所在地区" span="1">
+          {{ deptBudgetList.deliveryProvince }}
+          {{ deptBudgetList.deliveryCity }}
+          {{ deptBudgetList.deliveryArea }}
+        </ws-form-item>
+        <ws-form-item label="交货地详细地址" span="1" prop=" placeDelivery">
+          {{ deptBudgetList.placeDelivery }}
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
+          {{ deptBudgetList.finalTradingVolume }}
+        </ws-form-item>
+        <ws-form-item label="临时仓库负责人" span="1" prop="personCharge" v-if="deptBudgetList.deliverType != 2">
+          {{ deptBudgetList.personCharge }}
+        </ws-form-item>
+        <ws-form-item class="readonly" label="结算重量方式" span="1" prop="settlementWeightMethod" v-if="deptBudgetList.deliverType==1">
+          {{ deptBudgetList.settlementWeightMethod==1?'按出库重量结算':'按入库重量结算' }}
+        </ws-form-item>
+        <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+          {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+        </ws-form-item>
+      </ws-info-table>
+      <!--面试信息-->
+      <div class="remark">
+        <h3>货物信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="货名" span="1" prop="waterContent">
+          {{ deptBudgetList.contractGoodsInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+          {{ deptBudgetList.contractGoodsInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="品级" span="1" prop="grade">
+          {{ deptBudgetList.contractGoodsInfo.grade }}
+        </ws-form-item>
+        <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+          {{ deptBudgetList.contractGoodsInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+          {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+        </ws-form-item>
+        <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain" class="result">
+          {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+        </ws-form-item>
+        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+          {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+        </ws-form-item>
+        <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain" class="result">
+          {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>流程信息</h3>
+      </div>
+      <ws-info-table>
+        <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
+          {{deptBudgetList.contractProcessInfo.mildewGrain}}
+        </ws-form-item>
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          {{ deptBudgetList.contractProcessInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">{{ deptBudgetList.contractProcessInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity">{{ deptBudgetList.contractProcessInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item label="已完成发运量(吨)" span="1" prop="imperfectGrain" class="result">
+          {{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+        </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">{{ deptBudgetList.contractProcessInfo.grade }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>备注信息</h3>
+      </div>
+    <div style=" color: #afb5cb;margin-left: 20px;margin-bottom: 20px;">
+        <!-- {{ deptBudgetList.remarks }} -->
+        <ws-input v-model="deptBudgetList.remarks" disabled type="textarea" autosize row="3" placeholder="暂无备注信息"
+        maxlength="3000" />
+      </div>
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+
+    </ws-form>
+    <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose">
+      <div v-for="item in appendixIdss">
+        <el-image 
+        style="width: 100px; height: 100px"
+        :src="item" 
+        :preview-src-list="appendixIdss">
+      </el-image>
+      </div>
+    </WinseaContentModal>
+    <div style="text-align: right; padding: 10px">
+      <el-button class="bg-bottom" type="primary" size="small" @click="reject()">驳回</el-button>
+      <el-button class="bg-bottom" type="primary" size="small" @click="pass()">通过</el-button>
+    </div>
+    <el-dialog :title="title" :visible.sync="dialogTableVisible">
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-form-item :label="title">
+          <el-input size="medium" type="textarea" placeholder="请输入审核原因" maxlength="1000" show-word-limit v-model="form.auditMind"></el-input>
+        </el-form-item>
+        <el-form-item label="附件">
+          <ws-upload ref="upload" :size-limit="size"  @onChange="onChange" @uploadSuccess="uploadSuccess" :comp-id="compId" :appendix-ids="appendixIdss1"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="dialogTableVisible=false">取消</el-button>
+          <el-button type="primary" @click="onSubmit">确定</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    packList,
+    xiala,
+    examineList,
+    billoperatehis,
+  } from '@/model/contarct/index'
+  import WsUpload from '@/components/WsUpload'
+  import {
+  woekflowhandle
+} from '@/model/tasksport/index'
+  import {
+    gettaskhistories
+  } from '@/model/tasksport/index'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+    },
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        size: 10,
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        status: '',
+        appendixIdss1:'',
+        data:{companyId: localStorage.getItem('ws-pf_compId'),
+							modelId: '',
+							vesselId: ''},
+        // 提交类型
+        submitType: true,
+        historyList: [],
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        form:{},
+        ruleDeptBudget: [],
+        taskhistories: [],
+        deptBudgetList: {
+          contractProcessInfo: {},
+          contractGoodsInfo: {},
+        },
+        accessoryTFs:false,
+        appendixIdss:[],
+        mainReportAdd: {},
+        list: {},
+        title:'',
+        fileList:[],
+        dialogTableVisible:false,
+        compId: localStorage.getItem('ws-pf_compId'),
+      }
+    },
+
+    activated() {
+      this.status = this.$route.query.status
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+      onSubmit() {
+      if (this.title == '驳回原因') {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: false,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '驳回成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '驳回失败!',
+              type: 'error',
+            })
+          })
+      } else {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '通过成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '通过失败!',
+              type: 'error',
+            })
+          })
+      }
+
+    },
+      onChange(file,fileList) {
+        for (let i = 0; i < fileList.length; i++) {
+          this.fileList.push(fileList[i].appendixPath)
+        }
+        
+        console.log(file,fileList)
+            // this.deptBudgetList.addressUrl = response
+            // this.deptBudgetList.id = this.id
+            // this.deptBudgetList.flag = 1
+            // editInfo(this.deptBudgetList)
+            //   .toPromise()
+            //   .then((response) => {
+            //     this.accessoryTFs = false
+            //     this.$message.success('上传成功')
+            //     this.getList()
+            //   })
+      },
+      reject(){
+        this.title='驳回原因'
+        this.dialogTableVisible=true
+      },
+      pass(){
+        this.title='通过原因'
+        this.dialogTableVisible=true
+      },
+      fujian(row) {
+      this.id = row.id
+      this.accessoryTFs = true
+      this.appendixIdss = row.auditImg
+      console.log(this.appendixIdss)
+    },
+    handleCloseq() {
+        this.accessoryTFs = false
+      },
+      loaddata() {
+        // 数据
+        examineList({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }
+            else if (this.deptBudgetList.deliverType == 3) {
+              this.deptBudgetList.deliverType1 = '对方送货(临时库)'
+            }
+          })
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+      getUnitList() {
+        xiala({
+            compId: localStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+      history(id1) {
+        billoperatehis({
+            id: id1
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      returnsales() {
+        this.$router.go(-1)
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  // .status-orange,
+  // .status-bule,
+  // .status-green {
+  //   border: 1px solid;
+  //   border-radius: 30px;
+  //   padding: 3px 10px;
+  //   font-size: 16px;
+  // }
+
+  // .status-orange {
+  //   border-color: #ff9f24;
+  //   color: #ff9f24;
+  //   background: #ffedd5;
+  // }
+
+  // .status-bule {
+  //   border-color: #5473e8;
+  //   color: #5473e8;
+  //   background: #f0f3fe;
+  // }
+
+  // .status-green {
+  //   border-color: #50cad4;
+  //   color: #50cad4;
+  //   background: #ecfeff;
+  // }
+  .ws-form.el-form{
+  padding:0 15%;
+}
+  .ws-info-table .el-form-item {
+    width: 50%;
+  }
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+    color: #afb5cb;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  // .button-container {
+  //   display: flex;
+  //   flex-wrap: nowrap;
+  //   justify-content: space-between;
+  //   align-items: center;
+  //   background-color: #fff;
+  //   width: 100%;
+  //   height: 50px;
+  //   padding: 0 10px;
+
+  //   &>div {
+  //     margin-left: 10px;
+  //     display: flex;
+  //     flex-wrap: nowrap;
+  //     flex-direction: row;
+
+  //     &>span {
+  //       line-height: 50px;
+  //     }
+  //   }
+
+  //   /deep/.auditFlow-box {
+  //     position: unset;
+  //     margin-left: 10px;
+
+  //     &/deep/.auditFlow-icon {
+  //       width: auto;
+  //       padding-right: 30px;
+  //     }
+
+  //     &/deep/.auditFlow-main {
+  //       position: absolute;
+  //     }
+  //   }
+  // }
+
+  // .box-app {
+  //   display: inline-block;
+  //   float: left;
+  //   margin-left: 30px;
+  //   line-height: 50px;
+  // }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .wenzi {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 900px;
+    margin: 0 auto;
+  }
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  // .hide-sel {
+  //   .el-input__inner {
+  //     border: 0px;
+  //   }
+
+  //   .el-icon-arrow-up {
+  //     display: none;
+  //   }
+
+  //   .el-textarea__inner {
+  //     background-color: #fff !important;
+  //     border: 0;
+  //   }
+
+  //   .el-date-editor {
+  //     i {
+  //       display: none;
+  //     }
+  //   }
+
+  //   .is-disabled {
+  //     .el-input__inner:hover {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //     }
+
+  //     color: #606266;
+
+  //     .el-input__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+
+  //     .el-textarea__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+  //   }
+  // }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .vertical-text {
+    margin: 0 10px;
+    color: #8890b1;
+    font-size: 12px;
+    margin-top: -4px;
+  }
+
+  .vertical-line {
+    height: 100px;
+    border-left: 2px solid #e9ecf7;
+    margin-left: 4px;
+    padding: 0 3px;
+  }
+
+  .vertical-circle {
+    width: 10px;
+    height: 10px;
+    border: 2px solid #5878e8;
+    background-color: #ffffff;
+    -webkit-border-radius: 100px;
+  }
+
+  .vertical-circle:first-child {
+    color: red;
+  }
+
+  .icon {
+    display: inline-block;
+    width: 60px;
+    background: #ecfeff;
+    border-radius: 12px;
+    border: 1px solid #50cad4;
+    position: relative;
+    font-size: 14px;
+    color: #50cad4;
+    padding: 1px 7px;
+  }
+
+  .title-top {
+    margin-top: 20px;
+    font-size: 21px;
+    font-weight: 600;
+  }
+
+  .title-number {
+    font-size: 14px;
+    font-weight: 400;
+  }
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    line-height: 178px;
+    text-align: center;
+  }
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+  /deep/.el-upload{
+    border:1px dashed #ccc;
+    margin:10px 0;
+  }
+</style>

+ 202 - 33
src/views/contractManagement/salesContract.vue

@@ -146,14 +146,26 @@
       <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
       <el-table-column width='120' prop="mildewGrain" label="未回款(元)">
         <template slot-scope="scope">
-          <span style='color:red;'
+          <!-- <span style='color:red;'
             v-if='scope.row.datestatus && scope.row.invoiced > scope.row.contractRevenue'>{{ scope.row.mildewGrain }}</span>
-          <span v-else>{{ scope.row.mildewGrain }}</span>
+          <span v-else>{{ scope.row.mildewGrain }}</span> -->
+           <div class="inputChenge">
+              <!-- readonly -->
+              <el-input v-model="scope.row.mildewGrain" v-if="scope.row.identification == 'true'"></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.mildewGrain }}
+              </div>
+            </div>
+           <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="whether(scope.row,1)"
+              v-if="scope.row.identification == 'false'" alt="" />
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification == 'true'" @click="varietyClick(scope.row,1)"></i>
         </template>
       </el-table-column>
 
       <el-table-column prop="amountEdPayable" label="已付运费"> </el-table-column>
-      <el-table-column prop="statementUrl" label="结算单">
+      <!-- <el-table-column prop="statementUrl" 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="settlement(scope.row)" alt="" />
@@ -161,16 +173,28 @@
             {{ scope.row.statementUrl ? scope.row.statementUrl.split(",").length : "" }}
           </span>
         </template>
-      </el-table-column>
-      <el-table-column width='190' prop="goodsNames" label="已开发票 (元)">
+      </el-table-column> -->
+      <el-table-column width='120' prop="goodsNames" label="已开发票 (元)">
         <template slot-scope="scope">
-          <div v-if="!scope.row.editgoodsNames" style="display:inline-block;">
-            <span @dblclick="scope.row.editgoodsNames=true">{{ scope.row.invoiced?scope.row.invoiced:0 }}</span>
-            <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+          <div v-if="!scope.row.editgoodsNames" >
+            <!-- <span @dblclick="scope.row.editgoodsNames=true">{{ scope.row.invoiced?scope.row.invoiced:0 }}</span> -->
+             <div class="inputChenge">
+              <!-- readonly -->
+              <el-input v-model="scope.row.invoiced" v-if="scope.row.identification1 == 'true'"></el-input>
+              <div v-if="scope.row.identification1 == 'false'" class="inputs">
+                {{ scope.row.invoiced }}
+              </div>
+            </div>
+            <!-- <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/fujian.png" @click="invoiceUploade(scope.row)" alt="" />
             <span v-if="scope.row.invoiceUrl != null">
               {{ scope.row.invoiceUrl ? scope.row.invoiceUrl.split(",").length : "" }}
-            </span>
+            </span> -->
+             <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png" @click="whether(scope.row,2)"
+              v-if="scope.row.identification1 == 'false'" alt="" />
+            <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification1 == 'true'" @click="varietyClick(scope.row,2)"></i>
           </div>
           <div v-if="scope.row.editgoodsNames">
             <el-input class="goodsnamesinput" v-model="scope.row.invoiced" placeholder="输入累计开票金额" ></el-input>
@@ -186,7 +210,7 @@
           <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="160">
+      <el-table-column prop="address" label="操作" width="150">
         <template slot-scope="scope">
           <!-- <img width="16" height="17" style="
                 vertical-align: text-top;
@@ -196,33 +220,72 @@
                v-hasPermission="
               `contractManagement.nonContract.nonContractInfo.view`" src="../../../public/img/daichu.png"
              @click="handlecost(scope.row)" alt="" /> -->
-          <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
-            src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
+             <el-link v-hasPermission="
+              `contractManagement.salesContract.salesContractInfo.view`
+            " target="_blank" type="primary" :underline="false" @click="handleExamine(scope.row)"
+            >查看</el-link>
+            <el-divider direction="vertical"></el-divider>
+            <el-link v-hasPermission="
+              `contractManagement.salesContract.salesContractInfo.edit`
+            " target="_blank" type="primary" :underline="false" @click="handleEdit(scope.row)"
+              :disabled="scope.row.approveStatus">编辑</el-link>
+              <el-dropdown>
+              <span class="btn_css">•••</span>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.salesContract.salesContractInfo.delete`
+            "><el-link target="_blank" type="primary" :underline="false" @click="handleDelete(scope.row)"
+              :disabled="scope.row.approveStatus">删除</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.salesContract.salesContractInfo.edit`
+            ">
+                  <el-link  target="_blank" type="primary" :underline="false" @click="withdraw(scope.row)"
+              :disabled="scope.row.approveStatus && scope.row.approveStatus=='发起人撤回'">撤回</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
               `contractManagement.salesContract.salesContractInfo.view`
-            " alt="" />
-          <div v-if="
+            ">
+                  <el-link target="_blank" type="primary" :underline="false" @click="handleaudit(scope.row)"
+              :disabled="!scope.row.taskId">审核</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handlecost(scope.row)">费用详情</el-link>
+              </el-dropdown-item>
+              <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handleprofit(scope.row)">利润详情</el-link>
+              </el-dropdown-item>
+              <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link :disabled="scope.row.amountEdPayable=='他运'" target="_blank" type="primary" :underline="false" @click="handletransport(scope.row)">运输详情</el-link>
+              </el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+             <!-- <el-button @click="handleExamine(scope.row)"  v-hasPermission="
+              `contractManagement.salesContract.salesContractInfo.view`
+            " type="primary">查看</el-button>
+            <div v-if="
             (scope.row.approveStatus != '待决策人审核' &&
               !scope.row.approveStatus || scope.row.approveStatus == '发起人撤回')
           " style="display: inline-block">
-            <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px"
-              src="../../../public/img/bianji.png" v-hasPermission="
+          <el-button @click="handleEdit(scope.row)" v-hasPermission="
                 `contractManagement.salesContract.salesContractInfo.edit`
-              " @click="handleEdit(scope.row)" alt="" />
+              " type="primary">编辑</el-button>
           </div>
-
-          <img width="16" height="17" style="
-              vertical-align: text-top;
-              position: relative;
-              top: -1px;
-              margin: 0 6px;
-            " v-if="scope.row.status == '待执行' && !scope.row.approveStatus || scope.row.status == '已驳回'"
-            src="../../../public/img/shanchu.png" v-hasPermission="
+          <div v-if="scope.row.status == '待执行' && !scope.row.approveStatus || scope.row.status == '已驳回'" style="display: inline-block">
+          <el-button v-hasPermission="
               `contractManagement.salesContract.salesContractInfo.delete`
-            " @click="handleDelete(scope.row)" alt="" />
-            <div v-show="scope.row.showFlag" v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
-                <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px" src="../../../public/img/chehui.png"
-                   @click="withdraw(scope.row)" v-hasPermission="`contractManagement.buyContract.buyContractInfo.edit`" alt="" />
-            </div>
+            " @click="handleDelete(scope.row)" type="primary">删除</el-button>
+          </div>
+          <div  v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
+          <el-button @click="withdraw(scope.row)" v-hasPermission="
+                            `contractManagement.salesContract.salesContractInfo.edit`
+                          " type="primary">撤回</el-button>
+          </div>
+          <div  v-if="scope.row.taskId" style="display: inline-block">
+          <el-button @click="handleaudit(scope.row)" v-hasPermission="
+                            `contractManagement.salesContract.salesContractInfo.view`
+                          " type="primary">审核</el-button>
+          </div> -->
         </template>
       </el-table-column>
     </el-table>
@@ -288,11 +351,15 @@ import {
   editInfo,
   getsettlementprice,
   getstafffind,
-  sponsorWithdraw
+  sponsorWithdraw,
+  editProcessInfo
 } from '@/model/contarct/index'
 import {
   downloadFile
 } from '@/utils/batchDown'
+import {
+    gettask,
+  } from '@/model/outboundManagement/index'
 import { hasPermission } from '../../utils/getHasPermission'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -461,6 +528,15 @@ export default {
     this.persionXiaLa()
   },
   methods: {
+    handleaudit(row) {
+      this.$router.push({
+        name: 'salesContractAudit',
+        query: {
+          id: row.id,
+          status: row.status,
+        },
+      })
+    },
     submitgoodsNames(row){
       console.log(row)
       if(row.invoiced<0){
@@ -500,6 +576,51 @@ export default {
         },
       })
     },
+    whether(row, flag) {
+        if (flag == 1) {
+          row.identification = 'true'
+        } else {
+          row.identification1 = 'true'
+        }
+      },
+      //修改未回款、开票金额
+      varietyClick(row, flag) {
+        var title = ''
+        var data = {}
+        if(flag==1){
+            title = '确定要修改未回款金额?'
+            data = {
+              mildewGrain: row.mildewGrain,
+              id: row.id
+            }
+        }
+        else{
+          title = '确定要修改已开发票金额?'
+          data = {
+              goodsName: row.invoiced,
+              id: row.id
+            }
+        }
+        this.$confirm(title, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editProcessInfo(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '修改成功',
+                })
+                this.getList()
+              })
+              .catch(() => {
+                return false
+              })
+          })
+      },
     handleClose1() {
       this.show = false
       this.getList()
@@ -693,6 +814,8 @@ export default {
         .then((response) => {
           var date = new Date().getTime()
           for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification = 'false'
+            response.records[i].identification1 = 'false'
             if (response.records[i].status) {
               response.records[i].currectstatus = response.records[i].status
             }
@@ -853,7 +976,40 @@ export default {
         },
       })
     },
-
+    handlecost(row) {
+      this.$router.push({
+        name: 'expensemanagementdetails',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
+    handleprofit(row) {
+      this.$router.push({
+        name: 'contractprofits',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
+    handletransport(row) {
+  gettask({contractNo:row.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+        if(!response||response==0){
+          this.$message({
+            message: '联系内勤创建运输任务',
+            type: 'warning',
+                      
+          });
+        }else{
+          this.$router.push({
+            name: 'autoSettlementList',
+            query: {
+              contractNo: row.contractNo,
+            },
+          })
+        }
+      })
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleCloe() {
       this.dialogViewSpareMoney = false
@@ -944,7 +1100,14 @@ export default {
 .flex {
   display: flex;
 }
-
+ .inputChenge {
+    width: 100%;
+    display: inline-flex;
+    margin-left: -28%;
+  }
+    .inputs {
+    margin: 0 auto;
+  }
 .el-range-editor.el-input__inner {
   margin-left: 10px;
 }
@@ -1326,4 +1489,10 @@ export default {
 {
 width:80%;
 }
+.btn_css {
+    color: #409eff;
+    cursor: pointer;
+    position:relative;
+    top:2px;
+  }
 </style>

+ 978 - 0
src/views/contractManagement/salesContractAudit.vue

@@ -0,0 +1,978 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<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="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <div class="center">
+      <ws-form class="ws-form" ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
+        <div class="title-top">
+          销售合同
+          <span class="title-number">【编号:{{ deptBudgetList.contractNo }}】</span>
+          <div class="icon" v-if="deptBudgetList.status">
+            <template>
+              <el-popover placement="right" :width="285" trigger="click" visible-arrow="false"
+                @show="history(deptBudgetList.id)">
+                <template>
+                  <div slot="reference"> {{deptBudgetList.status }}</div>
+                </template>
+                <div>
+                  <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+                  <div v-for="(item, index) in historyList" class="flex">
+                    <div class="vertical-text vertical-text-left">
+                      {{ item.updateDate }}
+                    </div>
+                    <div>
+                      <div class="vertical-circle"></div>
+                      <div v-if="index != historyList.length - 1" class="vertical-line"></div>
+                    </div>
+                    <div class="vertical-text">
+                      {{ item.operateUser }}<br />{{ item.dealMsg }}
+                    </div>
+                  </div>
+                </div>
+              </el-popover>
+            </template>
+          </div>
+        </div>
+        <div class="remark">
+          <h3>基本信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="合同类型" span="1" prop="agreementType">
+            <div class="unchanged">
+              {{ deptBudgetList.agreementType }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="合同编号" v-if="deptBudgetList.agreementType=='销售合同'" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.contractNo }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          <div class="unchanged">
+              {{deptBudgetList.transactionSubject}}
+            </div>
+        </ws-form-item>
+        <ws-form-item  v-if="deptBudgetList.transactionSubject == '合营'" class="readonly" label="合营方" span="1" prop="seller">
+          <div class="unchanged">{{ deptBudgetList.jointVentureParties }}</div>
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营方电话" span="1" prop="jointPhone">
+          <div class="unchanged">{{deptBudgetList.jointPhone}}</div>
+        </ws-form-item>
+          <ws-form-item label="关联合同" v-if="deptBudgetList.agreementType=='补充协议'" span="1" prop="agreementNo">
+            <div class="unchanged">
+              {{ deptBudgetList.agreementNo }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="补充协议编号" v-if="deptBudgetList.agreementType=='补充协议'" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.contractNo }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="运输方式" span="1" prop="shippingType">
+            <div class="unchanged">
+              {{ deptBudgetList.shippingType }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="买方" span="1" prop="buyer">
+            <div class="unchanged">
+              {{ deptBudgetList.buyer }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.settlementMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="卖方" span="1" prop="seller">
+            <div class="unchanged">
+              {{ deptBudgetList.seller }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="交货方式" span="1" prop="deliverType">
+            <div v-if="deptBudgetList.deliverType==1" class="unchanged">
+              我方送货
+            </div>
+            <div v-else class="unchanged">
+              对方自提
+            </div>
+          </ws-form-item>
+          <ws-form-item label="买方电话" span="1" prop="buyerPhone">
+            <div class="unchanged">
+              {{ deptBudgetList.buyerPhone }}
+            </div>
+          </ws-form-item>
+          <!-- 收货反馈负责人 -->
+          <ws-form-item label="收货反馈负责人" span="1" prop="feedbackLeader" v-if="deptBudgetList.deliverType ==2">
+            <div class="unchanged">
+              {{ deptBudgetList.feedbackLeader }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="包装方式" span="1" prop="packingMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.packingMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="中转公司" span="1" prop="buyer" class="readonly">
+            <div class="unchanged">
+              {{deptBudgetList.transitCompany}}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+            <div class="unchanged">
+              {{ deptBudgetList.sellerPhone }}
+            </div>
+          </ws-form-item>
+           <!-- 收货反馈负责人 -->
+          <ws-form-item label="收货反馈负责人" span="1" prop="feedbackLeader" v-if="deptBudgetList.deliverType == '对方自提'">
+            <div class="unchanged">
+              {{ deptBudgetList.feedbackLeader }}
+            </div>
+          </ws-form-item>
+
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.acceptanceMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="重量(吨)" span="1" prop="weight">
+            <div class="unchanged">
+              {{ deptBudgetList.weight }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+            <div class="unchanged">
+              {{ deptBudgetList.deliveryDateStart }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+            <div class="unchanged">
+              {{ deptBudgetList.overShort }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+            <div class="unchanged">
+              {{ deptBudgetList.deliveryDateEnd }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="价格类型" span="1" prop="priceType">
+            <div class="unchanged">
+              {{ deptBudgetList.priceType }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="合同单价(元/吨)" span="1" prop="unitContractPrice" v-if="deptBudgetList.priceType == '定价销售'">
+            <div class="unchanged">
+              {{ deptBudgetList.unitContractPrice }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice" v-if="deptBudgetList.priceType == '定价销售'">
+            <div class="unchanged">
+              {{ deptBudgetList.totalContractPrice }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="签订日期" span="1" prop="signingDate"  v-if="deptBudgetList.agreementType=='销售合同'">
+            <div class="unchanged">
+              {{ deptBudgetList.signingDate }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="货源所在地区" span="1">
+            <div class="unchanged">
+              {{ deptBudgetList.sourceProvince }}
+              {{ deptBudgetList.sourceCity }}
+              {{ deptBudgetList.sourceArea }}
+            </div>
+          </ws-form-item>
+
+          <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+            <div class="unchanged">
+              {{ deptBudgetList.sourceGoods }}
+            </div>
+          </ws-form-item>
+
+          <ws-form-item label="交货地所在地区" span="1">
+            <div class="unchanged">
+              {{ deptBudgetList.deliveryProvince }}
+              {{ deptBudgetList.deliveryCity }}
+              {{ deptBudgetList.deliveryArea }}
+            </div>
+          </ws-form-item>
+
+          <ws-form-item label="交货地详细地址" span="1" prop="placeDelivery">
+            <div class="unchanged">
+              {{ deptBudgetList.placeDelivery }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="签订日期" span="1" prop="signingDate"  v-if="deptBudgetList.agreementType=='补充协议'">
+            <div class="unchanged">
+              {{ deptBudgetList.signingDate }}
+            </div>
+          </ws-form-item>
+          <!--结算重量方式-->
+          <ws-form-item label="结算重量方式" span="1" prop="settlementWeightMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.settlementWeightMethod==1?'按出库重量结算':'按收货重量结算' }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="最终实际交易量 (吨)" span="1" prop="finalTradingVolume">
+            <div class="unchanged">
+              {{ deptBudgetList.finalTradingVolume }}
+            </div>
+          </ws-form-item>
+           <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+           <div class="unchanged">
+              {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+            </div>
+        </ws-form-item>
+        </ws-info-table>
+
+        <!--货物信息-->
+        <div class="remark">
+          <h3>货物信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="货名" span="1" prop="waterContent">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.goodsName }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.waterContent }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="品级" span="1" prop="grade">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.grade }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.impurity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain" class="result">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain" class="result">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+            </div>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>流程信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.goodsNameKey }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.goodsName }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.waterContent }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.impurity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.mildewGrain }}
+            </div>
+          </ws-form-item>
+          <!-- <ws-form-item
+            label="已完成发运量(吨)"
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+            </div>
+          </ws-form-item> -->
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.grade }}
+            </div>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>备注信息</h3>
+          <div class="beizhu">
+            <ws-input v-model="deptBudgetList.remarks" disabled type="textarea" :row="3" autosize placeholder="暂无备注信息"
+          maxlength="200" />
+          </div>
+        </div>
+
+        <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+      </ws-form>
+      <div style="text-align: right; padding: 10px">
+      <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>
+    <el-dialog :title="title" :visible.sync="dialogTableVisible">
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-form-item :label="title">
+          <el-input size="medium" type="textarea" placeholder="请输入审核原因" maxlength="1000" show-word-limit v-model="form.auditMind"></el-input>
+        </el-form-item>
+        <el-form-item label="附件">
+          <ws-upload ref="upload" :size-limit="size"  @onChange="onChange" @uploadSuccess="uploadSuccess" :comp-id="compId" :appendix-ids="appendixIdss1"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="dialogTableVisible=false">取消</el-button>
+          <el-button type="primary" @click="onSubmit">确定</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+    packList,
+    xiala,
+    examineList,
+    billoperatehis,
+  } from '@/model/contarct/index'
+  import {
+    gettaskhistories
+  } from '@/model/tasksport/index'
+  import {
+    dayjs
+  } from 'base-core-lib'
+  import WsUpload from '@/components/WsUpload'
+  import {
+  woekflowhandle
+} from '@/model/tasksport/index'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+    },
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        taskhistories: [],
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        // 提交类型
+        submitType: true,
+        tableData: [],
+        ruleDeptBudget: [],
+        deptBudgetList: {
+          contractProcessInfo: {},
+          contractGoodsInfo: {},
+        },
+        mainReportAdd: {},
+        list: {},
+        historyList: [],
+        size: 10,
+        form:{},
+        fileList:[],
+        title:'',
+        dialogTableVisible:false,
+        compId: localStorage.getItem('ws-pf_compId'),
+      }
+    },
+
+    activated() {
+      this.status = this.$route.query.status
+      this.loaddata()
+      this.showType = this.isShow
+      // this.examineList()
+    },
+    methods: {
+      onSubmit() {
+      if (this.title == '驳回原因') {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: false,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '驳回成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '驳回失败!',
+              type: 'error',
+            })
+          })
+      } else {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '通过成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '通过失败!',
+              type: 'error',
+            })
+          })
+      }
+    },
+      onChange(file,fileList) {
+        for (let i = 0; i < fileList.length; i++) {
+          this.fileList.push(fileList[i].appendixPath)
+        }
+        
+        console.log(file,fileList)
+            // this.deptBudgetList.addressUrl = response
+            // this.deptBudgetList.id = this.id
+            // this.deptBudgetList.flag = 1
+            // editInfo(this.deptBudgetList)
+            //   .toPromise()
+            //   .then((response) => {
+            //     this.accessoryTFs = false
+            //     this.$message.success('上传成功')
+            //     this.getList()
+            //   })
+      },
+      reject(){
+        this.title='驳回原因'
+        this.dialogTableVisible=true
+      },
+      pass(){
+        this.title='通过原因'
+        this.dialogTableVisible=true
+      },
+      loaddata() {
+        gettaskhistories({
+            businessKey: this.$route.query.id,
+            workflowId: this.$route.query.workflowId
+          }).toPromise()
+          .then((response) => {
+            this.taskhistories = response
+          })
+        // 数据
+        examineList({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方送货'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方自提'
+            }
+          })
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+      getUnitList() {
+        xiala({
+            compId: localStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      history(id1) {
+        billoperatehis({
+            id: id1
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+
+      returnsales() {
+        this.$router.go(-1)
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  .button-container {
+    display: flex;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    height: 50px;
+    padding: 0 10px;
+
+    &>div {
+      margin-left: 10px;
+      display: flex;
+      flex-wrap: nowrap;
+      flex-direction: row;
+
+      &>span {
+        line-height: 50px;
+      }
+    }
+
+    /deep/.auditFlow-box {
+      position: unset;
+      margin-left: 10px;
+
+      &/deep/.auditFlow-icon {
+        width: auto;
+        padding-right: 30px;
+      }
+
+      &/deep/.auditFlow-main {
+        position: absolute;
+      }
+    }
+  }
+
+  .box-app {
+    display: inline-block;
+
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 6px 0px;
+  }
+
+  .wenzi {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 30px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 70%;
+    margin: 0 auto;
+  }
+
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  .hide-sel {
+    .el-input__inner {
+      border: 0px;
+    }
+
+    .el-icon-arrow-up {
+      display: none;
+    }
+
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+    }
+
+    .el-date-editor {
+      i {
+        display: none;
+      }
+    }
+
+    .is-disabled {
+      .el-input__inner:hover {
+        background-color: #fff !important;
+        border: 0;
+      }
+
+      color: #606266;
+
+      .el-input__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+
+      .el-textarea__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+    }
+  }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 10px 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  .state {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .state h2,
+  .state p {
+    display: inline-block;
+  }
+
+  .state p {
+    display: inline-block;
+    margin-left: 10px;
+    width: 170px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #000000;
+    line-height: 20px;
+  }
+
+  .icon {
+    display: inline-block;
+    width: 60px;
+    background: #ecfeff;
+    border-radius: 12px;
+    border: 1px solid #50cad4;
+    position: relative;
+    font-size: 14px;
+    color: #50cad4;
+    padding: 1px 7px;
+  }
+
+  .title-top {
+    margin-top: 20px;
+    font-size: 21px;
+    font-weight: 600;
+  }
+
+  .title-number {
+    font-size: 14px;
+    font-weight: 400;
+  }
+
+  //*号
+  // .unchangeable {
+  //   position: absolute;
+  //   width: 9px;
+  //   height: 22px;
+  //   font-size: 16px;
+  //   font-family: PingFangSC-Medium, PingFang SC;
+  //   font-weight: 500;
+  //   color: #ff2727;
+  //   line-height: 22px;
+  //   display: inline-block;
+  //   right: 14px;
+  // }
+  /deep/.el-input,
+  /deep/.el-date-editor {
+    font-size: 13px;
+    width: 232px;
+    left: 21px;
+  }
+
+  /deep/.ws-form .el-textarea {
+    width: 900px;
+    margin: 0px;
+  }
+
+  /deep/el-date-editor--date {
+    width: 200px;
+  }
+
+  /deep/.beizhu {
+    margin: 0 auto;
+    font-size: 14px;
+    color: #afb5cb;
+    margin-left: 20px;
+  }
+
+  .unchanged {
+    position: absolute;
+    left: 37px;
+    width: 900px;
+    height: 14px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #afb5cb;
+    line-height: 14px;
+  }
+
+  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  /deep/.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+    width: 232px;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .vertical-text {
+    margin: 0 10px;
+    color: #8890b1;
+    font-size: 12px;
+    margin-top: -4px;
+  }
+
+  .vertical-line {
+    height: 100px;
+    border-left: 2px solid #e9ecf7;
+    margin-left: 4px;
+    padding: 0 3px;
+  }
+
+  .vertical-circle {
+    width: 10px;
+    height: 10px;
+    border: 2px solid #5878e8;
+    background-color: #ffffff;
+    -webkit-border-radius: 100px;
+  }
+
+  .vertical-circle:first-child {
+    color: red;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+  }
+</style>

+ 105 - 3
src/views/contractManagement/storageContract.vue

@@ -112,9 +112,80 @@
         </template>
       </el-table-column>
       <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
-      <el-table-column prop="address" label="操作" width="160">
+      <el-table-column prop="address" label="操作" width="150">
         <template slot-scope="scope">
-          <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
+          <el-link v-hasPermission="
+              `contractManagement.dcContract.dcContractInfo.view`
+            " target="_blank" type="primary" :underline="false" @click="handleExamine(scope.row)"
+            >查看</el-link>
+            <el-divider direction="vertical"></el-divider>
+            <el-link v-hasPermission="
+              `contractManagement.dcContract.dcContractInfo.edit`
+            " target="_blank" type="primary" :underline="false" @click="handleEdit(scope.row)"
+              :disabled="scope.row.approveStatus">编辑</el-link>
+              <el-dropdown>
+              <span class="btn_css">•••</span>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.dcContract.dcContractInfo.delete`
+            "><el-link target="_blank" type="primary" :underline="false" @click="handleDelete(scope.row)"
+              :disabled="scope.row.approveStatus">删除</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.dcContract.dcContractInfo.edit`
+            ">
+                  <el-link  target="_blank" type="primary" :underline="false" @click="withdraw(scope.row)"
+              :disabled="scope.row.approveStatus && scope.row.approveStatus=='发起人撤回'">撤回</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.dcContract.dcContractInfo.list`
+            ">
+                  <el-link target="_blank" type="primary" :underline="false" @click="handleRecord(scope.row)">记录</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="
+              `contractManagement.dcContract.dcContractInfo.view`
+            ">
+                  <el-link target="_blank" type="primary" :underline="false" @click="handleaudit(scope.row)"
+              :disabled="!scope.row.taskId">审核</el-link>
+                </el-dropdown-item>
+                <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handlecost(scope.row)">费用详情</el-link>
+              </el-dropdown-item>
+              <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
+                <el-link target="_blank" type="primary" :underline="false" @click="handleprofit(scope.row)">利润详情</el-link>
+              </el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          <!-- <el-button @click="handleExamine(scope.row)"  v-hasPermission="
+              `contractManagement.dcContract.dcContractInfo.view`
+            " type="primary">查看</el-button>
+            <div v-if="
+            (scope.row.approveStatus != '待决策人审核' &&
+              !scope.row.approveStatus || scope.row.approveStatus == '发起人撤回')
+          " style="display: inline-block">
+          <el-button @click="handleEdit(scope.row)" v-hasPermission="
+                `contractManagement.dcContract.dcContractInfo.edit`
+              " type="primary">编辑</el-button>
+          </div>
+          <div v-if="scope.row.status == '待执行' && !scope.row.approveStatus || scope.row.status == '已驳回'" style="display: inline-block">
+          <el-button v-hasPermission="
+              `contractManagement.dcContract.dcContractInfo.delete`
+            " @click="handleDelete(scope.row)" type="primary">删除</el-button>
+          </div>
+          <div  v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
+          <el-button @click="withdraw(scope.row)" v-hasPermission="
+                            `contractManagement.dcContract.dcContractInfo.edit`
+                          " type="primary">撤回</el-button>
+          </div>
+          <el-button @click="handleRecord(scope.row)" v-hasPermission="
+                            `contractManagement.dcContract.dcContractInfo.list`
+                          " type="primary">记录</el-button>
+          <div  v-if="scope.row.taskId" style="display: inline-block">
+          <el-button @click="handleaudit(scope.row)" v-hasPermission="
+                            `contractManagement.dcContract.dcContractInfo.view`
+                          " type="primary">审核</el-button>
+          </div> -->
+          <!-- <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
             src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
               `contractManagement.dcContract.dcContractInfo.view`
             " alt="" />
@@ -150,7 +221,7 @@
                 @click="withdraw(scope.row)" v-hasPermission="
                             `contractManagement.dcContract.dcContractInfo.edit`
                           " alt="" />
-            </div>
+            </div> -->
         </template>
       </el-table-column>
     </el-table>
@@ -306,6 +377,31 @@
       this.persionXiaLa()
     },
     methods: {
+      handleaudit(row) {
+      this.$router.push({
+        name: 'storageContractAudit',
+        query: {
+          id: row.id,
+          status: row.status,
+        },
+      })
+    },
+    handlecost(row) {
+      this.$router.push({
+        name: 'expensemanagementdetails',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
+    handleprofit(row) {
+      this.$router.push({
+        name: 'contractprofits',
+        query: {
+          contractNo: row.contractNo,
+        },
+      })
+    },
       withdraw(row) {
       this.$confirm(`撤回成功后,可再次提交,确定撤回该合同吗?`, {
         cancelButtonText: '取消',
@@ -989,4 +1085,10 @@
   /deep/.typeselect .el-input__inner {
     color: #8890b1;
   }
+    .btn_css {
+    color: #409eff;
+    cursor: pointer;
+    position:relative;
+    top:2px;
+  }
 </style>

+ 784 - 0
src/views/contractManagement/storageContractAudit.vue

@@ -0,0 +1,784 @@
+<!--采购合同查看-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<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>
+
+    <ws-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
+      <div class="title-top">
+        代储合同<span class="title-number">【编号:{{ deptBudgetList.contractNo }}】</span>
+        <div class="icon" v-if="deptBudgetList.status">
+          <template>
+            <el-popover placement="right" :width="285" trigger="click" visible-arrow="false"
+              @show="history(deptBudgetList.id)">
+              <template>
+                <div slot="reference"> {{deptBudgetList.status }}</div>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div v-if="index != historyList.length - 1" class="vertical-line"></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
+                </div>
+              </div>
+            </el-popover>
+          </template>
+        </div>
+      </div>
+      <div class="remark">
+        <h3>基本信息</h3>
+      </div>
+      <ws-info-table>
+
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          {{ deptBudgetList.shippingType }}
+        </ws-form-item>
+        <ws-form-item label="买方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod">{{ deptBudgetList.settlementMethod }}
+        </ws-form-item>
+         <ws-form-item label="卖方" span="1" prop="seller">{{ deptBudgetList.seller }}
+        </ws-form-item>
+        <ws-form-item label="交货方式" span="1" prop="deliverType1">{{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <ws-form-item label="买方电话" span="1" prop="buyerPhone">{{ deptBudgetList.buyerPhone }}
+        </ws-form-item>
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          {{ deptBudgetList.packingMethod }}
+        </ws-form-item>
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          {{ deptBudgetList.sellerPhone }}
+        </ws-form-item>
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          {{ deptBudgetList.acceptanceMethod }}
+        </ws-form-item>
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          {{ deptBudgetList.weight }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          {{ deptBudgetList.overShort }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+         <ws-form-item label="货源所在地区" span="1">
+          {{ deptBudgetList.sourceProvince }}
+          {{ deptBudgetList.sourceCity }}
+          {{ deptBudgetList.sourceArea }}
+        </ws-form-item>
+        <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+          {{ deptBudgetList.sourceGoods }}
+        </ws-form-item>
+        <ws-form-item label="交货地所在地区" span="1">
+          {{ deptBudgetList.deliveryProvince }}
+          {{ deptBudgetList.deliveryCity }}
+          {{ deptBudgetList.deliveryArea }}
+        </ws-form-item>
+        <ws-form-item label="交货地详细地址" span="1" prop=" placeDelivery">
+          {{ deptBudgetList.placeDelivery }}
+        </ws-form-item>
+        <ws-form-item label="代储费(元/吨·天)" span="1" prop="storageFee">
+          {{deptBudgetList.storageFee}}
+        </ws-form-item>
+        <ws-form-item label="合同单价(元/吨)" span="1" prop="unitContractPrice" v-if="deptBudgetList.priceType == '定价采购'">
+          {{ deptBudgetList.unitContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="代储费起算重量" span="1" prop="storageFeeWeight">
+          {{deptBudgetList.storageFeeWeight}}
+        </ws-form-item>
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice" v-if="deptBudgetList.priceType == '定价采购'">
+          {{ deptBudgetList.totalContractPrice }}
+        </ws-form-item>
+         <ws-form-item label="代储费起算日期" span="1" prop="storageFeeStartdate">
+          {{deptBudgetList.storageFeeStartdate}}
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+        <ws-form-item label="代储费预计终止日期" span="1" prop="storageFeeEnddate">
+          {{deptBudgetList.storageFeeEnddate}}
+        </ws-form-item>
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
+          {{ deptBudgetList.finalTradingVolume }}
+        </ws-form-item>
+        
+      </ws-info-table>
+      <div class="remark">
+        <h3>货物信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="货名" span="1" prop="waterContent">
+          {{ deptBudgetList.contractGoodsInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+          {{ deptBudgetList.contractGoodsInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="品级" span="1" prop="grade">
+          {{ deptBudgetList.contractGoodsInfo.grade }}
+        </ws-form-item>
+        <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+          {{ deptBudgetList.contractGoodsInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+          {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+        </ws-form-item>
+        <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain" class="result">
+          {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+        </ws-form-item>
+        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+          {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+        </ws-form-item>
+        <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain" class="result">
+          {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>流程信息</h3>
+      </div>
+      <ws-info-table>
+        <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
+          {{deptBudgetList.contractProcessInfo.mildewGrain}}
+        </ws-form-item>
+        <ws-form-item label="已开销售发票(元)" span="1" prop="goodsName">
+          {{ deptBudgetList.contractProcessInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">{{ deptBudgetList.contractProcessInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="未开销售发票(元)" span="1" prop="impurity">{{ deptBudgetList.contractProcessInfo.impurity }}
+        </ws-form-item>
+       <!--未回款(元)-->
+       <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
+         {{deptBudgetList.contractProcessInfo.mildewGrain}}
+       </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">{{ deptBudgetList.contractProcessInfo.grade }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>备注信息</h3>
+      </div>
+      <div style=" color: #afb5cb;margin-left: 20px;">
+        {{ deptBudgetList.remarks }}
+      </div>
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </ws-form>
+
+    <div style="text-align: right; padding: 10px">
+      <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>
+    <el-dialog :title="title" :visible.sync="dialogTableVisible">
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-form-item :label="title">
+          <el-input size="medium" type="textarea" placeholder="请输入审核原因" maxlength="1000" show-word-limit v-model="form.auditMind"></el-input>
+        </el-form-item>
+        <el-form-item label="附件">
+          <ws-upload ref="upload" :size-limit="size"  @onChange="onChange" @uploadSuccess="uploadSuccess" :comp-id="compId" :appendix-ids="appendixIdss1"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="dialogTableVisible=false">取消</el-button>
+          <el-button type="primary" @click="onSubmit">确定</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    packList,
+    xiala,
+    examineList,
+    billoperatehis,
+  } from '@/model/contarct/index'
+  import {
+    gettaskhistories
+  } from '@/model/tasksport/index'
+  import WsUpload from '@/components/WsUpload'
+  import {
+  woekflowhandle
+} from '@/model/tasksport/index'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+    },
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        status: '',
+        // 提交类型
+        submitType: true,
+        historyList: [],
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        ruleDeptBudget: [],
+        taskhistories: [],
+        deptBudgetList: {
+          contractProcessInfo: {},
+          contractGoodsInfo: {},
+        },
+        mainReportAdd: {},
+        list: {},
+        size: 10,
+        form:{},
+        fileList:[],
+        title:'',
+        dialogTableVisible:false,
+        compId: localStorage.getItem('ws-pf_compId'),
+      }
+    },
+
+    activated() {
+      this.status = this.$route.query.status
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+      onSubmit() {
+      if (this.title == '驳回原因') {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: false,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '驳回成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '驳回失败!',
+              type: 'error',
+            })
+          })
+      } else {
+        woekflowhandle({
+          taskId: this.deptBudgetList.taskId,
+          approved: true,
+          auditMind: this.form.auditMind+ "##" + this.fileList.toString(),
+          needReapply: true,
+        }).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '通过成功!',
+              type: 'success',
+            })
+            this.dialogTableVisible = false
+            this.$router.go(-1)
+          }).catch((response) => {
+            this.$message({
+              message: '通过失败!',
+              type: 'error',
+            })
+          })
+      }
+    },
+      onChange(file,fileList) {
+        for (let i = 0; i < fileList.length; i++) {
+          this.fileList.push(fileList[i].appendixPath)
+        }
+        
+        console.log(file,fileList)
+            // this.deptBudgetList.addressUrl = response
+            // this.deptBudgetList.id = this.id
+            // this.deptBudgetList.flag = 1
+            // editInfo(this.deptBudgetList)
+            //   .toPromise()
+            //   .then((response) => {
+            //     this.accessoryTFs = false
+            //     this.$message.success('上传成功')
+            //     this.getList()
+            //   })
+      },
+      reject(){
+        this.title='驳回原因'
+        this.dialogTableVisible=true
+      },
+      pass(){
+        this.title='通过原因'
+        this.dialogTableVisible=true
+      },
+      loaddata() {
+        gettaskhistories({
+            businessKey: this.$route.query.id,
+            workflowId: this.$route.query.workflowId
+          }).toPromise()
+          .then((response) => {
+            this.taskhistories = response
+          })
+        // 数据
+        examineList({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }
+          })
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+      },
+      getUnitList() {
+        xiala({
+            compId: localStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+      history(id1) {
+        billoperatehis({
+            id: id1
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      returnsales() {
+        this.$router.go(-1)
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  // .status-orange,
+  // .status-bule,
+  // .status-green {
+  //   border: 1px solid;
+  //   border-radius: 30px;
+  //   padding: 3px 10px;
+  //   font-size: 16px;
+  // }
+
+  // .status-orange {
+  //   border-color: #ff9f24;
+  //   color: #ff9f24;
+  //   background: #ffedd5;
+  // }
+
+  // .status-bule {
+  //   border-color: #5473e8;
+  //   color: #5473e8;
+  //   background: #f0f3fe;
+  // }
+
+  // .status-green {
+  //   border-color: #50cad4;
+  //   color: #50cad4;
+  //   background: #ecfeff;
+  // }
+
+
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  // .readonly {
+  //   position: relative;
+  // }
+
+  // .readonly:after {
+  //   content: '*';
+  //   color: #ff2727;
+  //   position: absolute;
+  //   right: 8px;
+  //   z-index: 10;
+  //   top: 21%;
+  //   font-size: 20px;
+  // }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+    color: #afb5cb;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  // .button-container {
+  //   display: flex;
+  //   flex-wrap: nowrap;
+  //   justify-content: space-between;
+  //   align-items: center;
+  //   background-color: #fff;
+  //   width: 100%;
+  //   height: 50px;
+  //   padding: 0 10px;
+
+  //   &>div {
+  //     margin-left: 10px;
+  //     display: flex;
+  //     flex-wrap: nowrap;
+  //     flex-direction: row;
+
+  //     &>span {
+  //       line-height: 50px;
+  //     }
+  //   }
+
+  //   /deep/.auditFlow-box {
+  //     position: unset;
+  //     margin-left: 10px;
+
+  //     &/deep/.auditFlow-icon {
+  //       width: auto;
+  //       padding-right: 30px;
+  //     }
+
+  //     &/deep/.auditFlow-main {
+  //       position: absolute;
+  //     }
+  //   }
+  // }
+
+  .box-app {
+    display: inline-block;
+    float: left;
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  // .wenzi {
+  //   width: 900px;
+  //   margin: 0 auto;
+  // }
+
+  // .wenzi h3 {
+  //   display: inline-block;
+  //   left: 10px;
+  // }
+
+  // .wenzi p {
+  //   display: inline-block;
+  // }
+
+  .center {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .ws-form.el-form{
+  padding:0 15%;
+}
+  .ws-info-table .el-form-item {
+    width: 50%;
+  }
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  // .ce {
+  //   width: 900px;
+  //   margin: 0 auto;
+  // }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  // .hide-sel {
+  //   .el-input__inner {
+  //     border: 0px;
+  //   }
+
+  //   .el-icon-arrow-up {
+  //     display: none;
+  //   }
+
+  //   .el-textarea__inner {
+  //     background-color: #fff !important;
+  //     border: 0;
+  //   }
+
+  //   .el-date-editor {
+  //     i {
+  //       display: none;
+  //     }
+  //   }
+
+  //   .is-disabled {
+  //     .el-input__inner:hover {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //     }
+
+  //     color: #606266;
+
+  //     .el-input__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+
+  //     .el-textarea__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+  //   }
+  // }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .vertical-text {
+    margin: 0 10px;
+    color: #8890b1;
+    font-size: 12px;
+    margin-top: -4px;
+  }
+
+  .vertical-line {
+    height: 100px;
+    border-left: 2px solid #e9ecf7;
+    margin-left: 4px;
+    padding: 0 3px;
+  }
+
+  .vertical-circle {
+    width: 10px;
+    height: 10px;
+    border: 2px solid #5878e8;
+    background-color: #ffffff;
+    -webkit-border-radius: 100px;
+  }
+
+  .vertical-circle:first-child {
+    color: red;
+  }
+
+  .icon {
+    display: inline-block;
+    width: 60px;
+    background: #ecfeff;
+    border-radius: 12px;
+    border: 1px solid #50cad4;
+    position: relative;
+    font-size: 14px;
+    color: #50cad4;
+    padding: 1px 7px;
+  }
+
+  .title-top {
+    margin-top: 20px;
+    font-size: 21px;
+    font-weight: 600;
+  }
+
+  .title-number {
+    font-size: 14px;
+    font-weight: 400;
+  }
+</style>

+ 5 - 3
src/views/customerFundManagement/customerFundEdit.vue

@@ -108,7 +108,7 @@
               <div class="unload-img">上传银行卡正面</div>
               <el-upload
                 class="avatar-uploader avatar-uploader3"
-                ::action="global.uploadPath"
+                :action="uploadPath"
                 :show-file-list="false"
                 :on-success="bankSuccess1"
                 :disabled="disabled"
@@ -121,7 +121,7 @@
               <div class="unload-img">上传银行卡反面</div>
               <el-upload
                 class="avatar-uploader avatar-uploader4"
-                :action="global.uploadPath"
+                :action="uploadPath"
                 :show-file-list="false"
                 :on-success="bankSuccess2"
                 :disabled="disabled"
@@ -245,6 +245,7 @@ export default {
           url: '',
         },
       ],
+      uploadPath:this.global.uploadPath,
       identityUp: 'up',
       identityLow: 'low',
       bankUps: 'bankUp',
@@ -257,7 +258,8 @@ export default {
   },
   activated() {
     this.loaddata()
-
+    this.uploadPath=this.global.uploadPath
+    console.log(this.uploadPath)
     this.showType = this.isShow
     this.imageUrl3 = ''
     this.imageUrl4 = ''

+ 7 - 6
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -1149,8 +1149,8 @@ export default {
         }
       }
       if (this.deptBudgetList.goodsName && this.deptBudgetList.customerName) {
-        await getquality({ goodsName: this.deptBudgetList.goodsName, compId: localStorage.getItem('ws-pf_compId'), warehouseName: this.warehouseName, customerNumberCard: this.deptBudgetList.customerNumberCard })
-          .toPromise().then((response) => {
+        var response=await getquality({ goodsName: this.deptBudgetList.goodsName, compId: localStorage.getItem('ws-pf_compId'), warehouseName: this.warehouseName, customerNumberCard: this.deptBudgetList.customerNumberCard })
+          .toPromise()
             if (response.A + response.B + response.C * 50 > response.D - 50) {
               this.redstatus = true
             } else {
@@ -1162,7 +1162,6 @@ export default {
 
             this.deptBudgetList.volumeofbusiness = a + b + c
             this.$forceUpdate()
-          })
       }
     },
     waterContentChange(type) {
@@ -1322,7 +1321,7 @@ export default {
             .toPromise()
             .then((response) => {
               if (response) {
-                this.$set(this.deptBudgetList, "dryGrainPrice", response)
+                this.$set(this.deptBudgetList, 'dryGrainPrice', response)
                 // this.deptBudgetList.dryGrainPrice = response
                 this.dryGrainPrice = response
               }
@@ -3373,6 +3372,7 @@ export default {
                           console.log(response)
                           // this.$message.warning(response)
                         })
+                        this.$forceUpdate()
                     } else {
                       this.deptBudgetList.id = zjid
                       // if (this.serviceManagementType==3) {
@@ -3427,6 +3427,7 @@ export default {
                               // this.$message.warning(response)
                             })
                           this.getList()
+                          this.$forceUpdate()  
                           this.selectWarehouse()
                           this.add()
                         })
@@ -4013,8 +4014,8 @@ export default {
           })
       }
       if (this.deptBudgetList.goodsName == '大豆') {
-        this.deptBudgetList.transgene = "非转基因"
-        this.deptBudgetList.colorLustre = "正常"
+        this.deptBudgetList.transgene = '非转基因'
+        this.deptBudgetList.colorLustre = '正常'
       } else {
         delete this.deptBudgetList.transgene
         delete this.deptBudgetList.colorLustre

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

@@ -610,7 +610,10 @@
         },{
           value: '黑龙江欣洋粮食贸易有限公司',
           label: '黑龙江欣洋粮食贸易有限公司'
-        }],
+        },{
+        value: '天津建源供应链管理有限公司',
+        label: '天津建源供应链管理有限公司'
+      }],
         idPrint: '',
         
         myCompanyCustomer:'',
@@ -719,7 +722,10 @@
         }, {
           value: '黑龙江启兴粮食贸易有限公司',
           label: '黑龙江启兴粮食贸易有限公司'
-        }]
+        },{
+        value: '天津建源供应链管理有限公司',
+        label: '天津建源供应链管理有限公司'
+      }]
           this.companyNameEWOptions=[
           {
           value: '黑龙江中天昊元贸易有限公司',
@@ -748,7 +754,10 @@
         }, {
           value: '黑龙江启兴粮食贸易有限公司',
           label: '黑龙江启兴粮食贸易有限公司'
-        }]
+        },{
+        value: '天津建源供应链管理有限公司',
+        label: '天津建源供应链管理有限公司'
+      }]
           this.companyName=extra[0]
           this.companyNameEW=extra[0]
           this.ewCustomer=extra[0]
@@ -2298,7 +2307,7 @@
               }
           }
         }
-        getcontract({contractNo:this.weighingList.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+        getcontract({contractNo:this.weighingList.contractNo,warehouseName:this.warehouseName,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
           this.outContractNo=response
             this.shipInfoList=this.outContractNo.shipInfoList
             this.fireDirectionList=this.outContractNo.fireDirectionList

+ 12 - 3
src/views/outboundManagement/weighingManagementrecord.vue

@@ -366,7 +366,10 @@
         },{
           value: '黑龙江欣洋粮食贸易有限公司',
           label: '黑龙江欣洋粮食贸易有限公司'
-        }],
+        },{
+        value: '天津建源供应链管理有限公司',
+        label: '天津建源供应链管理有限公司'
+      }],
         companyName: '黑龙江中天昊元贸易有限公司',
         companyNameEW: '黑龙江利润元粮食贸易有限公司',
         ewCustomer: '厦门建发物产有限公司',
@@ -454,7 +457,10 @@
         }, {
           value: '黑龙江启兴粮食贸易有限公司',
           label: '黑龙江启兴粮食贸易有限公司'
-        }]
+        },{
+        value: '天津建源供应链管理有限公司',
+        label: '天津建源供应链管理有限公司'
+      }]
           this.companyNameEWOptions=[
           {
           value: '黑龙江中天昊元贸易有限公司',
@@ -483,7 +489,10 @@
         }, {
           value: '黑龙江启兴粮食贸易有限公司',
           label: '黑龙江启兴粮食贸易有限公司'
-        }]
+        },{
+        value: '天津建源供应链管理有限公司',
+        label: '天津建源供应链管理有限公司'
+      }]
           this.companyName=extra[0]
           this.companyNameEW=extra[0]
           this.ewCustomer=extra[0]

+ 1 - 1
src/views/personnelManagement/component/router/route.js

@@ -19,7 +19,7 @@ const checkWorkListRouter = {
             meta: {
                 title: '考勤管理',
                 shortcutEntrance: 'checkWorkList',
-                module: 'customerManagement.customer.customerInfo',
+                // module: 'customerManagement.customer.customerInfo',
                 permissicon: [],
                 keepAlive: true,
                 // module: 'procurement.sparepart.applDetail'

+ 39 - 13
src/views/profitable/cashout.vue

@@ -20,6 +20,7 @@
               <ws-option label="合同费用" value="合同费用" style="color: #8890b1" />
               <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="type"
@@ -28,6 +29,7 @@
               <ws-option label="粮款" value="粮款" style="color: #8890b1" />
               <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>
 
@@ -82,6 +84,8 @@
           </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-checkbox v-show="this.deptBudgetList.type != '利息'" v-model="selected">备用金支付</el-checkbox>
+            <el-checkbox v-show="this.deptBudgetList.type == '利息'" v-model="lixiSelected" disabled>无需付款</el-checkbox>
           </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">
@@ -110,10 +114,10 @@
           </el-form-item>
         </el-form>
         <div
-          v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" || deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == "不自动分配"'
+          v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" || deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == "不自动分配"'
           class='expensetitle'>费用分配</div>
         <div
-          v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" || deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == "不自动分配"'
+          v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" || deptBudgetList.purpose == "库点费用" && deptBudgetList.autoAssign == "不自动分配"'
           style='margin:0 auto 10px;width:90%;display: flex;'>
           <ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
             <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
@@ -158,7 +162,7 @@
           <span style="margin-top:5px;margin-left: 10px;" v-if='mode != "暂不分配"'>合计分配:{{ amount }}元</span>
         </div>
         <el-table ref="tableref"
-          v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" && mode != "暂不分配" || deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == "不自动分配"'
+          v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" && mode != "暂不分配" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" && mode != "暂不分配" || deptBudgetList.purpose == "库点费用" && mode != "暂不分配" && deptBudgetList.autoAssign == "不自动分配"'
           :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
           <el-table-column key="1" width="150" v-if='deptBudgetList.purpose == "合同费用"' prop="date" label="仓库名称"
             min-width="110">
@@ -253,6 +257,8 @@ export default {
   },
   data() {
     return {
+      selected:false,
+      lixiSelected:true,
       customerList: [],
       goodsSource: '',
       value2: '',
@@ -282,7 +288,7 @@ export default {
       warecontractList: [],
       dateRange: this.disabledDate(),
       feeDetailsDistributions: [{ receiptDocDate: '', inWarehouseWeight: 0, distributionMoney: 0, warehouseName: '', goodsName: '', goodsSource: '', index: 0 }],
-      deptBudgetList: { purpose: '合同费用', type: '粮款', flag: '否', autoAssign: "不自动分配", payee: '', accountNumber: '', bank: '', bankBranch: '', wareExpenseType: '杂费', },
+      deptBudgetList: { purpose: '合同费用', type: '粮款', flag: '否', payerHeader:'',noPaymentFlag:'',autoAssign: '不自动分配', payee: '', accountNumber: '',paymentIdentifi: '', bank: '', bankBranch: '', wareExpenseType: '杂费', },
       makeWordData: {},
       warehouseList: [],
       contractList: [],
@@ -323,6 +329,7 @@ export default {
     // this.makeWordData = this.getData(2)
     // this.initCharts()
     // this.getPassYearFormatDate()
+    this.deptBudgetList.payerHeader = localStorage.getItem('ws-pf_compName')
     this.getList()
   },
   computed: {
@@ -342,10 +349,10 @@ export default {
   },
   methods: {
     purposeChange(e) {
-      if (e == "库点费用") {
-        this.deptBudgetList.autoAssign = "不自动分配"
+      if (e == '库点费用') {
+        this.deptBudgetList.autoAssign = '不自动分配'
       } else {
-        this.deptBudgetList.autoAssign = ""
+        this.deptBudgetList.autoAssign = ''
       }
     },
     sourceChange(e) {
@@ -732,7 +739,7 @@ export default {
         })
         return
       }
-      if (this.deptBudgetList.purpose == '合同费用' && this.deptBudgetList.type == '非粮款' && this.mode != '暂不分配' || this.deptBudgetList.purpose == '库点费用' && this.deptBudgetList.autoAssign == '不自动分配' && this.mode != '暂不分配') {
+      if (this.deptBudgetList.purpose == '合同费用' && this.deptBudgetList.type == '利息' && this.mode != '暂不分配'|| this.deptBudgetList.purpose == '合同费用' && this.deptBudgetList.type == '非粮款' && this.mode != '暂不分配' || this.deptBudgetList.purpose == '库点费用' && this.deptBudgetList.autoAssign == '不自动分配' && this.mode != '暂不分配') {
         for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
           // if(!this.feeDetailsDistributions[i].goodsSource){
           //   this.$message({
@@ -799,7 +806,19 @@ export default {
       } else if (this.deptBudgetList.purpose == '经营性费用') {
         this.deptBudgetList.expensesPurpose = 5
         this.deptBudgetList.costNo = 'JYF' + this.getdate() + this.Num
+      }else if(this.deptBudgetList.purpose == '备用金'){
+        this.deptBudgetList.expensesPurpose = 7
+        this.deptBudgetList.costNo = 'BYJ' + this.getdate() + this.Num
+        this.$set(this.deptBudgetList,'wareExpenseType','')
+        this.$set(this.deptBudgetList,'type','')
+        this.$set(this.deptBudgetList,'flag','')
       }
+       //选中状态下,备用金支付标识为1
+       if(this.selected == true){
+          this.deptBudgetList.paymentIdentifi = 1
+        }else{
+          this.deptBudgetList.paymentIdentifi = 0
+        }
       if (this.deptBudgetList.expensesPurpose == 1) {
         if (this.deptBudgetList.type == '粮款') {
           this.deptBudgetList.costType = 1
@@ -813,6 +832,13 @@ export default {
           this.deptBudgetList.costType = 5
           this.deptBudgetList.expenseAllocationInfoList = []
         }
+        else if(this.deptBudgetList.type == '利息'){
+          this.deptBudgetList.noPaymentFlag = 1
+          this.deptBudgetList.costType = 7
+          if (this.mode != '暂不分配') {
+            this.deptBudgetList.expenseAllocationInfoList = this.feeDetailsDistributions
+          }
+        }
       }
       if (this.deptBudgetList.expensesPurpose == 1) {
         var data = []
@@ -910,13 +936,13 @@ export default {
           }
         }
       }
-      if (this.deptBudgetList.purpose == "库点费用") {
-        if (this.deptBudgetList.autoAssign == "不自动分配") {
+      if (this.deptBudgetList.purpose == '库点费用') {
+        if (this.deptBudgetList.autoAssign == '不自动分配') {
           this.deptBudgetList.autoAssign = 1
-        } else if (this.deptBudgetList.autoAssign == "仓储费自动分配") {
+        } else if (this.deptBudgetList.autoAssign == '仓储费自动分配') {
           this.deptBudgetList.autoAssign = 3
           this.deptBudgetList.expenseAllocationInfoList = []
-        } else if (this.deptBudgetList.autoAssign == "燃料费自动分配") {
+        } else if (this.deptBudgetList.autoAssign == '煤款自动分配') {
           if (!this.deptBudgetList.coalPrice) {
             this.$message({
               message: '燃料费单价不能为空!',
@@ -986,7 +1012,7 @@ export default {
                 })
               }
               this.mode = '全部分配'
-              this.deptBudgetList = { purpose: '合同费用', type: '粮款', flag: '否', payee: '', accountNumber: '', bank: '', bankBranch: '', wareExpenseType: '杂费', }
+              this.deptBudgetList = { purpose: '合同费用', type: '粮款', flag: '否', payee: '', noPaymentFlag:'',accountNumber: '',payerHeader:'',paymentIdentifi: '',  bank: '', bankBranch: '', wareExpenseType: '杂费', }
               this.feeDetailsDistributions = [{ receiptDocDate: '', inWarehouseWeight: 0, distributionMoney: 0, warehouseName: '', goodsName: '', goodsSource: '', index: 0 }]
               this.paymentScreenshot = []
               this.$refs.upload.clearFiles()

+ 9 - 6
src/views/profitable/cashoutaduit.vue

@@ -27,6 +27,7 @@
               <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-option label="利息" value="7" style="color: #8890b1" />
             </ws-select>
           </el-form-item>
           <!-- <el-form-item label-width='100px' v-if='deptBudgetList.purpose == "库点费用"' label="仓储费" span="1"
@@ -65,6 +66,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="金额(元)" span="1" prop="contractNo" class="readonly">
             {{ deptBudgetList.amountMoney }}
+            <span v-if='deptBudgetList.paymentIdentifi==1' style="color:blue;margin-left: 10px;">备用金支付</span>
+            <span v-if='deptBudgetList.noPaymentFlag==1' style="color:blue;margin-left: 10px;">无需付款</span>
           </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">
@@ -273,8 +276,8 @@ export default {
         date: 20
       }
       ], //货值
-      auditList: "",//审核附件
-      auditUrl: ""
+      auditList: '',//审核附件
+      auditUrl: ''
 
     }
   },
@@ -285,7 +288,7 @@ export default {
     cancelShow() {
       this.rejectshow = false
       this.auditList = [],//审核附件
-        this.auditUrl = ""
+        this.auditUrl = ''
     },
     auditUrlChange() {//审核附件
       this.$refs.upload
@@ -304,7 +307,7 @@ export default {
       if (!this.auditUrl) {
         this.auditUrl = data.appendixPath
       } else {
-        this.auditUrl = this.auditUrl + "," + data.appendixPath
+        this.auditUrl = this.auditUrl + ',' + data.appendixPath
       }
     },
     handleClose() {
@@ -333,7 +336,7 @@ export default {
             woekflowhandle({
               taskId: this.deptBudgetList.taskId,
               approved: false,
-              auditMind: this.textarea + "##" + this.auditUrl,
+              auditMind: this.textarea + '##' + this.auditUrl,
               needReapply: true,
             }).toPromise()
               .then((response) => {
@@ -353,7 +356,7 @@ export default {
             woekflowhandle({
               taskId: this.deptBudgetList.taskId,
               approved: true,
-              auditMind: this.textarea + "##" + this.auditUrl,
+              auditMind: this.textarea + '##' + this.auditUrl,
               needReapply: true,
             }).toPromise()
               .then((response) => {

+ 13 - 9
src/views/profitable/cashoutaduitNQ.vue

@@ -20,12 +20,14 @@
             <span v-if='deptBudgetList.expensesPurpose == 2'>运费</span>
             <span v-if='deptBudgetList.expensesPurpose == 3'>库点费用</span>
             <span v-if='deptBudgetList.expensesPurpose == 5'>经营性费用</span>
+            <span v-if='deptBudgetList.expensesPurpose == 7'>备用金</span>
           </el-form-item>
           <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose == 1' label="类型" span="1"
             prop="costType">
             <span v-if='deptBudgetList.costType == 1'>粮款</span>
             <span v-if='deptBudgetList.costType == 3'>非粮款</span>
             <span v-if='deptBudgetList.costType == 5'>保证金</span>
+            <span v-if='deptBudgetList.costType == 7'>利息</span>
           </el-form-item>
           <!-- <el-form-item label-width='100px' v-if='deptBudgetList.purpose == "库点费用"' label="仓储费" span="1"
             prop="contractNo" class="readonly">
@@ -63,6 +65,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
             {{ deptBudgetList.amountMoney }}
+            <span v-if='deptBudgetList.paymentIdentifi==1' style="color:blue;margin-left: 10px;">备用金支付</span>
+            <span v-if='deptBudgetList.noPaymentFlag==1' style="color:blue;margin-left: 10px;">无需付款</span>
           </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">
@@ -147,9 +151,9 @@
         </div>
         <!-- 经营性费用不分配 -->
         <div
-          v-if='deptBudgetList.expensesPurpose == 1 && deptBudgetList.costType == 3 || deptBudgetList.expensesPurpose == 3 && deptBudgetList.storageFeeFlag != 1 && deptBudgetList.autoAssign!=3 && deptBudgetList.autoAssign!=5'>
+          v-if='deptBudgetList.expensesPurpose == 1 && deptBudgetList.costType == 7 || deptBudgetList.expensesPurpose == 1 && deptBudgetList.costType == 3 || deptBudgetList.expensesPurpose == 3 && deptBudgetList.storageFeeFlag != 1 && deptBudgetList.autoAssign!=3 && deptBudgetList.autoAssign!=5'>
           <!-- <div v-if='deptBudgetList.expensesPurpose!=5'> -->
-          <div style="display:flex">
+            <div style="display:flex">
             <div style='margin:0 50px 10px;font-weight:bold'>费用分配</div>
             <div>可分配金额{{ deptBudgetList.unallocatedAmount }}元</div>
           </div>
@@ -185,7 +189,7 @@
         </div>
 
         <el-table ref="tableref"
-          v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" && mode != "暂不分配" || deptBudgetList.purpose == "库点费用" && mode != "暂不分配"&& deptBudgetList.storageFeeFlag != 1 && deptBudgetList.autoAssign!=3 && deptBudgetList.autoAssign!=5'
+          v-if='deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "利息" && mode != "暂不分配" || deptBudgetList.purpose == "合同费用" && deptBudgetList.type == "非粮款" && mode != "暂不分配" || deptBudgetList.purpose == "库点费用" && mode != "暂不分配"&& deptBudgetList.storageFeeFlag != 1 && deptBudgetList.autoAssign!=3 && deptBudgetList.autoAssign!=5'
           :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
           <el-table-column key="1" width="200" v-if='deptBudgetList.purpose == "合同费用"' prop="date" label="仓库名称"
             min-width="110">
@@ -349,8 +353,8 @@ export default {
         date: 20
       }
       ], //货值
-      auditList: "",//审核附件
-      auditUrl: ""
+      auditList: '',//审核附件
+      auditUrl: ''
     }
   },
   activated() {
@@ -376,7 +380,7 @@ export default {
     cancelShow() {
       this.rejectshow = false
       this.auditList = [],//审核附件
-        this.auditUrl = ""
+        this.auditUrl = ''
     },
     sourceChange(e) {
       if (e == '') {
@@ -516,7 +520,7 @@ export default {
       if (!this.auditUrl) {
         this.auditUrl = data.appendixPath
       } else {
-        this.auditUrl = this.auditUrl + "," + data.appendixPath
+        this.auditUrl = this.auditUrl + ',' + data.appendixPath
       }
     },
     modeselect(e) {
@@ -813,7 +817,7 @@ export default {
           woekflowhandle({
             taskId: this.deptBudgetList.taskId,
             approved: true,
-            auditMind: this.textarea + "##" + this.auditUrl,
+            auditMind: this.textarea + '##' + this.auditUrl,
             needReapply: true,
           }).toPromise()
             .then((response) => {
@@ -835,7 +839,7 @@ export default {
       woekflowhandle({
         taskId: this.deptBudgetList.taskId,
         approved: false,
-        auditMind: this.textarea + "##" + this.auditUrl,
+        auditMind: this.textarea + '##' + this.auditUrl,
         needReapply: true,
       }).toPromise()
         .then((response) => {

+ 34 - 5
src/views/profitable/cashoutedit.vue

@@ -23,6 +23,8 @@
                 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">
@@ -30,6 +32,7 @@
                 <ws-option label="粮款" value="粮款" style="color: #8890b1" />
                 <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">
@@ -52,6 +55,8 @@
           </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-checkbox v-show="this.deptBudgetList.type != '利息'" v-model="selected">备用金支付</el-checkbox>
+            <el-checkbox v-show="this.deptBudgetList.type == '利息'" v-model="lixiSelected" disabled>无需付款</el-checkbox>
           </el-form-item>
           <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
             <el-input
@@ -154,9 +159,11 @@
     },
     data() {
       return {
+        selected:false,
+        lixiSelected:true,
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         mode:'全部分配',
@@ -168,7 +175,7 @@
         warecontractList:[],
         dateRange: this.disabledDate(),
         feeDetailsDistributions:[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0}],
-        deptBudgetList:{purpose:"合同费用",type:'粮款'},
+        deptBudgetList:{purpose:'合同费用',type:'粮款'},
         makeWordData: {},
         warehouseList:[],
         contractList:[],
@@ -252,9 +259,9 @@
       timeFun(unixtimestamp) {
         var unixtimestamp = new Date(unixtimestamp);
         var year = 1900 + unixtimestamp.getYear();
-        var month = "0" + (unixtimestamp.getMonth() + 1);
-        var date = "0" + unixtimestamp.getDate();
-        return year + "-" + month.substring(month.length - 2, month.length) + "-" +     date.substring(date.length - 2,date.length)      
+        var month = '0' + (unixtimestamp.getMonth() + 1);
+        var date = '0' + unixtimestamp.getDate();
+        return year + '-' + month.substring(month.length - 2, month.length) + '-' +     date.substring(date.length - 2,date.length)      
       },
       selectware(e,item){
         this.datelist=[]
@@ -346,6 +353,18 @@
         }else if(this.deptBudgetList.purpose=='经营性费用'){
           this.deptBudgetList.expensesPurpose=5
           //  this.deptBudgetList.costNo='JYF'+this.getdate()+this.MathRand()
+        }else if(this.deptBudgetList.purpose == '备用金'){
+        this.deptBudgetList.expensesPurpose = 7
+        // this.deptBudgetList.costNo = 'BYJ' + this.getdate() + this.Num
+        this.$set(this.deptBudgetList,'wareExpenseType','')
+        this.$set(this.deptBudgetList,'type','')
+        this.$set(this.deptBudgetList,'flag','')
+      }
+        //选中状态下,备用金支付标识为1
+       if(this.selected == true){
+          this.deptBudgetList.paymentIdentifi = 1
+        }else{
+          this.deptBudgetList.paymentIdentifi = 0
         }
         if(this.deptBudgetList.expensesPurpose==1){
           if(this.deptBudgetList.type=='粮款'){
@@ -354,6 +373,9 @@
             this.deptBudgetList.costType=3
           }else if(this.deptBudgetList.type=='保证金'){
             this.deptBudgetList.costType=5
+          }else if(this.deptBudgetList.type=='利息'){
+            this.deptBudgetList.costType=7
+            this.deptBudgetList.noPaymentFlag = 1
           }
         }
         this.deptBudgetList.expensesType=2
@@ -470,6 +492,13 @@
             response.type='非粮款'
           }else if(response.costType==5){
             response.type='保证金'
+          }else if(response.costType==7){
+            response.type='利息'
+          }
+          if(response.paymentIdentifi == 1){
+            this.selected = true
+          }else{
+            this.selected = false
           }
           this.deptBudgetList=response
           this.dataList=[]

+ 60 - 28
src/views/profitable/component/routers/route.js

@@ -31,8 +31,8 @@ const profitableRouter = {
     {
       path: 'expensemanagement',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/expensemanagement'),
-      name: 'expensemanagement',
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/expensemanagementdetails'),
+      name: 'expensemanagementdetails',
       meta: {
         title: 'expensemanagement',
         shortcutEntrance: 'profitable',
@@ -45,17 +45,17 @@ const profitableRouter = {
     },
     // 费用管理详情
     {
-      path: 'expensemanagementdetails',
+      path: 'summaryOfIncomeAndExpenditure',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/expensemanagementdetails'),
-      name: 'expensemanagementdetails',
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/expensemanagement'),
+      name: 'expensemanagement',
       meta: {
-        title: 'expensemanagementdetails',
+        title: 'summaryOfIncomeAndExpenditure',
         shortcutEntrance: 'profitable',
         module: 'lirunhesuan.feiyongguanli.view',
         permissicon: [],
         keepAlive: true,
-        _title:'费用管理详情'
+        _title:'收支概览'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden:true,
@@ -252,7 +252,7 @@ const profitableRouter = {
       {
         path: 'contractprofits',
         component: () =>
-          import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractprofits'),
+          import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractprofitsdetails'),
         name: 'contractprofits',
         meta: {
           title: 'contractprofits',
@@ -264,19 +264,19 @@ const profitableRouter = {
           // module: 'procurement.sparepart.applDetail'
         }
       },  
-     // 合同利润详情
+     // 合同利润概览
      {
       path: 'contractprofitsdetails',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractprofitsdetails'),
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractprofits'),
       name: 'contractprofitsdetails',
       meta: {
-        title: 'contractprofitsdetails',
+        title: 'contractprofitsdetailsoverview',
         shortcutEntrance: 'profitable',
         module: 'lirunhesuan',
         permissicon: [],
         keepAlive: true,
-        _title:'合同利润详情'
+        _title:'合同利润概览'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden:true,
@@ -316,21 +316,21 @@ const profitableRouter = {
       hidden:true,
     },
     // 库点利润
-    {
-      path: 'warehouseprofits',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehouseprofits'),
-      name: 'warehouseprofits',
-      meta: {
-        title: 'warehouseprofits',
-        shortcutEntrance: 'profitable',
-        module: 'lirunhesuan',
-        permissicon: [],
-        keepAlive: true,
-        _title:'库点利润'
-        // module: 'procurement.sparepart.applDetail'
-      }
-    }, 
+    // {
+    //   path: 'warehouseprofits',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/profitable/warehouseprofits'),
+    //   name: 'warehouseprofits',
+    //   meta: {
+    //     title: 'warehouseprofits',
+    //     shortcutEntrance: 'profitable',
+    //     module: 'lirunhesuan',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'库点利润'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   }
+    // }, 
     // 库点利润详情
      {
       path: 'warehouseprofitsdetails',
@@ -416,8 +416,25 @@ const profitableRouter = {
         _title:'保证金'
         // module: 'procurement.sparepart.applDetail'
       },
+      
     // 油费
     },
+    // 备用金
+{
+  path: 'pettyCash',
+  component: () =>
+    import(/* webpackChunkName: "applDetail" */ '@/views/profitable/pettyCash'),
+  name: 'pettyCash',
+  meta: {
+    title: 'pettyCash',
+    shortcutEntrance: 'profitable',
+    module: 'lirunhesuan.feiyongguanli.view',
+    permissicon: [],
+    keepAlive: true,
+    _title:'备用金'
+    // module: 'procurement.sparepart.applDetail'
+  },
+},
     {
       path: 'coalCost',
       component: () =>
@@ -467,7 +484,22 @@ const profitableRouter = {
             // module: 'procurement.sparepart.applDetail'
           }
         },
-
+{
+  path: 'pettyAccount',
+  component: () =>
+    import(/* webpackChunkName: "applDetail" */ '@/views/profitable/pettyAccount'),
+  name: 'pettyAccount',
+  meta: {
+    title: 'pettyAccount',
+    shortcutEntrance: 'profitable',
+    module: 'lirunhesuan.feiyongguanli.view',
+    permissicon: [],
+    keepAlive: true,
+    _title:'备用金账户'
+    // module: 'procurement.sparepart.applDetail'
+  },
+  hidden:true,
+},
       // // 收支明细
       // {
       //   path: 'inOutDetailed',

+ 41 - 7
src/views/profitable/contractprofits.vue

@@ -1,12 +1,14 @@
 //合同利润
 <template>
   <div class="container">
-    <!-- <el-row class="row_top">
+    <el-row class="row_top1">
       <el-col :span="12">
-        <h2 class="bg-left title">盈收概览</h2>
+        <h2 class="bg-left title1">合同利润概览</h2>
       </el-col>
-      <el-col :span="12" class="bg-right"></el-col>
-    </el-row> -->
+      <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 class='row_top'>
       <el-col :span="12">
@@ -20,7 +22,7 @@
         
       </div>
       </el-col>
-      <el-col :span="12" class="bg-right"><el-button type='primary' @click='detail'>利润详情</el-button></el-col>
+      <el-col :span="12" class="bg-right"></el-col>
     </el-row>
       <div class="chart_css">
         <div class="table">
@@ -176,9 +178,10 @@
         
 
       },
-      detail(){
-        this.$router.push({name:'contractprofitsdetails'})
+      returnsales(){
+        this.$router.go(-1)
       },
+      
       datechange(e){
         this.value=e
         this.getList()
@@ -459,4 +462,35 @@
   margin:10px auto;
   color:#8890B1;
 }
+.row_top1 {
+  background: #f6f7fc;
+  border-radius: 4px;
+  margin-bottom: 10px;
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+  .bg-right {
+  padding-top: 15px;
+}
+
+  .title1 {
+    position: relative;
+  }
+
+  .title1::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+}
 </style>

+ 374 - 413
src/views/profitable/contractprofitsdetails.vue

@@ -1,15 +1,7 @@
 //合同利润详情
 <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="6">
@@ -18,11 +10,9 @@
         <el-col :span="18">
           <div style='margin-left:10px;' class="datascreen">
             <div style="display:inline-block;width:50;">
-              <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels
-                range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
-                class="data_css" @change="changeDate">
-              </el-date-picker>
-            </div>
+              <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></div>
             <el-input placeholder="可按合同编号、买方名称、卖方名称查找" class="input_css" v-model="searchKeyWord"></el-input>
             <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
                 src="../../../public/img/sousuo.png" alt="" /></el-button>
@@ -31,28 +21,26 @@
       </el-row>
       <el-row style='margin-bottom:10px;'>
         <el-col :span="18">
-          <el-button style="margin-left:10px" @click="typeChange('')"
-            :type="searchContractType == '' ? '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(5)" :type="searchContractType == 5 ? 'primary' : ''">收购合同</el-button>
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="searchContractType == ''?'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(5)" :type="searchContractType == 5?'primary':''">收购合同</el-button>
           <!-- <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">收储合同</el-button> -->
         </el-col>
-        <el-col :span="6">
-
+        <el-col style="text-align:right;" :span="6">
+          <el-button type='primary' @click='detail'>合同利润概览</el-button>
         </el-col>
       </el-row>
       <el-row style='margin-bottom:10px;'>
         <el-col :span="18">
-          <el-button style="margin-left:10px" @click="typeChange1('')"
-            :type="searchTypeCon == '' ? 'primary' : ''">全部状态</el-button>
-          <el-button @click="typeChange1(4)" :type="searchTypeCon == 4 ? 'primary' : ''">待执行</el-button>
-          <el-button @click="typeChange1(1)" :type="searchTypeCon == 1 ? 'primary' : ''">执行中</el-button>
-          <el-button @click="typeChange1(3)" :type="searchTypeCon == 3 ? 'primary' : ''">发运结束</el-button>
-          <el-button @click="typeChange1(2)" :type="searchTypeCon == 2 ? 'primary' : ''">已完成</el-button>
-          <el-button @click="typeChange1(5)" :type="searchTypeCon == 5 ? 'primary' : ''">已结算</el-button>
+          <el-button style="margin-left:10px" @click="typeChange1('')" :type="searchTypeCon == ''?'primary':''">全部状态</el-button>
+          <el-button @click="typeChange1(4)" :type="searchTypeCon == 4?'primary':''">待执行</el-button>
+          <el-button @click="typeChange1(1)" :type="searchTypeCon == 1?'primary':''">执行中</el-button>
+          <el-button @click="typeChange1(3)" :type="searchTypeCon == 3?'primary':''">发运结束</el-button>
+          <el-button @click="typeChange1(2)" :type="searchTypeCon == 2?'primary':''">已完成</el-button>
+          <el-button @click="typeChange1(5)" :type="searchTypeCon == 5?'primary':''">已结算</el-button>
         </el-col>
         <el-col :span="6">
 
@@ -60,8 +48,10 @@
       </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="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>
@@ -70,38 +60,37 @@
           </el-table-column>
           <el-table-column prop="contractNo" label="合同编号">
             <template slot-scope="scope">
-              <span>{{ scope.row.contractNo }}</span>
+              <span>{{scope.row.contractNo}}</span>
               <i @click="correlation(scope.row)" class="el-icon-connection"></i>
             </template>
           </el-table-column>
           <el-table-column prop="contractType" label="合同类型">
             <template slot-scope="scope">
-              <span v-if='scope.row.agreementType == "销售合同"'>销售</span>
-              <span v-if='scope.row.agreementType == "采购合同"'>采购</span>
-              <span v-if='scope.row.agreementType == "代收合同"'>代收</span>
-              <span v-if='scope.row.agreementType == "代储合同"'>代储</span>
-              <span v-if='scope.row.agreementType == "收购合同"'>收购</span>
+              <span v-if='scope.row.agreementType=="销售合同"'>销售</span>
+              <span v-if='scope.row.agreementType=="采购合同"'>采购</span>
+              <span v-if='scope.row.agreementType=="代收合同"'>代收</span>
+              <span v-if='scope.row.agreementType=="代储合同"'>代储</span>
+              <span v-if='scope.row.agreementType=="收购合同"'>收购</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 width="120" prop="surplus" label="剩余(吨)">
-            <template slot-scope="scope">
-              <span v-if='scope.row.agreementType == "销售合同"'>-</span>
-              <span v-else>{{ scope.row.surplus }}</span>
+             <template slot-scope="scope">
+              <span v-if='scope.row.agreementType=="销售合同"'>-</span>
+              <span v-else>{{scope.row.surplus}}</span>
             </template>
           </el-table-column>
-          <el-table-column width="150" prop="settlementPrice" label="结算单价(元/吨)">
+           <el-table-column width="150" prop="settlementPrice" label="结算单价(元/吨)">
           </el-table-column>
           <el-table-column width="120" prop="profit" label="利润(万元)">
           </el-table-column>
           <el-table-column width="80" prop="status" label="状态"></el-table-column>
           <el-table-column width="100" prop="signingDate" label="签订日期"></el-table-column>
-          <el-table-column prop="address" label="操作" width="350">
+          <el-table-column prop="address" label="操作" width="300">
             <template slot-scope="scope">
-              <el-button v-if="scope.row.status == '已结算'" @click="finalstatement(scope.row)"
-                type="primary">结算单</el-button>
-              <el-button v-if="scope.row.status == '已完成'" @click="closeaccount(scope.row)" type="primary">结算</el-button>
+              <el-button v-if="scope.row.status=='已结算'" @click="finalstatement(scope.row)" type="primary">结算单</el-button>
+              <el-button v-if="scope.row.status=='已完成'" @click="closeaccount(scope.row)" type="primary">结算</el-button>
               <el-button @click="inventory(scope.row)" type="primary">库存</el-button>
               <el-button @click="cost(scope.row)" type="primary">费用</el-button>
               <el-button @click="exportText(scope.row)" type="primary" v-if="scope.row.status == '已结算'">导出</el-button>
@@ -110,41 +99,46 @@
         </el-table>
       </div>
       <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        style="text-align:center" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
-        :total="deptBudgetTotal">
+        style="text-align:center" :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
       </el-pagination>
     </div>
-    <el-dialog title="提示" :visible.sync="correlationshow" width="30%" :before-close="handleClose">
-      <div v-if="contractList.length > 0">
-        <div style="display:flex;justify-content: space-between;" v-for="(item, index) in contractList" :key="index">
-          <div>{{ item.contractNo }}</div>
-          <div><span v-if="item.status != '已完成' && item.status != '已结算' && item.status != '发运结束'">未完成</span><span
-              v-else>已完成</span>
-          </div>
-        </div>
-      </div>
-      <div v-else>暂无关联合同</div>
-    </el-dialog>
-    <el-dialog title="合同结算单" :visible.sync="show" width="47%" :before-close="handleClose1">
-      <div>
-        <table class="table">
+    <el-dialog
+  title="提示"
+  :visible.sync="correlationshow"
+  width="30%"
+  :before-close="handleClose">
+  <div v-if="contractList.length>0">
+    <div style="display:flex;justify-content: space-between;" v-for="item in contractList"><div>{{item.contractNo}}</div>
+  <div><span v-if="item.status!='已完成'&&item.status!='已结算'&&item.status!='发运结束'">未完成</span><span v-else>已完成</span></div>
+     </div>
+  </div>
+  <div v-else>暂无关联合同</div>
+</el-dialog>
+<el-dialog
+  title="合同结算单"
+  :visible.sync="show"
+  width="47%"
+  :before-close="handleClose1">
+  <div>
+    <table class="table">
           <tr class="row">
             <td class="col col-bgc">合同编号</td>
-            <td class="col">{{ tableData.contractNo }}</td>
+            <td class="col">{{tableData.contractNo}}</td>
             <td class="col col-bgc">合同类型</td>
-            <td class="col">{{ tableData.agreementType }}</td>
+            <td  class="col">{{tableData.agreementType}}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">买方</td>
-            <td class="col">{{ tableData.buyer }}</td>
+            <td class="col">{{tableData.buyer}}</td>
             <td class="col col-bgc">卖方</td>
-            <td class="col">{{ tableData.seller }}</td>
+            <td class="col">{{tableData.seller}}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">结算单价(元/吨)</td>
-            <td class="col">{{ tableData.settlementPrice }}</td>
+            <td class="col">{{tableData.settlementPrice}}</td>
             <td class="col col-bgc">合计利润(元)</td>
-            <td class="col">{{ tableData.profit }}</td>
+            <td class="col">{{tableData.profit}}</td>
           </tr>
           <tr class="row">
             <td class="col col-bgc">关联合同</td>
@@ -152,16 +146,16 @@
             <td class="col col-bgc">重量(吨)</td>
             <td class="col col-bgc">利润(元)</td>
           </tr>
-          <tr v-for="(item, index) in tableData.contractList" :key="index" class="row">
-            <td class="col">{{ item.contractNo }}</td>
-            <td class="col">{{ item.settlementPrice }}</td>
-            <td class="col">{{ item.weight }}</td>
-            <td class="col">{{ item.profit }}</td>
+          <tr v-for="item in tableData.contractList" class="row">
+            <td class="col">{{item.contractNo}}</td>
+            <td class="col">{{item.settlementPrice}}</td>
+            <td class="col">{{item.weight}}</td>
+            <td class="col">{{item.profit}}</td>
           </tr>
         </table>
-      </div>
-    </el-dialog>
-    <el-dialog title="导出" :visible.sync="exportShow" width="500px" :before-close="exportClose" :show-close="true">
+    </div>
+</el-dialog>
+<el-dialog title="导出" :visible.sync="exportShow" width="500px" :before-close="exportClose" :show-close="true">
       <div class="check">
         <el-checkbox-group v-model="checkList" @change="checkChange">
           <el-checkbox label="合同附件" :disabled="contract"></el-checkbox>
@@ -178,53 +172,55 @@
   </div>
 </template>
 <script>
-import {
-  getcontractdetails,
-  getrelationcontract,
-  editcontract,
-  judgesettlement,
-  exportText,
+  import {
+    getcontractdetails,
+    getrelationcontract,
+    editcontract,
+    judgesettlement,
+    exportText,
   getAnnex
-} from '@/model/profitable/index'
-import {
-  downloadFile
-} from '@/utils/batchDown'
-export default {
-  components: {},
-  data() {
-    return {
-      value: '',
-      tableData: [],
-      show: false,
-      correlationshow: false,
-      deptBudgetTotal: 0,
-      currentPage: 1,
-      pageSize: 10,
-      agreementType: '',
-      deptCircularPage: {},
-      searchType: '',
-      searchKeyWord: '',
-      startDate: '',
-      searchContractType: '',
-      searchTypeCon: '',
-      endDate: '',
-      outtotal: 0,
-      intotal: 0,
-      contractList: [],
-      tableData: {},
-      datalist: {},
-      compId: localStorage.getItem('ws-pf_compId'),
-      exportShow: false,//导出
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: '',
+        tableData: [],
+        show:false,
+        correlationshow:false,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        agreementType:'',
+        deptCircularPage: {},
+        searchType:'',
+        searchKeyWord:'',
+        startDate:'',
+        searchContractType:'',
+        searchTypeCon:'',
+        endDate:'',
+        outtotal:0,
+        intotal:0,
+        contractList:[],
+        tableData:{},
+        datalist:{},
+        compId:localStorage.getItem('ws-pf_compId'),
+        exportShow: false,//导出
       checkList: [],
       exportObj: {},
       contract: false,
-    }
-  },
-  activated() {
-    this.getPassYearFormatDate()
-  },
-  methods: {
-    async exportSubmit() {
+      }
+    },
+    activated() {
+      if(this.$route.query.contractNo){
+        this.searchKeyWord=this.$route.query.contractNo
+      }else{
+        this.searchKeyWord=''
+      }
+      this.getPassYearFormatDate()
+    },
+    methods: {
+      async exportSubmit() {
       const {
         data
       } = await exportText(
@@ -284,329 +280,294 @@ export default {
       this.checkList = []
       this.exportShow = false
     },
-    handleClose() {
-      this.correlationshow = false
-    },
-    handleClose1() {
-      this.show = false
-    },
-    correlation(row) {
-      getrelationcontract({
-        agreementType: row.agreementType, contractNo: row.contractNo, compId: this.compId
-      })
-        .toPromise()
-        .then(response => {
-          this.contractList = response
-          this.correlationshow = true
-        })
-    },
-    typeChange(num) {
-      this.searchContractType = num
-      this.getList()
-    },
-    typeChange1(num) {
-      this.searchTypeCon = num
-      this.getList()
-    },
-    async closeaccount(row) {
-
-      var data = await getrelationcontract({
-        agreementType: row.agreementType, contractNo: row.contractNo, compId: this.compId
-      })
-        .toPromise()
-      var arr = [row].concat(data)
-      this.datalist.contractManagementInfoList = arr
-      judgesettlement(this.datalist).toPromise().then(response => {
-        var weightprice = 0
-        for (let i = 0; i < data.length; i++) {
-          // weightprice+=(data[i].weight*data[i].settlementPrice)
-          if (row.agreementType == '收购合同' || row.agreementType == '采购合同') {
-            weightprice += (data[i].weight * (data[i].settlementPrice - row.settlementPrice))
-          } else if (row.agreementType == '销售合同') {
-            weightprice += (data[i].weight * (row.settlementPrice - data[i].settlementPrice))
-          }
-        }
-        row.profit = weightprice
+      handleClose(){
+        this.correlationshow=false
+      },
+      handleClose1(){
+        this.show=false
+      },
+      correlation(row){
+        getrelationcontract({
+          agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
+          .toPromise()
+          .then(response => {
+            this.contractList=response
+            this.correlationshow=true
+          })
+        
+      },
+      typeChange(num){
+        this.searchContractType= num
+        this.getList()
+      },
+      typeChange1(num){
+        this.searchTypeCon= num
+        this.getList()
+      },
+      async closeaccount(row){
+      
+        var data=await getrelationcontract({
+          agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
+            .toPromise()
+            var arr=[row].concat(data)
+            this.datalist.contractManagementInfoList=arr
+            judgesettlement(this.datalist).toPromise().then(response => {
+                         var weightprice=0
+                  for (let i = 0; i < data.length; i++) {
+                      // weightprice+=(data[i].weight*data[i].settlementPrice)
+                      if(row.agreementType=='收购合同'||row.agreementType=='采购合同'){
+                      weightprice+=(data[i].weight*(data[i].settlementPrice-row.settlementPrice))
+                    }else if(row.agreementType=='销售合同'){
+                      weightprice+=(data[i].weight*(row.settlementPrice-data[i].settlementPrice))
+                    }
+                  }
+                    row.profit=weightprice
         this.$confirm('结算后当前合同和相关合同不可再进行费用相关操作', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        })
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
           .then(() => {
-            editcontract({ flag: 2, id: row.id, profit: row.profit }).toPromise()
-              .then(response => {
-                this.$message({
-                  message: '结算成功!',
-                  type: 'success',
-                })
-                this.getList()
-              }).catch(() => {
-                this.$message({
-                  message: '结算失败!',
-                  type: 'warning',
-                })
-              })
+            editcontract({flag:2,id:row.id,profit:row.profit}).toPromise()
+          .then(response => {
+            this.$message({
+                message: '结算成功!',
+                type: 'success',
+          })
+          this.getList()
+          }).catch(()=>{
+            this.$message({
+                message: '结算失败!',
+                type: 'warning',
+          })
+          })
           })
-      })
-    },
-    finalstatement(row) {
-      this.tableData.contractNo = row.contractNo
-      this.tableData.agreementType = row.agreementType
-      this.tableData.buyer = row.buyer
-      this.tableData.seller = row.seller
-      this.tableData.settlementPrice = row.settlementPrice
-      this.tableData.profit = (row.profit * 10000).toFixed(2)
-      getrelationcontract({
-        agreementType: row.agreementType, contractNo: row.contractNo, compId: this.compId
-      })
-        .toPromise()
-        .then(response => {
-          for (let q = 0; q < response.length; q++) {
-            if (row.agreementType == '收购合同' || row.agreementType == '采购合同') {
-              response[q].profit = (response[q].weight * (response[q].settlementPrice - row.settlementPrice)).toFixed(2)
-            } else if (row.agreementType == '销售合同') {
-              response[q].profit = (response[q].weight * (row.settlementPrice - response[q].settlementPrice)).toFixed(2)
-            }
-
-          }
-          this.tableData.contractList = response
-          this.show = true
         })
-    },
-    inventory(row) {
-      this.$router.push({ name: 'contractinventory', query: { contractNo: row.contractNo, contractType: row.contractType, buyer: row.buyer, seller: row.seller } })
-    },
-    returnsales() {
-      this.$router.go(-1)
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    cost(row) {
-      this.$router.push({ name: 'contractcost', query: { contractNo: row.contractNo, contractType: row.contractType, buyer: row.buyer, seller: row.seller } })
-    },
-    getPassYearFormatDate() {
-      var _date = new Date()
-      var nowDate = 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]
-      this.getList()
-      // })
-    },
-    async getList() {
-      var response = await 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()
-
-      if (response.records.length) {
-        for (let i = 0; i < response.records.length; i++) {
-          if (response.records[i].status == '已结算') {
-            var data = await getrelationcontract({
-              agreementType: response.records[i].agreementType, contractNo: response.records[i].contractNo, compId: this.compId
-            })
-              .toPromise()
-            var weightprice = 0
-            var weightprice1 = 0
-            console.log(data)
-            for (let q = 0; q < data.length; q++) {
-              if (response.records[i].agreementType == '收购合同' || response.records[i].agreementType == '采购合同') {
-                weightprice += (data[q].weight * (data[q].settlementPrice - response.records[i].settlementPrice))
-              } else if (response.records[i].agreementType == '销售合同') {
-                weightprice += (data[q].weight * (response.records[i].settlementPrice - data[q].settlementPrice))
+      },
+      finalstatement(row){
+        console.log(row)
+        this.tableData.contractNo=row.contractNo
+        this.tableData.agreementType=row.agreementType
+        this.tableData.buyer=row.buyer
+        this.tableData.seller=row.seller
+        this.tableData.settlementPrice=row.settlementPrice
+        this.tableData.profit=(row.profit*10000).toFixed(2)
+        getrelationcontract({
+          agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
+          .toPromise()
+          .then(response => {
+            for (let q = 0; q < response.length; q++) {
+              if(row.agreementType=='收购合同'||row.agreementType=='采购合同'){
+                response[q].profit=(response[q].weight*(response[q].settlementPrice-row.settlementPrice)).toFixed(2)
+              }else if(row.agreementType=='销售合同'){
+                response[q].profit=(response[q].weight*(row.settlementPrice-response[q].settlementPrice)).toFixed(2)
               }
-              data[q].profit = data[q].weight * data[q].settlementPrice
-              console.log(data[q], 222222)
+              
             }
-            response.records[i].profit = weightprice
-
-          }
-          response.records[i].profit = Number(Number(response.records[i].profit / 10000).toFixed(3))
-          response.records[i].surplus = Number(Number(response.records[i].surplus).toFixed(3))
+            this.tableData.contractList=response
+            this.show=true
+          })
+      },
+      inventory(row){
+        this.$router.push({name:'contractinventory',query:{contractNo:row.contractNo,contractType:row.contractType,buyer:row.buyer,seller:row.seller}})
+      },
+      
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      cost(row){
+        this.$router.push({name:'contractcost',query:{contractNo:row.contractNo,contractType:row.contractType,buyer:row.buyer,seller:row.seller}})
+      },
+      detail(){
+        this.$router.push({name:'contractprofitsdetails'})
+      },
+      getPassYearFormatDate() {
+        var _date = new Date()
+        var nowDate = 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
         }
-      }
-      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
-    },
+        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]
+        this.getList()
+        // })
+      },
+      async getList() {
+         var response=await 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()
+          
+          if(response.records.length){
+              for (let i = 0; i < response.records.length; i++) {
+                if(response.records[i].status=='已结算'){
+                  var data=await getrelationcontract({
+                  agreementType:response.records[i].agreementType,contractNo:response.records[i].contractNo,compId:this.compId})
+                  .toPromise()
+                  var weightprice=0
+                  var weightprice1=0
+                  console.log(data)
+                  for (let q = 0; q < data.length; q++) {
+                    if(response.records[i].agreementType=='收购合同'||response.records[i].agreementType=='采购合同'){
+                      weightprice+=(data[q].weight*(data[q].settlementPrice-response.records[i].settlementPrice))
+                    }else if(response.records[i].agreementType=='销售合同'){
+                      weightprice+=(data[q].weight*(response.records[i].settlementPrice-data[q].settlementPrice))
+                    }
+                    data[q].profit=data[q].weight*data[q].settlementPrice
+                    console.log(data[q],222222)
+                  }
+                    response.records[i].profit=weightprice
+                 
+                }
+                response.records[i].profit=Number(Number(response.records[i].profit/10000).toFixed(3))
+                response.records[i].surplus=Number(Number(response.records[i].surplus).toFixed(3))
+              }
+            }
+            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()
+      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()
+      },
     },
-    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>
-table,
-table tr th,
-table tr td {
-  border: 2px solid #333333;
-  padding: 5px 0;
-  height: 55px;
-}
-
-.content {
-  width: 1000px;
-  padding: 70px 20px 20px 20px;
-  font-size: 22px;
-  position: absolute;
-  top: 0;
-  bottom: 0;
-  left: 0;
-  right: 0;
-}
-
-table {
-  width: 100%;
-  text-align: center;
-  border-collapse: collapse;
-  border: 3px solid #333333;
-}
+ table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 55px;
+      }
 
-.col-bgc {
-  background: #f6f7fb;
-}
+      .content {
+        width: 1000px;
+        padding: 70px 20px 20px 20px;
+        font-size: 22px;
+        position: absolute;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
 
-.container {
-  background: #E8ECF6;
-}
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
 
-.center {
-  margin: 0 auto;
-  background: #ffffff;
-  height: calc(100vh - 215px);
-  border-radius: 4px;
-  padding: 20px 0;
+      .col-bgc {
+        background: #f6f7fb;
+      }
 
-  /deep/.el-table td,
-  /deep/.el-table th {
-    text-align: center;
+  .container {
+    background: #E8ECF6;
   }
-}
 
-.row_top {
-  background: #F6F7FC;
-  border-radius: 4px;
-  margin-bottom: 10px;
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
 
-  .bg-left {
-    padding-left: 30px;
-  }
-
-  .bg-right {
-    padding-right: 10px;
-    text-align: right;
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
   }
 
-  .title {
-    position: relative;
-  }
+  .datascreen {
+    display: flex;
 
-  .title::before {
-    content: '';
-    display: inline-block;
-    width: 5px;
-    height: 30px;
-    background: #5473e8;
-    position: absolute;
-    left: 0;
-  }
-}
+    .data_css {
+      width: 40%;
+    }
 
-.datascreen {
-  display: flex;
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
 
-  .data_css {
-    width: 40%;
+    .find {
+      margin-right: 10px;
+    }
   }
 
-  .input_css {
-    width: 50%;
-    margin: 0 10px;
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
   }
-
-  .find {
-    margin-right: 10px;
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
   }
-}
-
-.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;
   }
-}
-
-.bg-right {
-  padding-top: 15px;
-}
-
-.el-icon-connection {
-  color: #409eff;
-}
-
-.check {
+  .el-icon-connection{
+    color:#409eff;
+  }
+  .check {
   text-align: center;
 }
 </style>

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

@@ -19,11 +19,13 @@
               <span v-if='deptBudgetList.expensesPurpose==2'>运费</span>
               <span v-if='deptBudgetList.expensesPurpose==3'>库点费用</span>
               <span v-if='deptBudgetList.expensesPurpose==5'>经营性费用</span>
+              <span v-if='deptBudgetList.expensesPurpose==7'>备用金</span>
           </el-form-item>
           <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose==1' label="类型" span="1" prop="costType">
               <span v-if='deptBudgetList.costType==1'>粮款</span>
               <span v-if='deptBudgetList.costType==3'>非粮款</span>
               <span v-if='deptBudgetList.costType==5'>保证金</span>
+              <span v-if='deptBudgetList.costType==7'>利息</span>
           </el-form-item>
           <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
             <span v-if='(deptBudgetList.storageFeeFlag==1)'>是</span>
@@ -46,6 +48,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
             {{deptBudgetList.amountMoney}}
+            <el-checkbox v-show="this.deptBudgetList.type != '利息'" v-model="selected">备用金支付</el-checkbox>
+            <el-checkbox v-show="this.deptBudgetList.type == '利息'" v-model="lixiSelected" disabled>无需付款</el-checkbox>
           </el-form-item>
           <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
             <el-input
@@ -244,6 +248,8 @@
     },
     data() {
       return {
+        selected:false,
+        lixiSelected:true,
         value: [],
         customerList: [],
         goodsSource: '',
@@ -772,6 +778,8 @@
             response.type='非粮款'
           }else if(response.costType==5){
             response.type='保证金'
+          }else if(response.costType==7){
+            response.type='利息'
           }
           this.deptBudgetList=response 
           // this.feeDetailsDistributions = this.deptBudgetList.expenseAllocationInfoList

+ 6 - 1
src/views/profitable/expenseallotaduit.vue

@@ -22,6 +22,8 @@
                 style="color: #8890b1" />
                 <ws-option label="经营性费用" value="5"
                 style="color: #8890b1" />
+                <ws-option label="备用金" value="7"
+                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">
@@ -29,6 +31,7 @@
                 <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-option label="利息" value="7" 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">
@@ -52,6 +55,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
             {{deptBudgetList.amountMoney}}
+            <span v-if='deptBudgetList.paymentIdentifi==1' style="color:blue;margin-left: 10px;">备用金支付</span>
+            <span v-if='deptBudgetList.noPaymentFlag==1' style="color:blue;margin-left: 10px;">无需付款</span>
           </el-form-item>
           <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
             <el-input
@@ -139,7 +144,7 @@
             </el-table>
           </div>
         </div>
-        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3||deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' style='width:90%;margin:10px auto;'>
+        <div v-if='(deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==7)||(deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3)||deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' style='width:90%;margin:10px auto;'>
           <div style='margin-bottom:20px;display:flex;justify-content: space-between;'>
             <div>费用分配</div><span>合计分配:{{amount}}元</span>  </div>
           <!-- <div> -->

+ 46 - 9
src/views/profitable/expensemanagement.vue

@@ -1,12 +1,16 @@
-//费用管理
+//收支概览
 <template>
   <div class="container">
-    <!-- <el-row class="row_top">
+    <el-row class="row_top1">
       <el-col :span="12">
-        <h2 class="bg-left title">收概览</h2>
+        <h2 class="bg-left title1">收概览</h2>
       </el-col>
-      <el-col :span="12" class="bg-right"></el-col>
-    </el-row> -->
+      <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 class='row_top'>
       <el-col :span="12">
@@ -22,7 +26,7 @@
         
       </div>
       </el-col>
-      <el-col :span="12" class="bg-right"><el-button type='primary' @click='detail'>费用详情</el-button></el-col>
+      <el-col :span="12" class="bg-right"></el-col>
     </el-row>
       <div class="chart_css">
         <div class="table">
@@ -150,6 +154,9 @@
       }
     },
     methods: {
+      returnsales() {
+        this.$router.go(-1)
+      },
       yearChange(){
         this.getList()
       },
@@ -207,9 +214,7 @@
           this.year++
         }
       },
-      detail(){
-        this.$router.push({name:'expensemanagementdetails'})
-      },
+      
       getPassYearFormatDate() {
         var nowDate = new Date()
         var _date = new Date()
@@ -499,4 +504,36 @@
   top:50%;
   transform: translateY(-50%);
 }
+.row_top1 {
+  background: #f6f7fc;
+  border-radius: 4px;
+  margin-bottom: 10px;
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+  .bg-right {
+  padding-top: 15px;
+}
+
+  .title1 {
+    position: relative;
+  }
+
+  .title1::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+}
+
 </style>

+ 30 - 51
src/views/profitable/expensemanagementdetails.vue

@@ -1,16 +1,7 @@
-//费用详情
+//费用管理
 <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="6">
@@ -87,7 +78,7 @@
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px">
-        <el-col :span="18">
+        <el-col :span="16">
           <el-button style="margin-left: 10px" @click="typeChange('')" :type="searchType == '' ? 'primary' : ''">全部
           </el-button>
           <el-button @click="typeChange(1)" :type="searchType == 1 ? 'primary' : ''">收入</el-button>
@@ -97,10 +88,12 @@
           <el-button @click="costChange(3)" :type="expensesPurpose == 3 ? 'primary' : ''">库点费用</el-button>
           <el-button @click="costChange(1)" :type="expensesPurpose == 1 ? 'primary' : ''">合同费用</el-button>
           <el-button @click="costChange(5)" :type="expensesPurpose == 5 ? 'primary' : ''">经营性费用</el-button>
+          <el-button @click="petty()" :type="expensesPurpose == 7 ? 'primary' : ''">备用金</el-button>
           <el-button @click="costChange(2)" :type="expensesPurpose == 2 ? 'primary' : ''">运费</el-button>
           <el-button @click="exportFile" type="primary">导出</el-button>
         </el-col>
-        <el-col style="text-align: right;display: flex;" :span="6">
+        <el-col style="text-align: right;" :span="8">
+          <el-button @click="detail()">收支概览</el-button>
           <el-button @click="coalCost()">燃料费</el-button>
           <el-badge v-if="approveStatus" is-dot class="item">
             <el-button style="margin-left: 10px" @click="oilcost()">油费</el-button>
@@ -136,6 +129,7 @@
                 <span v-if="scope.row.costType == 1">-粮款</span>
                 <span v-if="scope.row.costType == 3">-非粮款</span>
                 <span v-if="scope.row.costType == 5">-保证金</span>
+                <span v-if="scope.row.costType == 7">-利息</span>
               </div>
               <div v-else-if="scope.row.expensesPurpose == 3">
                 库点费用
@@ -184,8 +178,8 @@
               </span>
             </template>
           </el-table-column>
-          <el-table-column prop="creater" label="发起人"></el-table-column>
-          <el-table-column prop="createDate" label="发起日期" width="90"></el-table-column>
+          <el-table-column prop="creater" label="发起人" width="100"></el-table-column>
+          <el-table-column prop="createDate" label="发起日期" width="100"></el-table-column>
           <el-table-column prop="status" label="费用状态" width="100">
             <template slot-scope="scope">
               <span v-if="scope.row.approveStatus">{{
@@ -219,7 +213,7 @@
               " @click="accomplish(scope.row)" type="primary">完成</el-button>
               <el-button v-if="scope.row.approveStatus && scope.row.approveStatus != '发起人撤回'"
                 v-show="scope.row.showFlag" @click="withdraw(scope.row)" type="primary">撤回</el-button>
-              <el-button v-if="scope.row.status == '已驳回' || scope.row.approveStatus == '发起人撤回'" @click="edit(scope.row)"
+              <el-button v-if="(scope.row.status == '已驳回' && scope.row.expensesType != 1) || (scope.row.approveStatus == '发起人撤回' && scope.row.expensesType != 1)" @click="edit(scope.row)"
                 type="primary">编辑</el-button>
               <el-button v-if="
                 (!scope.row.distributionStatus &&
@@ -368,6 +362,7 @@ export default {
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
+      // pettyShowFlag:'',
       showFlag: false,
       size: 100,
       expensesPurpose: '',
@@ -438,10 +433,18 @@ export default {
       this.toExamineType = "2"
     }
     this.getPassYearFormatDate()
+    if(this.$route.query.contractNo){
+        this.flowTo=this.$route.query.contractNo
+      }else{
+        this.flowTo=''
+      }
     this.getList()
     this.xiala()
   },
   methods: {
+    detail(){
+      this.$router.push({name:'expensemanagement'})
+    },
     async exportFile() {
       let _data = {
         // expenseInfoExportList:this.choiceObj,
@@ -494,6 +497,9 @@ export default {
     unallocatedAmountChange(e){
       this.getList()
     },
+    petty(){
+      this.$router.push({ name: 'pettyCash' })
+    },
     xiala() {
       //仓库筛选
     getwarehouse({
@@ -623,9 +629,7 @@ export default {
         })
         .catch((response) => { })
     },
-    returnsales() {
-      this.$router.go(-1)
-    },
+
     handleClose() {
       this.fujianshow = false
     },
@@ -781,10 +785,10 @@ export default {
           'expensebh',
           JSON.stringify(row.expenseAllocationInfoListBH)
         )
-        this.$router.push({
-          name: 'expensemanagentedit',
-          query: { id: row.id },
-        })
+          this.$router.push({
+            name: 'expensemanagentedit',
+            query: { id: row.id },
+          })
       } else {
         this.$message({
           message: '暂无此权限!',
@@ -954,7 +958,6 @@ export default {
             }
           }
           this.tableData = response.records
-
           if (this.tableData.length > 0) {
             this.intotal =
               Number(this.tableData[0].inContractMoney) +
@@ -1013,34 +1016,7 @@ export default {
   }
 }
 
-.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;
@@ -1081,4 +1057,7 @@ export default {
 .options_css {
   margin: 0 5px;
 }
+/deep/.el-badge{
+  display:inline-block;
+}
 </style>

+ 30 - 8
src/views/profitable/expensemanagentedit.vue

@@ -25,6 +25,8 @@
                 style="color: #8890b1" />
                 <ws-option label="经营性费用" value="5"
                 style="color: #8890b1" />
+                <ws-option label="备用金" value="7"
+                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">
@@ -32,6 +34,7 @@
                 <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-option label="利息" value="7" 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">
@@ -55,6 +58,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
             {{deptBudgetList.amountMoney}}
+            <el-checkbox v-show="deptBudgetList.costType != 7" v-model="selected">备用金支付</el-checkbox>
+            <el-checkbox v-show="deptBudgetList.costType == 7" v-model="lixiSelected" disabled>无需付款</el-checkbox>
           </el-form-item>
           <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
             <el-input
@@ -138,7 +143,7 @@
               </el-table-column>
               <el-table-column width="150" class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
               <el-table-column width="150" class="table_td" label="司机/车队" prop="name">
-                  <template
+                <template
                     slot-scope="scope">
                     {{ scope.row.name }}
                     <span v-if="scope.row.fleetFlag==1">(队)</span>
@@ -147,11 +152,11 @@
             </el-table>
           </div>
         </div>
-        <div style="display:flex" v-if='(deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.storageFeeFlag==0||deptBudgetList.expensesPurpose==2&&deptBudgetList.storageFeeFlag==0)' class='expensetitle'>费用分配
+        <div style="display:flex" v-if='(deptBudgetList.purpose=="合同费用"&&deptBudgetList.costType==7||deptBudgetList.purpose=="合同费用"&&deptBudgetList.costType==3||deptBudgetList.purpose=="库点费用"&&deptBudgetList.storageFeeFlag==0||deptBudgetList.expensesPurpose==2&&deptBudgetList.storageFeeFlag==0)' class='expensetitle'>费用分配
           <div style="margin-left:15px">可分配金额{{deptBudgetList.unallocatedAmount}}元</div></div>
-        <div v-if='(deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.storageFeeFlag==0||deptBudgetList.expensesPurpose==2&&deptBudgetList.storageFeeFlag==0)' style='margin:0  auto 10px;width:90%;display: flex;'>
+        <div v-if='(deptBudgetList.purpose=="合同费用"&&deptBudgetList.costType==7||deptBudgetList.purpose=="合同费用"&&deptBudgetList.costType==3||deptBudgetList.purpose=="库点费用"&&deptBudgetList.storageFeeFlag==0||deptBudgetList.expensesPurpose==2&&deptBudgetList.storageFeeFlag==0)' style='margin:0  auto 10px;width:90%;display: flex;'>
           <ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
-          <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
+            <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
             
         </ws-select>
@@ -190,7 +195,7 @@
         </ws-select>
         <span style="margin-top:5px;margin-left: 10px" v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
-        <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
+        <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="利息"&&mode!="暂不分配"||deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
           <el-table-column key="1" width="150" v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
@@ -284,6 +289,8 @@
     },
     data() {
       return {
+        selected:false,
+        lixiSelected:true,
         customerList: [],
         goodsSource: '',
         value2: '',
@@ -670,6 +677,17 @@ weight: 4000}]],
           this.deptBudgetList.expensesPurpose=3
         }else if(this.deptBudgetList.purpose=='经营性费用'){
           this.deptBudgetList.expensesPurpose=5
+        }else if(this.deptBudgetList.purpose == '备用金'){
+        this.deptBudgetList.expensesPurpose = 7
+        this.$set(this.deptBudgetList,'wareExpenseType','')
+        this.$set(this.deptBudgetList,'type','')
+        this.$set(this.deptBudgetList,'flag','')
+      }
+        //选中状态下,备用金支付标识为1
+       if(this.selected == true){
+          this.deptBudgetList.paymentIdentifi = 1
+        }else{
+          this.deptBudgetList.paymentIdentifi = 0
         }
         if(this.deptBudgetList.expensesPurpose==1){
           if(this.deptBudgetList.type=='粮款'){
@@ -681,6 +699,10 @@ weight: 4000}]],
           }else if(this.deptBudgetList.type=='保证金'){
             this.deptBudgetList.costType=5
             this.deptBudgetList.expenseAllocationInfoList=[]
+          }else if(this.deptBudgetList.type=='利息'){
+            this.deptBudgetList.costType=7
+            this.deptBudgetList.noPaymentFlag = 1
+            this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
           }
         }
         if(this.deptBudgetList.expensesPurpose==2 || this.deptBudgetList.expensesPurpose==3&&this.storageFeeFlag==0){
@@ -940,9 +962,10 @@ weight: 4000}]],
             response.type='非粮款'
           }else if(response.costType==5){
             response.type='保证金'
+          }else if(response.costType==7){
+            response.type='利息'
           }
           this.deptBudgetList=response
-          // this.feeDetailsDistributions = this.deptBudgetList.expenseAllocationInfoList
           this.dataList=[]
           if(response.addressUrl){
             var arr=[]
@@ -953,11 +976,10 @@ weight: 4000}]],
             }
             this.paymentScreenshot=srcs
           }
-          if(localStorage.getItem('expensebh')){
+          if(!localStorage.getItem('expensebh')){
             if(this.deptBudgetList.expensesPurpose==3||this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
               this.getgoodsourcelist()
             }
-          //   console.log(this.feeDetailsDistributions)
           }
         })
       },

+ 5 - 1
src/views/profitable/expensemanagentlook.vue

@@ -21,11 +21,13 @@
               <span v-if='deptBudgetList.expensesPurpose==2'>运费</span>
               <span v-if='deptBudgetList.expensesPurpose==3'>库点费用</span>
               <span v-if='deptBudgetList.expensesPurpose==5'>经营性费用</span>
+              <span v-if='deptBudgetList.expensesPurpose==7'>备用金</span>
           </el-form-item>
           <el-form-item label-width='100px' v-if='deptBudgetList.expensesPurpose==1' label="类型" span="1" prop="costType">
               <span v-if='deptBudgetList.costType==1'>粮款</span>
               <span v-if='deptBudgetList.costType==3'>非粮款</span>
               <span v-if='deptBudgetList.costType==5'>保证金</span>
+              <span v-if='deptBudgetList.costType==7'>利息</span>
           </el-form-item>
           <!-- <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
             <span v-if='(deptBudgetList.storageFeeFlag==1)'>是</span>
@@ -59,6 +61,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
             {{deptBudgetList.amountMoney}}
+            <span v-if='deptBudgetList.paymentIdentifi==1' style="color:blue;margin-left: 10px;">备用金支付</span>
+            <span v-if='deptBudgetList.noPaymentFlag==1' style="color:blue;margin-left: 10px;">无需付款</span>
           </el-form-item>
           <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
             <el-input
@@ -155,7 +159,7 @@
         </div>
         
         
-        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3||deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' style='width:90%;margin:10px auto;'>
+        <div v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==7 ||  deptBudgetList.expensesPurpose==1&&deptBudgetList.costType==3||deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' style='width:90%;margin:10px auto;'>
           <div style='margin-bottom:20px;'>费用分配</div>
           <!-- <div> -->
           <el-table :data="deptBudgetList.expenseAllocationInfoList">

+ 73 - 29
src/views/profitable/payment.vue

@@ -10,7 +10,6 @@
         </el-button></el-col>
     </el-row>
     <div class="center">
-     
       <div  style='margin:0 auto 10px;width:90%;display:flex;'>
         <el-form class='left-form' label-position="left">
           <div style='margin:0 auto 10px;'>基本信息</div>
@@ -24,6 +23,8 @@
                 style="color: #8890b1" />
                 <ws-option label="经营性费用" value="5"
                 style="color: #8890b1" />
+                <ws-option label="备用金" value="7"
+                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">
@@ -31,6 +32,7 @@
                 <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-option label="利息" value="7" 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">
@@ -48,6 +50,13 @@
           <el-form-item label-width='100px' label="金额" span="1" prop="contractNo" class="readonly">
             {{deptBudgetList.amountMoney}}
           </el-form-item>
+          <el-form-item label="备用金账户" label-width="110px" v-show="deptBudgetList.paymentIdentifi == 1">
+            <el-select v-model="deptBudgetList.pettyName"  filterable placeholder="选择备用金账户" clearable @change="accountChange"
+              class="options_css">
+              <el-option v-for="(item, index) in pettyList" :key="index" :label="item.userName" :value="item.userName" />
+            </el-select>
+            <span>余额: {{ pettAmountMoney }}  元</span>
+          </el-form-item>
           <el-form-item label-width='100px' label="备注" span="1" prop="settlementMethod">
             <el-input
             disabled
@@ -97,8 +106,7 @@
 </template>
 <script>
     import WsUpload from '@/components/WsUpload'
-  import {lookexenseinfo,expensepayment,getpayeeinfo} from '@/model/profitable/index'
-  import {woekflowhandle,} from '@/model/tasksport/index'
+  import {lookexenseinfo,expensepayment,getAccountList} from '@/model/profitable/index'
   export default {
     components: {
       WsUpload,
@@ -111,6 +119,8 @@
           name: '玉米',
           count: 2000,
         }],
+        pettyList:[],
+        accountList:[],
         size:99,
         compId:localStorage.getItem('ws-pf_compId'),
         rejectshow:false,
@@ -127,11 +137,13 @@
             date: 20
           }
         ], //货值
+        amountMoney1:'',
 
       }
     },
     activated() {
       this.getList()
+      this.xiala()
     },
      async created() {
       //获取快捷路口列表
@@ -148,33 +160,53 @@
       }
     },
     methods: {
+      accountChange(e) {
+        for (let i = 0; i < this.pettyList.length; i++) {
+          if (this.pettyList[i].userName == e) {
+            this.pettAmountMoney = this.pettyList[i].amountMoney
+          }
+        }
+      },
+      xiala() {
+        //备用金账户下拉列表
+        getAccountList({
+          compId: localStorage.getItem('ws-pf_compId'),
+        })
+          .toPromise()
+          .then((response) => {
+            this.pettyList = response
+            // for(let i= 0;i<response.length;i++){
+            //    this.accountList.push(this.pettyList[i].userName)
+            // }
+          })
+      },
       getList() {
         lookexenseinfo({
-         id:this.$route.query.id
-        })
-        .toPromise()
-        .then((response) => {
-          this.srcList=[]
-          this.paymentScreenshot=[]
-          this.deptBudgetList=response
-          // var arr=response.addressUrl.split(',')
-          // for (let i = 0; i < arr.length; i++) {
-          //   if(arr[i]!=''){
-          //     this.srcList.push({url:arr[i]})
-          //     this.paymentScreenshot.push(arr[i])
-          //   }
-          // }
-          // if(localStorage.getItem('ws-pf_roleName')=='出纳'){
-          //   if(this.deptBudgetList.expensesPurpose==1){
-          //     getpayeeinfo({compId:localStorage.getItem('ws-pf_compId'),contractNo:response.contractNo}).toPromise()
-          //     .then((response1) => {
-          //       this.payeeinfo=response1
-          //       console.log(this.payeeinfo)
-          //     })
-          //   }          
-          // }
+          id: this.$route.query.id
         })
-        
+          .toPromise()
+          .then((response) => {
+            this.srcList = []
+            this.paymentScreenshot = []
+            this.deptBudgetList = response
+            // var arr=response.addressUrl.split(',')
+            // for (let i = 0; i < arr.length; i++) {
+            //   if(arr[i]!=''){
+            //     this.srcList.push({url:arr[i]})
+            //     this.paymentScreenshot.push(arr[i])
+            //   }
+            // }
+            // if(localStorage.getItem('ws-pf_roleName')=='出纳'){
+            //   if(this.deptBudgetList.expensesPurpose==1){
+            //     getpayeeinfo({compId:localStorage.getItem('ws-pf_compId'),contractNo:response.contractNo}).toPromise()
+            //     .then((response1) => {
+            //       this.payeeinfo=response1
+            //       console.log(this.payeeinfo)
+            //     })
+            //   }          
+            // }
+          })
+
       },
       onChange() {
         this.$refs.upload
@@ -191,7 +223,13 @@
         this.$router.go(-1)
       },
       submit(){
-        // console.log(this.paymentScreenshot)
+        if(this.pettAmountMoney < this.deptBudgetList.amountMoney){
+          this.$message({
+              message: '所选账户备用金余额不足!',
+              type: 'warning',
+            })
+            return
+        }
         this.$confirm('确定提交付款信息?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -204,7 +242,13 @@
               message: '提交成功!',
               type: 'success',
             })
-            this.$router.go(-1)
+            if(this.deptBudgetList.expensesPurpose==7){
+              this.$router.push({
+                path: 'pettyCash'
+              })
+            }else{
+              this.$router.go(-1)
+            }
           }).catch((response) => {
             this.$message({
               message: '提交失败!',

+ 274 - 0
src/views/profitable/pettyAccount.vue

@@ -0,0 +1,274 @@
+//备用金账户
+<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;display: flex;">
+        <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(3)" :type="searchType == 3 ? 'primary' : ''">无余额</el-button>
+        </el-col>
+        <el-col :span="18">
+          <div class="datascreen">
+            <el-input style="width: 500px;" class="options_css" v-model="searchKeyWord" placeholder="可按员工姓名进行查找" clearable maxlength="500" type="input"
+           @keyup.enter.native="find()"></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%">
+          <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="userName" label="员工姓名">
+          </el-table-column>
+          <el-table-column prop="deptName" label="部门名称">
+          </el-table-column>
+          <el-table-column prop="amountMoney" label="账户余额(元)">
+          </el-table-column>
+          <el-table-column label="账单">
+            <template slot-scope="scope">
+              <span @click="billView(scope.row)" style="color:blue">查看</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align: center" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+
+      <el-dialog width='30%' :visible.sync="dialogVisible" title="账单">
+        <el-form ref="form" label-width="90px">
+          <div v-if="pettAccount.expenseInfoList">
+            <div v-for="item in pettAccount.expenseInfoList">
+              <div class="flex">
+                <div style="display: block;">
+                  <el-form-item>
+                    <span v-if="item.expensesType == 1">退款</span>
+                    <span v-else-if="item.expensesPurpose != 7 && item.expensesType == 2 ">付款</span>
+                    <span v-else-if="item.expensesType == 2">请款</span>
+                  </el-form-item>
+                  <el-form-item>
+                    {{item.costNo}}
+                  </el-form-item>
+                </div>
+                <div style="display:block">
+                  <el-form-item>
+                    {{item.amountMoney}}元
+                  </el-form-item>
+                  <el-form-item>
+                    {{item.createDate.split(" ")[0] }}
+                  </el-form-item>
+                </div>
+              </div>
+              <div style="border-bottom:1px solid #ccc;margin-bottom:18px;"></div>
+            </div>
+          </div>
+          <div style="margin-left:150px">
+            <el-form-item>
+              <el-button @click="dialogVisible=false">关闭</el-button>
+            </el-form-item>
+          </div>
+        </el-form>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+import WsUpload from '@/components/WsUpload'
+import {
+    pettAccountList
+} from '@/model/profitable/index'
+export default {
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      value: '',
+      tableData: [],
+      tableData1: [],
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      showFlag: false,
+      size: 100,
+      expensesPurpose: '',
+      recordList: [],
+      dialogVisible: false,
+      toExamineType: '',
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      searchType: '',
+      searchKeyWord: '',
+      pettAccount:{},
+      userName:'',
+      title: '附件',
+      title1: '',
+      outtotal: 0,
+      intotal: 0,
+      fujianshow: false,
+      statusdata: {},
+      appendixIdss: [],
+      appendixIdss1: '',
+      approveStatus: false,
+      currectdata: {},
+      choiceObj: [],
+    }
+  },
+  activated() {
+    this.getList()
+  },
+  methods: {
+    getList1() {
+      this.currentPage = 1
+      this.getList()
+    },
+    returnsales() {
+      this.$router.go(-1)
+    },
+    typeChange(num) {
+      this.searchType = num
+      this.getList()
+    },
+    getList() {
+      pettAccountList({
+        compId: localStorage.getItem('ws-pf_compId'),
+        searchKeyWord: this.searchKeyWord,
+        expenseName:this.expenseName,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+      })
+        .toPromise()
+        .then((response) => {
+          this.tableData = response.records
+          this.deptBudgetTotal = response.total
+        })
+    },
+    billView(row){
+        this.pettAccount = row
+        this.dialogVisible = true
+      },
+    find() {
+      this.currentPage = 1
+      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;
+  justify-content: right;
+
+  .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;
+}
+
+.options_css {
+  margin: 0 5px;
+}
+</style>

+ 424 - 0
src/views/profitable/pettyCash.vue

@@ -0,0 +1,424 @@
+//备用金
+<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="6">
+          <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-col>
+        <el-col :span="18">
+          <div class="datascreen">
+            <el-input style="width: 255px;" class="options_css" v-model="searchKeyWord" placeholder="可按编号进行查找" clearable maxlength="500" type="input"
+           @keyup.enter.native="find()"></el-input>
+            <el-select v-model="agent" multiple filterable allow-create default-first-option placeholder="按经办人筛选"
+              clearable @change="getList1" class="options_css">
+              <el-option v-for="item in personList" :key="item.id" :label="item.agent" :value="item.agent">
+              </el-option>
+            </el-select>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px"
+                src="../../../public/img/sousuo.png" alt="" /></el-button>
+            <el-button style="text-align: right;" type="primary" @click="pettyCash()">备用金账户</el-button>
+          </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="costNo" label="编号" width="180px">
+          </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="用途" width="100px">
+            <template slot-scope="scope">
+              <div v-if="scope.row.expensesPurpose == 7">备用金</div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="purpose" label="流向" width="100px">
+            <template slot-scope="scope">
+              <div v-if="scope.row.expensesPurpose == 7 ">中天昊元</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="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="creater" label="发起人"></el-table-column>
+          <el-table-column prop="createDate" label="发起日期" width="150"></el-table-column>
+          <el-table-column prop="status" label="费用状态" width="100">
+            <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>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align: center" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+    <el-dialog width="50%" :visible.sync="dialogVisible1" :title="title1">
+      <div style="padding: 20px" v-for="(item, index) in recordList" :style="{
+        'border-bottom':
+          index != recordList.length - 1 ? '1px solid #ccc' : 'none',
+      }" :key="index">
+        <div style="width: 100%; justify-content: space-between" class="flex">
+          <div style="width: 33.333%; text-align: left">
+            {{ item.operateUser }}
+          </div>
+          <div style="width: 33.333%; text-align: center">
+            {{
+              statusdata.expensesType != 1
+                ? item.approveResult == 1
+                  ? '通过'
+                  : item.approveResult == 0 ? '驳回' : item.dealMsg
+                : item.dealMsg
+            }}
+          </div>
+          <div style="width: 33.333%; text-align: right">
+            {{ item.operateDate }}
+          </div>
+        </div>
+        <div v-if="index < recordList.length - 1" style="width: 100%; text-align: left">
+          审核意见:{{item.verifyRemark?item.verifyRemark.split('##')[0]:""}}
+        </div>
+        <div v-else style="width: 100%; text-align: left">
+          审核意见:{{item.verifyRemark?item.verifyRemark.split('##')[0]:""}}
+        </div>
+      </div>
+    </el-dialog>
+    <WinseaContentModal v-model="fujianshow" :title="title" @on-cancel="handleClose">
+      <ws-upload ref="upload" @onChange="onChange1" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx"
+        :comp-id="compId" :appendix-ids="appendixIdss" :size-limit="size" />
+    </WinseaContentModal>
+  </div>
+</template>
+<script>
+import WsUpload from '@/components/WsUpload'
+import {
+  pettCashList,
+  getAuditRecord,
+  getXialaList,
+} from '@/model/profitable/index'
+export default {
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      value: '',
+      tableData: [],
+      tableData1: [],
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      showFlag: false,
+      size: 100,
+      expensesPurpose: '',
+      recordList: [],
+      dialogVisible: false,
+      toExamineType: '',
+      compId: localStorage.getItem('ws-pf_compId'),
+      dialogVisible1: false,
+      deptCircularPage: {},
+      searchType: '',
+      searchKeyWord: '',
+      expenseName: '',//费用名称
+      costNo: [],//编号
+      purpose: [],//用途
+      // flowTo: [],//流向
+      unallocatedAmount:'',//未分配金额(元)
+      agent: [],//经办人
+      startDate: '',
+      endDate: '',
+      title: '附件',
+      title1: '',
+      outtotal: 0,
+      intotal: 0,
+      fujianshow: false,
+      statusdata: {},
+      appendixIdss: [],
+      appendixIdss1: '',
+      approveStatus: false,
+      currectdata: {},
+      addressUrl: '',
+      personList: [],
+    }
+  },
+  activated() {
+    this.getPassYearFormatDate()
+    this.getList()
+    this.xiala()
+  },
+  methods: {
+    xiala() {
+      //经办人
+      getXialaList({
+        removeRepeatFlag: 4,
+      })
+        .toPromise()
+        .then((response) => {
+          this.personList = response
+        })
+
+    },
+    getList1() {
+      this.currentPage = 1
+      this.getList()
+    },
+    handlerecord(row) {
+      if (row.expensesType == 1) {
+        this.title1 = '收款审核记录'
+      } else {
+        this.title1 = '请款审核记录'
+      }
+      this.statusdata = row
+      getAuditRecord({ id: row.id, workflowId: row.workflowId })
+        .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
+
+      // if (row.addressUrl) {
+      this.appendixIdss = row.addressUrl
+      this.fujianshow = true
+      // } else {
+      //   this.$message({
+      //     message: '暂无附件查看!',
+      //     type: 'warning',
+      //   })
+      // }
+    },
+    pettyCash(){
+      this.$router.push({ name: 'pettyAccount' })
+    },
+    getPassYearFormatDate() {
+      if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
+
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+      } else {
+        this.startDate = localStorage.getItem('startDate')
+        this.endDate = localStorage.getItem('endDate')
+      }
+      this.value = [this.startDate, this.endDate]
+    },
+    getList() {
+        pettCashList({
+        compId: localStorage.getItem('ws-pf_compId'),
+        startDate: localStorage.getItem('startDate'),
+        endDate: localStorage.getItem('endDate'),
+        searchKeyWord: this.searchKeyWord,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        agent: this.agent.length > 0 ? this.agent.toString() : '',
+      })
+        .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(',')
+              }
+              if (response.records[i].agent == localStorage.getItem('ws-pf_staffName')) {
+                response.records[i].showFlag = true
+              }
+            }
+          }
+          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]
+        localStorage.setItem('startDate', this.startDate)
+        localStorage.setItem('endDate', this.endDate)
+      }
+      this.getList()
+    },
+    pickerOptions() { },
+    find() {
+      this.currentPage = 1
+      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;
+}
+
+.options_css {
+  margin: 0 5px;
+}
+</style>

+ 7 - 2
src/views/profitable/receipt.vue

@@ -20,6 +20,8 @@
                 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">
@@ -80,7 +82,7 @@
       return {
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         mode:'全部分配',
@@ -204,6 +206,9 @@
         }else if(this.deptBudgetList.purpose=='经营性费用'){
           this.deptBudgetList.expensesPurpose=5
            this.deptBudgetList.costNo='JYF'+this.getdate()+this.MathRand()
+        }else if(this.deptBudgetList.purpose=='备用金'){
+          this.deptBudgetList.expensesPurpose=7
+           this.deptBudgetList.costNo='BYJ'+this.getdate()+this.MathRand()
         }
           if(this.deptBudgetList.type=='粮款'){
             this.deptBudgetList.costType=1
@@ -255,7 +260,7 @@
               message: '提交成功!',
               type: 'success',
             })
-            this.deptBudgetList={purpose:"合同费用",type:'粮款'}
+            this.deptBudgetList={purpose:'合同费用',type:'粮款'}
             this.paymentScreenshot=[]
             this.$refs.upload.clearFiles()
             this.$router.go(-1)

+ 4 - 1
src/views/profitable/receiptaduit.vue

@@ -21,6 +21,8 @@
                 style="color: #8890b1" />
                 <ws-option label="经营性费用" value="5"
                 style="color: #8890b1" />
+                <ws-option label="备用金" value="7"
+                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">
@@ -95,7 +97,7 @@
       return {
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         size:9,
@@ -173,6 +175,7 @@
             type: 'warning'
           })
           .then(() => {
+            this.deptBudgetList.vesselId = 'tongzhi'
             this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
         this.deptBudgetList.flag=0
         this.$delete(this.deptBudgetList,'status')	

+ 10 - 10
src/views/statisticalReport/autoSettlementList.vue

@@ -43,7 +43,7 @@
       <el-row>
         <el-col  :span="12">
           &nbsp;
-          <div v-hasPermission="`report.transportationReport.wuliu`" style="display:flex;align-items:center;justify-content: flex-start;" v-if="contractNo!='全部合同'&&warehouseList.records.length>0"><div style="width:100px;">粮食单价:</div> <div v-if="grainPricetext=='编辑'">{{grainPrice}}</div><el-input style="margin:0;" v-else v-model="grainPrice"></el-input><el-button style="margin:0 0 0 5px;" type="primary" @click="editgrainPrice">{{grainPricetext}}</el-button></div></el-col>
+          <!-- <div v-hasPermission="`report.transportationReport.wuliu`" style="display:flex;align-items:center;justify-content: flex-start;" v-if="contractNo!='全部合同'&&warehouseList.records.length>0"><div style="width:100px;">货值:</div> {{grainPrice}}</div>--></el-col> 
         <el-col style="padding-left: 15px;text-align:right;" :span="12">
           <el-date-picker @change="datechange" format="yyyy-MM-dd" v-model="value2" type="daterange" unlink-panels range-separator="至"
           start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
@@ -74,6 +74,7 @@
         <el-table-column class="table_td" prop="contractNo" width="120" label="合同编号"></el-table-column>
         <el-table-column class="table_td" prop="startAddress" width="120" label="发货库"></el-table-column>
         <el-table-column class="table_td" prop="createDate" width="120" label="发货时间"></el-table-column>
+        <el-table-column class="table_td" prop="grainPrice" width="120" label="货值"></el-table-column>
         <!-- <el-table-column width="120" class="table_td" prop="processNo" label="运输阶段"></el-table-column>
         <el-table-column width="60" class="table_td" prop="name" label="姓名"></el-table-column>
         <el-table-column width="120" class="table_td" prop="phone" label="电话"></el-table-column> -->
@@ -296,7 +297,7 @@
 
       <!-- 页数 -->
       <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>
+        :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
     </el-scrollbar>
     <!-- 修改结算重量记录 -->
     <el-dialog width="40%" title="结算重量修改记录" :visible.sync="dialogFormVisible16" :append-to-body="true">
@@ -676,7 +677,6 @@ export default {
     }
   },
   activated() {
-    console.log(11111111)
     getwarehouse({
             compId: localStorage.getItem('ws-pf_compId'),
           })
@@ -684,6 +684,11 @@ export default {
           .then((response) => {
             this.warehouseList1=response
           })
+      if(this.$route.query.contractNo){
+        this.contractNo=this.$route.query.contractNo
+      }else{
+        this.contractNo=''
+      }
     this.getList()
     this.showType = this.isShow
   },
@@ -1695,8 +1700,8 @@ export default {
             response.records[i].deductionAmountchange = false
             response.records[i].amountIngPayable = response.records[i].amountIngPayable.toFixed(2)
             response.records[i].amountEdPayable = response.records[i].amountEdPayable.toFixed(2)
-            response.records[i].amountNotPayable =((response.records[i].totalPayable - response.records[i]
-              .amountEdPayable)*100)/100
+            response.records[i].amountNotPayable =(((response.records[i].totalPayable - response.records[i]
+              .amountEdPayable)*100)/100).toFixed(2)
             if (response.records[i].tranPriceApproveList) {
               for (var j = 0; j < response.records[i].tranPriceApproveList.length; j++) {
                 this.tranPriceApproveList.push(response.records[i].tranPriceApproveList[j])
@@ -1705,14 +1710,9 @@ export default {
           }
           this.deptBudgetTotal = response.total
           this.warehouseList = response
-          if(this.warehouseList.records.length>0&&this.contractNo!='全部合同'){
-            this.grainPrice=this.warehouseList.records[0].grainPrice
-          }
         })
       autocontract({
         compId: localStorage.getItem('ws-pf_compId'),
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
         // roleFlag: this.roleFlag,
       })
         .toPromise()

+ 2 - 2
src/views/statisticalReport/component/routers/route.js

@@ -96,7 +96,7 @@ const statisticalReportRouter = {
      {
       path: 'huoyunList',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/statisticalReport/huoyunList'),
+        import( '@/views/statisticalReport/huoyunList'),
       name: 'huoyunList',
       meta: {
         title: 'huoyunList',
@@ -112,7 +112,7 @@ const statisticalReportRouter = {
     {
       path: 'shippingList',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/statisticalReport/shippingList'),
+        import( '@/views/statisticalReport/shippingList'),
       name: 'shippingList',
       meta: {
         title: 'shippingList',

+ 5 - 0
src/views/statisticalReport/huoyunList.vue

@@ -474,6 +474,11 @@
             })
             this.options = this.contractNoList
           })
+      if(this.$route.query.contractNo){
+        this.contractNo=this.$route.query.contractNo
+      }else{
+        this.contractNo=''
+      }
       this.getList()
       this.showType = this.isShow
     },

+ 5 - 0
src/views/statisticalReport/shippingList.vue

@@ -479,6 +479,11 @@
             })
             this.options = this.contractNoList
           })
+      if(this.$route.query.contractNo){
+        this.contractNo=this.$route.query.contractNo
+      }else{
+        this.contractNo=''
+      }
       this.getList()
       this.showType = this.isShow
     },

+ 49 - 14
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -4,14 +4,14 @@
     <el-scrollbar style="height: 100%">
       <el-row>
         <el-col style="padding-left: 15px; width:48%" :span="16">
-          <ws-button :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</ws-button>
+          <ws-button :type="searchType == '' ? 'primary' : ''" @click="handlestatus('')">全部</ws-button>
+          <!-- <ws-button :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</ws-button> -->
           <ws-button :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(2)">待结算</ws-button>
           <ws-button :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(3)">已结算</ws-button>
-          <ws-button :type="searchType == '' ? 'primary' : ''" @click="handlestatus('')">全部</ws-button>
-          <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.view`" @click="handleAudit()">通过
+          <!-- <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.view`" @click="handleAudit()">通过
           </ws-button>
           <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.view`" @click="handlereject()">驳回
-          </ws-button>
+          </ws-button> -->
           <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.payment`" @click="handlepayment">
             付款</ws-button>
           <ws-button type="primary" v-hasPermission="`report.goodsProcurementInReport.view`" @click="addRemarks()">备注
@@ -20,9 +20,9 @@
           </ws-button>
         </el-col>
         <el-col style="text-align: right; line-height: 60px;  width:300px" :span="8">
-          <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
-            type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="起始时间"
-            end-placeholder="截止时间">
+          <el-date-picker value-format="yyyy-MM-dd" v-model="value2" type="daterange" align="right" unlink-panels :clearable="false"
+            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
+            class="data_css" @change="datechange">
           </el-date-picker>
         </el-col>
         <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="8">
@@ -126,14 +126,14 @@
         <el-table-column width="100" class="table_td" label="已付金额(元)" prop="amountEdPayable"></el-table-column>
         <el-table-column width="100" class="table_td" label="未付金额(元)" prop="amountNotPayable"></el-table-column>
         <el-table-column class="table_td" label="付款日期" prop="paymentDate"></el-table-column>
-        <el-table-column label="状态" prop="status">
+        <!-- <el-table-column label="状态" prop="status">
           <template slot-scope="scope">
             <span v-if="scope.row.approveStatus != null">{{
               scope.row.approveStatus
             }}</span>
             <span v-else>{{ scope.row.status }}</span>
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
 
       <!-- 页数 -->
@@ -283,7 +283,7 @@
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
-        searchType: '1',
+        searchType: '',
         searchTypeText: '未完成',
         searchKeyWord: '',
         contractType: 2,
@@ -358,6 +358,7 @@
       }
     },
     activated() {
+      this.getPassYearFormatDate()
       this.getContractList()
       this.showType = this.isShow
     },
@@ -670,6 +671,7 @@
           this.startDate = ''
           this.endDate = ''
         }
+        this.getContractList()
         this.getList()
       },
       //审核
@@ -885,10 +887,12 @@
       getContractList() {
         getStockPurchaseContractNoList({
             compId: localStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            roleFlag: this.roleFlag,
-            contractNo: this.contractNo,
+            startDate: this.startDate,
+            endDate: this.endDate,
+            // currentPage: this.currentPage,
+            // pageSize: this.pageSize,
+            // roleFlag: this.roleFlag,
+            // contractNo: this.contractNo,
           })
           .toPromise()
           .then((response) => {
@@ -909,7 +913,38 @@
       // handleDownload(file) {
       //   console.log(file)
       // },
+    getPassYearFormatDate() {
+      if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
 
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+      } else {
+        this.startDate = localStorage.getItem('startDate')
+        this.endDate = localStorage.getItem('endDate')
+      }
+      this.value2 = [this.startDate, this.endDate]
+    },
       handlePictureCardPreviewDis(file) {
         this.depositUrl = file.data.url
         this.dialogVisible = true

+ 40 - 8
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -14,7 +14,7 @@
           </ws-button>
         </el-col>
         <el-col style="text-align: right; line-height: 60px;  width:400px" :span="8">
-          <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
+          <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'  :clearable="false"
             type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="起始时间"
             end-placeholder="截止时间">
           </el-date-picker>
@@ -186,8 +186,8 @@
         </el-table-column>
         <el-table-column class="table_td" prop="collectionDate" label="收款日期">
         </el-table-column>
-        <el-table-column class="table_td" prop="status" label="状态">
-        </el-table-column>
+        <!-- <el-table-column class="table_td" prop="status" label="状态">
+        </el-table-column> -->
       </el-table>
       <!-- 他运 -->
       <el-table v-if='orderList.deliverType!=1' class="wenzi" :data="saleList.records"
@@ -314,8 +314,8 @@
         </el-table-column>
         <el-table-column class="table_td" prop="collectionDate" label="收款日期">
         </el-table-column>
-        <el-table-column class="table_td" prop="status" label="状态">
-        </el-table-column>
+        <!-- <el-table-column class="table_td" prop="status" label="状态">
+        </el-table-column> -->
       </el-table>
 
 
@@ -563,6 +563,7 @@
       month = month.toString().padStart(2, '0');
       date = date.toString().padStart(2, '0');
       this.collectionDate = `${year}-${month}-${date}`;
+      this.getPassYearFormatDate()
       this.getList()
       this.showType = this.isShow
     },
@@ -1311,9 +1312,8 @@
           })
         getStockSaleContractNoList({
             compId: localStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            roleFlag: this.roleFlag,
+            startDate: this.startDate,
+            endDate: this.endDate,
           })
           .toPromise()
           .then((response) => {
@@ -1322,6 +1322,38 @@
             this.options = this.contractNoList
           })
       },
+      getPassYearFormatDate() {
+      if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
+
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+      } else {
+        this.startDate = localStorage.getItem('startDate')
+        this.endDate = localStorage.getItem('endDate')
+      }
+      this.value2 = [this.startDate, this.endDate]
+    },
       //收款截图
       handleRemove(file) {
         console.log(file)

+ 9 - 8
src/views/taskManagement/supplyofgoods.vue

@@ -33,7 +33,7 @@
         </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-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;
@@ -66,12 +66,13 @@
             <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="contractNo" label="合同编号" width="160"></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="issuingTimeOther" class="table_td" label="入库单日期"></el-table-column>
+        <!-- <el-table-column prop="issuingTimeOther" class="table_td" label="入库单日期"></el-table-column> -->
         <el-table-column prop="outWeight" class="table_td" label="预计出库重量(吨)">
             <template slot-scope="scope">
                 <el-input @input='outweightchange' v-model="scope.row.estimateOutWarehouseWeight" placeholder="输入本次出库重量"></el-input>
@@ -134,7 +135,7 @@
         showType: true,
         // 年
         year: '',
-        goodsName:'0',
+        goodsName:'',
         goodsList:[],
         gainList: [],
         gainList1:[],
@@ -233,9 +234,9 @@
             this.goodsList = response
           })
       this.baseId=this.$route.query.baseId
-      if(this.$route.query.status){
+      if(this.$route.query.goodsName){
         this.status=true
-        this.goodsName='玉米'
+        this.goodsName=this.$route.query.goodsName
       }else{
         this.status=false
         this.goodsName=''
@@ -266,7 +267,7 @@
             pageSize: this.pageSize,
             searchType: this.searchType,
             searchKeyWord: this.searchKeyWord,
-            
+            goodsName:this.goodsName,
             // inOutType:this.inOutType,
             baseId:this.baseId,
             flag:this.flag
@@ -382,7 +383,7 @@
             startDate:this.startDate,
             endDate:this.endDate,
             searchType: this.searchType,
-            goodsName:this.goodsName==0?'':this.goodsName1,
+            goodsName:this.goodsName,
             searchKeyWord: this.searchKeyWord,
             // inOutType:this.inOutType,
             baseId:this.baseId,

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

@@ -24,6 +24,7 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="160"></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>

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

@@ -673,7 +673,7 @@
             			localStorage.setItem('taskTypeKey',this.dataList.taskTypeKey);
 						localStorage.setItem('warehouseId',this.baseId);
 						if(this.dataList.taskTypeKey==1){
-							this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId,status:1}})
+							this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId,goodsName:this.dataList.goodsName}})
 						}else{
 							this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
 						}

+ 18 - 3
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -107,7 +107,13 @@
                 v-model="deptBudgetList.tranPriceIngCar" maxlength="70" />
               <el-input v-else v-model="deptBudgetList.tranPriceIngCar" maxlength="70" />
             </el-form-item>
-            <div class="input-item-margin">
+            <el-form-item  label="货值:" class="input-item-margin">
+              <el-input v-if="deptBudgetList.priceStatusCar=='审核中' && deptBudgetList.approveStatus!='发起人撤回'||deptBudgetList.priceStatus=='审核中'&& deptBudgetList.approveStatus!='发起人撤回'" :disabled="readonly"
+                v-model="deptBudgetList.goodsValueIng" maxlength="70" />
+              <el-input v-else v-model="deptBudgetList.goodsValue" maxlength="70" />
+            </el-form-item>
+            <div style="width:326px;" class="input-item-margin">
+              
               <div style="display:inline-block;" v-if="deptBudgetList.priceStatus=='审核中'&&pricetype==1 || deptBudgetList.approveStatus=='发起人撤回'&&pricetype==1 ">
                 {{deptBudgetList.approveStatus}}
                 <el-button type="primary" v-hasPermission="`tranManager.vehicleDispatching.reprice`" size="small" 
@@ -694,7 +700,7 @@
         this.$prompt('运输单价审核', {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
-          inputValue: status==1?this.deptBudgetList.tranPriceIng:this.deptBudgetList.tranPriceIngCar
+          inputValue: status==1?this.deptBudgetList.tranPriceIng:this.deptBudgetList.tranPriceIngCar,
         }).then(({
           value
         }) => {
@@ -705,6 +711,7 @@
           tranProcessInfo.flag = '2'
           tranProcessInfo.tranTypeKey = 1
           tranProcessInfo.billingMethod= this.deptBudgetList.billingMethod
+          tranProcessInfo.goodsValueIng= this.deptBudgetList.goodsValueIng
           if(this.deptBudgetList.billingMethod==2){
              tranProcessInfo.tranPriceIngCar=value
               setUpTranPriceCar(tranProcessInfo)
@@ -743,6 +750,13 @@
           })
           return
         }
+        if(!this.deptBudgetList.goodsValue){
+          this.$message({
+            message: '请输入货值!',
+            type: 'warning',
+          })
+          return
+        }
         this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
             cancelButtonText: '取消',
             confirmButtonText: '确定',
@@ -754,6 +768,7 @@
             tranProcessInfo.flag = '1'
             tranProcessInfo.tranTypeKey = 1
             tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
+            tranProcessInfo.goodsValueIng = this.deptBudgetList.goodsValue
             if(!this.deptBudgetList.billingMethod) this.deptBudgetList.billingMethod=1
             tranProcessInfo.billingMethod= this.deptBudgetList.billingMethod
             tranProcessInfo.tranPriceIngCar = this.deptBudgetList.tranPriceIngCar
@@ -1088,7 +1103,7 @@
     // background: green;
     padding-left: 20px;
     align-items: center;
-    width: 999px;
+    width: 1170px;
   }
 
   .myTest .el-form-item {

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

@@ -508,69 +508,69 @@ const warehouseManagementRouter = {
       },
       hidden: true
     },
-    // {
-    //   path: 'awaitRansom',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/awaitRansom'),
-    //   name: 'awaitRansom',
-    //   meta: {
-    //     title: 'awaitrAnsom',
-    //     shortcutEntrance: 'warehouseManagementList',
-    //     module: 'warehouseManagement.warehouse.warehouseInfo',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'待赎回'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden:true
-    // },
-    // {
-    //   path: 'gooddetail',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/gooddetail'),
-    //   name: 'gooddetail',
-    //   meta: {
-    //     title: 'gooddetail',
-    //     shortcutEntrance: 'warehouseManagementList',
-    //     module: 'warehouseManagement.warehouse.warehouseInfo',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'货权明细'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    // },
-    // {
-    //   path: 'customerrecord',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/customerrecord'),
-    //   name: 'customerrecord',
-    //   meta: {
-    //     title: 'customerrecord',
-    //     shortcutEntrance: 'warehouseManagementList',
-    //     module: 'warehouseManagement.warehouse.warehouseInfo',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'客户操作记录'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden:true
-    // },
-    // {
-    //   path: 'goodsrollIn',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/goodsrollIn'),
-    //   name: 'goodsrollIn',
-    //   meta: {
-    //     title: 'goodsrollIn',
-    //     shortcutEntrance: 'warehouseManagementList',
-    //     module: 'warehouseManagement.warehouse.warehouseInfo',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'货权转入'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden:true
-    // },
+    {
+      path: 'awaitRansom',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/awaitRansom'),
+      name: 'awaitRansom',
+      meta: {
+        title: 'awaitrAnsom',
+        shortcutEntrance: 'warehouseManagementList',
+        module: 'warehouseManagement.warehouse.warehouseInfo',
+        permissicon: [],
+        keepAlive: true,
+        _title:'待赎回'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true
+    },
+    {
+      path: 'gooddetail',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/gooddetail'),
+      name: 'gooddetail',
+      meta: {
+        title: 'gooddetail',
+        shortcutEntrance: 'warehouseManagementList',
+        module: 'warehouseManagement.warehouse.warehouseInfo',
+        permissicon: [],
+        keepAlive: true,
+        _title:'货权明细'
+        // module: 'procurement.sparepart.applDetail'
+      },
+    },
+    {
+      path: 'customerrecord',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/customerrecord'),
+      name: 'customerrecord',
+      meta: {
+        title: 'customerrecord',
+        shortcutEntrance: 'warehouseManagementList',
+        module: 'warehouseManagement.warehouse.warehouseInfo',
+        permissicon: [],
+        keepAlive: true,
+        _title:'客户操作记录'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true
+    },
+    {
+      path: 'goodsrollIn',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/warehousenew/goodsrollIn'),
+      name: 'goodsrollIn',
+      meta: {
+        title: 'goodsrollIn',
+        shortcutEntrance: 'warehouseManagementList',
+        module: 'warehouseManagement.warehouse.warehouseInfo',
+        permissicon: [],
+        keepAlive: true,
+        _title:'货权转入'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true
+    },
   ],
 };
 export default warehouseManagementRouter;

+ 57 - 13
src/views/warehousenew/goodsrollIn.vue

@@ -10,15 +10,16 @@
         </el-button></el-col>
     </el-row>
     <div class="center">
+      <div style="width:49%;display:inline-block;">
         <el-form ref="form" :model="form" label-width="200px">
             <el-form-item label="关联货权转出记录">
-                <el-select @change="receiveNochange" v-model="form.relationReceiveNo" placeholder="选择关联货权">
+                <el-select filterable clearable @change="receiveNochange" v-model="form.relationReceiveNo" placeholder="选择关联货权">
                     <el-option label="不关联" value="不关联"></el-option>
                     <el-option v-for="item in cusationinfo" :key="item.id" :label="item.relationReceiveNo+('('+item.transferOutWeight+'吨)')" :value="item.relationReceiveNo"></el-option>
                 </el-select>
             </el-form-item>
             <el-form-item label="合同编号">
-                <el-select @change="contractNochange" v-model="form.outContractNo" placeholder="请选择合同编号">
+                <el-select filterable clearable @change="contractNochange" v-model="form.outContractNo" placeholder="请选择合同编号">
                 <el-option v-for="item in contractNoList" :key="item.id" :label="item.contractNo" :value="item.contractNo"></el-option>
                 </el-select>
             </el-form-item>
@@ -26,7 +27,7 @@
                 <el-input disabled placeholder="自动获取,不可编辑" v-model="form.customer"></el-input>
             </el-form-item>
             <el-form-item label="货名">
-                <el-select @change="goosnamechange" v-model="form.goodsName" placeholder="选择货名">
+                <el-select filterable clearable @change="goosnamechange" v-model="form.goodsName" placeholder="选择货名">
                     <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue" :value="item.constValue"></el-option>
                 </el-select>
             </el-form-item>
@@ -37,7 +38,7 @@
                 </el-radio-group>
             </el-form-item>
             <el-form-item v-if="form.redeemFlag==1" label="待赎回合同">
-                <el-select v-model="form.redeemContractNo" placeholder="选择待赎回的合同">
+                <el-select filterable clearable v-model="form.redeemContractNo" placeholder="选择待赎回的合同">
                     <el-option v-for="item in tableData" :key="item.id" :label="item.contractNo" :value="item.contractNo"></el-option>
                 </el-select>
             </el-form-item>
@@ -54,7 +55,7 @@
                 <el-input disabled v-model="form.amountNotPayable" placeholder="自动计算,不可编辑"></el-input>
             </el-form-item>
             <el-form-item label="库点">
-                <el-select @change="warehouseNamechange" v-model="form.warehouseName" placeholder="选择库点">
+                <el-select filterable clearable @change="warehouseNamechange" v-model="form.warehouseName" placeholder="选择库点">
                     <el-option  v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.warehouseName"></el-option>
                 </el-select>
             </el-form-item>
@@ -79,18 +80,36 @@
                 <el-button type="primary" @click="onSubmit">提交</el-button>
             </el-form-item>
         </el-form>
+      </div>
+        <div style="width:49%;display:inline-block;">
+          <el-form>
+            <el-form-item label-width='100px' label="收款方" span="1" prop="payee">
+              <el-input class='input50 input_css' placeholder="输入收款方" v-model="form.payee"></el-input>
+            </el-form-item>
+            <el-form-item label-width='100px' label="账号" span="1" prop="accountNumber">
+              <el-input class='input50 input_css' placeholder="输入账号"
+                v-model="form.accountNumber"></el-input>
+            </el-form-item>
+            <el-form-item label-width='100px' label="开户行" span="1" prop="bank">
+              <el-input class='input50 input_css' placeholder="输入开户行" v-model="form.bank"></el-input>
+            </el-form-item>
+            <el-form-item label-width='100px' label="开户支行" span="1" prop="bankBranch">
+              <el-input class='input50 input_css' placeholder="输入开户支行"
+                v-model="form.bankBranch"></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
     </div>
   </div>
 </template>
 <script>
-
 import {
     getredeemedinfo,
     getcusationinfo,
     setrollin
 } from '@/model/warehouse/index'
 import {
-    packList,
+    packList,getcustomerinfo,
   } from '@/model/contarct/index'
   import {
     getwarehouse
@@ -108,6 +127,7 @@ import {xialaNo} from '@/model/tasksport/index'
         binNumberList:[],
         rollweight:0,
         compId: localStorage.getItem('ws-pf_compId'),
+        customerList:[],
         form:{
             relationReceiveNo:'不关联',
             redeemFlag:'0',
@@ -211,9 +231,16 @@ import {xialaNo} from '@/model/tasksport/index'
                 type: 'warning',
             })
                 .then(() => {
+                  console.log(this.form)
                     setrollin(this.form).toPromise()
                     .then((response) => {
                     this.$message.success('提交成功!')
+                    this.form={
+                        relationReceiveNo:'不关联',
+                        redeemFlag:'0',
+                        cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',goodsweight:''}],
+                        compId: localStorage.getItem('ws-pf_compId')
+                    }
                     this.$router.go(-1)
                     // row.weightedit=false
                     this.getList()
@@ -239,11 +266,10 @@ import {xialaNo} from '@/model/tasksport/index'
         },
         async warehouseNamechange(e){
             for (let i = 0; i < this.warehouseList.length; i++) {
-                this.form.baseId=this.warehouseList[i].id
                 if(this.form.warehouseName==this.warehouseList[i].warehouseName){
-                    console.log(this.warehouseList[i].positionInfos,111111)
-                    this.binNumberList = this.warehouseList[i].positionInfos
-                    this.$forceUpdate()
+                  this.form.baseId=this.warehouseList[i].id
+                  this.binNumberList = this.warehouseList[i].positionInfos
+                  this.$forceUpdate()
                 }
             }
         },
@@ -260,6 +286,14 @@ import {xialaNo} from '@/model/tasksport/index'
         for (let i = 0; i < this.contractNoList.length; i++) {
             if(this.contractNoList[i].contractNo==e&&this.form.relationReceiveNo=='不关联'){
                 this.$set(this.form,'customer',this.contractNoList[i].seller)
+                for (let q = 0; q < this.customerList.length; q++) {
+                  if(this.customerList[q].compName==this.form.customer){
+                    this.$set(this.form,'payee',this.customerList[q].compName)
+                    this.$set(this.form,'accountNumber',this.customerList[q].bankCard)
+                    this.$set(this.form,'bank',this.customerList[q].bankDeposit)
+                    this.$set(this.form,'bankBranch',this.customerList[q].bankDepositBranch)
+                  }
+                }
             }
             if(this.contractNoList[i].contractNo==e){
               this.$set(this.form,'contractSeller',this.contractNoList[i].seller)
@@ -273,6 +307,14 @@ import {xialaNo} from '@/model/tasksport/index'
         for (let i = 0; i < this.cusationinfo.length; i++) {
             if(this.cusationinfo[i].relationReceiveNo==e){
                 this.$set(this.form,'customer',this.cusationinfo[i].customer)
+                for (let q = 0; q < this.customerList.length; q++) {
+                  if(this.customerList[q].compName==this.form.customer){
+                    this.$set(this.form,'payee',this.customerList[q].compName)
+                    this.$set(this.form,'accountNumber',this.customerList[q].bankCard)
+                    this.$set(this.form,'bank',this.customerList[q].bankDeposit)
+                    this.$set(this.form,'bankBranch',this.customerList[q].bankDepositBranch)
+                  }
+                }
                 this.$set(this.form,'transferOutWeight1',this.cusationinfo[i].transferOutWeight)
                 this.$set(this.form,'amountIngPayable',this.cusationinfo[i].amountIngPayable)
                 this.$set(this.form,'amountEdPayable',this.cusationinfo[i].amountEdPayable)
@@ -303,6 +345,7 @@ import {xialaNo} from '@/model/tasksport/index'
             constId: 'CON2',
           })
           .toPromise()
+          this.customerList=await getcustomerinfo({compId: localStorage.getItem('ws-pf_compId')}).toPromise()
          var response1=await getredeemedinfo({
             dropFlag:1,
             pageSize:9999 ,
@@ -354,9 +397,11 @@ import {xialaNo} from '@/model/tasksport/index'
   .center {
     margin: 0 auto;
     background: #ffffff;
-    height: calc(100vh - 13vh);
+    height: calc(100vh - 23vh);
     border-radius: 4px;
     padding: 20px 0;
+    overflow-y: scroll;
+    display: flex;
 
     /deep/.el-table td,
     /deep/.el-table th {
@@ -432,7 +477,6 @@ import {xialaNo} from '@/model/tasksport/index'
     display:flex;justify-content: space-between;
   }
   .el-form{
-    width:50%;
     margin:0 auto; 
     position:relative;
   }

+ 89 - 30
src/views/warehousenew/warehouseManagementList.vue

@@ -53,19 +53,30 @@
       <div class="right" style="width:70%">
         <div class="position">
         <div class="title"><span class="cangInfo">仓库储量</span></div>
+        <div class="weight">
+          <el-switch style="display: block" v-model="value" active-color="#13ce66" 
+          inactive-color="#409EFF" active-text="折算纯重" inactive-text="实际重量"   
+          active-value="1" inactive-value="0" @change="changeWeight"></el-switch>
+            <!-- <ws-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.view` " @click="changeWeight(2)">实际重量</ws-button>
+            <ws-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.view` " @click="changeWeight(1)">折算纯重</ws-button> -->
+          </div>
         <div class="color">
           <div v-for="(item , i) in totalReserves" :key="i" class="color_for">
             <div :style="{background:lineColor[i]}" class="color_item"></div><div class="color_goodsName">{{item.goodsName}}</div>
         </div>
         </div>
         <div v-for="(item , index) in totalReserves" :key="index" class="reservesInfo">
-          <div class="reservesInfo_item" v-if="warehouseType == '1'"><div class="reservesInfo_GoodsName">{{item.goodsName}}(吨)</div><span class="reservesInfo_Amount">{{item.stockNum == 0 ? "-":item.stockNum}}</span></div>
+          <div class="reservesInfo_item" v-if="warehouseType == '1'"><div class="reservesInfo_GoodsName">{{item.goodsName}}</div>
+          <span class="reservesInfo_Amount">{{item.stockNum == 0 ? "-":item.stockNum}}(吨)</span><br/>
+          <span v-if="item.stockNum&&item.cost" class="reservesInfo_Amount">{{item.cost == 0 ? "-":item.cost}}(元/吨)</span>
+          <span v-if="item.conversionCost" class="reservesInfo_Amount">{{item.conversionCost == 0 ? "-":item.conversionCost}}(元/吨)</span>
+          </div>
           <div class="reservesInfo_item" v-if="warehouseType == '2'"><div class="reservesInfo_GoodsName">{{item.goodsName}}(吨)</div><span class="reservesInfo_Amount">{{item.surplus == 0 ? "-":item.surplus}}</span></div>
         </div>
            <div ref="myEchart7" style="height: 250px; width:96%;border-radius: 4px; border:1px solid #D8DCE6; padding: 10px;" class="column"></div>
         </div>
       </div>
-    </div>
+      </div>
     <div class="position">
       <div class="title"><span style="font-size:18px;font-weight: 600;margin-left:20px">当期储量</span></div>
       <ws-button type="primary" @click="handleAdd()" v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.add`" style="margin-left:20px">添加</ws-button>
@@ -86,6 +97,7 @@
       <ws-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.kan`" @click="handleall()">全部仓库</ws-button>
       <ws-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.kan`" @click="handleMintor()">查看监控</ws-button>
       <ws-button @click="dryClick()">烘干入库</ws-button>
+      <!-- <ws-button @click="materialInOut()">物料出入库</ws-button> -->
         <el-table ref='table' show-summary :summary-method="getSummaries" class="wenzi setUp_css" :data="warehouseList" style="width: 100%; margin-top: 20px" height="calc(100% - 45px)" v-if="warehouseType == '1'">
         <el-table-column prop="warehouseName" label="仓库名">
         </el-table-column>
@@ -294,6 +306,8 @@
     getsponsible,
     clearancee,
     xiala,
+    getQualityZhe,
+    getQualityReal,
     exportHistoricalInventory,
     postExport,
     addselectinfoList,
@@ -303,7 +317,7 @@
     getResponsible,
     deletewarehouse,
     postInWeight,
-    getwarehousName,
+    getwarehousNameNew,
     getbintype
   } from '@/model/warehouse/index'
   import mapDrag from '@/components/mapdrag/warehouseMap'
@@ -336,6 +350,7 @@
     },
     data() {
       return {
+        value: '0',
         rules:{},
         options:[],
         StartDate:'',
@@ -399,7 +414,7 @@
           let hours = d.getHours()<10?'0'+d.getHours():d.getHours()
           let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
           let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
-          this.parameter.printStartDate = year + "-" + month+ "-" +date + " "+hours+":"+minutes+":"+seconds;
+          this.parameter.printStartDate = year + '-' + month+ '-' +date + ' '+hours+':'+minutes+':'+seconds;
       },
       endDataChange(e){
             var d = new Date(e);
@@ -410,7 +425,7 @@
           let hours = d.getHours()<10?'0'+d.getHours():d.getHours()
           let minutes = d.getMinutes()<10?'0'+d.getMinutes():d.getMinutes()
           let seconds = d.getSeconds()<10?'0'+d.getSeconds():d.getSeconds()
-           this.parameter.printEndDate = year + "-" + month+ "-" +date + " "+hours+":"+minutes+":"+seconds;
+           this.parameter.printEndDate = year + '-' + month+ '-' +date + ' '+hours+':'+minutes+':'+seconds;
       },
       warehousechange(e){
         for (let i = 0; i < this.warehouseAllXiaLa.length; i++) {
@@ -436,7 +451,7 @@
           var month = date.getMonth() + 1;
           var strDate = date.getDate()
           if(strDate<10){ 
-             strDate = "0"+strDate
+             strDate = '0'+strDate
           }
           var pastdate = new Date(date.getTime() - 24 * 60 * 60 * 1000)
           this.StartDate =pastdate.getFullYear() + '-' + (pastdate.getMonth() + 1) + '-' + (pastdate.getDate()>10?pastdate.getDate():'0'+pastdate.getDate())+' 00:00:00'
@@ -476,8 +491,8 @@
          if(this.parameter.warehouseName == '全部仓库'){
           this.parameter.warehouseName = ''
         }
-        if(this.parameter.binNumber == "全部仓位"){
-          this.parameter.binNumber = ""
+        if(this.parameter.binNumber == '全部仓位'){
+          this.parameter.binNumber = ''
         }
         // let enddate = new Date(this.parameter.endDate).toLocaleString()//将截止时间的时间戳转为时间
         // this.parameter.endDate = enddate.split(' ')[0].replace('/' ,'-').replace('/','-')
@@ -607,15 +622,6 @@
       },
        //导出历史库存记录
        exportHistoricalData() {
-        // 获取仓库
-        xiala({
-            compId: localStorage.getItem('ws-pf_compId'),
-            warehouseType: this.warehouseType,
-          })
-          .toPromise()
-          .then((response) => {
-            this.packtypeList = response
-          })
         let date = new Date()
         var year = date.getFullYear();
         var month = date.getMonth() + 1;
@@ -648,8 +654,8 @@
         if (this.parameter.warehouseName == '全部仓库') {
           this.parameter.warehouseName = ''
         }
-        if(this.parameter.binNumber == "全部仓位"){
-          this.parameter.binNumber = ""
+        if(this.parameter.binNumber == '全部仓位'){
+          this.parameter.binNumber = ''
         }
         const {
           data
@@ -844,6 +850,11 @@
           path: 'dryWarehousing'
         })
       },
+      // materialInOut(){
+      //   this.$router.push({
+      //     path: 'materialInOutWarehouse'
+      //   })
+      // },
       handleall(){
         this.$router.push({
           path: 'warehouseManagement'
@@ -1151,9 +1162,8 @@
                 this.responsible = response[0].staffName
               })
           // 仓库名称
-            getwarehousName({
-              compId: localStorage.getItem('ws-pf_compId'),
-              warehouseType: this.warehouseType,
+            getwarehousNameNew({
+              compId: localStorage.getItem('ws-pf_compId')
             })
               .toPromise()
               .then((response) => {
@@ -1162,19 +1172,13 @@
                 this.warehouseInfo.warehouseName = this.warehouseXiaLa[0].warehouseName
                 this.monitorUrl1 = this.warehouseXiaLa[0].monitorUrl1
                 this.monitorUrl2 = this.warehouseXiaLa[0].monitorUrl2
-                this.getList1()
-              })
-            xiala({
-              compId: localStorage.getItem('ws-pf_compId'),
-            })
-              .toPromise()
-              .then((response) => {
                 for(var tmp = 0 ; tmp < response.length ; tmp++){
                   if(response[tmp].warehouseType == '2'){
                     response[tmp].warehouseName = response[tmp].warehouseName + ' (临)'
                   }
                 }
                 this.warehouseAllXiaLa = response
+                this.getList1()
               })
         getsponsible({
             compId: localStorage.getItem('ws-pf_compId')
@@ -1184,6 +1188,55 @@
             this.list = response
           })
       },
+      changeWeight(e) {
+        //实际重量
+				if(e == '0'){
+          getQualityReal({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseName: this.warehouseInfo.warehouseName
+          })
+          .toPromise()
+          .then((response) => {
+            this.totalReserves = response.warehouseNumViewList
+            this.initCharts()
+          })
+        }else{
+          getQualityZhe({
+            compId: localStorage.getItem('ws-pf_compId'),
+            baseId: this.warehouseInfo.warehouseId
+          }).toPromise().then((response) =>{
+            console.log(this.totalReserves)
+            this.totalMoney = 0
+            for(let j = 0;j<this.totalReserves.length;j++){
+              if(this.totalReserves[j].cost && this.totalReserves[j].stockNum){
+                this.totalReserves[j].totalMoney = (Number(this.totalReserves[j].cost) *  Number(this.totalReserves[j].stockNum)).toFixed(3)
+                this.totalMoney = (Number(this.totalMoney) + Number(this.totalReserves[j].totalMoney)).toFixed(3)
+              }
+            }
+            // debugger
+            if(response.warehouseNumViewList.length != 0){
+              var result = []
+            for(let i = 0; i < response.warehouseNumViewList.length ; i++){
+              let param ={}
+              if (response.warehouseNumViewList[i].pureWeight) {
+                param.goodsName =response.warehouseNumViewList[i].goodsName
+                param.stockNum = Number(response.warehouseNumViewList[i].pureWeight).toFixed(3)
+                param.conversionCost = (Number(this.totalMoney) / Number(param.stockNum)).toFixed(3)
+                result.push(param)
+              } 
+             }
+             console.log(result)
+             this.totalReserves = result
+              this.initCharts()
+            }
+            else{
+              this.$message.error('当前仓库无潮粮库存,无需折算!')
+              this.value = '0'
+                return
+            }
+          })
+        }
+			},
       getList1(){
           getList({
             compId: localStorage.getItem('ws-pf_compId'),
@@ -1217,6 +1270,8 @@
             }else{
               this.totalReserves = response.warehouseViewList[0].warehouseNumViewList
             }
+            // this.totalMoney = Number(this.totalReserves[0].stockNum * this.totalReserves[0].cost).toFixed(3)
+            this.value = '0'
             this.initCharts()
             this.warehouseList = response.warehouseViewList
             if(this.warehouseList.length>0){
@@ -1350,12 +1405,16 @@
     }
     .reservesInfo_Amount{
       color: #323233;
-      font-size: 16px;
+      font-size: 14px;
       font-weight: 600;
 
     }
   }
 }
+.weight{
+  display: inline-flex;
+  margin-left: 11px;
+}
 .color{
   display: inline-flex;
   width: 100%;

+ 12 - 6
src/views/warehousenew/warehousingOrder.vue

@@ -62,9 +62,9 @@
       <el-col style='text-align:right;' :span="12">
         <!-- <ws-button v-hasPermission="
             `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="interestrate()" >{{interestratevalue.value}}利率</ws-button> -->
-        <!-- <ws-button  type="primary" @click="awatingransom()">待赎回</ws-button>
+        <ws-button  type="primary" @click="awatingransom()">待赎回</ws-button>
         <ws-button  type="primary" @click="editRollout()">修改赎回状态</ws-button>
-        <ws-button  type="primary" @click="goodrollOut()">货权转出</ws-button> -->
+        <ws-button  type="primary" @click="goodrollOut()">货权转出</ws-button>
         <ws-button  type="primary" @click="exportList()">导出</ws-button>
         <ws-button v-hasPermission="
         `warehouseManagement.warehousingOrder.yufu`" type="primary" @click="fieldrations()">折干</ws-button>
@@ -166,7 +166,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="outWarehouseWeight" width="80" class="table_td" label="出库重量"></el-table-column>
-        <!-- <el-table-column prop="transferOutWeight" width="200" class="table_td" label="转出">
+        <el-table-column prop="transferOutWeight" width="200" class="table_td" label="转出">
           <template scope="scope">
             <el-popover v-if="scope.row.transferOutWeight>0"
               placement="top-start"
@@ -177,7 +177,7 @@
             </el-popover>
             <span v-else>{{ scope.row.transferOutWeight }}</span>
           </template>
-        </el-table-column> -->
+        </el-table-column>
         <el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)"></el-table-column>
         <el-table-column prop="surplusWeight" width="80" class="table_td" label="剩余重量"></el-table-column>
         <el-table-column prop="grainFund" width="80" class="table_td" label="粮款(元)"></el-table-column>
@@ -1027,6 +1027,7 @@ export default {
       this.$forceUpdate()
     },
     async goodrollOut(){
+      console.log(11111111111111)
       var concatarr=[]
       var arr=[]
       var arr3=[]
@@ -1041,12 +1042,16 @@ export default {
       for (const key in this.multipleSelection1) {
         var array = this.multipleSelection1[key]
         for (let i = 0; i < array.length; i++) {
-          if(array[i].amountEdPayable == 0 && !array[i].approveStatus||array[i].amountEdPayable == array[i].grainFund && !array[i].approveStatus){
+          if(array[i].amountEdPayable == 0 && !array[i].approveStatus&&array[i].redeemFlag!='赎'||array[i].amountEdPayable == array[i].grainFund && !array[i].approveStatus&&array[i].redeemFlag!='赎'){
             arr.push(array[i])
+          }else if(rray[i].redeemFlag=='赎'){
+            this.$message.error('请选择未货权转出的条目!')
+            return
           }else{
             this.$message.error('请选择已付全款或未请款的条目!')
             return
           }
+
           if (arr3.length == 0) {
             arr3.push(array[i])
           } else {
@@ -1102,10 +1107,11 @@ export default {
       this.rolloutData.amountEdPayable=0
       this.rolloutData.amountNotPayable=0
       this.rolloutData.amountIngPayable=0
+      console.log(arr)
       for (let i = 0; i < arr.length; i++) {
         this.rolloutData.transferOutWeight+=Number(arr[i].surplusWeight)
         this.rolloutData.amountEdPayable+=Number(arr[i].amountEdPayable)
-        this.outamountNotPayable+=Number(arr[i].amountNotPayable)
+        this.rolloutData.amountNotPayable+=Number(arr[i].amountNotPayable)
         this.rolloutData.amountIngPayable+=Number(arr[i].grainFund)
         num+=(Number(arr[i].surplusWeight*arr[i].avgCost))
       }