Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

achao 2 năm trước cách đây
mục cha
commit
afaa5d83d5
100 tập tin đã thay đổi với 3612 bổ sung603 xóa
  1. 4 0
      src/App.vue
  2. 2 0
      src/api/V2/contract/index.js
  3. 9 1
      src/api/V2/profitable/index.js
  4. 3 1
      src/api/V2/taskspost/index.js
  5. 9 1
      src/api/V2/warehouse/index.js
  6. 2 0
      src/global.js
  7. 2 0
      src/lang/zh.js
  8. 4 1
      src/model/contarct/index.js
  9. 13 1
      src/model/profitable/index.js
  10. 5 2
      src/model/tasksport/index.js
  11. 14 2
      src/model/warehouse/index.js
  12. 1 0
      src/utils/util.js
  13. 26 4
      src/views/contractManagement/acquisitionContract.vue
  14. 26 7
      src/views/contractManagement/acquisitionContractAdd.vue
  15. 3 0
      src/views/contractManagement/acquisitionContractExamine.vue
  16. 3 3
      src/views/contractManagement/collectionContractRecord.vue
  17. 68 67
      src/views/contractManagement/component/routers/route.js
  18. 1315 0
      src/views/contractManagement/inspectInfo.vue
  19. 24 3
      src/views/contractManagement/purchaseContract.vue
  20. 21 1
      src/views/contractManagement/purchaseContractAdd.vue
  21. 2 2
      src/views/contractManagement/purchaseContractCost.vue
  22. 20 0
      src/views/contractManagement/purchaseContractEdit.vue
  23. 4 0
      src/views/contractManagement/purchaseContractExamine.vue
  24. 69 3
      src/views/contractManagement/salesContract.vue
  25. 6 1
      src/views/contractManagement/salesContractAdd.vue
  26. 2 2
      src/views/contractManagement/salesContractCost.vue
  27. 1 1
      src/views/contractManagement/salesContractEdit.vue
  28. 2 2
      src/views/contractManagement/storageContractRecord.vue
  29. 7 6
      src/views/customerFundManagement/customerFundAdd.vue
  30. 7 7
      src/views/customerFundManagement/customerFundEdit.vue
  31. 2 2
      src/views/financialManagement/collectionManagementList.vue
  32. 14 14
      src/views/houseSelfCollect/customerManagementAdd.vue
  33. 2 2
      src/views/houseSelfCollect/inspectInfo.vue
  34. 2 2
      src/views/houseSelfCollect/inspectInfoLook.vue
  35. 175 57
      src/views/houseSelfCollect/inspectionManagementNew.vue
  36. 12 8
      src/views/houseSelfCollect/newWeighingManagement.vue
  37. 11 11
      src/views/houseSelfCollect/paymentManagement.vue
  38. 3 2
      src/views/houseSelfCollect/settlement.vue
  39. 2 2
      src/views/houseSelfCollect/weightCheck.vue
  40. 2 2
      src/views/houseSelfCollect/weightCheckRecord.vue
  41. 2 2
      src/views/outboundManagement/collectionManagement.vue
  42. 29 11
      src/views/outboundManagement/newQualityInspectionManagement.vue
  43. 86 48
      src/views/outboundManagement/weighingManagementNew.vue
  44. 32 13
      src/views/outboundManagement/weighingManagementrecord.vue
  45. 6 6
      src/views/platformaudit/grainpulseenterprisereview.vue
  46. 25 13
      src/views/profitable/cashout.vue
  47. 12 3
      src/views/profitable/cashoutaduit.vue
  48. 45 14
      src/views/profitable/cashoutaduitNQ.vue
  49. 11 1
      src/views/profitable/cashoutedit.vue
  50. 51 16
      src/views/profitable/component/routers/route.js
  51. 194 7
      src/views/profitable/contractprofitsdetails.vue
  52. 20 8
      src/views/profitable/expenseallot.vue
  53. 19 7
      src/views/profitable/expenseallotaduit.vue
  54. 49 10
      src/views/profitable/expensemanagementdetails.vue
  55. 22 3
      src/views/profitable/expensemanagentedit.vue
  56. 18 8
      src/views/profitable/expensemanagentlook.vue
  57. 503 0
      src/views/profitable/oilcost.vue
  58. 29 29
      src/views/profitable/payment.vue
  59. 24 8
      src/views/profitable/receipt.vue
  60. 22 7
      src/views/profitable/receiptaduit.vue
  61. 300 0
      src/views/profitable/storageCharge.vue
  62. 21 12
      src/views/statisticalReport/autoSettlementList.vue
  63. 3 3
      src/views/statisticalReport/huoyunList.vue
  64. 4 4
      src/views/statisticalReport/purchaseClosingCashierList.vue
  65. 2 2
      src/views/statisticalReport/purchaseReceiptStatisticsList.vue
  66. 3 3
      src/views/statisticalReport/salesClosingCashierList.vue
  67. 2 2
      src/views/statisticalReport/salesDeliveryReportList.vue
  68. 3 3
      src/views/statisticalReport/shippingList.vue
  69. 4 4
      src/views/statisticalReport/stockPurchaseReceiptReportList.vue
  70. 4 4
      src/views/statisticalReport/stockSaleOutReportList.vue
  71. 5 2
      src/views/taskManagement/inOutWarehouseTaskEdit.vue
  72. 1 1
      src/views/taskManagement/tranManagementWarehouseInOutTask.vue
  73. 33 8
      src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue
  74. 9 1
      src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue
  75. 14 6
      src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue
  76. 2 2
      src/views/tradeServicesManagement/repayment.vue
  77. 16 16
      src/views/tranManagement/tranManagementDriverAdd.vue
  78. 16 16
      src/views/tranManagement/tranManagementDriverEdit.vue
  79. 3 3
      src/views/tranManagement/tranManagementFireFeedback.vue
  80. 3 3
      src/views/tranManagement/tranManagementFireReceivingFeedback.vue
  81. 3 3
      src/views/tranManagement/tranManagementReceivingloading.vue
  82. 3 3
      src/views/tranManagement/tranManagementShippingFeedback.vue
  83. 3 3
      src/views/tranManagement/tranManagementTransporFeedback.vue
  84. 1 1
      src/views/tranManagement/tranManagementUnShippingFeedback.vue
  85. 1 1
      src/views/warehouse/warehouseManagementAdd.vue
  86. 2 2
      src/views/warehouse/warehouseManagementDelivery.vue
  87. 3 3
      src/views/warehouse/warehouseManagementEdit.vue
  88. 1 1
      src/views/warehouse/warehouseManagementGross.vue
  89. 1 1
      src/views/warehouse/warehouseManagementNoWeightIn.vue
  90. 1 1
      src/views/warehouse/warehouseManagementNoWeightOut.vue
  91. 2 2
      src/views/warehouse/warehouseManagementPerfectDelivery.vue
  92. 2 2
      src/views/warehouse/warehouseManagementPerfectput.vue
  93. 2 2
      src/views/warehouse/warehouseManagementPut.vue
  94. 1 1
      src/views/warehouse/warehouseManagementTare.vue
  95. 1 1
      src/views/warehousenew/inventoryCheck.vue
  96. 17 13
      src/views/warehousenew/warehouseManagementAdd.vue
  97. 2 2
      src/views/warehousenew/warehouseManagementDelivery.vue
  98. 13 27
      src/views/warehousenew/warehouseManagementEdit.vue
  99. 1 1
      src/views/warehousenew/warehouseManagementGross.vue
  100. 6 4
      src/views/warehousenew/warehouseManagementLook.vue

+ 4 - 0
src/App.vue

@@ -126,4 +126,8 @@ input[type='number'] {
 .el-table th>.cell{
   line-height: 20px!important;
 }
+.el-submenu__title{
+  display: flex;
+  align-items: center;
+}
 </style>

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

@@ -113,3 +113,5 @@ export const API_EDIT_CONTRACT ='/contractCostInfo/editInfo'
 export const API_DELETE_CONTRACT ='/contractCostInfo/deleteInfo'
 // 付款
 export const API_PAYMENT ='/contractCostInfo/payment'
+// 获取合同结算单价
+export const API_GET_SETTLEMENTPRICE ='/contractManagementInfo/settlementPrice'

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

@@ -67,4 +67,12 @@ export const API_EXPENSECOUNT ='/expenseInfo/api/expenseCount'
 // 采购账户信息
 export const API_PAYEEINFO ='/customerInfo/getPayeeInfo'
 // 收购账户信息
-export const API_BUYPAYEEINFO ='/identityAuthenticationInfo/getPayeeInfo'
+export const API_BUYPAYEEINFO ='/identityAuthenticationInfo/getPayeeInfo'
+// 获取关联合同
+export const API_RELATIONCONTRACT ='/contractManagementInfo/selectRelationContract'
+// 结算
+export const API_EDIT_CONTRACT ='/contractManagementInfo/editInfo'
+// 结算校验
+export const API_JUDGE_SETTLEMENT ='/contractManagementInfo/judgeSettlementConditions'
+// 油费列表
+export const API_FUELFILLINGINFO  ='/fuelFillingInfo/selectFillingPc'

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

@@ -58,4 +58,6 @@ export const API_GET_SOURCEOFGOODS = '/warehousingOrder/getSourceOfGoodsList'
 // 矫正
 export const API_SET_CORRECT= '/inOutWarehouseTask/api/correct'
 // 出库货源列表
-export const API_GET_GOODSOURCEINFO= '/warehousingOrder/selectGoodSourceInfo'
+export const API_GET_GOODSOURCEINFO= '/warehousingOrder/selectGoodSourceInfo'
+// 退库选择任务
+export const API_GET_TASKNO= '/inOutWarehouseTask/getOutTaskNo'

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

@@ -122,4 +122,12 @@ export const API_SET_PAYMONEY = 'warehousingOrder/api/payMoney'
 //审核
 export const API_WORKFLOWHANDLE ='/newWorkflow/api/handle'
 //查看可分配金额
-export const API_GET_EXPENSE='/expenseAllocationInfo/getExpenseAllocationInfo'
+export const API_GET_EXPENSE='/contractManagementInfo/getContractInfo'
+//入库单仓位
+export const API_GET_WAREHOUSEPOSITIONINFO='/warehousePositionInfo/selectPositionList'
+//入库单折干
+export const API_DRYOUT='/warehousingOrder/dryOut'
+//入库单利率查看
+export const API_GET_ENABLEDINFO='/enabledInfo/getEnabledInfo'
+//入库单利率修改
+export const API_SET_ENABLEDINFO='/enabledInfo/api/setEnabledInfo'

+ 2 - 0
src/global.js

@@ -1,10 +1,12 @@
 import Vue from 'vue'
+const uploadPath = process.env.VUE_APP_BASE_API + '/appendix/admin'
 import store from '@/vendors/vuex'
 // import router from './router'
 // 2.新创建一个vue实例
 const v = new Vue()
 export default {
   ws: {},
+  uploadPath,
   websocket: '',
   setWs: function(newWs) {
     this.ws = newWs

+ 2 - 0
src/lang/zh.js

@@ -665,6 +665,8 @@ export default {
     purchasDetail: '采购详情',
     billDetail: '备件结算详情',
     warehousingOrder: '入库单',
+    storageCharge:'仓储费',
+    oilcost:'油费',
     inventoryCheck:'库存盘点',
     sparepartMa: '物料采购',
     applDetailMa: '物料申请详情',

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

@@ -48,7 +48,8 @@ import {
     API_ADD_CONTRACT,
     API_EDIT_CONTRACT,
     API_DELETE_CONTRACT,
-    API_PAYMENT
+    API_PAYMENT,
+    API_GET_SETTLEMENTPRICE
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -162,3 +163,5 @@ export const editcontractcost = appRx.post(API_EDIT_CONTRACT, errorCatcher, erro
 export const delcontractcost = appRx.post(API_DELETE_CONTRACT, errorCatcher, errorHandle, filter)
 // 付款
 export const payment = appRx.post(API_PAYMENT, errorCatcher, errorHandle, filter)
+// 获取合同结算单价
+export const getsettlementprice = appRx.get(API_GET_SETTLEMENTPRICE, errorCatcher, errorHandle, filter)

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

@@ -35,7 +35,11 @@ import {
   API_DEL_ONE_ALLOCATIONINFO,
   API_EXPENSECOUNT,
   API_PAYEEINFO,
-  API_BUYPAYEEINFO
+  API_BUYPAYEEINFO,
+  API_RELATIONCONTRACT,
+  API_EDIT_CONTRACT,
+  API_JUDGE_SETTLEMENT,
+  API_FUELFILLINGINFO,
 } from '@/api/V2/profitable'
 //收支明细列表
 export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
@@ -107,3 +111,11 @@ export const getexpensecount= appRx.get(API_EXPENSECOUNT, errorCatcher, errorHan
 export const getpayeeinfo= appRx.get(API_PAYEEINFO, errorCatcher, errorHandle, filter)
 // 收购账户信息
 export const getbuypayeeinfo= appRx.get(API_BUYPAYEEINFO, errorCatcher, errorHandle, filter)
+// 获取关联合同
+export const getrelationcontract= appRx.get(API_RELATIONCONTRACT, errorCatcher, errorHandle, filter)
+//结算
+export const editcontract= appRx.post(API_EDIT_CONTRACT, errorCatcher, errorHandle, filter)
+//结算校验
+export const judgesettlement= appRx.post(API_JUDGE_SETTLEMENT, errorCatcher, errorHandle, filter)
+// 油费列表
+export const getfielfillinginfo= appRx.get(API_FUELFILLINGINFO, errorCatcher, errorHandle, filter)

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

@@ -30,7 +30,8 @@ import {
     API_GET_SOURCEGOOD,
     API_SET_CORRECT,
     API_GET_SOURCEOFGOODS,
-    API_GET_GOODSOURCEINFO
+    API_GET_GOODSOURCEINFO,
+    API_GET_TASKNO
 } from '@/api/V2/taskspost'
 //运输任务列表
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
@@ -89,4 +90,6 @@ export const getSourceOfGoodslist = appRx.get(API_GET_SOURCEOFGOODS, errorCatche
 //矫正
 export const setcorrect = appRx.post(API_SET_CORRECT, errorCatcher, errorHandle, filter)
 //出库货源列表
-export const getSourceOfGoodsinfo = appRx.get(API_GET_GOODSOURCEINFO, errorCatcher, errorHandle, filter)
+export const getSourceOfGoodsinfo = appRx.get(API_GET_GOODSOURCEINFO, errorCatcher, errorHandle, filter)
+//退库选择的任务编号
+export const gettaskNo = appRx.get(API_GET_TASKNO, errorCatcher, errorHandle, filter)

+ 14 - 2
src/model/warehouse/index.js

@@ -59,7 +59,11 @@ import {
     API_EDIT_WAREHOUSINGORDER,
     API_SET_PAYMONEY,
     API_WORKFLOWHANDLE,
-    API_GET_EXPENSE
+    API_GET_EXPENSE,
+    API_GET_WAREHOUSEPOSITIONINFO,
+    API_DRYOUT,
+    API_GET_ENABLEDINFO,
+    API_SET_ENABLEDINFO
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -183,4 +187,12 @@ export const workflowhandle = appRx.post(API_WORKFLOWHANDLE,errorCatcher, errorH
 // //费用详情
 // export const getexenseinfo = appRx.get(API_GET_EXPENSEINFO,errorCatcher, errorHandle, filter)
 //查看可分配金额
-export const getExpense = appRx.get(API_GET_EXPENSE,errorCatcher, errorHandle, filter)
+export const getExpense = appRx.get(API_GET_EXPENSE,errorCatcher, errorHandle, filter)
+//入库单仓位
+export const getposition = appRx.get(API_GET_WAREHOUSEPOSITIONINFO,errorCatcher, errorHandle, filter)
+//入库单折干
+export const dryout = appRx.post(API_DRYOUT,errorCatcher, errorHandle, filter)
+//入库单利率查看
+export const getenabledinfo = appRx.get(API_GET_ENABLEDINFO,errorCatcher, errorHandle, filter)
+//入库单利率修改
+export const setenabledinfo = appRx.post(API_SET_ENABLEDINFO,errorCatcher, errorHandle, filter)

+ 1 - 0
src/utils/util.js

@@ -5,6 +5,7 @@ import {
  * 动态插入css
  */
 
+
 export const loadStyle = (url, callback) => {
   if (!isInclude(url)) {
     const link = document.createElement('link');

+ 26 - 4
src/views/contractManagement/acquisitionContract.vue

@@ -1,4 +1,4 @@
-<!--现货采购合同-->
+<!--购合同-->
 <!--2019年5月30日 20:25:16 by jlx-->
 <template>
   <div>
@@ -85,6 +85,7 @@
               style="color: #8890b1" />
           </el-select>
           <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
+            :disabled="scope.row.status=='已完成'||scope.row.status=='已结算'"
             @change='selectstatuschange($event,scope.row)'
 
             :value="scope.row.status">
@@ -199,7 +200,13 @@
 
     <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
       @on-cancel="handleClose">
+      <div v-if="applstatus">
       <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" 
+        v-hasPermission="`contractManagement.buyContract.buyContractInfo.appl`"
+        />
+      </div>
+      <ws-upload v-else ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
     </WinseaContentModal>
   </div>
@@ -212,12 +219,13 @@
     billoperatehis,
     deletecontract,
     editInfo,
-    
+    getsettlementprice
   } from '@/model/contarct/index'
   import {
     downloadFile
   } from '@/utils/batchDown'
   import Pagination from '@/components/Pagination'
+  import { hasPermission } from '../../utils/getHasPermission'
   import WsUpload from '@/components/WsUpload'
   import {
     dayjs,
@@ -277,6 +285,7 @@
           month: dayjs().format('MM'),
         },
         contractList: [],
+        applstatus:false,
         deptBudgetList: {},
         historyList: [],
         appendixIdss: [],
@@ -349,6 +358,7 @@
       }
     },
     activated() {
+      this.applstatus=hasPermission('contractManagement.buyContract.buyContractInfo.appl')
       //cg.viewBudget
       //cg.viewSpareMoney
       // this.getVesselData();
@@ -415,12 +425,19 @@
       },
       selectstatuschange(e,row){
         var data={}
-        if(e=='发运结束'){
+        var text=`是否将状态改为${e}`
+        getsettlementprice({contractNo:row.contractNo}).toPromise()
+        .then((response) => {
+                if(e=='发运结束'){
           data={id: row.id,endFlag:1}
+        }else if(e=='已完成'){
+          data={id:row.id,settlementPrice:response}
+          text=`合同单价${response}元/吨,确定合同已完成?`
         }else{
           data={id: row.id}
         }
-        this.$confirm(`是否将状态改为${e}`, {
+        
+        this.$confirm(text, {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
@@ -443,6 +460,11 @@
             row.status=row.currectstatus
             return false
           })
+          })
+          .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          })
+        
       },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)

+ 26 - 7
src/views/contractManagement/acquisitionContractAdd.vue

@@ -52,8 +52,8 @@
           </el-select>
         </ws-form-item>
         <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
-          <el-radio v-model="deptBudgetList.deliverType" label="1">我方自提</el-radio>
           <el-radio v-model="deptBudgetList.deliverType" label="2">对方送货</el-radio>
+          <el-radio v-model="deptBudgetList.deliverType" label="1">我方自提</el-radio>
           <!-- <el-radio v-model="deptBudgetList.deliverType" v-if="deptBudgetList.priceType == '随行就市'" disabled label="1">
               我方自提</el-radio>
             <el-radio v-model="deptBudgetList.deliverType" v-else label="1">我方自提</el-radio>
@@ -74,8 +74,10 @@
               :value="item.customerName" />
           </el-select>
         </ws-form-item>
-        
-        
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营加价" span="1" prop="seller" class="readonly">
+          <ws-input v-model="deptBudgetList.jointVentureMarkup" placeholder="请输入合营加价" maxlength="3"
+            size="small" />
+        </ws-form-item>
         <!--交货日期(起)-->
         <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
           <ws-date-picker v-model="deptBudgetList.deliveryDateStart" type="date" placeholder="请选择交货日期(起)"
@@ -361,7 +363,8 @@ import { isUndefined } from 'xe-utils/methods'
         ChapterTwoList: [],
         agreementType: '',
         deptBudgetList: {
-          deliverType: '1',
+          agreementType:'收购合同',
+          deliverType: '2',
           sourceGoods:'',
           placeDelivery:'',
           addressUrl: '',
@@ -441,7 +444,7 @@ import { isUndefined } from 'xe-utils/methods'
     methods: {
       selectpriceType(e) {
         if (e == '随行就市') {
-          this.deptBudgetList.deliverType = '1'
+          // this.deptBudgetList.deliverType = '1'
         }
       },
       querySearch3(queryString, cb) {
@@ -590,7 +593,8 @@ import { isUndefined } from 'xe-utils/methods'
       },
       returnsales() {
         this.deptBudgetList =  {
-          deliverType: '1',
+          agreementType:'收购合同',
+          deliverType: '2',
           sourceGoods:'',
           placeDelivery:'',
           addressUrl: '',
@@ -785,6 +789,20 @@ import { isUndefined } from 'xe-utils/methods'
           })
           return
         }
+        if(!this.deptBudgetList.jointVentureMarkup&&this.deptBudgetList.jointVentureMarkup!=0){
+          this.$message({
+            message: '请输入合营加价!',
+            type: 'warning',
+          })
+          return
+        }
+        if(this.deptBudgetList.jointVentureMarkup<0||this.deptBudgetList.jointVentureMarkup>100){
+          this.$message({
+            message: '合营加价输入错误!',
+            type: 'warning',
+          })
+          return
+        }
        }
         
         // if (isNaN(this.deptBudgetList.sellerPhone)) {
@@ -1278,7 +1296,8 @@ import { isUndefined } from 'xe-utils/methods'
                 localStorage.setItem('deptBudgetList_data4', JSON.stringify(this.restaurants4));
                 this.$message.success('添加成功')
                 this.deptBudgetList = {
-                  deliverType: '1',
+                  agreementType:'收购合同',
+                  deliverType: '2',
                   sourceGoods:'',
                   placeDelivery:'',
                   addressUrl: '',

+ 3 - 0
src/views/contractManagement/acquisitionContractExamine.vue

@@ -71,6 +71,9 @@
         <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营方电话" span="1" prop="sellerPhone">
           {{ deptBudgetList.sellerPhone }}
         </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>

+ 3 - 3
src/views/contractManagement/collectionContractRecord.vue

@@ -169,7 +169,7 @@
             </ws-form-item>
             <ws-form-item label="上传截图"></ws-form-item>
             <div class="upLoad">
-              <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+              <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
                 :on-success="handleAvatarSuccess">
 
                 <div v-if='imageUrl.length>0'>
@@ -202,7 +202,7 @@
             </ws-form-item>
             <ws-form-item label="上传截图" prop=" paymentScreenshot"></ws-form-item>
             <div class="upLoad">
-              <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+              <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
                 :on-success="handleAvatarSuccess">
                 <!-- <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
@@ -1007,7 +1007,7 @@
       //上传付款截图
       handleAvatarSuccess(e) {
         console.log(this)
-        this.imageUrl.push(e.url)
+        this.imageUrl.push(e.data.url)
       },
       printBig() {
         let _list2 = []

+ 68 - 67
src/views/contractManagement/component/routers/route.js

@@ -12,6 +12,7 @@ const contractManagementRouter = {
     icon: '-hetongguanli'
   },
   children: [
+    
     // 现货采购合同
     {
       path: 'buyContract',
@@ -94,72 +95,7 @@ const contractManagementRouter = {
       },
       hidden: true
     },
-    // 收购合同
-    // {
-    //   path: 'acquisitionContract',
-    //   component: () =>
-    //     import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/acquisitionContract'),
-    //   name: 'acquisitionContract',
-    //   meta: {
-    //     title: 'acquisitionContract',
-    //     shortcutEntrance: 'contractManagement',
-    //     module: 'contractManagement.buyContract',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'收购合同'
-    //   }
-    // },
-    // //收购合同查看
-    // {
-    //   path: 'acquisitionContractExamine',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractExamine'),
-    //   name: 'acquisitionContractExamine',
-    //   meta: {
-    //     title: 'acquisitionContractExamine',
-    //     shortcutEntrance: 'contractManagement',
-    //     module: 'contractManagement.buyContract.buyContractInfo.view',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'收购合同查看'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden: true
-    // },
-    // //收购合同编辑
-    // {
-    //   path: 'acquisitionContractEdit',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractEdit'),
-    //   name: 'acquisitionContractEdit',
-    //   meta: {
-    //     title: 'acquisitionContractEdit',
-    //     shortcutEntrance: 'contractManagement',
-    //     module: 'contractManagement.buyContract.buyContractInfo.edit',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'收购合同编辑'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden: true
-    // },
-    // //收购合同添加
-    // {
-    //   path: 'acquisitionContractAdd',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractAdd'),
-    //   name: 'acquisitionContractAdd',
-    //   meta: {
-    //     title: 'acquisitionContractAdd',
-    //     shortcutEntrance: 'contractManagement',
-    //     module: 'contractManagement.buyContract.buyContractInfo.add',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'收购合同添加'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden: true
-    // },
+    
 
     // 期货采购合同
     // {
@@ -311,7 +247,72 @@ const contractManagementRouter = {
       },
       hidden: true
     },
-
+    // 收购合同
+    {
+      path: 'acquisitionContract',
+      component: () =>
+        import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/acquisitionContract'),
+      name: 'acquisitionContract',
+      meta: {
+        title: 'acquisitionContract',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同'
+      }
+    },
+    //收购合同查看
+    {
+      path: 'acquisitionContractExamine',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractExamine'),
+      name: 'acquisitionContractExamine',
+      meta: {
+        title: 'acquisitionContractExamine',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract.buyContractInfo.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同查看'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    //收购合同编辑
+    {
+      path: 'acquisitionContractEdit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractEdit'),
+      name: 'acquisitionContractEdit',
+      meta: {
+        title: 'acquisitionContractEdit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract.buyContractInfo.edit',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同编辑'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    //收购合同添加
+    {
+      path: 'acquisitionContractAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractAdd'),
+      name: 'acquisitionContractAdd',
+      meta: {
+        title: 'acquisitionContractAdd',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.buyContract.buyContractInfo.add',
+        permissicon: [],
+        keepAlive: true,
+        _title:'收购合同添加'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
     //期货销售合同
     // {
     //   path: 'futuresSalesContract',

+ 1315 - 0
src/views/contractManagement/inspectInfo.vue

@@ -0,0 +1,1315 @@
+<!--质检信息-->
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">{{ information }}信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <div class="substance">
+      <ws-form>
+        <div style="width: 80%; margin: 0 auto">
+          <div class="title">基本信息</div>
+          <ws-info-table>
+            <ws-form-item label="仓库" span="1" prop="warehouseName">
+              <ws-input v-model="warehouseName" placeholder="请输入仓库" maxlength="100" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="编号" span="1" prop="qualityNo">
+              <ws-input v-model="inspect.qualityNo" placeholder="请输入编号" maxlength="100" disabled size="small" />
+            </ws-form-item>
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
+              <ws-select v-model="inspect.binNumber" placeholder="请输入仓位号" class="typeselect" :disabled="disabled">
+                <ws-option v-for="item in getbinNumberList" :key="item.value" :label="item.value" :value="item.value" />
+              </ws-select>
+            </ws-form-item>
+
+            <ws-form-item label="囤位号" span="1" prop="storageTagNo">
+              <ws-input v-model="inspect.storageTagNo" placeholder="请输入囤位号" maxlength="15" size="small"
+                :disabled="disabled3" />
+            </ws-form-item>
+            <ws-form-item label="购粮性质" span="1" prop="natureOfGrainPurchase">
+              <ws-input v-model="inspect.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="10" size="small"
+                :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="货名" span="1" prop="goodsName">
+              <ws-select v-model="inspect.goodsName" placeholder="" class="typeselect" :disabled="disabledName" @change="waterContentChange">
+                <ws-option v-for="item in goodNameList" :key="item.goodsName" :label="item.goodsName"
+                  :value="item.goodsName" />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="客户" span="1" prop="customerName">
+              <el-select v-model="inspect.customerName" clearable filterable placeholder="请选择" class="typeselect"
+                @change="customerChange" :disabled="disabled1">
+                <el-option v-for="item in customerList" :key="item.valueKey" :label="item.value" :value="item.value" />
+              </el-select>
+            </ws-form-item>
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+              <!-- <el-select v-model="inspect.carNumber" clearable  @blur="selectBlur" filterable  placeholder="请选择" class="typeselect" @change="shipperNameChange"
+                :disabled="disabled1"> -->
+                
+                <el-select v-model="inspect.carNumber" clearable filterable allow-create default-first-option placeholder="请选择" class="typeselect" @change="shipperNameChange"
+                :disabled="disabled1">
+                <el-option v-for="(item,index) in carNumberList" :key="index" :label="item.carNo" :value="index" />
+              </el-select>
+              <!-- <ws-input @change='carnochange' v-model="inspect.carNumber" placeholder="请输入车牌号" maxlength="10" size="small"
+                :disabled="disabled" /> -->
+            </ws-form-item>
+            <ws-form-item label="箱号-1" span="1" prop="boxNo">
+              <ws-input :disabled="disabled" v-model="inspect.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+            </ws-form-item>
+            <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+              <ws-input :disabled="disabled" v-model="inspect.boxNoOther" placeholder="请输入箱号" maxlength="20"
+                size="small" />
+            </ws-form-item>
+            <ws-form-item label="封号-1" span="1" prop="titleNo">
+              <ws-input :disabled="disabled" v-model="inspect.titleNo" placeholder="请输入封号" maxlength="20"
+                size="small" />
+            </ws-form-item>
+            <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+              <ws-input :disabled="disabled" v-model="inspect.titleNoOther" placeholder="请输入封号" maxlength="20"
+                size="small" />
+            </ws-form-item>
+            
+            <ws-form-item v-if="inspect.paramType != '1'" label="扣重比" span="1" prop="buckleWeightRatio">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.buckleWeightRatio"
+                placeholder="请输入扣重比" maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item v-else label="扣杂" span="1" prop="buckleWeightRatio">
+              <ws-input type="number" style="padding-right:30px" @mousewheel.native.prevent
+                v-model="inspect.buckleMiscellaneous" @input="waterContentChange" placeholder="请输入扣杂" maxlength="100"
+                size="small" :disabled="disabled" />
+              <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous"
+                placeholder="请输入扣杂" maxlength="100" size="small" />
+              <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reBuckleMiscellaneous"
+                placeholder="未复检" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="类型" span="1" prop="type">
+              <ws-select v-model="inspect.type" disabled @change="typeChange">
+                <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="净重单价(元/公斤)" span="1" prop="tidalGrainPrice" v-if="inspect.type == '潮粮'">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.tidalGrainPrice" placeholder="请输入净重单价"
+                maxlength="10" size="small"  />
+            </ws-form-item>
+            <ws-form-item label="干粮单价(元/公斤)" span="2" prop="dryGrainPrice" v-if="inspect.type == '干粮'">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.dryGrainPrice" placeholder="请输入干粮单价"
+                maxlength="10" size="small"  />
+            </ws-form-item>
+              <ws-form-item label="复检备注" span="2" prop="reMemo" v-if="information == '编辑复检' || statusShow == '已复检'">
+                <ws-input type="textarea" v-model="inspect.reMemo" placeholder="请输入复检备注" maxlength="300" v-if="statusShow != '已复检'" />
+                <ws-input type="textarea" v-model="inspect.reMemo" placeholder="请输入复检备注" maxlength="300" v-else disabled />
+              </ws-form-item>
+               <ws-form-item label="车型" span="2" prop="dryGrainPrice" v-if="types==4&&warehouseName=='鲅鱼圈金信库'||types==2&&warehouseName=='鲅鱼圈金信库'">
+                <el-select v-model="inspect.carModel" clearable filterable placeholder="请选择" class="typeselect"
+                 :disabled="disabled3">
+                <el-option v-for="item in cartypeList" :key="item.constValue" :label="item.constValue" :value="item.constValue" />
+              </el-select>
+            </ws-form-item>
+          </ws-info-table>
+
+          <div class="title">质检数据&nbsp;&nbsp;&nbsp;&nbsp; <el-checkbox v-if='types==1||types==3' v-model="checked">补录</el-checkbox></div>
+          <ws-info-table>
+            <ws-form-item label="等级" span="1" prop="grade">
+              <ws-select v-model="inspect.grade" placeholder="请输入等级" class="typeselect" :disabled="disabled"
+                @change="waterContentChange">
+                <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                  :value="item.constValue" />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="杂质(%)" span="1" prop="impurity">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.impurity" placeholder="请输入杂质占比"
+                maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="水分(%)" span="1" prop="waterContent">
+
+              <ws-input type="number" @mousewheel.native.prevent style="padding-right:30px"
+                v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="100" size="small"
+                @change="waterContentChange('water')" :disabled="disabled" />
+              <ws-input v-if='types==4' type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent"
+                placeholder="请输入水分占比" maxlength="100" size="small" />
+              <ws-input v-else type="number" @mousewheel.native.prevent v-model="inspect.reWaterContent"
+                placeholder="未复检" maxlength="100" size="small" disabled />
+            </ws-form-item>
+            <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.mildewGrain" placeholder="请输入霉变粒占比"
+                maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.bulkDensity" placeholder="请输入容重"
+                maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.jiaorenli" placeholder="请输入热损伤占比"
+                maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+            <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.imperfectGrain"
+                placeholder="请输入不完善粒占比" maxlength="100" size="small" :disabled="disabled" />
+            </ws-form-item>
+          </ws-info-table>
+          <div class="but">
+            <el-button @click="cancel" v-if="types != 2" type="primary">取消</el-button>
+               <el-button @click="checkOk" v-if="types == 4" type="primary">确认初检信息</el-button>
+            <el-button @click="print" v-if="types ==3 || types ==1" type="primary">保存</el-button>
+            <el-button @click="print" v-if="types == 5 || types==4" type="primary">确认并打印</el-button>
+            <el-button @click="cancel" v-if="types == 2" type="primary">关闭</el-button>
+          </div>
+        </div>
+      </ws-form>
+    </div>
+    <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单" @opened='opendBtn' @close="closeDialog"
+      :close-on-click-modal="false">
+      <inspectInfoPrint :printData="inspect" ref="saveImg"></inspectInfoPrint>
+      <div style="text-align:center">
+        <el-button type="primary" @click="closePrint">关闭</el-button>
+        <el-button type="primary" @click="printSmall">打印小票</el-button>
+        <el-button type="primary" @click="printBig">打印单据</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    inspectAdd,
+    getbinNumber,
+    getcustomer,
+    getinspectLook,
+    getinspectLookUnitPrice,
+    getinspectLookGoods,
+    getinspectEdit,
+    getamount,
+    getCount,
+    getDryGrainPrice,
+    getshippinginfo,
+    postCheck,
+    getQRcode,
+    getcartype
+  } from '@/model/houseSelfCollect/index'
+  import {
+    packList
+  } from '@/model/contarct/index'
+  import inspectInfoPrint from './component/inspectInfoPrint.vue'
+  import html2canvas from 'html2canvas'
+  import axios from 'axios'
+  export default {
+    components: {
+      inspectInfoPrint,
+    },
+    watch: {},
+    data() {
+      return {
+        isShowPrint: false,
+        customerList1: [],
+        // warehouseList: {},
+        inspect: {
+          tidalGrainPrice: 0,
+          buckleWeightRatio: 0,
+          natureOfGrainPurchase: '贸易粮',
+          buckleMiscellaneous: 0,
+          paramType: 1,
+          type: '潮粮'
+        },
+        carNumberList: [],
+        disabled: false,
+        disabled1: false,
+        checked:false,
+        disabled2: false,
+        disabled3:false,
+        disabledName: false,
+        types: '1',
+        information: '添加初检',
+        goodNameList: [],
+        gradeList: [],
+        customerList: [],
+        getbinNumberList: [],
+        cartypeList:[],
+        cangid: '', //仓库id
+        warehouseName: '',
+        unitPrice: 0,
+        count: 0,
+        cangNo: '',
+        typeList: ['干粮', '潮粮'],
+        purchasePriceList: [],
+        id: '',
+        imgUrl: '',
+        printData: {},
+        num: 0,
+        tipFlag: true,
+        allowEdit: 0,
+        statusShow :''
+      }
+    },
+    activated() {
+      this.types = this.$route.query.type
+      this.allowEdit = this.$route.query.allowEdit
+      if (this.allowEdit == 0) {
+        this.disabled2 = true
+      } else if (this.allowEdit == 1) {
+        this.disabled2 = false
+      }
+      if (!this.types) {
+        this.types = 1
+        this.information = '添加初检'
+        this.disabled = false
+        this.inspect = {
+          tidalGrainPrice: 0,
+          buckleWeightRatio: 0,
+          natureOfGrainPurchase: '贸易粮',
+          type: '潮粮'
+        }
+      }
+      this.cangid = this.$route.query.cangid
+      this.warehouseName = this.$route.query.warehouseName
+      this.cangNo = this.$route.query.warehouseNo
+      this.count = Number(this.$route.query.count) + 1
+      this.statusShow = this.$route.query.status
+      // this.purchasePriceList = this.$route.query.purchasePriceList
+      this.id = this.$route.query.id
+      if (this.types == 2) {
+        this.disabled = true
+        this.disabled1 = true
+        this.disabled2 = true
+        this.disabledName = true
+        this.disabled3=true
+        this.information = '查看质检'
+      } else if (this.types == 3) {
+        this.disabled = false
+        this.disabled1 = true
+        this.disabledName = true
+        this.information = '编辑初检'
+      } else if (this.types == 4) {
+        this.disabled = true
+        this.disabled1 = true
+        this.disabledName = true
+        this.information = '编辑复检'
+      } else if (this.types == 5) {
+        this.disabled = false
+        this.disabled1 = true
+        this.disabledName = false
+        this.information = '确认质检'
+      } else {
+        this.disabled1 = false
+        this.disabled = false
+        this.disabledName = false
+      }
+      this.calculation()
+      this.getList(this.id)
+    },
+    methods: {
+      //确认初检信息
+      checkOk(){
+        this.$confirm('确定初检信息后,初检员不需要再次确认质检信息,是否确认提交', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              postCheck(this.inspect)
+                .toPromise()
+                .then((response) => {
+                   postCheck({id:this.id,flag:2})
+                    .toPromise()
+                    .then((response) => {
+                      if(response == 'OK'){
+                      this.$message.success('提交成功')
+                        this.$router.push({path: 'inspectionManagement' })
+                        }else{
+                          this.$message.error('提交失败')
+                        }
+                    })
+                }).catch(() => {
+              return false
+            })
+        })
+
+      },
+      printSmall() {
+        window.open('../../../static/inspection.html?type=1&dataList=' + JSON.stringify(this.inspect))
+      },
+      printBig() {
+        window.open('../../../static/inspection.html?type=2&dataList=' + JSON.stringify(this.inspect))
+      },
+      getdate() {
+        var date = new Date()
+        var year = date.getFullYear() //获取完整的年份(4位)
+        var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+        var datetime = date.getDate() //获取当前日(1-31)
+        if (mouth < 10) {
+          mouth = '0' + mouth
+        }
+        if (datetime < 10) {
+          datetime = '0' + datetime
+        }
+        return String(year) + String(mouth) + String(datetime)
+      },
+      calculation() {
+        let number = '000' + this.count
+        number = number.substring(number.length - 4, number.length)
+        this.inspect.qualityNo = 'SGRK' + this.getdate() + this.cangNo + number //SGRK+8位时间+3位仓库编号+4位序列号
+      },
+      selectBlur(e) {
+                if (e.target.value) {  
+                 // 不在表单的时候不需要判断,也不需要isname字段
+                    this.inspect.carNumber = e.target.value;
+                    // this.isName = true;   
+                } else {
+                    // this.isName = false;
+                }
+            },
+      opendBtn(){
+           html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: this.global.uploadPath,
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.inspect.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.inspect.flag = 0
+              } else if (this.types == 4) {
+                this.inspect.flag = 1
+              }
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+              
+                })
+            })
+          }
+        })
+      },
+      
+      closeDialog() {
+        html2canvas(this.$refs.saveImg.$el).then(canvas => {
+          let dataURL = canvas.toDataURL('image/png');
+          this.imgUrl = dataURL;
+          if (this.imgUrl !== '') {
+            let b = this.dataURLtoFile(this.imgUrl, 'printImg')
+            let formdata = new FormData();
+            formdata.append('file', b);
+            axios({
+              method: 'post',
+              url: this.global.uploadPath,
+              data: formdata
+            }).then((response) => {
+              //编辑接口
+              this.inspect.pictureAddress = response.data.url
+              console.log(this.types)
+              if (this.types == 3) {
+                this.inspect.flag = 0
+              } else if (this.types == 4) {
+                this.inspect.flag = 1
+              }
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.types = ''
+                  // this.inspect = [] 
+                  this.isShowPrint = false
+                  this.$router.push({
+                    path: 'inspectionManagement'
+                  })
+                })
+            })
+            this.dialogTableVisible = true;
+          }
+        })
+
+      },
+      typeChange() {
+        if (this.inspect.type == '干粮' && this.inspect.goodsName) {
+          getDryGrainPrice({
+              warehouseId: this.cangid,
+              goodsName: this.inspect.goodsName
+            })
+            .toPromise()
+            .then((response) => {
+              this.$set(this.inspect, 'dryGrainPrice', response)
+            })
+        }
+      },
+      closePrint() {
+        // this.inspect = [] 
+        this.isShowPrint = false
+      },
+      submit() {
+        this.inspect.warehouseName = this.warehouseName
+        this.inspect.compId = localStorage.getItem('ws-pf_compId')
+        if (this.types == 1) {
+          this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
+          this.$confirm('确定保存质检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              if (!this.inspect.tidalGrainPrice || this.inspect.tidalGrainPrice == 'NaN') {
+                this.inspect.tidalGrainPrice = 0
+              }
+              inspectAdd(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.checked=false
+                  this.$message.success('保存成功')
+                  getinspectLook({
+                      id: response
+                    })
+                    .toPromise()
+                    .then((response) => {
+                    //  let printString = localStorage.getItem('ws-pf_compId') + "," + row.qualityNo + "," + this.cangid 
+                    //       getQRcode({printString}).toPromise()
+                    //             .then((res) => {
+                            this.isShowPrint = true
+                            this.printData = response
+                            // this.printData.qrCodeUrl = res
+                            // })
+                      this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
+                    })
+                  this.isShowPrint = true
+                  //打印
+                  // this.$router.go(-1)
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        } else if (this.types == 3) {
+          this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
+          this.inspect.flag = 0
+          this.$confirm('确定保存初检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              // return
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  this.checked=false
+                  this.$router.push({
+                    path: 'inspectionManagement'
+                  })
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        } else if (this.types == 4) {
+          this.inspect.flag = 1
+          this.inspect.reInspector = localStorage.getItem('ws-pf_roleName') + localStorage.getItem('ws-pf_staffName')
+          this.$confirm('确定保存复检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              // return
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  
+                  // this.$router.push({
+                  //   path: 'inspectionManagement'
+                  // })
+                   getinspectLook({
+                      id: this.inspect.id
+                    })
+                    .toPromise()
+                    .then((response) => {
+                      this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
+                    })
+                  this.isShowPrint = true
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        } else if (this.types == 5) {
+          this.inspect.flag = 2
+          // this.inspect.reInspector=localStorage.getItem('ws-pf_roleName') + localStorage.getItem('ws-pf_staffName')
+          this.$confirm('确定保存质检信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              getinspectEdit(this.inspect)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('修改成功')
+                  getinspectLook({
+                      id: this.inspect.id
+                    })
+                    .toPromise()
+                    .then((response) => {
+                      this.inspect = response
+                      if (response.compName == '黑龙江秋收有限公司') {
+               				 this.inspect.compName = '黑龙江中天昊元贸易有限公司'
+              					}
+                    })
+                  this.isShowPrint = true
+                })
+            })
+            .catch(() => {
+              return false
+            })
+        }
+      },
+      print() {
+        if (!this.inspect.qualityNo) {
+          this.$message({
+            message: '编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.binNumber) {
+          this.$message({
+            message: '仓位不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.customerName) {
+          this.$message({
+            message: '客户不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.inspect.storageTagNo) {
+        //   this.$message({
+        //     message: '囤位号不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if(this.inspect.storageTagNo){
+            if (this.inspect.storageTagNo.length > 10) {
+            this.$message({
+              message: '囤位号不超过10个字符',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (!this.inspect.carNumber) {
+          this.$message({
+            message: '车牌号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.carNumber.length > 7 || this.inspect.carNumber.length != 7) {
+          this.$message({
+            message: '车牌号输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.boxNo && this.inspect.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.boxNoOther && this.inspect.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.titleNo && this.inspect.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.titleNoOther && this.inspect.titleNoOther.length > 20) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.paramType == '2') {
+          if (
+            this.inspect.buckleWeightRatio < 0 ||
+            this.inspect.buckleWeightRatio > 2
+          ) {
+            this.$message({
+              message: '扣重比输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            String(this.inspect.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.inspect.buckleWeightRatio).length -
+            (String(this.inspect.buckleWeightRatio).indexOf('.') + 1) >
+            2
+          ) {
+            this.$message({
+              message: '扣重比输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (!this.inspect.type) {
+          this.$message({
+            message: '类型不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.natureOfGrainPurchase) {
+          this.$message({
+            message: '购粮性质不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.inspect.type == '干粮') {
+          if (!this.inspect.dryGrainPrice) {
+            this.$message({
+              message: '干粮价格不能为空',
+              type: 'warning'
+            })
+            return
+          }
+          if (this.inspect.dryGrainPrice <= 0 || this.inspect.dryGrainPrice > 1000) {
+            this.$message({
+              message: '干粮价格输入错误',
+              type: 'warning'
+            })
+            return
+          }
+          if (
+            String(this.inspect.dryGrainPrice).indexOf('.') != -1 &&
+            String(this.inspect.dryGrainPrice).length - (String(this.inspect.dryGrainPrice).indexOf('.') + 1) > 4) {
+            this.$message({
+              message: '干粮价格输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        } else {
+          if (!this.inspect.tidalGrainPrice) {
+            this.$message({
+              message: '净重单价不能为空',
+              type: 'warning'
+            })
+            return
+          }
+          if (this.inspect.tidalGrainPrice <= 0 || this.inspect.tidalGrainPrice > 1000) {
+            this.$message({
+              message: '净重单价输入错误',
+              type: 'warning'
+            })
+            return
+          }
+        }
+        if(!this.checked){
+          if (!this.inspect.grade) {
+            this.$message({
+              message: '等级不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.inspect.impurity) {
+            this.$message({
+              message: '杂质不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (String(this.inspect.impurity).indexOf('.') != -1 && String(this.inspect.impurity).length - (String(this
+              .inspect.impurity).indexOf('.') + 1) > 1) {
+            this.$message({
+              message: '杂质输入错误',
+              type: 'warning',
+            })
+            return
+          }
+
+          if (this.inspect.impurity < 0 || this.inspect.impurity > 40) {
+            this.$message({
+              message: '杂质输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if( this.information != '编辑复检'){
+          if (!this.inspect.waterContent) {
+            this.$message({
+              message: '水分不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (this.inspect.waterContent < 0 || this.inspect.waterContent > 50) {
+            this.$message({
+              message: '水分输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (String(this.inspect.waterContent).indexOf('.') != -1 && String(this.inspect.waterContent).length - (String(
+              this.inspect.waterContent).indexOf('.') + 1) > 1) {
+            this.$message({
+              message: '水分输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          }
+          
+          if (!this.inspect.mildewGrain) {
+            this.$message({
+              message: '霉变粒不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (this.inspect.mildewGrain < 0 || this.inspect.mildewGrain > 40) {
+            this.$message({
+              message: '霉变粒输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (String(this.inspect.mildewGrain).indexOf('.') != -1 && String(this.inspect.mildewGrain).length - (String(
+              this.inspect.mildewGrain).indexOf('.') + 1) > 1) {
+            this.$message({
+              message: '霉变粒输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.inspect.bulkDensity) {
+            this.$message({
+              message: '容重不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect.bulkDensity).length - (String(
+              this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
+            this.$message({
+              message: '容重需输入整数',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.inspect.jiaorenli) {
+            this.$message({
+              message: '热损伤不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (this.inspect.jiaorenli < 0 || this.inspect.jiaorenli > 40) {
+            this.$message({
+              message: '热损伤输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (String(this.inspect.jiaorenli).indexOf('.') != -1 && String(this.inspect.jiaorenli).length - (String(this
+              .inspect.jiaorenli).indexOf('.') + 1) > 1) {
+            this.$message({
+              message: '热损伤输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.inspect.imperfectGrain) {
+            this.$message({
+              message: '不完善粒不能为空',
+              type: 'warning',
+            })
+            return
+          }
+          if (this.inspect.imperfectGrain < 0 || this.inspect.imperfectGrain > 40) {
+            this.$message({
+              message: '不完善粒输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          if (String(this.inspect.imperfectGrain).indexOf('.') != -1 && String(this.inspect.imperfectGrain).length - (
+              String(this.inspect.imperfectGrain).indexOf('.') + 1) > 1) {
+            this.$message({
+              message: '不完善粒输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        
+        getamount({
+            compId: localStorage.getItem('ws-pf_compId'),
+            customerNumberCard: this.inspect.customerNumberCard,
+            goodsName: this.inspect.goodsName,
+          })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < this.purchasePriceList.length; i++) {
+              if (
+                this.inspect.goodsName == this.purchasePriceList[i].goodsName
+              ) {
+                let count = (this.purchasePriceList[i].saleLimit - response / 1000).toFixed(2)
+                if (count <= 0) {
+                  count = 0
+                  this.$alert(
+                    '该客户累计销售' +
+                    this.inspect.goodsName +
+                    (response / 1000).toFixed(2) +
+                    '吨,还可售粮' +
+                    count +
+                    '吨',
+                    '提示', {
+                      confirmButtonText: '确定',
+                      callback: (action) => {
+                        this.$message({
+                          type: 'info',
+                          message: `累计售粮已超出上限`,
+                        })
+                      },
+                    }
+                  )
+                } else {
+                  this.submit();
+                }
+              }
+            }
+          })
+      },
+      cancel() {
+        this.types = ''
+        // this.inspect = [] 
+        this.$router.push({
+          path: 'inspectionManagement'
+        })
+
+      },
+      shipperNameChange(e) {
+        this.$set(this.inspect, 'customerName', this.carNumberList[e].shipperName)
+        this.$set(this.inspect, 'carNumber', this.carNumberList[e].carNo)
+        this.$set(this.inspect, 'customerPhone', this.carNumberList[e].shipperPhone)
+        for (let i = 0; i < this.customerList1.length; i++) {
+          if (this.customerList1[i].customerName == this.inspect.customerName) {
+            this.inspect.customerNumberCard = this.customerList1[i].customerNumberCard
+          }
+        }
+        if (this.inspect.goodsName && this.inspect.customerName) {
+          // //查看当前用户对应货名有未结算状态的送货
+          // let count = 0
+          // getCount({
+          //     compId: localStorage.getItem('ws-pf_compId'),
+          //     customerName: this.inspect.customerName,
+          //     goodsName: this.inspect.goodsName,
+          //     customerNumberCard: this.inspect.customerNumberCard
+          //   }).toPromise()
+          //   .then((response) => {
+          //     count = response
+          //   })
+          //  客户下拉校验
+          // getamount({
+          //   compId: localStorage.getItem('ws-pf_compId'),
+          //   customerName: this.inspect.customerName,
+          //   goodsName: this.inspect.goodsName,
+          //   customerNumberCard:this.inspect.customerNumberCard
+          // })
+          //   .toPromise()
+          //   .then((response) => {
+          //     for (let i = 0; i < this.purchasePriceList.length; i++) {
+          //       if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+          //         if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0)&&this.tipFlag) {
+          //           this.tipFlag = false
+          //           this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+          //         }
+          //       }
+          //     }
+          //   })
+        }
+      },
+      customerChange(e) {
+        let customers = e.split('(')
+        this.inspect.customerName = customers[0]
+        for (let i = 0; i < this.customerList1.length; i++) {
+          // console.log(this.customerList1[i].customerName, this.customerList1[i])
+          if (this.customerList1[i].customerName == this.inspect.customerName) {
+            // console.log(this.customerList1[i])
+            this.inspect.customerNumberCard = this.customerList1[i].customerNumberCard
+          }
+        }
+        this.inspect.customerPhone = customers[1].split(')')[0]
+        if (this.inspect.goodsName && this.inspect.customerName) {
+          // //查看当前用户对应货名有未结算状态的送货
+          // let count = 0
+          // getCount({
+          //     compId: localStorage.getItem('ws-pf_compId'),
+          //     customerName: this.inspect.customerName,
+          //     goodsName: this.inspect.goodsName,
+          //     customerNumberCard: this.inspect.customerNumberCard
+          //   }).toPromise()
+          //   .then((response) => {
+          //     count = response
+          //   })
+          //   //  客户下拉校验
+          // getamount({
+          //   compId: localStorage.getItem('ws-pf_compId'),
+          //   customerName: this.inspect.customerName,
+          //   goodsName: this.inspect.goodsName,
+          //   customerNumberCard:this.inspect.customerNumberCard
+          // })
+          //   .toPromise()
+          //   .then((response) => {
+          //     for (let i = 0; i < this.purchasePriceList.length; i++) {
+          //       if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+          //         if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0)&&this.tipFlag) {
+          //           this.tipFlag = false
+          //           this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+          //         }
+          //       }
+          //     }
+          //   })
+        }
+      },
+
+      waterContentChange(type) {
+        if (this.inspect.goodsName && type != 'water') {
+          if (this.inspect.goodsName.indexOf('潮粮') != -1) {
+            this.inspect.type = '潮粮'
+          } else {
+            this.inspect.type = '干粮'
+          }
+          if (!this.inspect.dryGrainPrice || this.inspect.dryGrainPrice == 0) {
+            getDryGrainPrice({
+                warehouseId: this.cangid,
+                goodsName: this.inspect.goodsName
+              })
+              .toPromise()
+              .then((response) => {
+                this.$set(this.inspect, 'dryGrainPrice', response)
+              })
+          }
+        //客户
+        getcustomer({
+            warehouseId: this.cangid,
+            goodsName:this.inspect.goodsName
+          })
+          .toPromise()
+          .then((response) => {
+            this.customerList1 = response
+            this.customerList = []
+            let customer = response
+            for (let i = 0; i < response.length; i++) {
+              if (response[i].supplier) {
+                customer = response[i].customerName + '(' + response[i].customerPhone + ')' + '-' + response[i]
+                  .supplier
+              } else {
+                customer = response[i].customerName + '(' + response[i].customerPhone + ')'
+              }
+              this.customerList.push({
+                valueKey: i,
+                value: customer,
+              })
+            }
+          })
+          for (var i = 0; i < this.purchasePriceList.length; i++) {
+            if (this.purchasePriceList[i].goodsName == this.inspect.goodsName) {
+              this.$set(this.inspect, 'buckleWeightRatio', this.purchasePriceList[i].deductWeight)
+              this.$set(this.inspect, 'paramType', this.purchasePriceList[i].paramType)
+
+            }
+          }
+        }
+        //潮粮单价改变事件
+        if (
+          this.inspect.goodsName &&
+          this.inspect.waterContent &&
+          this.inspect.grade
+        ) {
+          getinspectLookUnitPrice({
+              warehouseId: this.cangid,
+              goodsName: this.inspect.goodsName,
+              waterContent: this.inspect.waterContent,
+              grade: this.inspect.grade,
+            })
+            .toPromise()
+            .then((response) => {
+              if (this.inspect.paramType == '1') {
+                this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect
+                  .buckleMiscellaneous) / 100 * parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
+              } else {
+                if (this.inspect.type == '干粮') {
+                  if (response == 0) {
+                    getDryGrainPrice({
+                        warehouseId: this.cangid,
+                        goodsName: this.inspect.goodsName
+                      })
+                      .toPromise()
+                      .then((response) => {
+                        this.$set(this.inspect, 'dryGrainPrice', response)
+                      })
+                  } else {
+                    this.inspect.dryGrainPrice = response
+                  }
+                } else {
+                  this.inspect.tidalGrainPrice = response
+                }
+              }
+            })
+        }
+        if (this.inspect.goodsName && this.inspect.customerName) {
+          // //查看当前用户对应货名有未结算状态的送货
+          // let count = 0
+          // if (
+          //   this.inspect.goodsName &&
+          //   this.inspect.customerName
+          // ) {
+          //   getCount({
+          //       compId: localStorage.getItem('ws-pf_compId'),
+          //       customerName: this.inspect.customerName,
+          //       goodsName: this.inspect.goodsName,
+          //       customerNumberCard: this.inspect.customerNumberCard
+          //     }).toPromise()
+          //     .then((response) => {
+          //       count = response
+          //     })
+          //   // //  货名下拉校验
+          //   // getamount({
+          //   //   compId: localStorage.getItem('ws-pf_compId'),
+          //   //   customerName: this.inspect.customerName,
+          //   //   goodsName: this.inspect.goodsName,
+          //   //   customerNumberCard:this.inspect.customerNumberCard
+          //   // })
+          //   //   .toPromise()
+          //   //   .then((response) => {
+          //   //     for (let i = 0; i < this.purchasePriceList.length; i++) {
+          //   //       if (this.inspect.goodsName == this.purchasePriceList[i].goodsName) {
+          //   //         if ((this.purchasePriceList[i].saleLimit - response/1000 < 50 || count > 0 )&&this.tipFlag) {
+          //   //           this.tipFlag = false
+          //   //           this.$message('当前客户已累计销售我司' +this.inspect.goodsName + (response/1000).toFixed(2) +'吨,最高可售' +this.purchasePriceList[i].saleLimit +'吨。');
+          //   //         }
+          //   //       }
+          //   //     }
+          //   //   })
+          // }
+        }
+      },
+
+      getList(ids) {
+        // 车型
+        getcartype({constId:'QUA1'}).toPromise()
+          .then((response) => {
+            this.cartypeList=response
+          })
+        // 货名
+        getinspectLookGoods({
+            warehouseId: this.cangid
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodNameList = []
+            this.goodNameList = response
+            this.purchasePriceList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        getshippinginfo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseName: this.warehouseName
+          }).toPromise()
+          .then((response) => {
+            this.carNumberList = response
+          })
+        // 仓位
+        getbinNumber({
+            id: this.cangid
+          })
+          .toPromise()
+          .then((response) => {
+            this.getbinNumberList = []
+            for (let i = 0; i < response.warehousePositionInfoList.length; i++) {
+              this.getbinNumberList.push({
+                value: response.warehousePositionInfoList[i].binNumber,
+              })
+            }
+          })
+        if (this.types != 1) {
+          //查看
+          getinspectLook({
+              id: ids
+            })
+            .toPromise()
+            .then((response) => {
+              this.inspect = response
+            })
+        }
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.el-dialog__header {
+    text-align: center !important;
+    padding: 10px 0 !important;
+    height: auto !important;
+  }
+
+  /deep/.el-dialog__title {
+    font-size: 24px !important;
+  }
+
+  .center {
+    background: #f6f7fc;
+  }
+
+  .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    text-align: center;
+    background: #ffffff;
+    font-size: 14px;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+    // overflow: auto!important;
+    height: 55px;
+  }
+
+  /deep/.el-textarea__inner {
+    width: 100%;
+  }
+
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    margin: 10px;
+  }
+
+  .titleup {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 15px;
+    background: #8890b1;
+    margin-right: 5px;
+  }
+
+  .substance {
+    background: #ffffff;
+    width: 100%;
+    border-radius: 4px;
+    margin: 0 auto;
+    padding-top: 20px;
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  .el-table .el-table__body .cell {
+    text-align: center;
+  }
+
+  /deep/.el-table--enable-row-transition .el-table__body td {
+    text-align: center;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .titleup {
+    position: relative;
+  }
+
+  .titleup::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .but {
+    text-align: center;
+    // margin: 20px auto;
+  }
+</style>

+ 24 - 3
src/views/contractManagement/purchaseContract.vue

@@ -85,6 +85,7 @@
               style="color: #8890b1" />
           </el-select>
           <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
+          :disabled="scope.row.status=='已完成'||scope.row.status=='已结算'"
             @change='selectstatuschange($event,scope.row)'
 
             :value="scope.row.status">
@@ -199,7 +200,13 @@
 
     <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
       @on-cancel="handleClose">
+        <div v-if="applstatus">
       <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" 
+        v-hasPermission="`contractManagement.buyContract.buyContractInfo.appl`"
+        />
+      </div>
+      <ws-upload v-else ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
     </WinseaContentModal>
   </div>
@@ -212,7 +219,7 @@
     billoperatehis,
     deletecontract,
     editInfo,
-    
+    getsettlementprice
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -344,11 +351,13 @@
             },
           ],
         },
+        applstatus:false,
         value1: '',
         value2: '',
       }
     },
     activated() {
+      this.applstatus=hasPermission('contractManagement.buyContract.buyContractInfo.appl')
       //cg.viewBudget
       //cg.viewSpareMoney
       // this.getVesselData();
@@ -415,12 +424,19 @@
       },
       selectstatuschange(e,row){
         var data={}
-        if(e=='发运结束'){
+        var text=`是否将状态改为${e}`
+        getsettlementprice({contractNo:row.contractNo}).toPromise()
+        .then((response) => {
+                if(e=='发运结束'){
           data={id: row.id,endFlag:1}
+        }else if(e=='已完成'){
+          data={id:row.id,settlementPrice:response}
+          text=`合同单价${response}元/吨,确定合同已完成?`
         }else{
           data={id: row.id}
         }
-        this.$confirm(`是否将状态改为${e}`, {
+        
+        this.$confirm(text, {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
@@ -443,6 +459,11 @@
             row.status=row.currectstatus
             return false
           })
+          })
+          .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          })
+        
       },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)

+ 21 - 1
src/views/contractManagement/purchaseContractAdd.vue

@@ -80,6 +80,10 @@
           <el-radio v-model="deptBudgetList.transactionSubject" label="自营">自营</el-radio>
           <el-radio v-model="deptBudgetList.transactionSubject" label="合营">合营</el-radio>
         </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营加价" span="1" prop="seller" class="readonly">
+          <ws-input v-model="deptBudgetList.jointVentureMarkup" placeholder="请输入合营加价" maxlength="3"
+            size="small" />
+        </ws-form-item>
         <!--结算方式-->
         <ws-form-item label="结算方式" span="1" prop="settlementMethod">
           <ws-input v-model="deptBudgetList.settlementMethod" placeholder="请输入结算方式" maxlength="100" size="small" />
@@ -642,7 +646,7 @@ import { isUndefined } from 'xe-utils/methods'
       },
       selectpriceType(e) {
         if (e == '随行就市') {
-          this.deptBudgetList.deliverType = '1'
+          // this.deptBudgetList.deliverType = '1'
         }
       },
       feedbackLeaderChange(e){
@@ -966,6 +970,22 @@ import { isUndefined } from 'xe-utils/methods'
       },
 
       submit() {
+        if(this.deptBudgetList.transactionSubject == '合营'){
+        if(!this.deptBudgetList.jointVentureMarkup&&this.deptBudgetList.jointVentureMarkup!=0){
+          this.$message({
+            message: '请输入合营加价!',
+            type: 'warning',
+          })
+          return
+        }
+        if(this.deptBudgetList.jointVentureMarkup<0||this.deptBudgetList.jointVentureMarkup>100){
+          this.$message({
+            message: '合营加价输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+       }
         if(this.deptBudgetList.placeDelivery.indexOf('省')>-1){
               this.$message({
             message: '请手动删除详细地址中省市区/市,避免重复显示省市区/市!',

+ 2 - 2
src/views/contractManagement/purchaseContractCost.vue

@@ -165,7 +165,7 @@
         </el-form-item>
         
         <el-form-item label="附件">
-          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload ref='uploadfiles' :file-list='dataList' :action="global.uploadPath" list-type="picture-card"
             :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -398,7 +398,7 @@
       },
       handlefujian(file) {
         // console.log(file)
-        this.paymentScreenshot.push(file.url)
+        this.paymentScreenshot.push(file.data.url)
         // this.dialogVisible = true
       },
       handleRemove(file) {

+ 20 - 0
src/views/contractManagement/purchaseContractEdit.vue

@@ -30,6 +30,10 @@
         <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
           {{deptBudgetList.transactionSubject}}
         </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营加价" span="1" prop="seller" class="readonly">
+          <ws-input v-model="deptBudgetList.jointVentureMarkup" placeholder="请输入合营加价" maxlength="3"
+            size="small" />
+        </ws-form-item>
         <ws-form-item label="关联合同" v-if="deptBudgetList.agreementType=='补充协议'" span="1" prop="agreementNo">
           {{ deptBudgetList.agreementNo }}
         </ws-form-item>
@@ -720,6 +724,22 @@
           })
       },
       submit() {
+        if(this.deptBudgetList.transactionSubject == '合营'){
+        if(!this.deptBudgetList.jointVentureMarkup&&this.deptBudgetList.jointVentureMarkup!=0){
+          this.$message({
+            message: '请输入合营加价!',
+            type: 'warning',
+          })
+          return
+        }
+        if(this.deptBudgetList.jointVentureMarkup<0||this.deptBudgetList.jointVentureMarkup>100){
+          this.$message({
+            message: '合营加价输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+       }
         if (!this.deptBudgetList.contractNo) {
           this.$message({
             message: '合同编号不能为空',

+ 4 - 0
src/views/contractManagement/purchaseContractExamine.vue

@@ -55,12 +55,16 @@
         <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
           {{deptBudgetList.transactionSubject}}
         </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>

+ 69 - 3
src/views/contractManagement/salesContract.vue

@@ -88,7 +88,7 @@
           </el-select>
           <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
             @change='selectstatuschange($event,scope.row)'
-
+            :disabled="scope.row.status=='已完成'||scope.row.status=='已结算'"
             :value="scope.row.status">
               <el-option label="执行中" value="执行中"
               style="color: #8890b1" />
@@ -202,9 +202,35 @@
     </el-pagination>
     <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
       @on-cancel="handleClose">
+        <div v-if="applstatus">
       <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" 
+        v-hasPermission="`contractManagement.buyContract.buyContractInfo.appl`"
+        />
+      </div>
+      <ws-upload v-else ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
     </WinseaContentModal>
+    <el-dialog
+    title="合同完成"
+    :visible.sync="show"
+    width="30%"
+    :before-close="handleClose">
+    <span>该合同为随行就市的销售合同,结算单价确认后不可修改。</span>
+    <div style="margin-top:10px;">
+      <el-form class="priceform" ref="form" >
+        <el-form-item label="结算单价">
+          <el-input v-model="currectPrice"></el-input>
+          元/吨
+        </el-form-item>
+      </el-form>
+      
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="handleClose1">取 消</el-button>
+      <el-button type="primary" @click="selectstatuschange1()">确 定</el-button>
+    </span>
+  </el-dialog>
   </div>
 </template>
 <script>
@@ -215,6 +241,7 @@
     billoperatehis,
     deletecontract,
     editInfo,
+    getsettlementprice
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -246,6 +273,8 @@
         //弹出框
         dialogViewSpareMoney: false,
         dialogApproveFormVisible: false,
+        currectPrice:'',
+        currectdata:{},
         // 船舶类型
         monetaryKey: null,
         // 表格显示数据
@@ -357,11 +386,13 @@
           ],
         },
         currentDate:0,
+        applstatus:false,
         value1: '',
         value2: '',
       }
     },
     activated() {
+      this.applstatus=hasPermission('contractManagement.buyContract.buyContractInfo.appl')
       //cg.viewBudget
       //cg.viewSpareMoney
       // this.getVesselData();
@@ -380,10 +411,35 @@
           },
         })
       },
-      selectstatuschange(e,row){
+      handleClose1(){
+        this.show=false
+        this.getList()
+      },
+      async selectstatuschange1(){
+        var data={id:this.currectdata.id,settlementPrice:this.currectPrice}
+        editstatus(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.show=false
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+      },
+      async selectstatuschange(e,row){
+        var response=await getsettlementprice({contractNo:row.contractNo}).toPromise()
         var data={}
+        var text=`是否将状态改为${e}`
         if(e=='发运结束'){
           data={id: row.id,endFlag:1}
+        }else if(e=='已完成'&&row.priceType!='随行就市'){
+          data={id:row.id,settlementPrice:response}
+          text=`合同单价${response}元/吨,确定合同已完成?`
         }else{
           data={id: row.id}
         }
@@ -393,11 +449,13 @@
               title: '失败',
               message: '修改失败,未上传双章合同附件',
             })
+            row.status=row.currectstatus
             return
           }
           console.log(row)
         }
-        this.$confirm(`是否将状态改为${e}`, {
+        if(e!='已完成'||e=='已完成'&&row.priceType!='随行就市'){
+          this.$confirm(text, {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning',
@@ -420,6 +478,11 @@
             row.status=row.currectstatus
             return false
           })
+        }else{
+          this.currectdata=row
+          this.currectPrice=response
+          this.show=true
+        }      
       },
       onChange() {
         this.$refs.upload
@@ -990,6 +1053,9 @@
     width: 100%;
     z-index: 1;
   }
+  .priceform .el-input{
+    width:79%;
+  }
 
   /*.crt-main .textarea /deep/ .el-form-item__label {*/
   /*  height: 82px;*/

+ 6 - 1
src/views/contractManagement/salesContractAdd.vue

@@ -17,7 +17,7 @@
             <el-row>
             <el-col :span="12">
               <p style="color: #8890b1">
-                注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>” 标记的条目提交后不可修改。
+                注:“<span style="color:red">*</span>” 标记的条目提交后不可修改。
               </p>
               </el-col>
               <el-col :span="12" style='text-align:right;'>
@@ -129,6 +129,7 @@
             <!-- <el-autocomplete class="inline-input" v-model="deptBudgetList.buyer" :fetch-suggestions="querySearch1"
               placeholder="请输入买方名称" @select="handleSelect"></el-autocomplete> -->
               <el-select  v-model="deptBudgetList.transitCompany" placeholder="无" class="typeselect" filterable clearable>
+                <el-option key="0"  label="无" value="无" />
             <el-option v-for="item in customerinfo" :key="item.customerName"  :label="item.customerName"
               :value="item.customerName" />
               </el-select>
@@ -486,6 +487,7 @@
         gradeList: [],
         ChapterTwoList: [],
         deptBudgetList: {
+          transitCompany:'无',
           deliverType: '1',
           agreementType: '销售合同',
           finalTradingVolume: 0,
@@ -582,6 +584,7 @@
       cancelcopy(){
         this.contractNo=''
         this.deptBudgetList={
+          transitCompany:'无',
           deliverType: '1',
           agreementType: '销售合同',
           finalTradingVolume: 0,
@@ -695,6 +698,7 @@
       },
       returnsales() {
         this.deptBudgetList = {
+          transitCompany:'无',
           deliverType: '1',
           agreementType: '销售合同',
           finalTradingVolume: 0,
@@ -1512,6 +1516,7 @@
                 localStorage.setItem('deptBudgetList_data4', JSON.stringify(this.restaurants4));
                 this.$message.success('添加成功')
                 this.deptBudgetList = {
+                  transitCompany:'无',
                   deliverType: '1',
                   agreementType: '销售合同',
                   finalTradingVolume: 0,

+ 2 - 2
src/views/contractManagement/salesContractCost.vue

@@ -163,7 +163,7 @@
         </el-form-item>
         
         <el-form-item label="附件">
-          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload ref='uploadfiles' :file-list='dataList' :action="global.uploadPath" list-type="picture-card"
             :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -401,7 +401,7 @@
       },
       handlefujian(file) {
         // console.log(file)
-        this.paymentScreenshot.push(file.url)
+        this.paymentScreenshot.push(file.data.url)
         // this.dialogVisible = true
       },
       handleRemove(file) {

+ 1 - 1
src/views/contractManagement/salesContractEdit.vue

@@ -15,7 +15,7 @@
          <div class="remark">
       <h3>基本信息</h3>
       <p style="color: #8890b1">
-          &nbsp;&nbsp;注:基本信息均为必填项,“<span style="color:red">*</span>”
+          &nbsp;&nbsp;注:“<span style="color:red">*</span>”
           标记的条目提交后不可修改。
         </p>
     </div>

+ 2 - 2
src/views/contractManagement/storageContractRecord.vue

@@ -160,7 +160,7 @@
         </div>
         <div class="row">
           <div class="left">收款截图</div>
-          <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+          <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
             :on-success="handleAvatarSuccess">
             <div v-if='imageUrl.length>0'>
               <div style='display:inline-block;' v-for='item in imageUrl'>
@@ -605,7 +605,7 @@
       },
       //上传付款截图
       handleAvatarSuccess(e) {
-        this.imageUrl.push(e.url)
+        this.imageUrl.push(e.data.url)
       },
       // 查询列表
       getList() {

+ 7 - 6
src/views/customerFundManagement/customerFundAdd.vue

@@ -108,7 +108,7 @@
               <div class="unload-img">上传银行卡正面</div>
               <el-upload
                 class="avatar-uploader avatar-uploader3"
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.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="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="bankSuccess2"
                 :disabled="disabled"
@@ -285,11 +285,12 @@ export default {
       })
     },
     bankSuccess1(e) {
+      console.log(e.data)
       this.bankUps = 'bankUp'
-      this.bank[0] = e.url
-      this.imageUrl3 = e.url
+      this.bank[0] = e.data.url
+      this.imageUrl3 = e.data.url
       getBank({
-        bankImg: e.url,
+        bankImg: e.data.url,
       })
         .toPromise()
         .then((response) => {
@@ -306,7 +307,7 @@ export default {
     },
     bankSuccess2(e) {
       this.bankLows = 'bankLow'
-      this.bank[1] = e.url
+      this.bank[1] = e.data.url
       // this.imageUrl4 = e.url
       // getBank({
       //   bankImg: e.url,

+ 7 - 7
src/views/customerFundManagement/customerFundEdit.vue

@@ -108,7 +108,7 @@
               <div class="unload-img">上传银行卡正面</div>
               <el-upload
                 class="avatar-uploader avatar-uploader3"
-                action="https://www.zthymaoyi.com/upload/admin"
+                ::action="global.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="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="bankSuccess2"
                 :disabled="disabled"
@@ -280,10 +280,10 @@ export default {
     },
     bankSuccess1(e) {
       this.bankUps = 'bankUp'
-      this.bank[0] = e.url
-      this.imageUrl3 = e.url
+      this.bank[0] = e.data.url
+      this.imageUrl3 = e.data.url
       getBank({
-        bankImg: e.url,
+        bankImg: e.data.url,
       })
         .toPromise()
         .then((response) => {
@@ -300,8 +300,8 @@ export default {
     },
     bankSuccess2(e) {
       this.bankLows = 'bankLow'
-      this.bank[1] = e.url
-      this.imageUrl4 = e.url
+      this.bank[1] = e.data.url
+      this.imageUrl4 = e.data.url
       // getBank({
       //   bankImg: e.url,
       // })

+ 2 - 2
src/views/financialManagement/collectionManagementList.vue

@@ -163,7 +163,7 @@
     <!-- 附件弹框 -->
     <el-dialog width="60%" :visible.sync="accessoryTFs" :before-close="handlefujianClose" :append-to-body="true">
       <p>添加附件</p>
-      <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+      <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
         :on-success="handleAvatarSuccess">
         <i style='margin:0 auto;' class="el-icon-plus avatar-uploader-icon"></i>
       </el-upload>
@@ -360,7 +360,7 @@
         this.accessoryTFs = true
       },
       handleAvatarSuccess(res) {
-        this.addressUrls.push(res.url)
+        this.addressUrls.push(res.data.url)
         editinfo({
           addressUrl: this.addressUrls.join(),
           id: this.editlist.id

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

@@ -25,7 +25,7 @@
               <div class="unload-img">上传身份证人像面</div>
               <el-upload
                 class="avatar-uploader avatar-uploader1"
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="upLoadSuccess1"
                 :disabled="disabled"
@@ -39,7 +39,7 @@
               <div class="unload-img">上传身份证国徽面</div>
               <el-upload
                 class="avatar-uploader avatar-uploader2"
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="upLoadSuccess2"
                 :disabled="disabled"
@@ -55,7 +55,7 @@
               <div class="unload-img">上传银行卡正面</div>
               <el-upload
                 class="avatar-uploader avatar-uploader3"
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="bankSuccess1"
                 :disabled="disabled"
@@ -68,7 +68,7 @@
               <div class="unload-img">上传银行卡反面</div>
               <el-upload
                 class="avatar-uploader avatar-uploader4"
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="bankSuccess2"
                 :disabled="disabled"
@@ -431,10 +431,10 @@
       },
       upLoadSuccess1(e) {
         this.identityUp = 'up'
-        this.identity[0] = e.url
-        this.imageUrl1 = e.url
+        this.identity[0] = e.data.url
+        this.imageUrl1 = e.data.url
         getIdentity({
-            personImg: e.url
+            personImg: e.data.url
           })
           .toPromise()
           .then((response) => {
@@ -455,8 +455,8 @@
 
       upLoadSuccess2(e) {
         this.identityLow = 'low'
-        this.identity[1] = e.url
-        this.imageUrl2 = e.url
+        this.identity[1] = e.data.url
+        this.imageUrl2 = e.data.url
         // getIdentity({
         //     personImg: e.url
         //   })
@@ -480,10 +480,10 @@
       },
       bankSuccess1(e) {
         this.bankUps = 'bankUp'
-        this.bank[0] = e.url
-        this.imageUrl3 = e.url
+        this.bank[0] = e.data.url
+        this.imageUrl3 = e.data.url
         getBank({
-            bankImg: e.url
+            bankImg: e.data.url
           })
           .toPromise()
           .then((response) => {
@@ -501,8 +501,8 @@
       },
       bankSuccess2(e) {
         this.bankLows = 'bankLow'
-        this.bank[1] = e.url
-        this.imageUrl4 = e.url
+        this.bank[1] = e.data.url
+        this.imageUrl4 = e.data.url
         // getBank({
         //     bankImg: e.url
         //   })

+ 2 - 2
src/views/houseSelfCollect/inspectInfo.vue

@@ -372,7 +372,7 @@
             formdata.append('file', b);
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url: 'global.uploadPath',
               data: formdata
             }).then((response) => {
               //编辑接口
@@ -405,7 +405,7 @@
             formdata.append('file', b);
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url: 'global.uploadPath',
               data: formdata
             }).then((response) => {
               //编辑接口

+ 2 - 2
src/views/houseSelfCollect/inspectInfoLook.vue

@@ -411,7 +411,7 @@
             formdata.append('file', b);
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata
             }).then((response) => {
               //编辑接口
@@ -444,7 +444,7 @@
             formdata.append('file', b);
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata
             }).then((response) => {
               //编辑接口

+ 175 - 57
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -3,7 +3,7 @@
   <div style='overflow-y:scroll;'>
     <BaseHeaderLayout :leftSpan="16">
       <template slot="left">
-        <el-button v-if='this.zjJurisdiction' @click='warehousetypechange(1)' :type="serviceManagementType == 1 ? 'primary' : ''">贸易入库</el-button>
+        <el-button @click='warehousetypechange(1)' :type="serviceManagementType == 1 ? 'primary' : ''">贸易入库</el-button>
         <el-button @click='warehousetypechange(3)' :type="serviceManagementType == 3 ? 'primary' : ''">收购入库</el-button>
       </template>
       <template slot="right">
@@ -18,15 +18,15 @@
     <div style='margin:10px;'>
       <el-row :gutter="20">
         <el-col :span="8">
-          <el-button @click='statustypechange("初检")' :type="statusTypetext == '初检' ? 'primary' : ''">初检</el-button>
-          <el-button @click='statustypechange("复检")' :type="statusTypetext == '复检' ? 'primary' : ''">复检</el-button>
-          <el-button @click='statustypechange("确认")' :type="statusTypetext == '确认' ? 'primary' : ''">确认</el-button>
+          <el-button v-if="qyJurisdiction||zjJurisdiction"  @click='statustypechange("初检")' :type="statusTypetext == '初检' ? 'primary' : ''">初检</el-button>
+          <el-button v-if="fjJurisdiction" @click='statustypechange("复检")' :type="statusTypetext == '复检' ? 'primary' : ''">复检</el-button>
+          <el-button v-if="qrJurisdiction" @click='statustypechange("确认")' :type="statusTypetext == '确认' ? 'primary' : ''">确认</el-button>
         </el-col>
         <el-col :span="8">
           <div style='text-align:center;'>
             <span>&nbsp;</span>
-            <el-button @click='add' type="primary" v-if="qyJurisdiction&&statusTypetext == '初检' || serviceManagementType == 1">新增</el-button>
-            <el-button @click='deletelist' type="danger" v-if="qyJurisdiction&&statusTypetext == '初检' || serviceManagementType == 1">删除
+            <el-button @click='add' type="primary" v-if="qyJurisdiction&&statusTypetext == '初检' || serviceManagementType == 1&&statusTypetext == '初检'">新增</el-button>
+            <el-button @click='deletelist' type="danger" v-if="qyJurisdiction&&statusTypetext == '初检' || serviceManagementType == 1&&statusTypetext == '初检'">删除
             </el-button>
           </div>
         </el-col>
@@ -54,29 +54,29 @@
                 </el-checkbox>
               </div>
               <ws-info-table>
-                <ws-form-item v-if='serviceManagementType == 1' label="任务编号" span="1" prop="inOutTaskNo">
+                <!-- <ws-form-item v-if='serviceManagementType == 1' label="任务编号" span="1" prop="inOutTaskNo">
                   <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.inOutTaskNo"
                     placeholder="请选择任务编号" class="typeselect" @change="contractNoChange">
                     <el-option v-for="item in taskNolist" :key="'renwu' + item.inOutTaskNo" :label="item.inOutTaskNo"
                       :value="item.inOutTaskNo" />
                   </el-select>
-                </ws-form-item>
-                <!-- <ws-form-item v-if='serviceManagementType == 3 && qyJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"||serviceManagementType == 1' label="任务编号" span="1" prop="inOutTaskNo">
+                </ws-form-item> -->
+                <ws-form-item v-if='serviceManagementType == 3 && qyJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"||serviceManagementType == 1' label="任务编号" span="1" prop="inOutTaskNo">
                   <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.inOutTaskNo"
                     placeholder="请选择任务编号" class="typeselect" @change="contractNoChange">
                     <el-option v-for="item in taskNolist" :key="'renwu' + item.inOutTaskNo" :label="item.inOutTaskNo"
                       :value="item.inOutTaskNo" />
                   </el-select>
-                </ws-form-item> -->
+                </ws-form-item>
                 <ws-form-item v-if='serviceManagementType==3&&deptBudgetList.id' label="业务编号" span="1" prop="qualityNo">
                   <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
                     size="small" />
                 </ws-form-item>
-                <!-- <ws-form-item v-if='serviceManagementType == 3 && qyJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="合同编号"
+                <ws-form-item v-if='serviceManagementType == 3 && qyJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="合同编号"
                   span="1" prop="contractNo">
                   <ws-input v-model="deptBudgetList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
                     size="small" />
-                </ws-form-item> -->
+                </ws-form-item>
                 <ws-form-item v-if='serviceManagementType == 3 && zjJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="购粮性质" span="1"
                   prop="natureOfGrainPurchase">
                   <ws-input v-model="deptBudgetList.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="10"
@@ -91,7 +91,11 @@
                 </ws-form-item>
                 <ws-form-item label="货名" span="1"
                   prop="inOutTaskNo">
-                  <el-select :disabled='disablednotarize || goodsdisabled' v-model="deptBudgetList.goodsName" clearable
+                  <!-- <el-select :disabled='disablednotarize || goodsdisabled' v-model="deptBudgetList.goodsName" clearable
+                    filterable placeholder="请选择" class="typeselect" @change="goodsNameChange">
+                    <el-option v-for="item in goodnameList" :key="'huoming' + item.id" :label="item.goodsName" :value="item.goodsName" />
+                  </el-select> -->
+                  <el-select disabled v-model="deptBudgetList.goodsName" clearable
                     filterable placeholder="请选择" class="typeselect" @change="goodsNameChange">
                     <el-option v-for="item in goodnameList" :key="'huoming' + item.id" :label="item.goodsName" :value="item.goodsName" />
                   </el-select>
@@ -361,12 +365,12 @@
                     maxlength="40" size="small" />
                 </ws-form-item>
                 <!--容重(克/升)-->
-                <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+                <ws-form-item :label="deptBudgetList.goodsName!='大豆'?'容重(克/升)':'蛋白'" span="1" prop="bulkDensity">
                   <ws-input v-if='statusTypetext != "复检"'
-                    v-model="deptBudgetList.bulkDensity" type="number" @mousewheel.native.prevent placeholder="请输入容重"
+                    v-model="deptBudgetList.bulkDensity" type="number" @mousewheel.native.prevent :placeholder="deptBudgetList.goodsName!='大豆'?'请输入容重':'请输入蛋白'"
                     maxlength="40" size="small" />
                   <ws-input :disabled='disablednotarize' v-if='statusTypetext != "初检"'
-                    v-model="deptBudgetList.reBulkDensity" type="number" @mousewheel.native.prevent placeholder="请输入容重"
+                    v-model="deptBudgetList.reBulkDensity" type="number" @mousewheel.native.prevent :placeholder="deptBudgetList.goodsName!='大豆'?'请输入容重':'请输入蛋白'"
                     maxlength="40" size="small" />
                 </ws-form-item>
                 <!--霉变粒(%)<=-->
@@ -500,6 +504,9 @@ import {
   getstaff,
   getReceiptTaskNo,
 } from '@/model/warehouse/index'
+import {
+    gettask,
+  } from '@/model/outboundManagement/index'
 import inspectInfoPrint from './component/inspectInfoPrint.vue'
 import html2canvas from 'html2canvas'
 import axios from 'axios'
@@ -560,6 +567,7 @@ export default {
       goodsdisabled: false,
       customerName: '',
       customerPhone: '',
+      contractFlag:7,
       deptBudgetList: {
         type: '干粮',
         freight: 0,
@@ -681,6 +689,9 @@ export default {
       isZj: false,
       qyJurisdiction: false,
       zjJurisdiction: false,
+      fjJurisdiction:false,
+      qrJurisdiction:false
+      
     }
   },
   mounted() {
@@ -692,7 +703,10 @@ export default {
     //获取钎样员权限
     this.qyJurisdiction = getHp('acquisitionManagement.acquisitionQuality.qview')
     this.zjJurisdiction= getHp('acquisitionManagement.acquisitionQuality.initial')
-    
+// 复检
+    this.fjJurisdiction= getHp('acquisitionManagement.acquisitionQuality.again')
+    // 确认
+    this.qrJurisdiction= getHp('acquisitionManagement.acquisitionQuality.con')
     console.log(111111111)
     console.log(this.qyJurisdiction)
     //获取质检员权限
@@ -1005,7 +1019,7 @@ export default {
           formdata.append('file', b);
           axios({
             method: 'post',
-            url: 'https://www.zthymaoyi.com/upload/admin',
+            url:this.global.uploadPath,
             data: formdata
           }).then((response) => {
             //编辑接口
@@ -1037,7 +1051,7 @@ export default {
           formdata.append('file', b);
           axios({
             method: 'post',
-            url: 'https://www.zthymaoyi.com/upload/admin',
+            url:this.global.uploadPath,
             data: formdata
           }).then((response) => {
             //编辑接口
@@ -1258,7 +1272,8 @@ export default {
             mildewGrain: response.mildewGrain,
             reMildewGrain: response.reMildewGrain,
           }
-          this.deptBudgetList.carNo = response.carNumber
+          this.$set(this.deptBudgetList,'carNo',response.carNumber)
+          this.outType=this.deptBudgetList.outType
           for (let i = 0; i < this.taskNolist.length; i++) {
             if (this.taskNolist[i].inOutTaskNo == this.deptBudgetList.inOutTaskNo) {
               console.log(this.taskNolist[i])
@@ -1404,16 +1419,17 @@ export default {
     },
     statustypechangelist(status) {
       // debugger
+      
+      // if (this.serviceManagementType == 3) {
+      //   if(this.statusTypetext=='初检'){
+      //     this.statusType = 0
+      //   }else if(this.statusTypetext=='复检'){
+      //     this.statusType = 1
+      //   }else{
+      //     this.statusType = 2
+      //   }
+      // }
       this.statusType = status
-      if (this.serviceManagementType == 3) {
-        if(this.statusTypetext=='初检'){
-          this.statusType = 0
-        }else if(this.statusTypetext=='复检'){
-          this.statusType = 1
-        }else{
-          this.statusType = 2
-        }
-      }
       getinspectList({
         compId: localStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
@@ -1795,11 +1811,20 @@ export default {
       this.deptBudgetList.warehouseInOutDetail.reBulkDensity = this.deptBudgetList.reBulkDensity
       if (this.deptBudgetList.reBulkDensity) {
         if (isNaN(this.deptBudgetList.reBulkDensity)) {
-          this.$message({
-            message: '复检容重(克/升)非数字!',
-            type: 'warning',
-          })
-          return
+          
+          if(this.deptBudgetList.goodsName!='大豆'){
+            this.$message({
+              message: '复检容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }else{
+              this.$message({
+              message: '复检蛋白非数字!',
+              type: 'warning',
+            })
+            return
+          }
         }
         if (
           (this.deptBudgetList.reBulkDensity &&
@@ -1816,11 +1841,20 @@ export default {
           this.deptBudgetList.reBulkDensity > 1000 ||
           this.deptBudgetList.reBulkDensity < 0
         ) {
-          this.$message({
-            message: '复检容重输入错误',
-            type: 'warning',
-          })
-          return
+          if(this.deptBudgetList.goodsName!='大豆'){
+            this.$message({
+              message: '复检容重输入错误',
+              type: 'warning',
+            })
+            return
+            }else{
+              this.$message({
+                message: '复检蛋白输入错误',
+                type: 'warning',
+              })
+              return
+            }
+          
         }
       }
       this.$confirm('确定初检信息后,初检员不需要再次确认质检信息,是否确认提交', '提示', {
@@ -1958,6 +1992,13 @@ export default {
       if (this.reader) {
         this.reader.cancel()
       }
+      if(this.qyJurisdiction&&this.serviceManagementType==1&&this.statusTypetext=='初检'){
+        this.$message({
+            message: '钎样员只能进行收购入库添加',
+            type: 'warning',
+          })
+          return
+      }
       if(this.serviceManagementType==3&&this.zjJurisdiction&&this.statusTypetext=='初检'&&!this.deptBudgetList.id&&!this.qyJurisdiction){
          this.$message({
             message: '请选择待初检数据',
@@ -2231,18 +2272,36 @@ export default {
           this.deptBudgetList.warehouseInOutDetail.bulkDensity =
             this.deptBudgetList.bulkDensity
           if (!this.deptBudgetList.bulkDensity) {
-            this.$message({
-              message: '请输入容重!',
-              type: 'warning',
-            })
-            return
+            if(this.deptBudgetList.goodsName!='大豆'){
+              this.$message({
+                message: '请输入容重!',
+                type: 'warning',
+              })
+              return
+            }else{
+              this.$message({
+                message: '请输入蛋白!',
+                type: 'warning',
+              })
+              return
+            }
+            
           }
           if (isNaN(this.deptBudgetList.bulkDensity)) {
-            this.$message({
+            if(this.deptBudgetList.goodsName!='大豆'){
+              this.$message({
               message: '容重(克/升)非数字!',
               type: 'warning',
             })
             return
+            }else{
+              this.$message({
+              message: '蛋白非数字!',
+              type: 'warning',
+            })
+            return
+            }
+            
           }
           if (
             (this.deptBudgetList.bulkDensity &&
@@ -2253,11 +2312,20 @@ export default {
             this.deptBudgetList.bulkDensity > 1000 ||
             this.deptBudgetList.bulkDensity < 0
           ) {
-            this.$message({
+            
+            if(this.deptBudgetList.goodsName!='大豆'){
+              this.$message({
               message: '容重输入错误',
               type: 'warning',
             })
             return
+            }else{
+              this.$message({
+              message: '蛋白输入错误',
+              type: 'warning',
+            })
+            return
+            }
           }
 
         }
@@ -2407,11 +2475,20 @@ export default {
         this.deptBudgetList.warehouseInOutDetail.reBulkDensity = this.deptBudgetList.reBulkDensity
         if (this.deptBudgetList.reBulkDensity) {
           if (isNaN(this.deptBudgetList.reBulkDensity)) {
-            this.$message({
-              message: '复检容重(克/升)非数字!',
-              type: 'warning',
-            })
-            return
+            
+            if(this.deptBudgetList.goodsName!='大豆'){
+              this.$message({
+                message: '复检容重(克/升)非数字!',
+                type: 'warning',
+              })
+              return
+            }else{
+              this.$message({
+                message: '复检蛋白非数字!',
+                type: 'warning',
+              })
+              return
+            }
           }
           if (
             (this.deptBudgetList.reBulkDensity &&
@@ -2428,11 +2505,19 @@ export default {
             this.deptBudgetList.reBulkDensity > 1000 ||
             this.deptBudgetList.reBulkDensity < 0
           ) {
+            if(this.deptBudgetList.goodsName!='大豆'){
             this.$message({
               message: '复检容重输入错误',
               type: 'warning',
             })
             return
+            }else{
+              this.$message({
+                message: '复检蛋白输入错误',
+                type: 'warning',
+              })
+              return
+            }
           }
         }
 
@@ -2608,6 +2693,8 @@ export default {
       }
       this.deptBudgetList.warehouseNo = this.warehouseNo
       console.log(this.deptBudgetList, '入库对象')
+      this.deptBudgetList.agent =
+                localStorage.getItem('ws-pf_staffName')
       // return
       this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
@@ -2631,14 +2718,18 @@ export default {
               if(this.deptBudgetList.id){
                   var zjid=JSON.parse(JSON.stringify(this.deptBudgetList.id))
                   var kid=JSON.parse(JSON.stringify(this.deptBudgetList.warehouseInOutId))
+                  // delete this.deptBudgetList.status
+                  this.$delete(this.deptBudgetList,'status')
+                  // var status=JSON.parse(JSON.stringify(this.deptBudgetList.warehouseInOutId))
                 }
+                // console.log(delete this.deptBudgetList.status)
               if (this.statusTypetext == '初检') {
-                this.deptBudgetList.agent =
-                localStorage.getItem('ws-pf_staffName')
+                
                 
                 if(this.deptBudgetList.id){
                   this.deptBudgetList.id=kid
                 }
+                
                 addstorageputList(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
@@ -2801,6 +2892,7 @@ export default {
                           })
                           this.getList()
                           this.selectWarehouse()
+                          this.add()
                       })
                     }
                     
@@ -3061,10 +3153,21 @@ export default {
               this.serviceManagementType=3
               
             }
+            if(this.qyJurisdiction&&!this.fjJurisdiction&&!this.qrJurisdiction||this.zjJurisdiction&&!this.fjJurisdiction&&!this.qrJurisdiction){
+              this.statusTypetext='初检'
+              
+            }else if(this.fjJurisdiction&&!this.qyJurisdiction&&!this.qrJurisdiction&&!this.zjJurisdiction){
+              this.statusTypetext='复检'
+              
+            }else if(this.qrJurisdiction&&!this.qyJurisdiction&&!this.fjJurisdiction&&!this.zjJurisdiction){
+              this.statusTypetext='确认'
+            }
             if(this.serviceManagementType==3){
+              this.contractFlag=10
               this.taskflag=3
             }else{
               this.taskflag=2
+              this.contractFlag=7
             }
           getReceiptTaskNo({
             flag: this.taskflag,
@@ -3089,9 +3192,11 @@ export default {
         //   //解决冲突别解决没了(注意)
         this.taskflag=3
         this.outType = '他运'
+        this.contractFlag=10
       } else {
         this.taskflag=2
         this.outType = ''
+        this.contractFlag=7
       }
       console.log(this.taskflag,22222222)
       getReceiptTaskNo({
@@ -3153,8 +3258,21 @@ export default {
           console.log(this.outContractNo[i])
           this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
           this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+          this.goodsNameChange(this.deptBudgetList.goodsName)
           this.deptBudgetList.grade = this.outContractNo[i].grade
           if (this.outContractNo[i].inOutType == '采购入库') {
+            if(this.outContractNo[i].deliverType==1){
+                gettask({contractNo:this.outContractNo[i].contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+                  // console.log(response)
+                  if(!response){
+                    this.$message({
+                        message: '联系内勤创建运输任务',
+                        type: 'warning',
+                        
+                      });
+                  }
+                })
+              }
             this.customerName = this.outContractNo[i].buyer
             this.customerPhone = this.outContractNo[i].buyerPhone
             this.warehouseTradeCount = this.warehouseTradeCount1
@@ -3214,9 +3332,9 @@ export default {
           } else {
             this.isSelectType = true
           }
-          if (this.outContractNo[i].priceType == '随行就市') {
-            this.disabled1 = !this.disabled1
-          }
+          // if (this.outContractNo[i].priceType == '随行就市') {
+          //   this.disabled1 = !this.disabled1
+          // }
 
           if (this.outContractNo[i].deliverType == '1') {
             this.carstatus = true
@@ -3371,7 +3489,7 @@ export default {
       //合同编号
       xialaNo({
         compId: localStorage.getItem('ws-pf_compId'),
-        flag: 7,
+        flag: this.contractFlag,
       })
         .toPromise()
         .then((response) => {

+ 12 - 8
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -180,8 +180,8 @@
               <div class="screen_left">
                 <div @click="cutstatus(1)" :class="status==1?'select_css':'noselect_css'"
                   v-if="!(inWarehouseType == 1 && tpyeNo == 2)">未称{{information}}</div>
-                <div @click="cutstatus(2)" :class="status==2?'select_css':'noselect_css'"
-                  v-if="!(inWarehouseType == 1 && tpyeNo == 2)">已称{{information}}</div>
+                <!-- <div @click="cutstatus(2)" :class="status==2?'select_css':'noselect_css'"
+                  v-if="!(inWarehouseType == 1 && tpyeNo == 2)">已称{{information}}</div> -->
               </div>
               <div class="screen_right">
                 <div @click="record" v-hasPermission="`acquisitionManagement.acquisitionWeight.view`" class="jilu">记录
@@ -301,6 +301,7 @@
     getsettleaccout,
     newSubmit
   } from '@/model/houseSelfCollect/index'
+
   import {
     addstorageputList
   } from '@/model/warehouse/index'
@@ -1283,7 +1284,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -1305,7 +1306,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -1449,13 +1450,15 @@
             type: 'warning',
           })
           .then(() => {
+            this.deptBudgetList.secretaryWeigher =
+                localStorage.getItem('ws-pf_staffName')
             var that = this
             var warehousing = {}
             //贸易入库保存需要再走入库接口
             if (this.inWarehouseType == 1) {
               warehousing = JSON.parse(JSON.stringify(this.weighingList))
               // warehousing = this.weighingList
-              warehousing.secretaryWeigher = localStorage.getItem('ws-pf_staffName')
+              warehousing.secretaryWeigher = this.deptBudgetList.secretaryWeigher
               warehousing.compId = localStorage.getItem('ws-pf_compId')
               warehousing.inOutFlag = 2
               let _data = JSON.parse(
@@ -1474,8 +1477,7 @@
             }
             // 毛重
             if (this.tpyeNo == 1) {
-              this.deptBudgetList.secretaryWeigher =
-                localStorage.getItem('ws-pf_staffName')
+              
               // console.log(this.weighingList)
               if (this.weighingList.customerNumberCard) {
                 //毛检保存前进行校验
@@ -1527,6 +1529,7 @@
                             warehousing.deductionWeight /= 1000
                             warehousing.statusFlag = 1
                             warehousing.inOutFlag = 2
+                            warehousing.secretaryWeigher = this.deptBudgetList.secretaryWeigher
                             warehousing.id = warehousing.warehouseInOutId
                             warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
                             warehousing.weighingManagement = this.weighingList
@@ -1607,6 +1610,7 @@
                   warehousing.inOutFlag = 2
                   delete warehousing.status
                   warehousing.id = warehousing.warehouseInOutId
+                  warehousing.secretaryWeigher = this.deptBudgetList.secretaryWeigher
                   warehousing.warehouseInOutDetail.id = warehousing.inOutDetailId
                   warehousing.weighingManagement = this.weighingList
 
@@ -2424,4 +2428,4 @@
     border-right: 4px solid #2aff7c;
     // border-bottom: 1px solid #2aff7c ;
   }
-</style>
+</style>

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

@@ -27,10 +27,10 @@
         <ws-button type="primary" @click="screen(0)">待审核</ws-button>
         <ws-button type="primary"  @click="screen()">全部</ws-button>-->
         <ws-button :type="searchType == '' ? 'primary' : ''" @click="screen(-1)">全部</ws-button>
-        <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">待审核</ws-button>
+        <!-- <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">待审核</ws-button>
         <div v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">
           <ws-button :type="searchType == 7 ? 'primary' : ''" @click="screen(7)">待付款</ws-button>
-        </div>
+        </div> -->
         <ws-button :type="searchType == 2 ? 'primary' : ''" @click="screen(2)"
           v-hasPermission="`acquisitionManagement.acquisitionPay.add`">待结算</ws-button>
         <ws-button :type="invoicing === 0 ? 'primary' : ''" @click="screen(0)">未开票</ws-button>
@@ -68,14 +68,14 @@
         <ws-button type="primary" @click="screen(0)">待审核</ws-button>
         <ws-button type="primary"  @click="screen()">全部</ws-button>-->
 
-        <ws-button type="primary" @click="reject">驳回</ws-button>
-        <ws-button type="primary" @click="adopt">通过</ws-button>
+        <!-- <ws-button type="primary" @click="reject">驳回</ws-button>
+        <ws-button type="primary" @click="adopt">通过</ws-button> -->
         <ws-button type="primary" @click="invoicingClick"
           v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">开票</ws-button>
         <ws-button type="primary" @click="exportlist" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">导出
         </ws-button>
         <!-- <ws-button type="primary" @click="handlepass" v-if="isShowAdopt">审核</ws-button> -->
-        <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">付款
+        <!-- <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">付款 -->
         </ws-button>
         <!-- v-hasPermission="`acquisitionManagement.acquisitionPay.finace`" -->
         <ws-button type="primary" @click="selectPrint(1)"
@@ -200,7 +200,7 @@
             </ws-form-item>
             <ws-form-item label="上传截图" prop=" paymentScreenshot"></ws-form-item>
             <div class="upLoad">
-              <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+              <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
                 :on-success="handleAvatarSuccess">
                 <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
@@ -219,7 +219,7 @@
       <!-- <div v-for="(item, index) in payImg" :key="index" class="pay_img">
         <img :src="item" alt class="img" />
       </div> -->
-      <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+      <el-upload :action="global.uploadPath" list-type="picture-card"
         :on-success="handleAvatarSuccess1" :file-list='payImg' :limit='1'>
         <i slot="default" class="el-icon-plus"></i>
         <div slot="file" slot-scope="{file}">
@@ -235,7 +235,7 @@
           </span>
         </div>
       </el-upload>
-      <!-- <el-upload class="avatar-uploader"  action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+      <!-- <el-upload class="avatar-uploader"  :action="global.uploadPath" :show-file-list="false"
                 :on-success="handleAvatarSuccess1" :on-remove="_handleRemove">
                 <img @mouseout='imgshow' @mouseover="deleteshow=true" v-if="payImg" :src="payImg" class="avatar" />
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
@@ -1179,14 +1179,14 @@
       },
       //上传付款截图
       handleAvatarSuccess(e) {
-        this.imageUrl = e.url
+        this.imageUrl = e.data.url
       },
       handleAvatarSuccess1(file) {
         if (this.payImg[0]) {
-          this.$set(this.payImg[0], 'url', file.url)
+          this.$set(this.payImg[0], 'url', file.data.url)
         } else {
           this.payImg[0] = {
-            url: file.url
+            url: file.data.url
           }
         }
         settlementEdit({

+ 3 - 2
src/views/houseSelfCollect/settlement.vue

@@ -338,7 +338,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -361,7 +361,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -557,6 +557,7 @@
       },
       print() {
         delete this.paymentList.status
+        delete this.paymentList.statusFlag
         if (this.paymentList.type == '潮粮' && this.paymentList.qualityInspectionManagement.paramType != 1) {
           if (!this.paymentList.buckleWeightRatio) {
             this.$message({

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

@@ -944,7 +944,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -966,7 +966,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口

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

@@ -14,13 +14,13 @@
     </el-row>
     <div class="center">
       <el-row>
-        <el-col :span="12">
+        <el-col :span="6">
           <el-button :type="warehousingType == 1?'primary':''" size="small" @click="changeType(1)"
             class="btn_css btn_topcss">贸易入库</el-button>
           <el-button :type="warehousingType == 3?'primary':''" size="small" @click="changeType(3)"
             class="btn_css btn_topcss">收购入库</el-button>
         </el-col>
-        <el-col :span="12" class="bg-right">
+        <el-col :span="18" class="bg-right">
           <div style="display:flex">
             <el-select style='margin-right:5px;width:40%' v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
               <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"

+ 2 - 2
src/views/outboundManagement/collectionManagement.vue

@@ -88,7 +88,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传收款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview1" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -348,7 +348,7 @@
           })
       },
       handlePictureCardPreview1(file) {
-        this.collectionScreenshot = file.url
+        this.collectionScreenshot = file.data.url
       },
       dataFilter(val) {
         // console.log(val,"名")

+ 29 - 11
src/views/outboundManagement/newQualityInspectionManagement.vue

@@ -155,8 +155,8 @@
               <el-input v-model="inspect.mildewGrain" placeholder="请输入霉变粒占比" maxlength="10" size="small" type="number"
                 :disabled="disabled" />
             </ws-form-item>
-            <ws-form-item label="容重(克/升)" prop="bulkDensity">
-              <el-input v-model="inspect.bulkDensity" placeholder="请输入容重" maxlength="10" size="small" type="number"
+            <ws-form-item :label="inspect.goodsName!='大豆'?'容重(克/升)':'蛋白'" prop="bulkDensity">
+              <el-input v-model="inspect.bulkDensity" :placeholder="inspect.goodsName!='大豆'?'请输入容重':'请输入蛋白'" maxlength="10" size="small" type="number"
                 :disabled="disabled" />
             </ws-form-item>
             <ws-form-item label="热损伤(%)" prop="jiaorenli">
@@ -532,7 +532,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -555,7 +555,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -661,20 +661,38 @@
         //   return
         // }
         if (this.inspect.bulkDensity && this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
-          this.$message({
-            message: '容重输入错误',
-            type: 'warning',
-          })
-          return
+          if(this.inspect.goodsName!='大豆'){
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }else{
+            this.$message({
+              message: '蛋白输入错误',
+              type: 'warning',
+            })
+            return
+          }
+          
         }
         if (this.inspect.bulkDensity && String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect
             .bulkDensity).length - (String(
             this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
-          this.$message({
-            message: '容重需输入整数',
+          if(this.inspect.goodsName!='大豆'){
+            this.$message({
+              message: '容重需输入整数',
+              type: 'warning',
+            })
+            return
+          }else{
+            this.$message({
+            message: '蛋白需输入整数',
             type: 'warning',
           })
           return
+          }
+          
         }
         // if (!this.inspect.jiaorenli) {
         //   this.$message({

+ 86 - 48
src/views/outboundManagement/weighingManagementNew.vue

@@ -156,7 +156,7 @@
                       weighingList.outType == '汽运' ||
                       weighingList.outType == '集装箱船'
                     ">
-                        <el-input v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
+                        <el-input :maxlength="'7'" v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
                            size="small" :disabled="recheck1"/>
                         <el-select v-else filterable clearable v-model="weighingList.carNo" placeholder="请选择车牌号"
                           class="typeselect" @change="carChange" :disabled="recheck1">
@@ -280,9 +280,9 @@
                   <el-button v-if="tpyeNo == 2" @click="statustypechangelist(3)"
                     :type="statusType == 3 ? 'primary' : ''">未称毛重
                   </el-button>
-                  <el-button v-if="tpyeNo == 2" @click="statustypechangelist(2)"
+                  <!-- <el-button v-if="tpyeNo == 2" @click="statustypechangelist(2)"
                     :type="statusType == 2 ? 'primary' : ''">已称毛重
-                  </el-button>
+                  </el-button> -->
                 </div>
                 <div style="display: flex;">
                   <el-button @click='refreshClick(1)' type="primary">刷新</el-button>
@@ -311,13 +311,20 @@
     <div class="print-type" v-show="isShowPrintType">
       <div class="print-type-content">
         <div class="print-type-title">请选择打印类型</div>
-        <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
-          <div>我司发货单位:</div>
-          <!-- <div>{{companyName}}</div> -->
-          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
-            <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
-            </el-option>
-          </el-select>
+         <div class="ew-print" v-if="checked||(!ddchecked&&!checked)">
+          <div class="row">
+           <div>我司发货单位:</div>
+            <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
+              <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </div>
+          <div class="row">
+           <div>我司收货单位:</div>
+            <el-select v-model="myCompanyCustomer" disabled style="width: 75%;">
+             
+            </el-select>
+          </div>
         </div>
         <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
@@ -441,7 +448,7 @@
         tpyeNo: 1,
         types: null,
         information: '皮重',
-        carChange1: '手动填写',
+        carChange1: '识别下拉',
         inWarehouseType: 1, //入库类型
         outContractNo: [],
         mListTop: [],
@@ -459,6 +466,7 @@
         weighingList: {
           grossWeight: '',
           tare: '',
+          selfLoading: 1,
           buckleMiscellaneous: 0,
           netWeight: 0,
           weight: '',
@@ -506,6 +514,9 @@
         }, {
           value: '黑龙江中天昊元贸易有限公司',
           label: '黑龙江中天昊元贸易有限公司'
+        },{
+          value: '黑龙江欣洋粮食贸易有限公司',
+          label: '黑龙江欣洋粮食贸易有限公司'
         }],
        companyNameOptions: [
          {
@@ -520,6 +531,9 @@
         }, {
           value: '黑龙江鑫满仓粮食贸易有限公司',
           label: '黑龙江鑫满仓粮食贸易有限公司'
+        },{
+          value: '黑龙江欣洋粮食贸易有限公司',
+          label: '黑龙江欣洋粮食贸易有限公司'
         }],
         
         companyName: '黑龙江中天昊元贸易有限公司',
@@ -539,9 +553,13 @@
         },{
           value: '厦门建发物产有限公司',
           label: '厦门建发物产有限公司'
+        },{
+          value: '黑龙江欣洋粮食贸易有限公司',
+          label: '黑龙江欣洋粮食贸易有限公司'
         }],
         idPrint: '',
         
+        myCompanyCustomer:'',
         ewCustomer: '厦门建发物产有限公司',
         ewradio: '',
         printSeparately: false,
@@ -780,13 +798,14 @@
           //  localStorage.setItem('ck_bd_printData1',JSON.stringify(this.inspect))
           //  window.open('../../../../static/outWeightPrint.html?type=2')
           // 打印额外
+           localStorage.removeItem('print_out_data')
+          localStorage.removeItem('selectPrint_EWjjSelectPrintList')
+          localStorage.removeItem('selectPrint_jjSelectPrintList')
           if (this.checked || this.ddchecked) {
             this.makeEWjjSelectPrintList()
             //  this.selectEW = true;
           }
-          localStorage.removeItem('print_out_data')
-          localStorage.removeItem('selectPrint_EWjjSelectPrintList')
-          localStorage.removeItem('selectPrint_jjSelectPrintList')
+         
           if (type == 1) {
             localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.dialogDataList))
             window.open('../../../../static/weightCheckOutNew.html?type=2&radioType=' + radioType + '&selectEW=' + this
@@ -820,7 +839,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -910,7 +929,7 @@
             formdata.append('file', b)
             axios({
               method: 'post',
-              url: 'https://www.zthymaoyi.com/upload/admin',
+              url:this.global.uploadPath,
               data: formdata,
             }).then((response) => {
               //编辑接口
@@ -1284,8 +1303,8 @@
               (String(this.weighingList.grossWeight).indexOf('.') + 1) >
               1) ||
             this.weighingList.grossWeight < 1 ||
-            this.weighingList.grossWeight > 100000
-          ) {
+            this.weighingList.grossWeight > 120000
+          ) {3
             this.$message({
               message: '毛重输入错误!',
               type: 'warning',
@@ -1436,19 +1455,20 @@
                         .warehouseName == '哈尔滨依兰库' || this
                         .warehouseName == '白城内陆港'|| this
                         .warehouseName == '山东园丰库'){
-                          
-                          console.log(11111111111111111111)
-                          let cang = {}
-                          cang.value = this.weighingList.seller
-                          cang.label = this.weighingList.seller
-                         if (this.check(this.weighingList.seller, 1)) {
-                          this.ewCustomerOptions.push(cang)
-                          }
-                          let cang1 = {}
-                          cang1.value = this.weighingList.buyer
-                          cang1.label = this.weighingList.buyer
-                          if (this.check(this.weighingList.buyer, 2)) {
-                            this.companyNameEWOptions.push(cang1)
+                          if(this.weighingList.contractManagement){
+                            let cang = {}
+                            cang.value = this.weighingList.contractManagement.seller
+                            cang.label = this.weighingList.contractManagement.seller
+                            if (this.check(this.weighingList.contractManagement.seller, 1)) {
+                              this.ewCustomerOptions.push(cang)
+                              }
+                              let cang1 = {}
+                              cang1.value = this.weighingList.contractManagement.buyer
+                              cang1.label = this.weighingList.contractManagement.buyer
+                              if (this.check(this.weighingList.contractManagement.buyer, 2)) {
+                                this.companyNameEWOptions.push(cang1)
+                              }
+                              this.myCompanyCustomer = this.weighingList.contractManagement.buyer
                           }
                           this.isShowPrintType = true
                         }else{
@@ -1520,25 +1540,28 @@
                         .warehouseName == '哈尔滨依兰库' || this
                         .warehouseName == '白城内陆港'|| this
                         .warehouseName == '山东园丰库'){
-                          
-                          console.log(11111111111111111111)
-                          let cang = {}
-                          cang.value = this.weighingList.seller
-                          cang.label = this.weighingList.seller
-                         if (this.check(this.weighingList.seller, 1)) {
-                          this.ewCustomerOptions.push(cang)
-                          }
-                          let cang1 = {}
-                          cang1.value = this.weighingList.buyer
-                          cang1.label = this.weighingList.buyer
-                          if (this.check(this.weighingList.buyer, 2)) {
-                            this.companyNameEWOptions.push(cang1)
+                          if(this.weighingList.contractManagement){
+                            let cang = {}
+                            cang.value = this.weighingList.contractManagement.seller
+                            cang.label = this.weighingList.contractManagement.seller
+                            if (this.check(this.weighingList.contractManagement.seller, 1)) {
+                              this.ewCustomerOptions.push(cang)
+                              }
+                              let cang1 = {}
+                              cang1.value = this.weighingList.contractManagement.buyer
+                              cang1.label = this.weighingList.contractManagement.buyer
+                              if (this.check(this.weighingList.contractManagement.buyer, 2)) {
+                                this.companyNameEWOptions.push(cang1)
+                              }
+                              this.myCompanyCustomer = this.weighingList.contractManagement.buyer
                           }
+                          console.log(11111111111111111111)
+                          
                           this.isShowPrintType = true
                         }else{
                           this.isShowPrintType = true
                         }
-
+                      
                     })
                   if (this.reader) {
                     this.reader.cancel()
@@ -1557,7 +1580,7 @@
                   // this.isShowPrint = true
                   this.weighingList = {
                     grossWeight: 0,
-                    selfLoading: 0,
+                    selfLoading: 1,
                     tare: 0,
                     tips: '',
                     // contractNo:'',
@@ -1738,7 +1761,7 @@
         this.getList()
         this.weighingList = {
           grossWeight: 0,
-          selfLoading: 0,
+          selfLoading: 1,
           tare: 0,
           tips: '',
           // contractNo:'',
@@ -2041,6 +2064,19 @@
             this.weighingList.grade = this.outContractNo[i].grade
             this.weighingList.inOutType = this.outContractNo[i].inOutType
             if (this.outContractNo[i].inOutType == '销售出库') {
+              if(this.outContractNo[i].deliverType==1){
+                gettask({contractNo:this.outContractNo[i].contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
+                  // console.log(response)
+                  if(!response){
+                    this.$message({
+                        message: '联系内勤创建运输任务',
+                        type: 'warning',
+                        
+                      });
+                  }
+                })
+              }
+              
               if(this.outContractNo[i].priceType=='随行就市'){
                 this.priceedit=false
               }else if(this.outContractNo[i].priceType=='定价销售'){
@@ -2194,6 +2230,7 @@
         //合同编号
         xialaNo({
             compId: localStorage.getItem('ws-pf_compId'),
+            loadingstatus: 1,
             flag: 5,
           })
           .toPromise()
@@ -2548,7 +2585,7 @@
     height: 320px;
     background: white;
     border-radius: 10px;
-    z-index: 9999;
+    z-index: 100;
   }
 
   /deep/.el-radio-group {
@@ -2590,6 +2627,7 @@
   .ew-print {
     padding: 0 20px;
     margin-top: 10px;
+    margin-bottom: 15px;
 
     // display: flex;
     // justify-content: space-between;

+ 32 - 13
src/views/outboundManagement/weighingManagementrecord.vue

@@ -109,13 +109,20 @@
     <div class="print-type" v-show="isShowPrintType">
       <div class="print-type-content">
         <div class="print-type-title">请选择打印类型</div>
-        <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
-          <div>我司发货单位:</div>
-          <!-- <div>{{companyName}}</div> -->
-          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
-            <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
-            </el-option>
-          </el-select>
+        <div class="ew-print" v-if="checked||(!ddchecked&&!checked)">
+          <div class="row">
+           <div>我司发货单位:</div>
+            <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
+              <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </div>
+          <div class="row">
+           <div>我司收货单位:</div>
+            <el-select v-model="myCompanyCustomer" disabled style="width: 75%;">
+             
+            </el-select>
+          </div>
         </div>
         <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
@@ -254,6 +261,9 @@
         }, {
           value: '黑龙江鑫满仓粮食贸易有限公司',
           label: '黑龙江鑫满仓粮食贸易有限公司'
+        },{
+          value: '黑龙江欣洋粮食贸易有限公司',
+          label: '黑龙江欣洋粮食贸易有限公司'
         }],
         companyNameOptions: [
           {
@@ -268,6 +278,9 @@
         }, {
           value: '黑龙江鑫满仓粮食贸易有限公司',
           label: '黑龙江鑫满仓粮食贸易有限公司'
+        },{
+          value: '黑龙江欣洋粮食贸易有限公司',
+          label: '黑龙江欣洋粮食贸易有限公司'
         }],
         companyNameEWOptions: [{
           value: '黑龙江中天昊元贸易有限公司',
@@ -284,6 +297,9 @@
         },{
           value: '厦门建发物产有限公司',
           label: '厦门建发物产有限公司'
+        },{
+          value: '黑龙江欣洋粮食贸易有限公司',
+          label: '黑龙江欣洋粮食贸易有限公司'
         }],
         companyName: '黑龙江中天昊元贸易有限公司',
         companyNameEW: '黑龙江利润元粮食贸易有限公司',
@@ -291,7 +307,7 @@
         ewradio: '',
         ddchecked: false,
         checked: false,
-        
+        myCompanyCustomer:'',
         printSeparately: false,
         
         jjSelectPrintList: [],
@@ -433,6 +449,7 @@
               if (this.check(row.buyer, 2)) {
                 this.companyNameEWOptions.push(cang1)
               }
+              this.myCompanyCustomer = row.buyer
             }
           }
           this.idPrint = row.id
@@ -807,13 +824,14 @@
         //  localStorage.setItem('ck_bd_printData1',JSON.stringify(this.inspect))
         //  window.open('../../../../static/outWeightPrint.html?type=2')
          // 打印额外
+        localStorage.removeItem('print_out_data')
+        localStorage.removeItem('selectPrint_EWjjSelectPrintList')
+        localStorage.removeItem('selectPrint_jjSelectPrintList')
         if (this.checked || this.ddchecked) {
           this.makeEWjjSelectPrintList()
           //  this.selectEW = true;
         }
-        localStorage.removeItem('print_out_data')
-        localStorage.removeItem('selectPrint_EWjjSelectPrintList')
-        localStorage.removeItem('selectPrint_jjSelectPrintList')
+       
         if (type == 1) {
           localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.dialogDataList))
           window.open('../../../../static/weightCheckOutNew.html?type=2&radioType=' + radioType + '&selectEW=' + this
@@ -847,7 +865,7 @@
       //     formdata.append('file', b)
       //     axios({
       //       method: 'post',
-      //       url: 'https://www.zthymaoyi.com/upload/admin',
+      //       url:this.global.uploadPath,
       //       data: formdata,
       //     }).then((response) => {
       //       //编辑接口
@@ -869,7 +887,7 @@
           formdata.append('file', b)
           axios({
             method: 'post',
-            url: 'https://www.zthymaoyi.com/upload/admin',
+            url:this.global.uploadPath,
             data: formdata,
           }).then((response) => {
             //编辑接口
@@ -1102,6 +1120,7 @@
    .ew-print {
     padding: 0 20px;
     margin-top: 10px;
+    margin-bottom: 15px;
 
     // display: flex;
     // justify-content: space-between;

+ 6 - 6
src/views/platformaudit/grainpulseenterprisereview.vue

@@ -168,14 +168,14 @@
           <el-input v-model="companyList1.detailedAddress" placeholder="请输入详细地址"></el-input>
         </el-form-item>
         <el-form-item label="上传封面图片" :label-width="formLabelWidth" prop="attachmentAddress">
-          <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+          <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
             :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
             <img v-if="companyList1.attachmentAddress" :src="companyList1.attachmentAddress" class="avatar">
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
           </el-upload>
         </el-form-item>
         <el-form-item label="营业执照" :label-width="formLabelWidth" prop="licenseAddress">
-          <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+          <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
             :on-success="handleAvatarSuccess1" :before-upload="beforeAvatarUpload">
             <img v-if="companyList1.licenseAddress" :src="companyList1.licenseAddress" class="avatar">
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
@@ -201,7 +201,7 @@
           <div :key="index" v-for="(item, index) in companyList1.sitePhotoAddress">
             <img style="float:left" v-if="item" :src="item" class="avatar">
           </div>
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :limit="9"
+          <el-upload :action="global.uploadPath" :show-file-list="false" :limit="9"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove">
             <i class="el-icon-plus avatar-uploader-icon"></i>
           </el-upload>
@@ -348,10 +348,10 @@
     },
     methods: {
       handleAvatarSuccess(res, file) {
-        this.companyList1.attachmentAddress = file.response.url;
+        this.companyList1.attachmentAddress = file.data.url;
       },
       handleAvatarSuccess1(res, file) {
-        this.companyList1.licenseAddress = file.response.url;
+        this.companyList1.licenseAddress = file.data.url;
       },
       beforeAvatarUpload(file) {
         const isJPG = file.type === 'image/jpeg';
@@ -370,7 +370,7 @@
         console.log(file, fileList)
       },
       handlePictureCardPreview(res, file) {
-        let url = file.response.url;
+        let url = file.data.url;
         if (this.companyList1.sitePhotoAddress.length >= 9) {
           this.$message({
             message: '最多上传九张图片!',

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

@@ -30,6 +30,12 @@
                 <ws-option label="保证金" value="保证金" style="color: #8890b1" />
             </ws-select>
           </el-form-item>
+          <!-- <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓储费" span="1" prop="contractNo" class="readonly">
+            <ws-select v-model="deptBudgetList.flag" placeholder="" class="typeselect" >
+                <ws-option label="否" value="否" style="color: #8890b1" />
+                <ws-option label="是" value="是" style="color: #8890b1" />
+            </ws-select>
+          </el-form-item> -->
           <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="合同费用"' label="合同编号" span="1" prop="contractNo" class="readonly">
             <el-select v-model="deptBudgetList.contractNo" filterable clearable placeholder="选择合同" class="typeselect" @change="selectcontract">
               <el-option v-for="item in contractList" :key="item.id" :label="item.contractNo" :value="item.contractNo"
@@ -60,14 +66,14 @@
             <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
         @onChange="onChange" 
        />
-          <!-- <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" :on-preview="Previewf"
+          <!-- <el-upload ref='uploadfiles' :file-list='dataList' :action="global.uploadPath" :on-preview="Previewf"
             :on-success="handlefujian" :on-remove="handleRemove" class="photo2" >
             <i class="el-icon-plus"></i>
           </el-upload> -->
         </el-form-item>
         </el-form>
-        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' class='expensetitle'>费用分配</div>
-        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' style='margin:0  auto 10px;width:90%;'>
+        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.flag!="是"' class='expensetitle'>费用分配</div>
+        <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"&&deptBudgetList.flag!="是"' style='margin:0  auto 10px;width:90%;'>
             <ws-select v-model="mode" placeholder="费用分配方式" @change="modeselect">
           <ws-option v-for="item in modeList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
@@ -93,7 +99,7 @@
         </ws-select>
         <span v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
-        <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
+        <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"&&deptBudgetList.flag!="是"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
           <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
@@ -178,7 +184,7 @@
         warecontractList:[],
         dateRange: this.disabledDate(),
         feeDetailsDistributions:[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0}],
-        deptBudgetList:{purpose:"合同费用",type:'粮款'},
+        deptBudgetList:{purpose:"合同费用",type:'粮款',flag:'否'},
         makeWordData: {},
         warehouseList:[],
         contractList:[],
@@ -301,7 +307,8 @@
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
-              arr.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+              response[i].issuingDate=response[i].issuingTime.split(' ')[0]
+              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
             }
             this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
           })
@@ -390,9 +397,7 @@
 
       },
       selectcontract(e){
-        console.log(e)
         for (let i = 0; i < this.contractList.length; i++) {
-          console.log(this.contractList[i])
           if(this.contractList[i].contractNo==e){
             this.deptBudgetList.contractId=this.contractList[i].id
             this.signingDate=this.contractList[i].signingDate
@@ -457,7 +462,7 @@
       submit(){
         this.deptBudgetList.compId=localStorage.getItem('ws-pf_compId')
         this.deptBudgetList.agent=localStorage.getItem('ws-pf_staffName')
-        if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'||this.deptBudgetList.purpose=='库点费用'){
+        if(this.deptBudgetList.purpose=='合同费用'&&this.deptBudgetList.type=='非粮款'||this.deptBudgetList.purpose=='库点费用'&&this.deptBudgetList.flag!="是"){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(!this.feeDetailsDistributions[i].distributionMoney&&this.mode!="暂不分配"){
               this.$message({
@@ -493,7 +498,14 @@
           this.deptBudgetList.costNo='HTF'+this.getdate()+this.Num
         }else if(this.deptBudgetList.purpose=='库点费用'){
           this.deptBudgetList.expensesPurpose=3
-          this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
+          if(this.deptBudgetList.flag=='是'){
+            this.deptBudgetList.storageFeeFlag=1
+            this.deptBudgetList.expenseAllocationInfoList=[]
+          }else{
+            this.deptBudgetList.storageFeeFlag=0
+            this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
+          }
+          
            this.deptBudgetList.costNo='KDF'+this.getdate()+this.Num
         }else if(this.deptBudgetList.purpose=='经营性费用'){
           this.deptBudgetList.expensesPurpose=5
@@ -587,7 +599,7 @@
               return
         }
        
-        if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='全部分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='全部分配'){
+        if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='全部分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='全部分配'&&this.deptBudgetList.storageFeeFlag!=1){
           if(this.amount!=this.deptBudgetList.amountMoney){
             this.$message({
                 message: '请款金额与分配金额不相等!',
@@ -596,7 +608,7 @@
           return
           }
         }
-        if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='部分分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='部分分配'){
+        if(this.deptBudgetList.expensesPurpose==1&&this.deptBudgetList.costType==3&&this.mode=='部分分配'||this.deptBudgetList.expensesPurpose==3&&this.mode=='部分分配'&&this.deptBudgetList.storageFeeFlag!=1){
           if(this.amount>this.deptBudgetList.amountMoney){
             this.$message({
                 message: '分配金额不可超过请款金额!',
@@ -680,7 +692,7 @@
       getList() {
         getcontract({
         compId:localStorage.getItem('ws-pf_compId'),
-        flag:2
+        flag:11
         })
         .toPromise()
         .then((response) => {

+ 12 - 3
src/views/profitable/cashoutaduit.vue

@@ -164,8 +164,10 @@ import WsUpload from '@/components/WsUpload'
         moneys:'按重量自动分配',
         goods:'全部货品',
         goodsList:[],
+        compId:localStorage.getItem('ws-pf_compId'),
         warecontractList:[],
         textarea:'',
+        size:9,
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{},
         makeWordData: {},
@@ -228,9 +230,6 @@ import WsUpload from '@/components/WsUpload'
         this.rejectshow=true
       },
       rejectclick(){
-        if(this.deptBudgetList.taskId){
-
-        }
         woekflowhandle({
           taskId: this.deptBudgetList.taskId,
           approved:false,
@@ -254,6 +253,7 @@ import WsUpload from '@/components/WsUpload'
       getList() {
        getcontract({
         compId:localStorage.getItem('ws-pf_compId'),
+        flag:11
         }).toPromise()
         .then((response) => {
           this.contractList=response
@@ -378,4 +378,13 @@ import WsUpload from '@/components/WsUpload'
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 45 - 14
src/views/profitable/cashoutaduitNQ.vue

@@ -120,36 +120,39 @@
       </div>
       <div>
         <div style='margin-top:10px;text-align:right;width:90%;'>
-          <el-button class="bg-bottom" type="primary" size="small" @click="reject()">驳回
+          <el-button class="bg-bottom" type="primary" size="small" @click="submit(0)">驳回
           </el-button>
-          <el-button class="bg-bottom" type="primary" size="small" @click="submit()">通过
+          <el-button class="bg-bottom" type="primary" size="small" @click="submit(1)">通过
         </el-button>
         </div>
       
     </div>
     </div>
     <el-dialog
-      title="驳回"
+      :title="title"
       :visible.sync="rejectshow"
       width="30%"
       :before-close="handleClose">
-      <span>驳回原因</span>
+      <span>{{title}}原因</span>
       <div><el-input
   type="textarea"
   :rows="2"
-  placeholder="请输入驳回原因"
+  :placeholder="'请输入'+title+'原因'"
   v-model="textarea">
 </el-input>
 </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="rejectclick">确 定</el-button>
+        <el-button @click="rejectshow = false">取 消</el-button>
+        <el-button type="primary" @click="title=='驳回'?rejectclick():pass()">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 <script>
     import WsUpload from '@/components/WsUpload'
+    import {
+    woekflowhandle
+  } from '@/model/tasksport/index'
   import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo} from '@/model/profitable/index'
   export default {
     components: {
@@ -169,7 +172,10 @@
         moneys:'按重量自动分配',
         goods:'全部货品',
         goodsList:[],
+        title:'驳回',
         srcList:[],
+        textarea:'',
+        size:9,
         warecontractList:[],
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{},
@@ -212,7 +218,9 @@
       }
     },
     methods: {
-      
+      handleClose(){
+        this.rejectshow=false
+      },
       onChange() {
         this.$refs.upload
           .handleSaveBill()
@@ -239,7 +247,8 @@
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
-              arr.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+              response[i].issuingDate=response[i].issuingTime.split(' ')[0]
+              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
             }
             this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
           })
@@ -327,7 +336,7 @@
       returnsales(){
         this.$router.go(-1)
       },
-       submit(){
+       submit(status){
           for (let i = 0; i < this.feeDetailsDistributions.length; i++) {
             if(!this.feeDetailsDistributions[i].distributionMoney){
               this.$message({
@@ -429,7 +438,8 @@
        
         // this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
         this.deptBudgetList.flag=3
-        this.$confirm('确定提交分配信息', '提示', {
+        if(status==1){
+          this.$confirm('确定提交分配信息', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             type: 'warning'
@@ -437,9 +447,18 @@
           .then(() => {
         editexenseinfo(this.deptBudgetList).toPromise()
           .then(response => {
-            this.pass()
+            this.title='通过'
+            this.rejectshow=true
           })
           })
+        }else{
+          editexenseinfo(this.deptBudgetList).toPromise()
+          .then(response => {
+            this.title='驳回'
+            this.rejectshow=true
+          })
+        }
+        
       },
       pass(){
          this.$confirm('确认通过请款信息?', '提示', {
@@ -451,7 +470,7 @@
             woekflowhandle({
               taskId: this.deptBudgetList.taskId,
               approved:true,
-              auditMind: '34',
+              auditMind: this.textarea,
               needReapply: true,
             }).toPromise()
             .then((response) => {
@@ -459,6 +478,7 @@
                 message: '通过成功!',
                 type: 'success',
               })
+              this.rejectshow=false
               this.$router.go(-1)
             }).catch((response) => {
               this.$message({
@@ -501,6 +521,7 @@
       getList() {
         getcontract({
           compId:localStorage.getItem('ws-pf_compId'),
+          flag:11
         })
         .toPromise()
         .then((response) => {
@@ -546,7 +567,8 @@
                 getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
               .then(response1 => {
                 for (let i = 0; i < response1.length; i++) {
-                  arr.push({time:response1[i].issuingTime,id:response1[i].id,weight:response1[i].inWarehouseWeight})
+                  response1[i].issuingDate=response1[i].issuingTime.split(' ')[0]
+                  arr.push({time:response1[i].issuingDate,id:response1[i].id,weight:response1[i].inWarehouseWeight})
                 }
                 this.$set(this.datelist,i,JSON.parse(JSON.stringify(arr)))
                 console.log(this.feeDetailsDistributions,this.datelist)
@@ -687,4 +709,13 @@
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 11 - 1
src/views/profitable/cashoutedit.vue

@@ -102,6 +102,7 @@
         goodsourcelist:[],
         signingDate:'',
         datelist:[],
+        size:9,
         modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
         wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
         datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
@@ -365,7 +366,6 @@
           })
           return
         }
-        this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
         this.$confirm('确定提交请款信息', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -413,6 +413,7 @@
       getList() {
         getcontract({
         compId:localStorage.getItem('ws-pf_compId'),
+        flag:11
         })
         .toPromise()
         .then((response) => {
@@ -562,4 +563,13 @@
 .add,.del{
   width:25px;height:25px;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 51 - 16
src/views/profitable/component/routers/route.js

@@ -246,22 +246,22 @@ const profitableRouter = {
       hidden:true,
     },  
     // 费用管理请款审核
-    // {
-    //   path: 'cashoutaduitNQ',
-    //   component: () =>
-    //     import(/* webpackChunkName: "applDetail" */ '@/views/profitable/cashoutaduitNQ'),
-    //   name: 'cashoutaduitNQ',
-    //   meta: {
-    //     title: 'cashoutaduit',
-    //     shortcutEntrance: 'profitable',
-    //     module: 'lirunhesuan.feiyongguanli.view',
-    //     permissicon: [],
-    //     keepAlive: true,
-    //     _title:'费用管理请款审核'
-    //     // module: 'procurement.sparepart.applDetail'
-    //   },
-    //   hidden:true,
-    // }, 
+    {
+      path: 'cashoutaduitNQ',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/cashoutaduitNQ'),
+      name: 'cashoutaduitNQ',
+      meta: {
+        title: 'cashoutaduit',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan.feiyongguanli.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'费用管理请款审核'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    }, 
     // 费用管理收款
     {
       path: 'receipt',
@@ -382,6 +382,41 @@ const profitableRouter = {
       },
       hidden:true,
     }, 
+     // 仓储费
+     {
+      path: 'storageCharge',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/storageCharge'),
+      name: 'storageCharge',
+      meta: {
+        title: 'storageCharge',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan.feiyongguanli.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'仓储费'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    // 油费
+    },
+    {
+      path: 'oilcost',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/oilcost'),
+      name: 'oilcost',
+      meta: {
+        title: 'oilcost',
+        shortcutEntrance: 'profitable',
+        module: 'lirunhesuan.feiyongguanli.view',
+        permissicon: [],
+        keepAlive: true,
+        _title:'油费'
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden:true,
+    },
+
       // // 收支明细
       // {
       //   path: 'inOutDetailed',

+ 194 - 7
src/views/profitable/contractprofitsdetails.vue

@@ -32,6 +32,7 @@
           <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">
@@ -45,6 +46,7 @@
           <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">
 
@@ -62,17 +64,23 @@
               <span v-else>{{ scope.$index + 1 }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="contractNo" label="合同编号"></el-table-column>
+          <el-table-column prop="contractNo" label="合同编号">
+            <template slot-scope="scope">
+              <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>
             </template>
           </el-table-column>
-          <el-table-column prop="buyer" label="买方"></el-table-column>
-          <el-table-column prop="seller" label="卖方"></el-table-column>
+          <el-table-column prop="buyer" label="买方/收购方"></el-table-column>
+          <el-table-column prop="seller" label="卖方/合营方"></el-table-column>
           <el-table-column prop="surplus" label="剩余(吨)">
              <template slot-scope="scope">
               <span v-if='scope.row.agreementType=="销售合同"'>-</span>
@@ -83,8 +91,10 @@
           </el-table-column>
           <el-table-column prop="status" label="状态"></el-table-column>
           <el-table-column prop="signingDate" label="签订日期"></el-table-column>
-          <el-table-column prop="address" label="操作" width="200">
+          <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 @click="inventory(scope.row)" type="primary">库存</el-button>
               <el-button @click="cost(scope.row)" type="primary">费用</el-button>
             </template>
@@ -96,11 +106,66 @@
         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 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="30%"
+  :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 col-bgc">合同类型</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 col-bgc">卖方</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 col-bgc">合计利润(元)</td>
+            <td class="col">{{tableData.profit}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">关联合同</td>
+            <td class="col col-bgc">结算单价(元/吨)</td>
+            <td class="col col-bgc">重量(吨)</td>
+            <td class="col col-bgc">利润(元)</td>
+          </tr>
+          <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>
   </div>
 </template>
 <script>
   import {
-    getcontractdetails
+    getcontractdetails,
+    getrelationcontract,
+    editcontract,
+    judgesettlement
   } from '@/model/profitable/index'
   export default {
     components: {},
@@ -108,6 +173,8 @@
       return {
         value: "",
         tableData: [],
+        show:false,
+        correlationshow:false,
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
@@ -121,12 +188,32 @@
         endDate:"",
         outtotal:0,
         intotal:0,
+        contractList:[],
+        tableData:{},
+        datalist:{},
+        compId:localStorage.getItem('ws-pf_compId'),
       }
     },
     activated() {
       this.getPassYearFormatDate()
     },
     methods: {
+      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()
@@ -135,6 +222,60 @@
         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=='采购合同'){
+                    row.profit=weightprice-(row.weight*row.settlementPrice)
+                  }else if(row.agreementType=='销售合同'){
+                    row.profit=(row.weight*row.settlementPrice)-weightprice
+                  }
+        this.$confirm('结算后当前合同和相关合同不可再进行费用相关操作', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            editcontract({flag:2,id:row.id,profit:row.profit}).toPromise()
+          .then(response => {
+            this.$message({
+                message: '结算成功!',
+                type: 'success',
+          })
+          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
+        getrelationcontract({
+          agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
+          .toPromise()
+          .then(response => {
+            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}})
       },
@@ -153,7 +294,7 @@
             agreementType: this.agreementType,
             startDate:this.startDate,
             endDate:this.endDate,
-            currentPage: this.currentPage,
+            currentPage: 1,
             pageSize:9999 ,
             searchType:this.searchType,
             searchContractType:this.searchContractType,
@@ -178,7 +319,7 @@
             this.getList()
           })
         },
-      getList() {
+      async getList() {
          getcontractdetails({
             // warehouseType: 1,
             agreementType: this.agreementType,
@@ -195,6 +336,22 @@
           .then(response => {
             if(response.records.length){
               for (let i = 0; i < response.records.length; i++) {
+                if(response.records[i].status=='已结算'){
+                  var data=getrelationcontract({
+                  agreementType:response.records[i].agreementType,contractNo:response.records[i].contractNo,compId:this.compId})
+                  .toPromise()
+                  var weightprice=0
+                  var weightprice1=0
+                  for (let i = 0; i < data.length; i++) {
+                    weightprice+=(data[i].weight*data[i].settlementPrice)
+                    // weightprice1-=(data[i].weight*data[i].settlementPrice)
+                  }
+                  if(response.records[i].agreementType=='收购合同'||response.records[i].agreementType=='采购合同'){
+                    response.records[i].profit=weightprice-(response.records[i].weight*response.records[i].settlementPrice)
+                  }else if(response.records[i].agreementType=='销售合同'){
+                    response.records[i].profit=(response.records[i].weight*response.records[i].settlementPrice)-weightprice
+                  }
+                }
                 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))
               }
@@ -236,6 +393,36 @@
   }
 </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;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
   .container {
     background: #E8ECF6;
   }

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

@@ -48,11 +48,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
           <div v-if='srcList.length>0'>
-            <span v-for='item in srcList'><el-image
-              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
-              :src="item"
-               :preview-src-list="srcList"></el-image></span>
-             
+            <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
           </div>
           <div v-else>暂无附件</div>
         </el-form-item>
@@ -113,7 +110,7 @@
           </el-table-column>
           <el-table-column prop="date" label="分配金额(元)">
             <template slot-scope="scope">
-                <el-input placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
+                <el-input placeholder="输入分配金额" class="input_css" v-model="scope.row.distributionMoney"></el-input>
             </template>
           </el-table-column>
           <el-table-column prop="address" label="操作" width="200">
@@ -135,9 +132,12 @@
   </div>
 </template>
 <script>
+  import WsUpload from '@/components/WsUpload'
   import {lookexenseinfo,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,editexenseinfo} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -152,6 +152,7 @@
         goods:'全部货品',
         goodsList:[],
         srcList:[],
+        compId:localStorage.getItem('ws-pf_compId'),
         warecontractList:[],
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{},
@@ -161,6 +162,7 @@
         signingDate:'',
         datelist:[],
         disabled:false,
+        size:9,
         modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
         wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
         datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
@@ -208,7 +210,8 @@
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
-              arr.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+              response[i].issuingDate=response[i].issuingTime.split(' ')[0]
+              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
             }
             this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
           })
@@ -585,4 +588,13 @@
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 19 - 7
src/views/profitable/expenseallotaduit.vue

@@ -52,11 +52,8 @@
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
           <div>
-            <span v-for='item in srcList'><el-image
-              style="width: 100px; height: 100px;border:1px solid #000;display:inline-block;margin:10px;"
-              :src="item"
-               :preview-src-list="srcList"></el-image></span>
-             
+            <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
           </div>
         </el-form-item>
         </el-form>
@@ -107,7 +104,7 @@
             </el-table-column>
             <el-table-column prop="date" label="分配金额(元)">
               <template slot-scope="scope">
-                  <el-input disabled placeholder="输入费用名称,1-15个字" class="input_css" v-model="scope.row.distributionMoney"></el-input>
+                  <el-input disabled placeholder="输入分配金额" class="input_css" v-model="scope.row.distributionMoney"></el-input>
               </template>
             </el-table-column>
           </el-table>
@@ -145,9 +142,12 @@
   </div>
 </template>
 <script>
+    import WsUpload from '@/components/WsUpload'
   import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,lookexenseinfo,editexenseinfo} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -162,6 +162,7 @@
         goods:'全部货品',
         goodsList:[],
         warecontractList:[],
+        compId:localStorage.getItem('ws-pf_compId'),
         textarea:'',
         datelist:[],
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
@@ -170,6 +171,7 @@
         warehouseList:[],
         rejectshow:false,
         goodsourcelist:[],
+        size:9,
         modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
         wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
         datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
@@ -271,6 +273,7 @@
       getList() {
        getcontract({
         compId:localStorage.getItem('ws-pf_compId'),
+        flag:11
         })
         .toPromise()
         .then((response) => {
@@ -430,4 +433,13 @@
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 49 - 10
src/views/profitable/expensemanagementdetails.vue

@@ -32,6 +32,11 @@
           <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">支出</el-button>
         </el-col>
         <el-col style='text-align:right;' :span="6">
+          <!-- <el-badge v-if="approveStatus" is-dot class="item">
+            <el-button style="margin-left:10px" @click="oilcost()">油费</el-button>
+          </el-badge>
+          <el-button v-else style="margin-left:10px" @click="oilcost()">油费</el-button>
+          <el-button  style="margin-left:10px" @click="storageCharge()">仓储费</el-button> -->
           <el-button v-hasPermission="`lirunhesuan.feiyongguanli.add`" style="margin-left:10px" @click="cashout('')">请款</el-button>
           <el-button v-hasPermission="`lirunhesuan.feiyongguanli.shouk`" style="margin-right:10px" @click="receipt(1)" >收款</el-button>
         </el-col>
@@ -60,14 +65,10 @@
                 <span v-if='scope.row.costType==5'>-保证金</span>
               </div>
               <div v-else-if='scope.row.expensesPurpose==3'>库点费用
-                <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.storageFeeFlag==1'>-仓储费</span>
+                <span v-else>-非粮款</span>
               </div>
               <div v-else-if='scope.row.expensesPurpose==5'>经营性费用
-                <span v-if='scope.row.costType==1'>-粮款</span>
-                <span v-if='scope.row.costType==3'>-非粮款</span>
-                <span v-if='scope.row.costType==5'>-保证金</span>
               </div>
                <div v-else>{{scope.row.costType}}
               </div>
@@ -122,7 +123,7 @@
               <el-button  v-if='scope.row.status=="已驳回"' @click="edit(scope.row)" type="primary">编辑</el-button>
               <!-- <el-button v-if='scope.row.status=="已驳回"' @click="expenseedit(scope.row)" type="primary">编辑</el-button> -->
               <el-button v-if='!scope.row.distributionStatus&&scope.row.expensesPurpose==1&&scope.row.costType==3&&!scope.row.approveStatus&&scope.row.status=="已付款"
-              ||!scope.row.distributionStatus&&scope.row.expensesPurpose==3&&!scope.row.approveStatus&&scope.row.status=="已付款"||scope.row.expensesPurpose==2' @click="allot(scope.row)" type="primary">分配</el-button>
+              ||!scope.row.distributionStatus&&scope.row.expensesPurpose==3&&!scope.row.approveStatus&&scope.row.status=="已付款"&&scope.row.storageFeeFlag!=1||scope.row.expensesPurpose==2&&scope.row.status=="已付款"' @click="allot(scope.row)" type="primary">分配</el-button>
               <!-- <el-button v-if='scope.row.approveStatus=="已驳回"' @click="del(0,scope.row)" type="primary">删除</el-button> -->
               <el-button v-if='scope.row.status=="已驳回"' @click="del(0,scope.row)" type="danger">删除</el-button>
               <el-button v-if='scope.row.approveStatus=="待财务审核"||scope.row.approveStatus=="待决策人审核"||scope.row.approveStatus=="待内勤审核"' @click="aduit(scope.row)" type="primary">审核</el-button>
@@ -139,7 +140,7 @@
           </el-table-column>
           <el-table-column prop="address" label="分配相关" width="300">
             <template slot-scope="scope">
-              <el-button v-if='scope.row.expensesType==2&&scope.row.distributionStatus=="待确认"&&!scope.row.approveStatus' @click="allotaduit(scope.row)" type="primary">确认</el-button>
+              <el-button v-if='scope.row.expensesType==2&&scope.row.distributionStatus=="待确认"&&!scope.row.approveStatus&&scope.row.status!="已驳回"' @click="allotaduit(scope.row)" type="primary">确认</el-button>
               <el-button v-if='scope.row.expensesType==2&&scope.row.distributionStatus=="已驳回"&&!scope.row.approveStatus' @click="expenseedit(scope.row)" type="primary">编辑</el-button>
               <el-button v-if='scope.row.expensesType==2&&scope.row.distributionStatus=="已驳回"&&!scope.row.approveStatus' @click="del(1,scope.row)" type="danger">删除</el-button>
             </template>
@@ -176,7 +177,8 @@
     getInOutDetailed,
     getexenseinfo,
     delexenseinfo,
-    delallocationinfo,editexenseinfo,getAuditRecord
+    delallocationinfo,editexenseinfo,getAuditRecord,
+    getfielfillinginfo 
   } from '@/model/profitable/index'
   export default {
     components: {
@@ -186,9 +188,11 @@
       return {
         value: "",
         tableData: [],
+        tableData1:[],
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
+        size:9,
         recordList:[],
         compId:localStorage.getItem('ws-pf_compId'),
         dialogVisible1:false,
@@ -203,6 +207,7 @@
         intotal:0,
         fujianshow:false,
         appendixIdss:[],
+        approveStatus:false,
       }
     },
     activated() {
@@ -295,6 +300,25 @@
             }
           })
       },
+      getfielfillingList() {
+        getfielfillinginfo({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            currentPage: 1,
+            pageSize:10 ,
+            // searchType:this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData1 = response.records
+            var arr=this.tableData1.filter((item)=>{return item.approveStatus})
+            if(arr.length>0){
+              this.approveStatus=true
+            }else{
+              this.approveStatus=false
+            }
+          })
+      },
       accomplish(row){
         var title1=''
         if(row.unallocatedAmount>0){
@@ -327,6 +351,9 @@
       edit(row){
         this.$router.push({name:'cashoutedit',query:{id:row.id}})
       },
+      oilcost(){
+        this.$router.push({name:'oilcost'})
+      },
       expenseedit(row){
          if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
           localStorage.setItem('expensebh',JSON.stringify(row.expenseAllocationInfoListBH))
@@ -339,7 +366,15 @@
         }
       },
       shoukuanqueren(row){
-        this.$router.push({name:'receiptaduit',query:{id:row.id}})
+        if(localStorage.getItem('ws-pf_roleName')=='出纳'){
+          this.$router.push({name:'receiptaduit',query:{id:row.id}})
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
+        
       },
       aduit(row){
         if(row.taskId){
@@ -390,6 +425,9 @@
       cashout(){
         this.$router.push({name:'cashout'})
       },
+      storageCharge(){
+        this.$router.push({name:'storageCharge'})
+      },
       receipt(){
         this.$router.push({name:'receipt'})
       },
@@ -424,6 +462,7 @@
           this.value=[this.startDate,this.endDate]
         },
       getList() {
+        this.getfielfillingList()
          getexenseinfo({
             // warehouseType: 1,
             compId: localStorage.getItem('ws-pf_compId'),

+ 22 - 3
src/views/profitable/expensemanagentedit.vue

@@ -61,6 +61,8 @@
                :preview-src-list="dataList"></el-image></span>
              
           </div> -->
+          <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
         </el-form-item>
         </el-form>
         <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' class='expensetitle'>费用分配</div>
@@ -154,9 +156,12 @@
   </div>
 </template>
 <script>
+  import WsUpload from '@/components/WsUpload'
   import {lookexenseinfo,getcontract,getwarehouse,getwarehousingorder,editexenseinfo,deloneallocationinfo} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -170,6 +175,8 @@
         goodsList:[],
         disabled:false,
         warecontractList:[],
+        size:9,
+        compId:localStorage.getItem('ws-pf_compId'),
         // dateRange: this.disabledDate(),
         feeDetailsDistributions:[{receiptDocDate:'',inWarehouseWeight:0,distributionMoney:0,warehouseName:'',goodsName:'',goodsSource:'',index:0,}],
         deptBudgetList:{purpose:"合同费用",type:'粮款'},
@@ -233,7 +240,8 @@ weight: 4000}]],
         getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:e}).toPromise()
           .then(response => {
             for (let i = 0; i < response.length; i++) {
-              arr.push({time:response[i].issuingTime,id:response[i].id,weight:response[i].inWarehouseWeight})
+              response[i].issuingDate=response[i].issuingTime.split(' ')[0]
+              arr.push({time:response[i].issuingDate,id:response[i].id,weight:response[i].inWarehouseWeight})
             }
             this.$set(this.datelist,index,JSON.parse(JSON.stringify(arr)))
           })
@@ -532,6 +540,7 @@ weight: 4000}]],
       getList() {
         getcontract({
         compId:localStorage.getItem('ws-pf_compId'),
+        flag:11
         })
         .toPromise()
         .then((response) => {
@@ -594,7 +603,8 @@ weight: 4000}]],
                 const data  = await getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
                 this.datelist[i]=[]
                 for (let q = 0; q < data.length; q++) {
-                  arr.push({time:data[i].issuingTime,id:data[i].id,weight:data[i].inWarehouseWeight})
+                  data[i].issuingDate=data[i].issuingTime.split(' ')[0]
+                  arr.push({time:data[i].issuingDate,id:data[i].id,weight:data[i].inWarehouseWeight})
                 }
                 this.$set(this.datelist,i,JSON.parse(JSON.stringify(arr)))
               }
@@ -738,4 +748,13 @@ weight: 4000}]],
 .add,.del{
   width:25px;height:25px;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 18 - 8
src/views/profitable/expensemanagentlook.vue

@@ -56,7 +56,7 @@
         </el-form-item>
         </el-form>
         <el-form v-if='roleName=="出纳"' label-position="left">
-               <div style='margin:0 0 10px;width:90%;'>账户信息</div>
+               <div v-if="payeeinfo" style='margin:0 0 10px;width:90%;'>账户信息</div>
             <el-form-item  label-width='100px' label="收款方" span="1" prop="purpose" class="readonly">
             {{payeeinfo.customerType=="企业客户"?payeeinfo.compName:payeeinfo.customerName}}
             </el-form-item>
@@ -147,6 +147,7 @@
         compId:localStorage.getItem('ws-pf_compId'),
         roleName:localStorage.getItem('ws-pf_roleName'),
         payeeinfo:{},
+        size:9,
         valueData: [{
             date: 10
           },
@@ -169,13 +170,13 @@
         .toPromise()
         .then((response) => {
           this.deptBudgetList=response
-          this.srcList=[]
-          var arr=response.addressUrl.split(',')
-          for (let i = 0; i < arr.length; i++) {
-            if(arr[i]!=''){
-              this.srcList.push(arr[i])
-            }
-          }
+          // this.srcList=[]
+          // var arr=response.addressUrl.split(',')
+          // for (let i = 0; i < arr.length; i++) {
+          //   if(arr[i]!=''){
+          //     this.srcList.push(arr[i])
+          //   }
+          // }
           if(this.deptBudgetList.expensesPurpose==1){
               getpayeeinfo({compId:localStorage.getItem('ws-pf_compId'),contractNo:response.contractNo}).toPromise()
               .then((response1) => {
@@ -277,4 +278,13 @@
   /deep/.el-form-item {
     width: 50%;
 }
+/deep/.el-upload--picture-card{
+  width: 100px;
+  height:100px;
+  line-height:100px;
+}
+/deep/.el-upload-list--picture-card .el-upload-list__item{
+  width: 110px;
+  height:140px;
+}
 </style>

+ 503 - 0
src/views/profitable/oilcost.vue

@@ -0,0 +1,503 @@
+//油费
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">油费</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+          <el-button style="margin-left:10px" @click="strokeTypeChange(1)" :type="strokeType == 1?'primary':''">长途加油</el-button>
+          <el-button @click="strokeTypeChange(3)" :type="strokeType == 3?'primary':''">短途加油</el-button>
+          <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
+        </el-col>
+        <el-col :span="12">
+          <div style="flex-direction: row-reverse;" class="datascreen">
+             <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-input placeholder="可按司机名、车牌号查找" class="input_css" v-model="searchKeyWord" clearable></el-input>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="18">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="searchType == ''?'primary':''">全部</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">待审核</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">已通过</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">已驳回</el-button>
+          <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">已付款</el-button>
+        </el-col>
+        <el-col style='text-align:right;' :span="6">
+        </el-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="fillingNo" label="申请编号" width="100px">
+          </el-table-column>
+          <el-table-column v-if="strokeType == 3" prop="warehouseName" label="仓库名" width="100px">
+          </el-table-column>
+          <el-table-column v-if="strokeType == 3" prop="remark" label="备注" width="100px">
+          </el-table-column>
+          <el-table-column v-if="strokeType == 1" prop="driverName" label="司机名" width="100px">
+          </el-table-column>
+          <el-table-column v-if="strokeType == 1" prop="carNo" label="车牌号" width="150px">
+          </el-table-column>
+          <el-table-column v-if="strokeType == 1"  prop="purpose" label="总油耗(L)" width="200px">
+            <template slot-scope="scope">
+              {{scope.row.tfc}}
+            </template>
+          </el-table-column>
+          <el-table-column v-if="strokeType == 1"  prop="purpose" label="总金额" width="200px">
+            <template slot-scope="scope">
+              {{scope.row.totalCost}}
+            </template>
+          </el-table-column>
+          <el-table-column v-if="strokeType == 1"  prop="createDate" width="120" label="申请时间"></el-table-column>
+          <el-table-column v-if="strokeType == 3"  prop="amountRequested" label="请款金额(元)">
+          </el-table-column>
+          <el-table-column v-if="strokeType == 3"  prop="createDate" width="120" label="请款时间"></el-table-column>
+          <el-table-column prop="approveStatus" width="100" label="状态">
+            <template slot-scope="scope">
+              <span v-if="scope.row.approveStatus">{{scope.row.approveStatus}}</span><span v-else>{{scope.row.travelStatus}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="expenseRemarks" label="附件">
+              <template slot-scope="scope">
+          <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
+          <span v-if="scope.row.addressUrlArray != null">
+            {{
+              scope.row.addressUrlArray.length == 0
+                ? ''
+                : scope.row.addressUrlArray.length
+            }}
+          </span>
+        </template>
+          </el-table-column>
+          <el-table-column prop="agent" label="轨迹"></el-table-column>
+
+          <el-table-column prop="address" label="操作" width="300">
+            <template slot-scope="scope">
+              <el-button @click="look(scope.row)" type="primary">查看</el-button>
+             
+              <!-- <el-button v-if='scope.row.approveStatus=="待确认"' @click="accomplish(scope.row)" type="primary">完成</el-button> -->
+              <el-button v-if='scope.row.approveStatus' @click="pass(scope.row)" type="primary">通过</el-button>
+              <el-button v-if='scope.row.approveStatus' @click="reject(scope.row)" type="primary">驳回</el-button>
+              <!-- <el-button v-if='scope.row.status=="已驳回"' @click="expenseedit(scope.row)" type="primary">编辑</el-button> -->
+              <el-button v-if='!scope.row.approveStatus&&scope.row.expensesType==2&&scope.row.status=="待付款"' @click="payment(scope.row)" type="primary">付款</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+    <el-dialog width='50%' :visible.sync="dialogVisible1" title="请款详情">
+      <!-- <div  style='padding:20px;'  :style="{'border-bottom':(index!=recordList.length-1?'1px solid #ccc':'none')}"
+> -->
+<el-form ref="form" label-width="120px">
+  <el-form-item v-if="strokeType==1" label="车牌号">
+    {{form.carNo}}
+  </el-form-item>
+  <el-form-item v-if="strokeType==1" label="起点">
+    {{form.originProvince}}{{form.originCity}}{{form.originArea}}{{form.originAddress}}
+  </el-form-item>
+  <el-form-item v-if="strokeType==1" label="终点">
+    {{form.destinationProvince}}{{form.destinationCity}}{{form.destinationArea}}{{form.destinationAddress}}
+  </el-form-item>
+  <el-form-item  v-if="strokeType==1" label="总油耗(升)">
+    {{form.tfc}}
+  </el-form-item>
+  <el-form-item  v-if="strokeType==1" label="总金额(元)">
+    {{form.totalCost}}
+  </el-form-item>
+  <el-form-item v-if="strokeType==1" label="申请时间">
+    {{form.createDate}}
+  </el-form-item>
+  <el-form-item v-if="strokeType==3" label="仓库名">
+    {{form.warehouseName}}
+  </el-form-item>
+  <el-form-item v-if="strokeType==3" label="备注">
+    {{form.remark}}
+  </el-form-item>
+  <el-form-item v-if="strokeType==3" label="请款金额">
+    {{form.amountRequested}}
+  </el-form-item>
+  <el-form-item v-if="strokeType==3" label="请款时间">
+    {{form.createDate}}
+  </el-form-item>
+  <div style="border-bottom:1px solid #ccc;margin-bottom:18px;"></div>
+  <div v-if="form.fillingDetailInfoList">
+    <div v-for="(item,index) in form.fillingDetailInfoList">
+      <div>加油-{{index+1}}</div>
+      <el-form-item label="油耗(升)">
+        {{item.oilConsumption}}
+      </el-form-item>
+      <el-form-item label="单价(元/升)">
+        {{item.currentOilPrice}}
+      </el-form-item>
+      <el-form-item label="油费(元)">
+        {{item.currentConsumption}}
+      </el-form-item>
+      <el-form-item label="凭证">
+        <img :src="item.addressUrl" alt="">
+      </el-form-item>
+    </div>
+  </div>
+    <div v-if="form.shortFillingInfoList">
+    <div v-for="(item,index) in form.shortFillingInfoList">
+      <div>加油-{{index+1}}</div>
+      <el-form-item label="车牌号">
+        {{item.carNo}}
+      </el-form-item>
+      <el-form-item label="起始地">
+        {{item.originProvince}}{{item.originCity}}{{item.originArea}}{{item.originAddress}}
+      </el-form-item>
+      <el-form-item label="终到地">
+        {{item.destinationProvince}}{{item.destinationCity}}{{item.destinationArea}}{{item.destinationAddress}}
+      </el-form-item>
+    </div>
+  </div>
+  
+  <el-form-item>
+    <el-button @click="dialogVisible1=false">关闭</el-button>
+  </el-form-item>
+</el-form>
+      <!-- </div> -->
+    </el-dialog>
+    <el-dialog width='50%' :visible.sync="dialogVisible2" :title="title1">
+      <div  style='padding:20px;' v-for="(item,index) in recordList" :style="{'border-bottom':(index!=recordList.length-1?'1px solid #ccc':'none')}"
+>
+        <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;'>{{item.dealMsg!='请款'?item.approveResult==1?'通过':'驳回':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}}</div>
+        <div v-else style='width:100%;text-align:left;'>审核意见:{{item.verifyRemark}}</div>
+      </div>
+    </el-dialog>
+    <WinseaContentModal v-model="fujianshow" :title="title"
+      @on-cancel="handleClose">
+    <ws-upload :editable='false' ref="upload" 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 {
+    getfielfillinginfo,
+  } from '@/model/profitable/index'
+  import {
+    woekflowhandle
+  } from '@/model/tasksport/index'
+  export default {
+    components: {
+      WsUpload,
+    },
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        recordList:[],
+        compId:localStorage.getItem('ws-pf_compId'),
+        dialogVisible1:false,
+        form:{},
+        dialogVisible2:false,
+        deptCircularPage: {},
+        searchType:"",
+        searchKeyWord:"",
+        strokeType:'1',
+        title:'附件',
+        title1:'',
+        outtotal:0,
+        intotal:0,
+        fujianshow:false,
+        appendixIdss:[],
+      }
+    },
+    activated() {
+      this.getList()
+    },
+    methods: {
+      handlerecord(row){
+        if(row.expensesType==1){
+          this.title1='收款审核记录'
+        }else{
+          this.title1='请款审核记录'
+        }
+        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
+        this.fujianshow = true
+        if(row.addressUrl){
+         this.appendixIdss=row.addressUrl
+        }
+      },
+      look(row){
+        this.form=row
+        this.dialogVisible1=true
+      },
+      
+      strokeTypeChange(num){
+        this.strokeType = num
+        this.getList()
+      },
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      edit(row){
+        this.$router.push({name:'cashoutedit',query:{id:row.id}})
+      },
+      pass(row){
+        if(row.taskId){
+          this.$confirm('确认通过请款信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            woekflowhandle({
+              taskId: row.taskId,
+              approved:true,
+              auditMind: '34',
+              needReapply: true,
+            }).toPromise()
+            .then((response) => {
+              this.$message({
+                message: '通过成功!',
+                type: 'success',
+              })
+              this.getList()
+            }).catch((response) => {
+              this.$message({
+                message: '通过失败!',
+                type: 'error',
+              })
+            })
+          })
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
+      },
+      reject(row){
+        if(row.taskId){
+          this.$confirm('确认驳回请款信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            woekflowhandle({
+              taskId: row.taskId,
+              approved:false,
+              auditMind: '34',
+              needReapply: true,
+            }).toPromise()
+            .then((response) => {
+              this.$message({
+                message: '驳回成功!',
+                type: 'success',
+              })
+              this.getList()
+            }).catch((response) => {
+              this.$message({
+                message: '驳回失败!',
+                type: 'error',
+              })
+            })
+          })
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
+      },
+      payment(row){
+        if(localStorage.getItem('ws-pf_roleName')=='出纳'){
+          this.$router.push({name:'payment',query:{id:row.id}})
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
+        
+      },
+      allot(row){
+        if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
+          this.$router.push({name:'expenseallot',query:{id:row.id}})
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
+      },
+      cashout(){
+        this.$router.push({name:'cashout'})
+      },
+      storageCharge(){
+        this.$router.push({name:'storageCharge'})
+      },
+      receipt(){
+        this.$router.push({name:'receipt'})
+      },
+      // inventory(){
+      //   this.$router.push({name:'contractinventory'})
+      // },
+      getList() {
+        getfielfillinginfo({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            strokeType:this.strokeType
+            // searchType:this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    // height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+</style>

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

@@ -59,14 +59,13 @@
               :src="item"
                :preview-src-list="srcList"></el-image></span>
               -->
-              <el-upload ref='uploadfiles' :file-list='srcList' action="https://www.zthymaoyi.com/upload/admin" 
-              list-type="picture-card" :on-success="handlefujian" :on-remove="handleRemove" class="photo2" accept="image/jpg,image/jpeg,image/png">
-                <i class="el-icon-plus"></i>
-              </el-upload>
+              <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
           </div>
         </el-form-item>
         </el-form>
-        <div style='width:50%;'>
+        <div v-if="this.payeeinfo" style='width:50%;'>
           <div style='margin:0 auto 10px;width:90%;'>账户信息</div>
             <el-form label-position="left">
             <el-form-item  label-width='100px' label="收款方" span="1" prop="purpose" class="readonly">
@@ -91,10 +90,13 @@
   </div>
 </template>
 <script>
+    import WsUpload from '@/components/WsUpload'
   import {lookexenseinfo,expensepayment,getpayeeinfo} from '@/model/profitable/index'
   import {woekflowhandle,} from '@/model/tasksport/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -102,6 +104,8 @@
           name: "玉米",
           count: 2000,
         }],
+        size:9,
+        compId:localStorage.getItem('ws-pf_compId'),
         rejectshow:false,
         deptBudgetList:{},
         makeWordData: {},
@@ -132,13 +136,13 @@
           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])
-            }
-          }
+          // 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()
@@ -151,26 +155,22 @@
         })
         
       },
-      handlefujian(file) {
-        // console.log(file)
-        this.paymentScreenshot.push(file.url)
-        // this.dialogVisible = true
-      },
-      handleRemove(file) {
-        // console.log(file)
-        for (let i = 0; i < this.paymentScreenshot.length; i++) {
-          if(this.paymentScreenshot[i]==response.url){
-            this.paymentScreenshot.splice(i, 1)
-          }
-          
-        }
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
       },
       returnsales(){
         this.$router.go(-1)
       },
       submit(){
         // console.log(this.paymentScreenshot)
-        this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
         this.$confirm('确定提交付款信息?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -286,7 +286,7 @@
   line-height:100px;
 }
 /deep/.el-upload-list--picture-card .el-upload-list__item{
-  width: 100px;
-  height:100px;
+  width: 110px;
+  height:140px;
 }
 </style>

+ 24 - 8
src/views/profitable/receipt.vue

@@ -56,10 +56,9 @@
             </el-input>
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
-          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
-            :on-success="handlefujian" :on-remove="handleRemove" class="photo2" accept="image/jpg,image/jpeg,image/png">
-            <i class="el-icon-plus"></i>
-          </el-upload>
+            <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
         </el-form-item>
         </el-form>
         </div>
@@ -71,9 +70,12 @@
   </div>
 </template>
 <script>
+    import WsUpload from '@/components/WsUpload'
   import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -87,8 +89,10 @@
         moneys:'按重量自动分配',
         goods:'全部货品',
         amount:0,
+        compId:localStorage.getItem('ws-pf_compId'),
         goodsList:[],
         dataList:[],
+        size:9,
         warecontractList:[],
         feeDetailsDistributions:[{proDate:'',weight:'',money:'',warehouse:'',belonging:'',index:0}],
         deptBudgetList:{purpose:'合同费用',type:'粮款'},
@@ -118,6 +122,17 @@
       returnsales(){
         this.$router.go(-1)
       },
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
       // 获取当前年月日
 			getdate() {
 				var date = new Date()
@@ -242,7 +257,7 @@
             })
             this.deptBudgetList={purpose:"合同费用",type:'粮款'}
             this.paymentScreenshot=[]
-            this.$refs.uploadfiles.clearFiles()
+            this.$refs.upload.clearFiles()
             this.$router.go(-1)
             })
       },
@@ -263,6 +278,7 @@
       getList() {
          getcontract({
         compId:localStorage.getItem('ws-pf_compId'),
+        flag:11
         })
         .toPromise()
         .then((response) => {
@@ -409,7 +425,7 @@
   line-height:100px;
 }
 /deep/.el-upload-list--picture-card .el-upload-list__item{
-  width: 100px;
-  height:100px;
+  width: 110px;
+  height:140px;
 }
 </style>

+ 22 - 7
src/views/profitable/receiptaduit.vue

@@ -52,10 +52,9 @@
             </el-input>
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
-          <el-upload ref='uploadfiles' :file-list='srcList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
-            :on-success="handlefujian" :on-remove="handleRemove" class="photo2" accept="image/jpg,image/jpeg,image/png">
-            <i class="el-icon-plus"></i>
-          </el-upload>
+            <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
         </el-form-item>
         </el-form>
         <div style='width:90%;margin:10px auto;text-align:right;'><el-button class="bg-bottom" type="primary" size="small" @click="reject()">驳回
@@ -85,10 +84,13 @@
   </div>
 </template>
 <script>
+  import WsUpload from '@/components/WsUpload'
   import {lookexenseinfo,editexenseinfo} from '@/model/profitable/index'
   import {woekflowhandle,} from '@/model/tasksport/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -96,6 +98,8 @@
           name: "玉米",
           count: 2000,
         }],
+        size:9,
+        compId:localStorage.getItem('ws-pf_compId'),
         rejectshow:false,
         deptBudgetList:{},
         makeWordData: {},
@@ -115,6 +119,17 @@
       this.getList()
     },
     methods: {
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
       handlefujian(file) {
         // console.log(file)
         this.paymentScreenshot.push(file.url)
@@ -307,7 +322,7 @@
   line-height:100px;
 }
 /deep/.el-upload-list--picture-card .el-upload-list__item{
-  width: 100px;
-  height:100px;
+  width: 110px;
+  height:140px;
 }
 </style>

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

@@ -0,0 +1,300 @@
+//仓储费
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">仓储费</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"><el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button></el-col>
+    </el-row>
+    <div class="center">
+      <el-row style='margin-bottom:10px;'>
+        <el-col :span="12">
+         <el-select v-model="warehouseName" filterable clearable placeholder="选择仓库" @change="selectwarehouse" :value="searchType">
+          <el-option  key="0" label="全部仓库" value=""
+            style="color: #8890b1" />
+          <el-option v-for="item in warehouse" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
+            style="color: #8890b1" />
+        </el-select>
+        </el-col>
+        <el-col :span="12">
+          <div style="text-align:right;padding-right:10px;" >
+            仓储费分摊金额:{{allotmentofMoney.value}}元/(吨·天) <el-button class="bg-bottom" type="primary" size="small" @click="edit()">修改
+        </el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="index" label="序号">
+            <template scope="scope">
+              <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+              <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="warehouseName" label="仓库名称"></el-table-column>
+          <el-table-column prop="agent" label="请款人"></el-table-column>
+          <el-table-column prop="amountMoney" label="金额(元)"></el-table-column>
+          <el-table-column prop="money" label="已分配(元)"></el-table-column>
+          <el-table-column prop="unallocatedAmount" label="未分配(元)"></el-table-column>
+          <el-table-column prop="paymentDate" label="付款日期"></el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+    <el-dialog width='50%' :visible.sync="interestrateshow" title="设置分摊金额" top="20vh">
+        <el-input placeholder="输入分摊金额" v-model="allotmentofMoney.value"></el-input>
+        元/(吨·天) 
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="interestrateshow=false">取消</el-button>
+          <el-button type="primary" @click="interestratesubmit">确定</el-button>
+        </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+    import {
+    getexenseinfo,
+    getwarehouse
+  } from '@/model/profitable/index'
+  import {
+    getenabledinfo,
+  setenabledinfo
+} from '@/model/warehouse/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        taskTypeList:[],
+        warehouse:[],
+        interestrateshow:false,
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        outtotal:0,
+        intotal:0,
+         foodExpenditure:0,
+        grainIncome:0,
+        expenseIncome:0,
+        expensesPay:0,
+        currentProfit:0,
+        warehouseName:'全部仓库',
+        allotmentofMoney:{}
+      }
+    },
+    activated() {
+        //  this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      edit(){
+        this.interestrateshow=true
+      },
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      returnsales(){
+        this.$router.go(-1)
+      },
+      interestratesubmit(){
+        setenabledinfo({id:this.allotmentofMoney.id,value:this.allotmentofMoney.value}).toPromise()
+              .then((response) => {
+                this.$message({
+                  message: '修改利率成功',
+                  type: 'success'
+                });
+                this.interestrateshow=false
+              })
+      },
+      getPassYearFormatDate () {
+          var nowDate = new Date()
+          var _date = new Date()
+          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]
+        },
+        selectwarehouse(e){
+          if(e=='全部仓库'){
+            this.warehouseName=''
+          }else{
+            this.warehouseName=e
+          }
+          this.getList()
+        },
+      getList() {
+        getwarehouse({ compId: localStorage.getItem('ws-pf_compId'),warehouseType:1}).toPromise()
+          .then(response => {
+            this.warehouse = response
+          
+          })
+          getenabledinfo({functionType:3}).toPromise()
+          .then((response) => {
+            this.allotmentofMoney=response
+          })
+          getexenseinfo({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            searchTypeFee:1,
+            warehouseName:this.warehouseName,
+            pageSize:this.pageSize ,
+            searchType:this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            if(response.records.length>0){
+              for (let i = 0; i < response.records.length; i++) {
+                response.records[i].money=response.records[i].amountMoney-response.records[i].unallocatedAmount
+                if(response.records[i].paymentDate){
+                  response.records[i].paymentDate=response.records[i].paymentDate.split(' ')[0]
+                }
+              }
+            }
+            this.tableData = response.records
+             
+            
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+  .bg-right{
+    padding-top:15px;
+  }
+  /deep/.el-input{
+    width:90%;
+  }
+</style>

+ 21 - 12
src/views/statisticalReport/autoSettlementList.vue

@@ -219,10 +219,13 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <!-- <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
-          </el-upload>
+          </el-upload> -->
+          <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -307,9 +310,11 @@
     <!--付款截图 -->
     <WinseaContentModal v-model="paymentImg" title="付款截图信息" @on-cancel="handleClose2">
       <p>查看付款截图</p>
-      <div v-for="item in paymentScreenshot1">
+      <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
+      <!-- <div v-for="item in paymentScreenshot1">
         <img style="width: 100px; height: 100px" :src="item" alt="" />
-      </div>
+      </div> -->
     </WinseaContentModal>
   </div>
   <!-- </div> -->
@@ -357,8 +362,7 @@ export default {
   },
 
   data() {
-    return {
-      checked: true,
+    return { 
       alreadyInvoice: '',
       needReapply: true,
       dialogFormVisible1: false,
@@ -382,10 +386,6 @@ export default {
       currect: true,
       formLabelWidth: '120px',
       formLabelWidth1: '140px',
-      barWidth: 0,
-      barHeight: 0,
-      retioX: 1,
-      ratioY: 1,
       isTaped: false,
       isHover: false,
       settlementWeightchange: false,
@@ -400,14 +400,12 @@ export default {
       year: '',
       options: [],
       id: '',
-      pickerOptions: {},
       value2: '',
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
       searchType: '1',
       manualFlag: '',
-      searchTypeText: '未完成',
       searchKeyWord: '',
       startAddress:'',
       driverPayeeList: {
@@ -484,6 +482,17 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.paymentScreenshot = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
     find(){
       this.getList()
     },

+ 3 - 3
src/views/statisticalReport/huoyunList.vue

@@ -110,7 +110,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -1057,9 +1057,9 @@
       },
       handlePictureCardPreview(file) {
         if (this.paymentScreenshot) {
-          this.paymentScreenshot += "," + file.url
+          this.paymentScreenshot += "," + file.data.url
         } else {
-          this.paymentScreenshot = file.url
+          this.paymentScreenshot = file.data.url
         }
       },
       handleDownload(file) {

+ 4 - 4
src/views/statisticalReport/purchaseClosingCashierList.vue

@@ -75,7 +75,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -104,7 +104,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传收款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview1" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -548,10 +548,10 @@
         console.log(file)
       },
       handlePictureCardPreview(file) {
-        this.paymentScreenshot = file.url
+        this.paymentScreenshot = file.data.url
       },
       handlePictureCardPreview1(file) {
-        this.collectionScreenshot = file.url
+        this.collectionScreenshot = file.data.url
       },
       handleDownload(file) {
         console.log(file)

+ 2 - 2
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -111,7 +111,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -991,7 +991,7 @@
         console.log(file)
       },
       handlePictureCardPreview(file) {
-        this.paymentScreenshot = file.url
+        this.paymentScreenshot = file.data.url
 
         this.dialogVisible = true
       },

+ 3 - 3
src/views/statisticalReport/salesClosingCashierList.vue

@@ -111,7 +111,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload v-if="paymentlist.paymentScreenshot == ''" action="https://www.zthymaoyi.com/upload/admin"
+          <el-upload v-if="paymentlist.paymentScreenshot == ''" :action="global.uploadPath"
             list-type="picture-card" :on-success="
               (res, file) => {
                 handlepaymentScreenshot(res, file)
@@ -428,10 +428,10 @@
         })
       },
       handlepaymentScreenshot(res, fire) {
-        this.paymentlist.paymentScreenshot = res.url
+        this.paymentlist.paymentScreenshot = res.data.url
       },
       handlecollectionScreenshot(res, fire) {
-        this.collectionlist.collectionScreenshot = res.url
+        this.collectionlist.collectionScreenshot = res.data.url
       },
       payment() {
         if (this.multipleSelection.length > 0) {

+ 2 - 2
src/views/statisticalReport/salesDeliveryReportList.vue

@@ -102,7 +102,7 @@
             value-format="yyyy-MM-dd" class="deal" />
         </el-form-item>
         <el-form-item label="上传收款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -806,7 +806,7 @@
         console.log(file)
       },
       handlePictureCardPreview(file) {
-        this.collectionScreenshot = file.url
+        this.collectionScreenshot = file.data.url
       },
       handleDownload(file) {
         console.log(file)

+ 3 - 3
src/views/statisticalReport/shippingList.vue

@@ -111,7 +111,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -1074,9 +1074,9 @@
       },
       handlePictureCardPreview(file) {
         if (this.paymentScreenshot) {
-          this.paymentScreenshot += ',' + file.url
+          this.paymentScreenshot += ',' + file.data.url
         } else {
-          this.paymentScreenshot = file.url
+          this.paymentScreenshot = file.data.url
         }
         this.dialogVisible = true
       },

+ 4 - 4
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -165,7 +165,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -202,7 +202,7 @@
 
         </el-form-item>
         <el-form-item label="上传定金截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreviewDis" :on-remove="handleRemoveDis" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -903,7 +903,7 @@
         console.log(file)
       },
       handlePictureCardPreview(file) {
-        this.paymentScreenshot = file.url
+        this.paymentScreenshot = file.data.url
         this.dialogVisible = true
       },
       // handleDownload(file) {
@@ -911,7 +911,7 @@
       // },
 
       handlePictureCardPreviewDis(file) {
-        this.depositUrl = file.url
+        this.depositUrl = file.data.url
         this.dialogVisible = true
       },
       handleRemoveDis(file) {

+ 4 - 4
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -356,7 +356,7 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传收款截图" :label-width="formLabelWidth">
-          <el-upload ref='upload' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <el-upload ref='upload' :action="global.uploadPath" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -403,7 +403,7 @@
           <el-input v-model="deposit" autocomplete="off" placeholder="输入定金金额" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="上传定金截图" :label-width="formLabelWidth">
-          <el-upload ref="upload" action="https://www.zthymaoyi.com/upload/admin" :limit='1' list-type="picture-card"
+          <el-upload ref="upload" :action="global.uploadPath" :limit='1' list-type="picture-card"
             :on-success="handlePictureCardPreview1" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
           </el-upload>
@@ -1327,10 +1327,10 @@
         console.log(file)
       },
       handlePictureCardPreview(file) {
-        this.collectionScreenshot = file.url
+        this.collectionScreenshot = file.data.url
       },
       handlePictureCardPreview1(file) {
-        this.depositUrl = file.url
+        this.depositUrl = file.data.url
       },
       handleDownload(file) {
         console.log(file)

+ 5 - 2
src/views/taskManagement/inOutWarehouseTaskEdit.vue

@@ -195,10 +195,13 @@
             {{dataList.goodsName}}
             <!-- </el-select> -->
           </el-form-item>
-          <el-form-item v-else label="货源" class="huom">
+          <el-form-item v-else-if='dataList1.inOutType=="退库"&&dataList1.taskTypeKey == 4' label="货源" class="huom">
             {{goods}}
             <el-button style='margin-left:5px;' class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
           </el-form-item>
+          <el-form-item v-else label="货源" class="huom">
+            {{dataList.inOutTaskNo}}
+          </el-form-item>
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" >
             {{dataList1.weight}}
@@ -687,7 +690,7 @@ export default {
           }
           if(this.dataList.sourceRelationInfoList){
             if(this.dataList.taskTypeKey==2&&this.dataList.inOutType=="退库"||this.dataList.taskTypeKey==4){
-                  this.goods=this.dataList.sourceId
+                  this.goods=this.dataList1.sourceId
                 }else 
               for (let i = 0; i < this.dataList.sourceRelationInfoList.length; i++) {
                 if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){

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

@@ -303,7 +303,7 @@
           // console.log(response)
         })
         getstafffind({
-          roles: 'd6a5c8a52da544309259f91f75de1ec6'
+          roles: '499413401da1471fa2e26f2e35d4f018'
         })
         .toPromise()
         .then((response) => {

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

@@ -193,11 +193,19 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<el-form-item v-else-if='dataList1.inOutType=="退库"&&dataList1.taskTypeKey == 4' label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
 					</el-form-item>
+					<el-form-item v-else label="出库任务编号" class="huom">
+						
+						<el-select v-model="dataList1.inOutTaskNo" placeholder="请选择出库任务编号" class="huom" @change="selectinOutTaskNo"
+						filterable clearable>
+						<el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
+							:value="item.inOutTaskNo"></el-option>
+						</el-select>
+					</el-form-item>
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
 						<el-input :disabled='dataList1.inOutType=="收购入库"' @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
@@ -371,9 +379,9 @@
 		getwarehousename,
 		xialaNo,
 		addoreditoutput,
-		getGoodsName
+		getGoodsName,
+		gettaskNo
 	} from '@/model/tasksport/index'
-
 	import {
 		mapGetters
 	} from 'vuex'
@@ -447,6 +455,7 @@
 				deptBudgetTotal: 0,
 				readonly: true,
 				currentPage: 1,
+				taskNolist:[],
 				pageSize: 10,
 				searchType: 1,
 				searchKeyWord: '',
@@ -893,8 +902,14 @@
 									this.$set(this.dataList1, 'waterContent', response.waterContent)
 									this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
 									if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=='退库'){
-										this.goods=''
 										this.dataList1.weight=0
+										gettaskNo({
+											contractNo: this.dataList1.contractNo,
+										})
+										.toPromise()
+										.then((response) => {
+											this.taskNolist = response
+										})
 									}else{
 										this.$set(this.dataList1, 'weight', response.weight)
 									}
@@ -1536,8 +1551,10 @@
 					
 				}
 				var supplygoods=data
-				this.dataList.sourceId=this.goods
-				this.dataList1.sourceId=this.goods
+				if(this.dataList.taskTypeKey != 2){
+					this.dataList.sourceId=this.goods
+					this.dataList1.sourceId=this.goods
+				}
 				if (this.dataList.taskTypeKey == 1) {
 					this.dataList.inOutTaskNo = this.inOutTaskNo
 					this.dataList.sourceRelationInfoList=supplygoods
@@ -1598,6 +1615,14 @@
 					}
 				}
 			},
+			selectinOutTaskNo(e) {
+				for (var i = 0; i < this.taskNolist.length; i++) {
+					if (this.taskNolist[i].inOutTaskNo == e) {
+						this.dataList1.sourceId = this.taskNolist[i].id
+						// this.dataList1.weight = this.taskNolist[i].weight
+					}
+				}
+			},
 			selectpackingMethod(e) {
 				for (var i = 0; i < this.gradeList.length; i++) {
 					if (this.gradeList[i].constValue == e) {
@@ -1623,7 +1648,7 @@
 			selectstorageType(e) {
 				switch (e) {
 					case '采购出库':
-						this.flag = 0
+						this.flag = 8
 						break
 					case '销售出库':
 						this.flag = 1
@@ -1650,7 +1675,7 @@
 						this.flag = 0
 						break
 					case '退库':
-						this.flag = 2
+						this.flag = 5
 						break
 				}
 				for (var i = 0; i < this.storageType1.length; i++) {

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

@@ -226,11 +226,18 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<el-form-item v-else-if='dataList1.inOutType=="退库"&&dataList1.taskTypeKey == 4' label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
 						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">查看货源</el-button>
 					</el-form-item>
+          <el-form-item v-else label="出库任务编号" class="huom">
+            <el-select disabled v-model="dataList1.inOutTaskNo" placeholder="请选择出库任务编号" class="huom"
+						filterable clearable>
+						<el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
+							:value="item.inOutTaskNo"></el-option>
+						</el-select>
+          </el-form-item>
           <!--重量(吨)-->
           <el-form-item label="重量(吨)">
             <el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)" maxlength="120"
@@ -487,6 +494,7 @@
         // 是否显示
         showType: true,
         disabled: false,
+        taskNolist:[],
         // 年
         year: '',
         disableReason: '',

+ 14 - 6
src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue

@@ -167,7 +167,7 @@
           <el-form-item label="货源" class="huom">
             <el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
-            <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+            <!-- <el-button class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
           </el-form-item>
           <!--重量(吨)-->
           <el-form-item
@@ -349,7 +349,7 @@
           <!-- 入库类型 -->
           <el-form-item label="入库类型">
             <el-select
-              :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4||dataList1.inOutType=='收购入库'"
+              disabled
               v-model="dataList1.inOutType"
               placeholder="请选择入库类型"
               class="typeselect"
@@ -375,7 +375,7 @@
           <!-- 合同编号 -->
           <el-form-item v-if="dataList1.taskTypeKey != 3" label="合同编号">
             <el-select
-            :disabled="dataList1.inOutType=='收购入库'"
+              disabled
               @change="changecontract1"
               v-model="dataList1.contractNo"
               placeholder="请输入合同编号"
@@ -407,10 +407,18 @@
 							:value="item.constValue"></el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item v-else label="货源" class="huom">
+					<el-form-item v-else-if='dataList1.inOutType=="退库"&&dataList1.taskTypeKey == 4' label="货源" class="huom">
 						<el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
-						<el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+						<!-- <el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
+					</el-form-item>
+          <el-form-item v-else label="出库任务编号" class="huom">
+						<el-select disabled v-model="dataList1.inOutTaskNo" placeholder="请选择出库任务编号"
+						filterable clearable>
+						<el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
+							:value="item.inOutTaskNo"></el-option>
+						</el-select>
+						<!-- <el-button v-if='dataList.taskTypeKey!=3' class="bg-bottom" type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
 					</el-form-item>
           <!--重量(吨)-->
           <el-form-item
@@ -624,7 +632,7 @@
           <el-form-item label="货源" class="huom">
             <el-input disabled v-model="goods" placeholder="请选择货源"
 							maxlength="120" size="small" class="huom" />
-            <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button>
+            <!-- <el-button class="bg-bottom" v-if='dataList.taskTypeKey!=4' type="primary" size="small" @click="supplygoods()">选择货源</el-button> -->
           </el-form-item>
           <!--重量(吨)-->
           <el-form-item

+ 2 - 2
src/views/tradeServicesManagement/repayment.vue

@@ -68,13 +68,13 @@
             </ws-form-item>
             <ws-form-item label="上传还款截图" prop="paymentScreenshot"></ws-form-item>
             <div class="upLoad">
-              <!-- <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+              <!-- <el-upload class="avatar-uploader" :action="global.uploadPath" :show-file-list="false"
                 :on-success="handleAvatarSuccess">
                 <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload> -->
                <!-- <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             list-type="picture-card"
             :on-success="handleAvatarSuccess"
             :on-remove="handleRemove"

+ 16 - 16
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -265,7 +265,7 @@
                 size="small"
               />
               <el-upload
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="
                   (res, file) => {
@@ -349,7 +349,7 @@
                 size="small"
               />
               <el-upload
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="
                   (res, file) => {
@@ -409,7 +409,7 @@
       <div class="flex">
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandletravel"
             class="avatar-uploader"
@@ -428,7 +428,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandledrive"
             class="avatar-uploader"
@@ -447,7 +447,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandleway"
             class="avatar-uploader"
@@ -466,7 +466,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandlequalification"
             class="avatar-uploader"
@@ -485,7 +485,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandleidentityjust"
             class="avatar-uploader"
@@ -504,7 +504,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandleidentityagainst"
             class="avatar-uploader"
@@ -671,12 +671,12 @@ export default {
       console.log(index, e, fileList)
       const that = this
       // this.deptBudgetList.cardAddressUrl = e.url
-      getbank({ bankImg: e.url })
+      getbank({ bankImg: e.data.url })
         .toPromise()
         .then((response) => {
           for (var i = 0; i < this.freightspace1.length; i++) {
             if (i == index) {
-              this.freightspace1[i].payeeAddressUrl = e.url
+              this.freightspace1[i].payeeAddressUrl = e.data.url
               this.freightspace1[i].bankCard = response.bankNo
               this.freightspace1[i].bankDeposit = response.bankName
               this.freightspace1[i].bankDepositBranchList =
@@ -686,23 +686,23 @@ export default {
         })
     },
     uploadSuccessHandletravel(e) {
-      this.$set(this.addressUrls, 'travel', e.url)
+      this.$set(this.addressUrls, 'travel', e.data.url)
     },
     uploadSuccessHandledrive(e) {
-      this.$set(this.addressUrls, 'drive', e.url)
+      this.$set(this.addressUrls, 'drive', e.data.url)
     },
     uploadSuccessHandleway(e) {
-      this.$set(this.addressUrls, 'way', e.url)
+      this.$set(this.addressUrls, 'way', e.data.url)
       this.addressUrls.way = e.url
     },
     uploadSuccessHandlequalification(e) {
-      this.$set(this.addressUrls, 'qualification', e.url)
+      this.$set(this.addressUrls, 'qualification', e.data.url)
     },
     uploadSuccessHandleidentityjust(e) {
-      this.$set(this.addressUrls, 'identityjust', e.url)
+      this.$set(this.addressUrls, 'identityjust', e.data.url)
     },
     uploadSuccessHandleidentityagainst(e) {
-      this.$set(this.addressUrls, 'identityagainst', e.url)
+      this.$set(this.addressUrls, 'identityagainst', e.data.url)
     },
     selectbankDepositBranch(e, index) {
       this.freightspace1[index].bankDepositBranch = e

+ 16 - 16
src/views/tranManagement/tranManagementDriverEdit.vue

@@ -268,7 +268,7 @@
                 size="small"
               />
               <el-upload
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="
                   (res, file) => {
@@ -353,7 +353,7 @@
                 size="small"
               />
               <el-upload
-                action="https://www.zthymaoyi.com/upload/admin"
+                :action="global.uploadPath"
                 :show-file-list="false"
                 :on-success="
                   (res, file) => {
@@ -414,7 +414,7 @@
         <!-- <div v-for="(item,index) in deptBudgetList.addressUrlArray"> -->
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandletravel"
             class="avatar-uploader"
@@ -434,7 +434,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandledrive"
             class="avatar-uploader"
@@ -454,7 +454,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandleway"
             class="avatar-uploader"
@@ -474,7 +474,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandlequalification"
             class="avatar-uploader"
@@ -494,7 +494,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandleidentityjust"
             class="avatar-uploader"
@@ -514,7 +514,7 @@
         </div>
         <div>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="uploadSuccessHandleidentityagainst"
             class="avatar-uploader"
@@ -744,7 +744,7 @@ export default {
     uploadSuccessHandle1(index, e, fileList) {
       const that = this
       // this.deptBudgetList.cardAddressUrl = e.url
-      getbank({ bankImg: e.url })
+      getbank({ bankImg: e.data.url })
         .toPromise()
         .then((response) => {
           for (
@@ -753,7 +753,7 @@ export default {
             i++
           ) {
             if (i == index) {
-              this.deptBudgetList.driverPayeeInfoList[i].payeeAddressUrl = e.url
+              this.deptBudgetList.driverPayeeInfoList[i].payeeAddressUrl = e.data.url
               this.deptBudgetList.driverPayeeInfoList[i].bankCard =
                 response.bankNo
               this.deptBudgetList.driverPayeeInfoList[i].bankDeposit =
@@ -766,23 +766,23 @@ export default {
     },
     uploadSuccessHandletravel(e) {
       console.log(e.url)
-      this.$set(this.addressUrls, 'travel', e.url)
+      this.$set(this.addressUrls, 'travel', e.data.url)
     },
     uploadSuccessHandledrive(e) {
-      this.$set(this.addressUrls, 'drive', e.url)
+      this.$set(this.addressUrls, 'drive', e.data.url)
     },
     uploadSuccessHandleway(e) {
-      this.$set(this.addressUrls, 'way', e.url)
+      this.$set(this.addressUrls, 'way', e.data.url)
       this.addressUrls.way = e.url
     },
     uploadSuccessHandlequalification(e) {
-      this.$set(this.addressUrls, 'qualification', e.url)
+      this.$set(this.addressUrls, 'qualification', e.data.url)
     },
     uploadSuccessHandleidentityjust(e) {
-      this.$set(this.addressUrls, 'identityjust', e.url)
+      this.$set(this.addressUrls, 'identityjust', e.data.url)
     },
     uploadSuccessHandleidentityagainst(e) {
-      this.$set(this.addressUrls, 'identityagainst', e.url)
+      this.$set(this.addressUrls, 'identityagainst', e.data.url)
     },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {

+ 3 - 3
src/views/tranManagement/tranManagementFireFeedback.vue

@@ -109,7 +109,7 @@
             <ws-form-item label="磅单:" span="1" prop="loadPoundImg">
               <template slot-scope="scope">
                 <!-- slot-scope="scope" -->
-                <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
+                <el-upload :action="global.uploadPath" :show-file-list="false" :on-success="
                     (res) => {
                       uploadSuccessHandle1(res, index)
                     }
@@ -684,9 +684,9 @@
         that.$forceUpdate();
         that.freightspace[that.index].imgCount++
         if(that.freightspace[that.index].loadPoundImg){
-             that.freightspace[that.index].loadPoundImg += "," + e.url  
+             that.freightspace[that.index].loadPoundImg += "," + e.data.url  
         }else{
-             that.freightspace[that.index].loadPoundImg += e.url 
+             that.freightspace[that.index].loadPoundImg += e.data.url 
         }
       }
     }

+ 3 - 3
src/views/tranManagement/tranManagementFireReceivingFeedback.vue

@@ -180,7 +180,7 @@
               <!-- slot-scope="scope" -->
               <template>
                 <el-upload
-                  action="https://www.zthymaoyi.com/upload/admin"
+                  :action="global.uploadPath"
                   :show-file-list="false"
                   :on-success="
                     (res) => {
@@ -756,9 +756,9 @@ export default {
         that.freightspace[that.index].imgCount++
         console.log(that.freightspace[that.index].imgCount)
         if( that.freightspace[that.index].unloadPoundImg){
-           that.freightspace[that.index].unloadPoundImg += ',' + e.url
+           that.freightspace[that.index].unloadPoundImg += ',' + e.data.url
         }else{
-          that.freightspace[that.index].unloadPoundImg += e.url
+          that.freightspace[that.index].unloadPoundImg += e.data.url
         }
     },
   },

+ 3 - 3
src/views/tranManagement/tranManagementReceivingloading.vue

@@ -109,7 +109,7 @@
           <div style="font-size: 16px; width: 100%; text-align: right;display:flex;justify-content:end;">
             <!-- <el-upload style="margin-left: 8px;"
           class=""
-          action="https://www.zthymaoyi.com/upload/admin"
+          :action="global.uploadPath"
           :show-file-list="false"
           :on-success="
           (res, file) => {
@@ -262,7 +262,7 @@
               <ws-form-item label="磅单:" span="1" prop="unloadPoundImg">
                 <template>
                   <el-upload
-                    action="https://www.zthymaoyi.com/upload/admin"
+                    :action="global.uploadPath"
                     :show-file-list="false"
                     :on-success="
                       (res) => {
@@ -587,7 +587,7 @@ export default {
       }
     },
     uploadSuccessHandle1(e, index) {
-      this.deptBudgetList.tranCarInfoList[index].unloadPoundImg = e.url
+      this.deptBudgetList.tranCarInfoList[index].unloadPoundImg = e.data.url
     },
     selectwaterContent() {},
     //提交按钮

+ 3 - 3
src/views/tranManagement/tranManagementShippingFeedback.vue

@@ -314,7 +314,7 @@
           <!-- slot-scope="scope" -->
           <template>
             <el-upload
-              action="https://www.zthymaoyi.com/upload/admin"
+              :action="global.uploadPath"
               :show-file-list="false"
               :on-success="
                 (res) => {
@@ -987,9 +987,9 @@ export default {
     uploadSuccessHandle1(e) {
       this.pictureTotal++
       if (this.deptBudgetList.tranCarInfoList[0].loadPoundImg) {
-        this.deptBudgetList.tranCarInfoList[0].loadPoundImg += ',' + e.url
+        this.deptBudgetList.tranCarInfoList[0].loadPoundImg += ',' + e.data.url
       } else {
-        this.deptBudgetList.tranCarInfoList[0].loadPoundImg = e.url
+        this.deptBudgetList.tranCarInfoList[0].loadPoundImg = e.data.url
       }
 
       console.log(this.deptBudgetList.tranCarInfoList, 'duixiang1')

+ 3 - 3
src/views/tranManagement/tranManagementTransporFeedback.vue

@@ -55,7 +55,7 @@
       <div style="font-size: 16px; width: 50%;float: left;text-align: right;display:flex;justify-content:end;">
         <!-- <el-upload style="margin-left: 8px;"
           class=""
-          action="https://www.zthymaoyi.com/upload/admin"
+          :action="global.uploadPath"
           :show-file-list="false"
           :on-success="
           (res, file) => {
@@ -142,7 +142,7 @@
             <ws-form-item label="磅单:" span="1" prop="loadPoundImg">
               <!-- slot-scope="scope" -->
               <template>
-                <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+                <el-upload :action="global.uploadPath" :show-file-list="false"
                   :on-success=" (res) => { uploadSuccessHandle1(res,index)}" class="avatar-uploader"
                   accept=".jpg, .jpeg, .png, .gif">
                   <img width="18" height="20" style="
@@ -762,7 +762,7 @@
         }
       },
       uploadSuccessHandle1(e, index) {
-        this.freightspace[index].loadPoundImg = e.url
+        this.freightspace[index].loadPoundImg = e.data.url
       }
     }
   }

+ 1 - 1
src/views/tranManagement/tranManagementUnShippingFeedback.vue

@@ -307,7 +307,7 @@
         <!-- slot-scope="scope" -->
         <template>
           <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="
               (res) => {

+ 1 - 1
src/views/warehouse/warehouseManagementAdd.vue

@@ -81,7 +81,7 @@
     </ws-form>
     <ws-form ref="deptBudgetList" :model="deptBudgetList">
       <div class="small-title" v-show="radio == 1">上传仓库照片</div>
-      <el-upload ref='upload' action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
+      <el-upload ref='upload' :action="global.uploadPath" :show-file-list="false" :on-success="
           (res, file) => {
             uploadSuccessHandle(res)
           }

+ 2 - 2
src/views/warehouse/warehouseManagementDelivery.vue

@@ -474,7 +474,7 @@
       </div>
       <div class="small-title">上传磅单照片</div>
       <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="
               (res) => {
@@ -758,7 +758,7 @@ export default {
       console.log(e)
     },
     uploadSuccessHandle1(res){
-      this.deptBudgetList.addressUrl=res.url
+      this.deptBudgetList.addressUrl=res.data.url
     },
     //返回按钮
     revert() {

+ 3 - 3
src/views/warehouse/warehouseManagementEdit.vue

@@ -86,7 +86,7 @@
       </ws-form>
       <ws-form ref="deptBudgetList" :model="deptBudgetList">
         <div v-if="warehouseType == 1" class="small-title">上传仓库照片</div>
-        <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
+        <el-upload :action="global.uploadPath" :show-file-list="false" :on-success="
             (res, file) => {
               uploadSuccessHandle(res)
             }
@@ -516,8 +516,8 @@
         })
       },
       uploadSuccessHandle(e) {
-        this.deptBudgetList.addressUrl += e.url + ','
-        this.addressUrls.push(e.url)
+        this.deptBudgetList.addressUrl += e.data.url + ','
+        this.addressUrls.push(e.data.url)
       },
       //提交
       submit() {

+ 1 - 1
src/views/warehouse/warehouseManagementGross.vue

@@ -345,7 +345,7 @@
       </div>
       <!-- <div class="small-title">上传磅单照片</div>
       <el-upload
-        action="https://www.zthymaoyi.com/upload/admin"
+        :action="global.uploadPath"
         :show-file-list="false"
         :on-success="
           (res) => {

+ 1 - 1
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -303,7 +303,7 @@
       </div>
       <!-- <div class="small-title">上传磅单照片</div>
        <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="
               (res) => {

+ 1 - 1
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -260,7 +260,7 @@
       </div>
       <!-- <div class="small-title">上传磅单照片</div>
       <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="
               (res) => {

+ 2 - 2
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -442,7 +442,7 @@
       </div>
       <div class="small-title">上传磅单照片</div>
       <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="
               (res) => {
@@ -761,7 +761,7 @@ export default {
       }
     },
     uploadSuccessHandle1(res){
-      this.dataList.addressUrl=res.url
+      this.dataList.addressUrl=res.data.url
     },
     //返回按钮
     revert() {

+ 2 - 2
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -544,7 +544,7 @@
       </div>
       <div class="small-title">上传磅单照片</div>
        <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="
               (res) => {
@@ -884,7 +884,7 @@ export default {
       console.log(e)
     },
     uploadSuccessHandle1(res){
-      this.dataList.addressUrl=res.url
+      this.dataList.addressUrl=res.data.url
     },
     pureweight(status){
       console.log(this.dataList)

+ 2 - 2
src/views/warehouse/warehouseManagementPut.vue

@@ -338,7 +338,7 @@
         </div>
       </div>
       <div class="small-title">上传磅单照片</div>
-      <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
+      <el-upload :action="global.uploadPath" :show-file-list="false" :on-success="
           (res) => {
             uploadSuccessHandle1(res)
           }
@@ -600,7 +600,7 @@
         }
       },
       uploadSuccessHandle1(res) {
-        this.deptBudgetList.addressUrl = res.url
+        this.deptBudgetList.addressUrl = res.dat.url
         console.log(this.deptBudgetList.addressUrl)
       },
       dataFilter1(val) {

+ 1 - 1
src/views/warehouse/warehouseManagementTare.vue

@@ -244,7 +244,7 @@
       </div>
       <!-- <div class="small-title">上传磅单照片</div>
       <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="
               (res) => {

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

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

+ 17 - 13
src/views/warehousenew/warehouseManagementAdd.vue

@@ -76,22 +76,24 @@
       </ws-info-table>
     </ws-form>
     <ws-form ref="deptBudgetList" :model="deptBudgetList">
-      <div class="small-title" v-show="radio == 1">上传仓库照片</div>
-      <el-upload ref='upload' action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
+      <div class="small-title" v-show="radio == 1">上传附件</div>
+      <!-- <el-upload ref='upload' action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
           (res, file) => {
             uploadSuccessHandle(res)
           }
         " class="avatar-uploader" accept=".jpg, .jpeg, .png, .gif">
         <el-button v-show="radio == 1">上传附件</el-button>
-      </el-upload>
-      <div class="addressUrls" v-if="addressUrls != null">
+      </el-upload> -->
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+      <!-- <div class="addressUrls" v-if="addressUrls != null">
         <div class="addressUrls-item">
           <div v-for="(item, index) in addressUrls" class="addressUrl" :key="index">
             <div @click="close(index)" class="iconfont icon-guanbi"></div>
             <img v-if="addressUrls != null" width="100" height="100" :src="item" alt="" />
           </div>
         </div>
-      </div>
+      </div> -->
       <div style="margin-bottom: 5px" class="small-title">仓库定位</div>
       <!-- <map-drag  @marker="marker" @selectedAddress="selectedAddress" @provinceChange='provinceChange' @pickedAddress='getInfo'></map-drag> -->
       <map-drag @marker="marker" ref="childMap" :isShowaddress='false' v-on:addressListen='getAddress' v-on:pickedAddress='searchAddress' ></map-drag>
@@ -313,15 +315,17 @@
         })
       },
       // 上传附件
-      uploadSuccessHandle(e) {
-        this.deptBudgetList.addressUrl += e.url + ','
-        this.addressUrls.push(e.url)
-      },
-      onChange(files) {
-        this.fileNum = files
-        this.$refs.upload.handleSaveBill().then((res) => {})
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
       },
-
       submit() {
         
         if (this.radio == 1) {

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

@@ -472,7 +472,7 @@
       </div>
       <div class="small-title">上传磅单照片</div>
       <el-upload
-            action="https://www.zthymaoyi.com/upload/admin"
+            :action="global.uploadPath"
             :show-file-list="false"
             :on-success="
               (res) => {
@@ -748,7 +748,7 @@ export default {
       console.log(e)
     },
     uploadSuccessHandle1(res){
-      this.deptBudgetList.addressUrl=res.url
+      this.deptBudgetList.addressUrl=res.data.url
     },
     //返回按钮
     revert() {

+ 13 - 27
src/views/warehousenew/warehouseManagementEdit.vue

@@ -89,28 +89,9 @@
         </div>
       </ws-form>
       <ws-form ref="deptBudgetList" :model="deptBudgetList">
-        <div v-if="warehouseType == 1" class="small-title">上传仓库照片</div>
-        <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
-            (res, file) => {
-              uploadSuccessHandle(res)
-            }
-          " :on-remove="
-            (value) => {
-              handleRemove(value)
-            }
-          " class="avatar-uploader" accept=".jpg, .jpeg, .png, .gif">
-          <el-button v-if="warehouseType == 1">上传附件</el-button>
-        </el-upload>
-        <div class="addressUrls" v-if="addressUrls != null">
-            <div v-for="(item , index) in addressUrls" class="addressUrl" :key="index">
-              <div @click='close(index)' class="iconfont icon-guanbi"></div>
-              <el-image  v-if="addressUrls != null"
-                style="width: 100px; height: 100px"
-                :src="item" 
-                :preview-src-list="addressUrls">
-              </el-image>
-          </div>
-        </div>
+        <div v-if="warehouseType == 1" class="small-title">上传附件</div>
+        <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
         <div class="small-title">仓库定位</div>
         <map-drag @marker="marker" :isShowaddress='false' v-on:addressListen='getAddress'
           v-on:pickedAddress='searchAddress'></map-drag>
@@ -364,11 +345,16 @@
         this.fileList = files
         console.log('uploadSuccess ', data, files, url)
       },
-      onChange(files) {
-        this.fileNum = files
-        this.$refs.upload.handleSaveBill().then((res) => {
-          console.log(files)
-        })
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
       },
       handleClose() {
         this.accessoryTFs = false

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

@@ -669,7 +669,7 @@
       </div>
       <!-- <div class="small-title">上传磅单照片</div>
       <el-upload
-        action="https://www.zthymaoyi.com/upload/admin"
+        :action="global.uploadPath"
         :show-file-list="false"
         :on-success="
           (res) => {

+ 6 - 4
src/views/warehousenew/warehouseManagementLook.vue

@@ -140,18 +140,20 @@
             </ws-form-item>
           </ws-info-table>
         </div>
-        <div class="small-title" v-show="warehouseType == '1'">仓库照片</div>
+        <div class="small-title" v-show="warehouseType == '1'">附件</div>
         <div>
           <div class="addressUrls">
-          <div v-for="(items, index) in addressUrls" class="addressUrl">
+            <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+          <!-- <div v-for="(items, index) in addressUrls" class="addressUrl">
             <img
               v-show="addressUrls.length > 0"
               width="100"
               height="100"
               :src="items"
               alt=""
-            />
-          </div>
+            /> -->
+          <!-- </div> -->
         </div>
         
         </div>

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác