ccj 1 vuosi sitten
vanhempi
commit
dafc060d70

+ 5 - 0
package-lock.json

@@ -9990,6 +9990,11 @@
       "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
       "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g=="
     },
+    "ezuikit-js": {
+      "version": "7.7.7",
+      "resolved": "https://registry.npmjs.org/ezuikit-js/-/ezuikit-js-7.7.7.tgz",
+      "integrity": "sha512-VRkQN5u7bTdSwCqQYk3db7lR2kiXdCrMzr/rwmRZww8xqeXaghgttPjjI/kS+u/xVMAkl6hp9+47Yxs/zBRB8A=="
+    },
     "fast-deep-equal": {
       "version": "3.1.3",
       "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",

+ 1 - 0
package.json

@@ -56,6 +56,7 @@
     "echarts": "^4.2.1",
     "element-china-area-data": "^5.0.2",
     "element-ui": "^2.15.9",
+    "ezuikit-js": "^7.7.7",
     "file-saver": "^2.0.5",
     "flv.js": "^1.6.2",
     "form-making-advanced": "^1.2.6",

+ 71 - 71
src/api/V2/houseSelfCollect/index.js

@@ -1,145 +1,145 @@
 //客户管理列表
 export const API_GET_CUSTOMER_MANAGE = '/identityAuthenticationInfo/selectIdentityAuthenticationInfoPurchase'
-    //新增粮商1
+//新增粮商1
 export const API_POST_CUSTOMER_ADD = '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo'
-    //新增粮商2
+//新增粮商2
 export const API_GET_CUSTOMER_IDENTITY = '/identityAuthenticationInfo/saveCompanyIdentity'
-    //客户管理删除
+//客户管理删除
 export const API_GET_CUSTOMER_DELETE = '/identityAuthenticationInfo/api/deleteCompanyIdentity'
-    //客户查看
+//客户查看
 export const API_GET_CUSTOMER_LOOK = '/identityAuthenticationInfo/api/getIdentityAuthenticationInfo'
-    //收购管理列表
+//收购管理列表
 export const API_GET_PURCHASEPRICE_MANAGE = '/purchasePrice/purchasePriceList'
-    //收购管理添加
+//收购管理添加
 export const API_POST_PURCHASEPRICE_ADD = '/purchasePrice/purchasePriceAdd'
-    //收购管理查看
+//收购管理查看
 export const API_GET_PURCHASEPRICE_LOOK = '/purchasePrice/purchasePriceLook'
-    //收购管理编辑
+//收购管理编辑
 export const API_POST_PURCHASEPRICE_EDIT = '/purchasePrice/purchasePriceEdit'
-    //收购管理删除
+//收购管理删除
 export const API_POST_PURCHASEPRICE_DEL = '/purchasePrice/purchasePriceDel'
-    //收购管理员手动编辑
+//收购管理员手动编辑
 export const API_POST_PURCHASEPRICE_ALLOWEDIT = '/purchasePrice/purchasePriceAllowEdit'
-    //查询仓库列表
+//查询仓库列表
 export const API_GET_WAREHOUSESELF = '/warehouseBaseInfo/selectWarehouseSelf'
-    //客户修改
+//客户修改
 export const API_POST_CUSTOMER_EDIT = '/identityAuthenticationInfo/api/editIdentityAuthenticationInfo'
-    //客户获取验证码
+//客户获取验证码
 export const API_GET_CUSTOMER_CODE = '/commonUser/sendVerifyCode'
-    //客户验证码校验
+//客户验证码校验
 export const API_GET_CUSTOMER_CODEJY = '/commonUser/checkVerifyCode'
-    //质检添加
+//质检添加
 export const API_POST_INSPECT_ADD = '/qualityInspectionManagement/api/addQualityInspection'
-    //质检仓位下拉
+//质检仓位下拉
 export const API_GET_INSPECT_GETBINNUMBER = '/warehouseBaseInfo/getWarehouse'
-    //客户下拉
+//客户下拉
 export const API_GET_INSPECT_GETCUSTOMER = '/identityAuthenticationInfo/identityAuthenticationInfoCustomer'
-   //客户下拉新
-   export const API_GET_INSPECT_GETCUSTOMER_NEW = '/identityAuthenticationInfo/identityAuthenticationInfoCustomerNew'
-    //获取二维码
+//客户下拉新
+export const API_GET_INSPECT_GETCUSTOMER_NEW = '/identityAuthenticationInfo/identityAuthenticationInfoCustomerNew'
+//获取二维码
 export const API_GET_INSPECT_GETQRCODE = '/identityAuthenticationInfo/generateQRCodeImage'
-    //质检列表
+//质检列表
 export const API_GET_INSPECT_GETINSPECTLIST = '/qualityInspectionManagement/selectQualityInspection'
-    //质检查看
+//质检查看
 export const API_GET_INSPECT_GETINSPECTLOOK = '/qualityInspectionManagement/api/getQualityInspection'
-    //质检查看潮粮单价
+//质检查看潮粮单价
 export const API_GET_INSPECT_GETINSPECTLOOKUNITPRICE = '/purchasePrice/tidalGrainPrice'
-    //质检货名下拉
+//质检货名下拉
 export const API_GET_INSPECT_GETINSPECTLOOKGOODS = '/qualityInspectionManagement/api/goodsName'
-    //质检修改
+//质检修改
 export const API_POST_INSPECT_GETINSPECTEDIT = '/qualityInspectionManagement/api/editQualityInspection'
-    //质检删除
+//质检删除
 export const API_POST_INSPECT_GETINSPECTDELETE = '/qualityInspectionManagement/api/deleteQualityInspection'
-    //付款管理列表
+//付款管理列表
 export const API_GET_PAYMENTMANAGEMENT = '/paymentManagement/selectPaymentManagement'
-    //检斤列表查看
+//检斤列表查看
 export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWeighingManagement'
-    //皮重检斤保存
+//皮重检斤保存
 export const API_POST_WEIGHTCHECK_TARE = '/weighingManagement/api/editTare'
-    //毛重检斤保存
+//毛重检斤保存
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
-    //检斤管理删除
+//检斤管理删除
 export const API_POST_INSPECT_GETWEIGHTDELETE = '/weighingManagement/api/deleteWeightcheck'
-    //付款查看
+//付款查看
 export const API_GET_PAYMENT = '/paymentManagement/getInfo'
-    // 付款结算
+// 付款结算
 export const API_POST_PAYMENT_EDIT = '/paymentManagement/api/editInfo'
-    //质检客户下拉校验
+//质检客户下拉校验
 export const API_GET_INSPECT_GETAMOUNT = '/paymentManagement/cumulant'
-    //质检运输方式
+//质检运输方式
 export const API_GET_INSPECT_CONTRACTNO = '/inOutWarehouseTask/getContractNo'
-    //识别身份证
+//识别身份证
 export const API_GET_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
-    //识别银行卡
+//识别银行卡
 export const API_GET_CUSTOMER_GETBANK = '/driverViewInfo/bankShibie'
-    //查询货名有未结算状态
+//查询货名有未结算状态
 export const API_GET_INSPECT_GETCOUNT = '/qualityInspectionManagement/api/settledCount'
-    //检斤打印查看
+//检斤打印查看
 export const API_GET_WEIGHTCHECK_GETPRINT = '/weighingManagement/getWeighingManagement'
-    //付款删除
+//付款删除
 export const API_POST_PAYMENT_DEL = '/paymentManagement/api/deleteInfo'
-    //付款审核
+//付款审核
 export const API_POST_PAYMENT_AUDIT = '/paymentManagement/api/openAuditFlow'
-    //付款提交
+//付款提交
 export const API_POST_PAYMENT_PAYMENTSUBMIT = '/paymentManagement/api/payMoney'
-    //付款结算修改
+//付款结算修改
 export const API_POST_PAYMENT_SETTLEMENTEDIT = '/paymentManagement/api/editCollect'
-    //付款结算修改
+//付款结算修改
 export const API_GET_INSPECT_GETDRYGRAINPRICE = '/purchasePrice/dryGrainPrice'
-    //付款权限查询
+//付款权限查询
 export const API_GET_INSPECT_GETJURISDICTION = '/paymentManagement/selectTaskId'
-    //财务开票
+//财务开票
 export const API_POST_INVOICING = '/paymentManagement/api/readXmlManagement'
 export const API_POST_EXPORT = '/paymentManagement/export'
-    // 车牌号
+// 车牌号
 export const API_GET_SHIPPINGINFOFORMATION = '/shippingInformation/selectShippingInformation'
-    //确认质检信息
+//确认质检信息
 export const API_POST_INSPECTIONCHECK = '/qualityInspectionManagement/api/editQualityInspection'
-    //单据二维码
+//单据二维码
 export const API_GAT_QRCODE = '/weighingManagement/generateQRCodeImage'
-    //二维码获取数据
+//二维码获取数据
 export const API_GAT_GETQRCODE = '/weighingManagement/getQRcode'
-    //车型
+//车型
 export const API_GAT_INFO = '/commonSysParameter/getInfo'
-    // 审核之后接口
+// 审核之后接口
 export const API_POST_WORKFLOW_TASK = `/newWorkflow/getTaskWebsocket`
-    // 反结算
-    // export const API_POST_SUSPENDINSTANCE ='/api/suspendInstance'
+// 反结算
+// export const API_POST_SUSPENDINSTANCE ='/api/suspendInstance'
 export const API_POST_SUSPENDINSTANCE = '/paymentManagement/api/ReSettlement'
-    //导入
+//导入
 export const API_POST_IMPORT = '/qualityInspectionManagement/api/importQuality'
-    //导入移库
+//导入移库
 export const API_POST_IMPORT_YK = '/weighingManagement/api/importWeighing'
-    // 结算单
+// 结算单
 export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'
-    // 退回
+// 退回
 export const API_POST_RETURN = '/weighingManagement/weightReturn'
-    // 新检斤保存
+// 新检斤保存
 export const API_POST_SUBMIT = '/warehouseInOutInfo/api/newInOutWarehouse'
-    // 换仓
+// 换仓
 export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`
-    // 查询合同
+// 查询合同
 export const API_GET_CONTRACT = '/contractManagementInfo/getInContract'
-    // 发起人撤回
+// 发起人撤回
 export const API_SPONSOR_WITHDRAW = '/newWorkflow/api/stopInstance'
-    // 获取仓库id
+// 获取仓库id
 export const API_GET_BASEID = '/qualityInspectionManagement/selectBaseId'
-    // 换任务号
+// 换任务号
 export const API_POST_TASK_NO = `/weighingManagement/api/changeTaskNo`
-    //获取摄像头
+//获取摄像头
 export const API_POST_GETVIDEO = `/photoFrameController/api/devInit`
-    //获取车牌号
-    // export const API_POST_GETCARNUMBER = `/photoFrameController/api/devSetTrigger`
+//获取车牌号
+// export const API_POST_GETCARNUMBER = `/photoFrameController/api/devSetTrigger`
 export const API_POST_GETCARNUMBER = `/photoFrameController/api/zhuaPai`
-    // 换客户
+// 换客户
 export const API_POST_CUSTOMER = `/weighingManagement/api/changeCustomer`
-    // 丹东港生成入库单
+// 丹东港生成入库单
 export const API_POST_DANDONG_ORDER = `/paymentManagement/api/generateOrder`
-    // 检查客户送粮量
+// 检查客户送粮量
 export const API_GETQUALITY = '/qualityInspectionManagement/getQualityInspectionManagementMap'
 // 查询仓库接口新
 export const API_GET_WAREHOUSE = '/warehouseBaseInfo/selectWarehouseSelfNew'
 
-export const API_POST_GETOKEN = `/photoFrameController/api/getToken`
+export const API_GET_GETOKEN = `/warehouseBaseInfo/api/getToken`
 export const API_POST_GEROM = `/photoFrameController/api/getRom`
 export const API_POST_UPLOADSELF = '/paymentManagement/uploadSelfCertificate'

+ 71 - 71
src/model/houseSelfCollect/index.js

@@ -70,7 +70,7 @@ import {
     API_GET_WAREHOUSE,
     API_POST_GETVIDEO,
     API_POST_GETCARNUMBER,
-    API_POST_GETOKEN,
+    API_GET_GETOKEN,
     API_POST_GEROM,
     API_GETQUALITY,
     API_POST_UPLOADSELF,
@@ -78,146 +78,146 @@ import {
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
-    //新增粮商1
+//新增粮商1
 export const customerAdd = appRx.post(API_POST_CUSTOMER_ADD, errorCatcher, errorHandle, filter)
-    //新增粮商2
+//新增粮商2
 export const customerIdentity = appRx.get(API_GET_CUSTOMER_IDENTITY, errorCatcher, errorHandle, filter)
-    //客户管理删除
+//客户管理删除
 export const getCustomerDelete = appRx.post(API_GET_CUSTOMER_DELETE, errorCatcher, errorHandle, filter)
-    //客户查看
+//客户查看
 export const getCustomerLook = appRx.get(API_GET_CUSTOMER_LOOK, errorCatcher, errorHandle, filter)
-    //收购管理列表
+//收购管理列表
 export const getPurchasePrice = appRx.get(API_GET_PURCHASEPRICE_MANAGE, errorCatcher, errorHandle, filter)
-    //收购管理添加
+//收购管理添加
 export const purchasePriceAdd = appRx.post(API_POST_PURCHASEPRICE_ADD, errorCatcher, errorHandle, filter)
-    //收购管理查看
+//收购管理查看
 export const purchasePriceLook = appRx.get(API_GET_PURCHASEPRICE_LOOK, errorCatcher, errorHandle, filter)
-    //收购管理编辑
+//收购管理编辑
 export const purchasePriceEdit = appRx.post(API_POST_PURCHASEPRICE_EDIT, errorCatcher, errorHandle, filter)
-    //收购管理删除
+//收购管理删除
 export const purchasePriceDel = appRx.post(API_POST_PURCHASEPRICE_DEL, errorCatcher, errorHandle, filter)
-    //收购管理手动编辑
+//收购管理手动编辑
 export const purchasePriceAllowEdit = appRx.post(API_POST_PURCHASEPRICE_ALLOWEDIT, errorCatcher, errorHandle, filter)
-    //查看仓库
+//查看仓库
 export const selectWarehouseSelf = appRx.get(API_GET_WAREHOUSESELF, errorCatcher, errorHandle, filter)
-    //客户查看
+//客户查看
 export const CustomerEdit = appRx.post(API_POST_CUSTOMER_EDIT, errorCatcher, errorHandle, filter)
-    // 获取验证码
+// 获取验证码
 export const GetCustomerCode = appRx.get(API_GET_CUSTOMER_CODE, errorCatcher, errorHandle, filter)
-    // 验证码校验
+// 验证码校验
 export const GetCustomerCodeJY = appRx.get(API_GET_CUSTOMER_CODEJY, errorCatcher, errorHandle, filter)
-    //质检添加
+//质检添加
 export const inspectAdd = appRx.post(API_POST_INSPECT_ADD, errorCatcher, errorHandle, filter)
-    //仓位下拉
+//仓位下拉
 export const getbinNumber = appRx.get(API_GET_INSPECT_GETBINNUMBER, errorCatcher, errorHandle, filter)
-    //客户下拉
+//客户下拉
 export const getcustomer = appRx.get(API_GET_INSPECT_GETCUSTOMER, errorCatcher, errorHandle, filter)
-    //客户下拉新
-    export const getcustomernew = appRx.get(API_GET_INSPECT_GETCUSTOMER_NEW, errorCatcher, errorHandle, filter)
-    //获取二维码
+//客户下拉新
+export const getcustomernew = appRx.get(API_GET_INSPECT_GETCUSTOMER_NEW, errorCatcher, errorHandle, filter)
+//获取二维码
 export const getQRCode = appRx.get(API_GET_INSPECT_GETQRCODE, errorCatcher, errorHandle, filter)
-    //质检列表
+//质检列表
 export const getinspectList = appRx.get(API_GET_INSPECT_GETINSPECTLIST, errorCatcher, errorHandle, filter)
-    //质检查看
+//质检查看
 export const getinspectLook = appRx.get(API_GET_INSPECT_GETINSPECTLOOK, errorCatcher, errorHandle, filter)
-    //质检查看潮粮单价
+//质检查看潮粮单价
 export const getinspectLookUnitPrice = appRx.get(API_GET_INSPECT_GETINSPECTLOOKUNITPRICE, errorCatcher, errorHandle, filter)
-    //质检查看货名下拉
+//质检查看货名下拉
 export const getinspectLookGoods = appRx.get(API_GET_INSPECT_GETINSPECTLOOKGOODS, errorCatcher, errorHandle, filter)
-    //质检修改
+//质检修改
 export const getinspectEdit = appRx.post(API_POST_INSPECT_GETINSPECTEDIT, errorCatcher, errorHandle, filter)
-    //质检删除
+//质检删除
 export const getinspectDelete = appRx.post(API_POST_INSPECT_GETINSPECTDELETE, errorCatcher, errorHandle, filter)
-    //付款管理列表
+//付款管理列表
 export const getpayment = appRx.get(API_GET_PAYMENTMANAGEMENT, errorCatcher, errorHandle, filter)
-    //检斤列表查看
+//检斤列表查看
 export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, errorCatcher, errorHandle, filter)
-    //皮重检斤保存
+//皮重检斤保存
 export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
-    //毛重检斤保存
+//毛重检斤保存
 export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)
-    //检斤删除
+//检斤删除
 export const getweighingDelete = appRx.post(API_POST_INSPECT_GETWEIGHTDELETE, errorCatcher, errorHandle, filter)
-    //付款信息查看
+//付款信息查看
 export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorHandle, filter)
-    //付款信息结算
+//付款信息结算
 export const postpaymentedit = appRx.post(API_POST_PAYMENT_EDIT, errorCatcher, errorHandle, filter)
-    //质检客户下拉校验
+//质检客户下拉校验
 export const getamount = appRx.get(API_GET_INSPECT_GETAMOUNT, errorCatcher, errorHandle, filter)
-    //质检运输方式
+//质检运输方式
 export const getinspectcontractno = appRx.get(API_GET_INSPECT_CONTRACTNO, errorCatcher, errorHandle, filter)
-    //身份证识别
+//身份证识别
 export const getIdentity = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)
-    //银行卡识别
+//银行卡识别
 export const getBank = appRx.get(API_GET_CUSTOMER_GETBANK, errorCatcher, errorHandle, filter)
-    //查询货名有未结算状态
+//查询货名有未结算状态
 export const getCount = appRx.get(API_GET_INSPECT_GETCOUNT, errorCatcher, errorHandle, filter)
-    //检斤打印查看
+//检斤打印查看
 export const getPrint = appRx.get(API_GET_WEIGHTCHECK_GETPRINT, errorCatcher, errorHandle, filter)
-    //付款删除
+//付款删除
 export const delpayment = appRx.post(API_POST_PAYMENT_DEL, errorCatcher, errorHandle, filter)
-    //付款审核
+//付款审核
 export const auditpayment = appRx.post(API_POST_PAYMENT_AUDIT, errorCatcher, errorHandle, filter)
-    //付款提交
+//付款提交
 export const paymentCommit = appRx.post(API_POST_PAYMENT_PAYMENTSUBMIT, errorCatcher, errorHandle, filter)
-    //付款结算修改
+//付款结算修改
 export const settlementEdit = appRx.post(API_POST_PAYMENT_SETTLEMENTEDIT, errorCatcher, errorHandle, filter)
-    //质检干粮单价查看
+//质检干粮单价查看
 export const getDryGrainPrice = appRx.get(API_GET_INSPECT_GETDRYGRAINPRICE, errorCatcher, errorHandle, filter)
-    //付款权限查询
+//付款权限查询
 export const getJurisdiction = appRx.get(API_GET_INSPECT_GETJURISDICTION, errorCatcher, errorHandle, filter)
-    //财务开票post
+//财务开票post
 export const invoicing = appRx.post(API_POST_INVOICING, errorCatcher, errorHandle, filter)
 
 export const export1 = appRx.post(API_POST_EXPORT)
-    // 车牌号
+// 车牌号
 export const getshippinginfo = appRx.get(API_GET_SHIPPINGINFOFORMATION, errorCatcher, errorHandle, filter)
-    // 确认初检信息
+// 确认初检信息
 export const postCheck = appRx.post(API_POST_INSPECTIONCHECK, errorCatcher, errorHandle, filter)
-    // 单据二维码
+// 单据二维码
 export const getQRcode = appRx.get(API_GAT_QRCODE, errorCatcher, errorHandle, filter)
-    // 二维码获取数据
+// 二维码获取数据
 export const getQRCodeData = appRx.get(API_GAT_GETQRCODE, errorCatcher, errorHandle, filter)
-    // 车型
+// 车型
 export const getcartype = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter)
-    // 审核之后
+// 审核之后
 export const workflowcontent = appRx.get(API_POST_WORKFLOW_TASK, errorCatcher, errorHandle, filter)
-    // 反结算
+// 反结算
 export const suspendinstance = appRx.post(API_POST_SUSPENDINSTANCE, errorCatcher, errorHandle, filter)
-    // 导入
+// 导入
 export const importWord = appRx.post(API_POST_IMPORT, errorCatcher, errorHandle, filter)
-    // 导入移库
+// 导入移库
 export const importWordYk = appRx.post(API_POST_IMPORT_YK, errorCatcher, errorHandle, filter)
-    // 查看结算单
+// 查看结算单
 export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, errorHandle, filter)
-    // 退回
+// 退回
 export const returnInfo = appRx.post(API_POST_RETURN, errorCatcher, errorHandle, filter)
-    // 删除
+// 删除
 export const deleteInfo = appRx.post(API_POST_DELETE, errorCatcher, errorHandle, filter)
-    // 新检斤保存
+// 新检斤保存
 export const newSubmit = appRx.post(API_POST_SUBMIT, errorCatcher, errorHandle, filter)
-    // 换仓
+// 换仓
 export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)
-    // 获取合同
+// 获取合同
 export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
-    // 发起人撤回
+// 发起人撤回
 export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
-    // 获取仓库id
+// 获取仓库id
 export const getBaseId = appRx.get(API_GET_BASEID, errorCatcher, errorHandle, filter)
-    // 换任务号
+// 换任务号
 export const changeTaskNo = appRx.post(API_POST_TASK_NO, errorCatcher, errorHandle, filter)
-    // 丹东港生成入库单
+// 丹东港生成入库单
 export const dandongOrder = appRx.post(API_POST_DANDONG_ORDER, errorCatcher, errorHandle, filter)
-    // 获取仓库摄像头
+// 获取仓库摄像头
 export const getVideo = appRx.post(API_POST_GETVIDEO, errorCatcher, errorHandle, filter)
-    // 获取车牌号
+// 获取车牌号
 export const getCarNumber = appRx.post(API_POST_GETCARNUMBER, errorCatcher, errorHandle, filter)
-    // 换客户
+// 换客户
 export const changeCustomer = appRx.post(API_POST_CUSTOMER, errorCatcher, errorHandle, filter)
-    // 查询仓库新
+// 查询仓库新
 export const getwarehouse = appRx.get(API_GET_WAREHOUSE, errorCatcher, errorHandle, filter)
 
-export const getToken = appRx.post(API_POST_GETOKEN, errorCatcher, errorHandle, filter)
+export const getToken = appRx.get(API_GET_GETOKEN, errorCatcher, errorHandle, filter)
 export const getRom = appRx.post(API_POST_GEROM, errorCatcher, errorHandle, filter)
 // 查询交易量
 export const getquality = appRx.get(API_GETQUALITY, errorCatcher, errorHandle, filter)

+ 106 - 608
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -29,7 +29,8 @@
         </div>
 
         <div class="bottom">
-          <div class="bg-left titleup">
+          <div id="video-container"></div>
+          <!--<div class="bg-left titleup">
             <span class="word_css">实时监控</span>
           </div>
           <div style="position:relative;">
@@ -41,23 +42,7 @@
             <video id="videoDo" class="video"></video>
           </div>
           <canvas id="canvasId" v-show="false" class="canvas"></canvas>
-          <!-- <div class="videoImg">
-            <div class="videoImg-row">
-                <video id="videoElement" autoplay muted width="50%"></video>
-              <video id="videoElement1" autoplay muted width="50%"></video>
-            </div>
-
-            <div class="videoImg-row">
-              <div class="carnumber-style">
-                <el-button @click='positionPlace(1)' type="primary" class="btn">定位车辆</el-button>
-                <div class="number">车牌号1:{{ $store.state.user.carNumber1 }}</div>
-              </div>
-              <div class="carnumber-style">
-                <el-button @click='positionPlace(2)' type="primary" class="btn">定位车辆</el-button>
-                <div class="number">车牌号2:{{ $store.state.user.carNumber2 }}</div>
-              </div>
-            </div>
-          </div> -->
+           -->
           <!-- <div v-if="!monitorUrl1" class="video1">
             <img
               src="../../../public/img/quesheng@2x.png"
@@ -412,9 +397,9 @@
               <el-button @click="refreshClick(1)" type="primary"
                 >刷新</el-button
               >
-              <el-button @click="refreshClick" type="primary">{{
+              <!-- <el-button @click="refreshClick" type="primary">{{
                 timer ? refresh : '自动刷新'
-              }}</el-button>
+              }}</el-button> -->
               <!-- <el-checkbox v-model="checked">默认</el-checkbox> -->
             </div>
             <div class="screen frame">
@@ -684,6 +669,8 @@
   </div>
 </template>
 <script>
+var player = null
+var accessToken = null
 import flvjs from 'flv.js'
 import {
   tare,
@@ -706,7 +693,7 @@ import BalanceAlert from '@/components/balanceAlert'
 import html2canvas from 'html2canvas'
 import axios from 'axios'
 import configText from '../../../vue.config.js'
-
+import EZUIKit from 'ezuikit-js'
 export default {
   components: {
     weightCheckPrint,
@@ -813,7 +800,6 @@ export default {
       isShowImg: false,
       photoInfo: '',
       canvas: null,
-      player: null,
       ip1: '',
       ip2: '',
       rom1: '',
@@ -926,7 +912,6 @@ export default {
     }
   },
   mounted() {
-    this.cameraImgFile()
     localStorage.setItem('serverIp', configText.devServer.proxy['/pb'].target)
     getcomp({
       userMobilePhone: JSON.parse(
@@ -935,9 +920,15 @@ export default {
     })
       .toPromise()
       .then(res => {
-        this.compNameoptions = res
+        console.log(res)
+        if (res.length > 0)
+          this.companyNameOptions = [
+            {
+              label: res[0],
+              value: res[0]
+            }
+          ]
       })
-    // this.getVideos()
     this.isShowBalance = true
     var _saomaData = JSON.parse(localStorage.getItem('saoma_data')) //判断是否扫码进来的
     // }
@@ -1024,6 +1015,24 @@ export default {
         } else if (this.tpyeNo == 2) {
           this.information = '皮重'
         }
+        getToken()
+          .toPromise()
+          .then(response => {
+            accessToken = response
+            player = new EZUIKit.EZUIKitPlayer({
+              id: 'video-container', // 视频容器ID
+              accessToken: accessToken,
+              url: this.monitorUrl2,
+              template: 'standard',
+              width: 550,
+              height: 350,
+              handleCapturePicture: res => {
+                console.log('rereer', res)
+              }
+            })
+            window.player = player
+            window.accessToken = accessToken
+          })
         this.getList()
       })
   },
@@ -1042,77 +1051,48 @@ export default {
     //  if (this.$route.query.automaticWeightAcquisition == '1') {
   },
   methods: {
-    cameraImgFile() {
-      let _this = this
-      if (this.canvas !== null) {
-        let cxt = this.canvas.getContext('2d')
-        cxt.clearRect(0, 0, this.canvas.width, this.canvas.height)
-      }
-      // 老的浏览器可能根本没有实现 mediaDevices,所以我们可以先设置一个空的对象
-      if (navigator.mediaDevices === undefined) {
-        navigator.mediaDevices = {}
-      }
-      // 一些浏览器部分支持 mediaDevices。我们不能直接给对象设置 getUserMedia
-      // 因为这样可能会覆盖已有的属性。这里我们只会在没有getUserMedia属性的时候添加它。
-      if (navigator.mediaDevices.getUserMedia === undefined) {
-        navigator.mediaDevices.getUserMedia = function(constraints) {
-          // 首先,如果有getUserMedia的话,就获得它
-          var getUserMedia =
-            navigator.webkitGetUserMedia || navigator.mozGetUserMedia
-
-          // 一些浏览器根本没实现它 - 那么就返回一个error到promise的reject来保持一个统一的接口
-          if (!getUserMedia) {
-            return Promise.reject(
-              new Error('getUserMedia is not implemented in this browser')
-            )
+    // callbackPic(data) {
+    //   console.log('ressssss', data)
+    // },
+    getAPhoto() {
+      console.log('getAPhoto')
+      //   const capCallback = data => {
+      //     console.log('ressssss', data)
+      //   }
+      //   player.handleCapturePicture = this.callbackPic
+      //   player.capturePicture('default', this.callbackPic)
+      //   player.capturePicture(`${new Date().getTime()}`, capCallback)
+      var capturePicturePromise = player.capturePicture(
+        `${new Date().getTime()}`
+      )
+      capturePicturePromise.then(res => {
+        console.log('promise 获取 数据', res)
+        let b = this.dataURLtoFile(
+          this.transformUint8ArrayToBase64(res.data.fileUint8Array),
+          'printImage'
+        )
+        let formdata = new FormData()
+        formdata.append('file', b)
+        axios({
+          method: 'post',
+          url: this.global.uploadPath,
+          data: formdata
+        }).then(response => {
+          console.log('response.data.data.url', response.data.data.url)
+          this.photoInfo = response.data.data.url
+          if (this.photoInfo) {
+            this.coverImgList.push(this.photoInfo)
           }
-          // 否则,为老的navigator.getUserMedia方法包裹一个Promise
-          return new Promise(function(resolve, reject) {
-            getUserMedia.call(navigator, constraints, resolve, reject)
-          })
-        }
-      }
-      navigator.mediaDevices
-        .getUserMedia({ video: true, audio: false })
-        .then(function(stream) {
-          _this.videoShow = true
-          _this.$nextTick(() => {
-            let video = document.getElementById('videoDo')
-            video.srcObject = stream
-            video.onloadedmetadata = function(e) {
-              video.play()
-            }
-          })
-        })
-        .catch(function(err) {
-          _this.videoShow = false
-          _this.$message.warning('未发现可拍照设备或出现其他错误!')
         })
-    },
-
-    getAPhoto() {
-      return new Promise((resolve, reject) => {
-        let video = document.getElementById('videoDo')
-        this.canvas = document.getElementById('canvasId')
-        this.canvas
-          .getContext('2d')
-          .drawImage(video, 0, 0, this.canvas.width, this.canvas.height)
-        //把canvas图像转为img图片
-        this.photoInfo = this.canvas.toDataURL('image/png')
-        if (this.photoInfo !== '') {
-          let b = this.dataURLtoFile(this.photoInfo, ' carImage')
-          let formdata = new FormData()
-          formdata.append('file', b)
-          axios({
-            method: 'post',
-            url: this.global.uploadPath,
-            data: formdata
-          }).then(response => {
-            resolve(response.data.data.url)
-          })
-        }
       })
     },
+    transformUint8ArrayToBase64(array) {
+      var binary = ''
+      for (var len = array.byteLength, i = 0; i < len; i++) {
+        binary += String.fromCharCode(array[i])
+      }
+      return 'data:image/png;base64,' + window.btoa(binary).replace(/=/g, '')
+    },
     //  uploadingPhoto() {
     //        if (this.photoInfo) {
     //          // 获取到的图片为base64格式
@@ -1128,95 +1108,6 @@ export default {
     //          this.$message.warning("请先拍照再确定上传照片");
     //        }
     //      },
-    play() {
-      this.flvPlayer.play()
-    },
-    positionPlace(type) {
-      let _number = ''
-      if (type == 1) {
-        _number = this.carNumber1
-      } else {
-        _number = this.carNumber2
-      }
-      console.log('定位车辆')
-      console.log(this.carList)
-      for (let i = 0; i < this.carList.length; i++) {
-        if (_number == this.carList[i].carNumber) {
-          this.setCurrent(this.carList[2])
-          return
-        } else {
-          this.$message({
-            message: '未识别到车辆信息',
-            type: 'warning'
-          })
-        }
-      }
-    },
-    getVideos(ip1, ip2, rom1, rom2) {
-      if (rom1) {
-        if (flvjs.isSupported()) {
-          getToken({ romId: rom1 })
-            .toPromise()
-            .then(response => {
-              console.log(111)
-              // let _accessToken = response.split('$$')[0]
-              let _playUrl = response.split('$$')[1]
-              // this.VideoSrc = _playUrl
-              let videoElement = document.getElementById('videoElement')
-              this.flvPlayer = flvjs.createPlayer({
-                type: 'flv',
-                isLive: true,
-                hasAudio: false,
-                url: _playUrl
-              })
-              this.flvPlayer.attachMediaElement(videoElement)
-              this.flvPlayer.load()
-              this.flvPlayer.play()
-            })
-            .catch(response => {})
-        }
-        whetherWebSocket1(ip1, localStorage.getItem('ws-pf_userId'))
-      }
-      if (rom2) {
-        if (flvjs.isSupported()) {
-          getRom({ romId: rom2 })
-            .toPromise()
-            .then(response => {
-              console.log(111)
-              // let _accessToken = response.split('$$')[0]
-              let _playUrl = response.split('$$')[1]
-              // this.VideoSrc1 = _playUrl
-              let videoElement1 = document.getElementById('videoElement1')
-              this.flvPlayer = flvjs.createPlayer({
-                type: 'flv',
-                isLive: true,
-                hasAudio: false,
-                url: _playUrl
-              })
-              this.flvPlayer.attachMediaElement(videoElement1)
-              this.flvPlayer.load()
-              this.flvPlayer.play()
-            })
-            .catch(response => {})
-        }
-
-        whetherWebSocket2(ip2, localStorage.getItem('ws-pf_userId'))
-      }
-
-      // getVideo({
-      //   ip1:ip1,
-      //   ip2:ip2,
-      //   userId:localStorage.getItem('ws-pf_userId')
-      // })
-      //     .toPromise()
-      //     .then((response) => {
-      //       console.log(111)
-
-      //   })
-      //   .catch((response) => {
-
-      //   })
-    },
     changeOut(e) {
       if (e) {
         this.printout = true
@@ -1243,82 +1134,11 @@ export default {
           .then(response => {
             that.common.commonWeighingList = response.records
             that.makeData()
-            getweighingList({
-              compId: localStorage.getItem('ws-pf_compId'),
-              currentPage: that.currentPage,
-              pageSize: that.pageSize,
-              searchKeyWord: '',
-              statusType: that.statusType,
-              warehouseName: that.warehouseName,
-              managementType: 1,
-              serviceManagementType: that.inWarehouseType,
-              loadingstatus: 1,
-              pcFlag: 5
-              // statusType:1
-            })
-              .toPromise()
-              .then(response => {
-                that.deptBudgetTotal = response.total
-                // that.weighingList = response.records
-              })
-              .catch(response => {
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
+            that.deptBudgetTotal = response.total
           })
           .catch(response => {
             // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           })
-      } else {
-        clearInterval(that.timer)
-        that.refresh = 60
-        that.timer = setInterval(function() {
-          // console.log(that.refresh)
-          if (that.refresh == 0) {
-            that.refresh = 60
-            getweighingList({
-              compId: localStorage.getItem('ws-pf_compId'),
-              currentPage: that.currentPage,
-              pageSize: that.pageSize,
-              searchKeyWord: '',
-              warehouseName: that.warehouseName,
-              managementType: 1,
-              serviceManagementType: that.inWarehouseType,
-              loadingstatus: 1,
-              pcFlag: 5
-              // statusType:1
-            })
-              .toPromise()
-              .then(response => {
-                that.common.commonWeighingList = response.records
-                that.makeData()
-                getweighingList({
-                  compId: localStorage.getItem('ws-pf_compId'),
-                  currentPage: that.currentPage,
-                  pageSize: that.pageSize,
-                  searchKeyWord: '',
-                  statusType: that.statusType,
-                  warehouseName: that.warehouseName,
-                  managementType: 1,
-                  serviceManagementType: that.inWarehouseType,
-                  loadingstatus: 1,
-                  pcFlag: 5
-                  // statusType:1
-                })
-                  .toPromise()
-                  .then(response => {
-                    that.deptBudgetTotal = response.total
-                    // that.weighingList = response.records
-                  })
-                  .catch(response => {
-                    // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-                  })
-              })
-              .catch(response => {
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
-          }
-          that.refresh--
-        }, 1000)
       }
     },
     changeEw(e) {
@@ -1438,6 +1258,21 @@ export default {
           } else if (this.allowEdit == 1) {
             this.disabled = false
           }
+          let _this = this
+          if (_this.monitorUrl2) {
+            player = new EZUIKit.EZUIKitPlayer({
+              id: 'video-container', // 视频容器ID
+              accessToken: accessToken,
+              url: _this.monitorUrl2,
+              // simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
+              template: 'standard',
+              width: 550,
+              height: 350
+            })
+            window.player = player
+          } else {
+            player.stop()
+          }
         }
       }
       this.getList()
@@ -1543,43 +1378,6 @@ export default {
           })
       }
       this.refreshClick(1)
-      // getweighingList({
-      //     compId: localStorage.getItem('ws-pf_compId'),
-      //     currentPage: this.currentPage,
-      //     pageSize: this.pageSize,
-      //     searchKeyWord: '',
-      //     warehouseName: this.warehouseName,
-      //     managementType: 1,
-      //     serviceManagementType: this.inWarehouseType,
-      //     // statusType:1
-      //   })
-      //   .toPromise()
-      //   .then((response) => {
-      //     this.common.commonWeighingList = response.records
-      //     this.makeData()
-      //   })
-      //   .catch((response) => {
-      //     // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-      //   })
-      // getweighingList({
-      //     compId: localStorage.getItem('ws-pf_compId'),
-      //     currentPage: this.currentPage,
-      //     pageSize: this.pageSize,
-      //     searchKeyWord: '',
-      //     statusType: this.statusType,
-      //     warehouseName: this.warehouseName,
-      //     managementType: 1,
-      //     serviceManagementType: this.inWarehouseType,
-      //     // statusType:1
-      //   })
-      //   .toPromise()
-      //   .then((response) => {
-      //     this.deptBudgetTotal = response.total
-      //     this.weighingList = response.records
-      //   })
-      //   .catch((response) => {
-      //     // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-      //   })
     },
     makeData() {
       this.mList = []
@@ -1742,211 +1540,6 @@ export default {
         this.deptBudgetTotal = this.pList.length
       }
       this.weighingList.carModel = this.weighingList.qualityInspectionManagement.carModel
-      //已下代码注释保留
-      // if (this.weighingList.carModel == '单拖小柜') {
-      //   this.weighingList.receivableWeighingFee = 80
-      //   this.weighingList.actualWeighingFee = 80
-      // } else if (this.weighingList.carModel == '双拖小柜') {
-      //   this.weighingList.receivableWeighingFee = 160
-      //   this.weighingList.actualWeighingFee = 160
-      // } else if (this.weighingList.carModel == '大柜') {
-      //   if (this.weighingList.grossWeight / 1000 < 50) {
-      //     this.$set(this.weighingList, 'receivableWeighingFee', 120)
-      //     this.weighingList.actualWeighingFee = 120
-      //     this.$forceUpdate()
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 50 ||
-      //     this.weighingList.grossWeight / 1000 < 65
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 150
-      //     this.weighingList.actualWeighingFee = 150
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 65 ||
-      //     this.weighingList.grossWeight / 1000 < 75
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 170
-      //     this.weighingList.actualWeighingFee = 170
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 75 ||
-      //     this.weighingList.grossWeight / 1000 < 80
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 190
-      //     this.weighingList.actualWeighingFee = 190
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 80 ||
-      //     this.weighingList.grossWeight / 1000 < 85
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 210
-      //     this.weighingList.actualWeighingFee = 210
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 85 ||
-      //     this.weighingList.grossWeight / 1000 < 95
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 240
-      //     this.weighingList.actualWeighingFee = 240
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 95 ||
-      //     this.weighingList.grossWeight / 1000 < 105
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 260
-      //     this.weighingList.actualWeighingFee = 260
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 105 ||
-      //     this.weighingList.grossWeight / 1000 < 150
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 300
-      //     this.weighingList.actualWeighingFee = 300
-      //   }
-      // } else if (this.weighingList.carModel == '挂车') {
-      //   if (this.weighingList.grossWeight / 1000 < 50) {
-      //     this.weighingList.receivableWeighingFee = 180
-      //     this.weighingList.actualWeighingFee = 180
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 50 ||
-      //     this.weighingList.grossWeight / 1000 < 65
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 200
-      //     this.weighingList.actualWeighingFee = 200
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 65 ||
-      //     this.weighingList.grossWeight / 1000 < 75
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 250
-      //     this.weighingList.actualWeighingFee = 250
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 75 ||
-      //     this.weighingList.grossWeight / 1000 < 85
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 350
-      //     this.weighingList.actualWeighingFee = 350
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 85 ||
-      //     this.weighingList.grossWeight / 1000 < 95
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 400
-      //     this.weighingList.actualWeighingFee = 400
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 95 ||
-      //     this.weighingList.grossWeight / 1000 < 105
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 450
-      //     this.weighingList.actualWeighingFee = 450
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 105 ||
-      //     this.weighingList.grossWeight / 1000 < 120
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 500
-      //     this.weighingList.actualWeighingFee = 500
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 120 ||
-      //     this.weighingList.grossWeight / 1000 < 130
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 550
-      //     this.weighingList.actualWeighingFee = 550
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 130 ||
-      //     this.weighingList.grossWeight / 1000 < 150
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 700
-      //     this.weighingList.actualWeighingFee = 700
-      //   }
-      // } else if (this.weighingList.carModel == '冷藏箱(不抠箱)') {
-      //   if (this.weighingList.grossWeight / 1000 < 50) {
-      //     this.weighingList.receivableWeighingFee = 120
-      //     this.weighingList.actualWeighingFee = 120
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 50 ||
-      //     this.weighingList.grossWeight / 1000 < 65
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 150
-      //     this.weighingList.actualWeighingFee = 150
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 65 ||
-      //     this.weighingList.grossWeight / 1000 < 75
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 170
-      //     this.weighingList.actualWeighingFee = 170
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 75 ||
-      //     this.weighingList.grossWeight / 1000 < 80
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 190
-      //     this.weighingList.actualWeighingFee = 190
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 80 ||
-      //     this.weighingList.grossWeight / 1000 < 85
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 210
-      //     this.weighingList.actualWeighingFee = 210
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 85 ||
-      //     this.weighingList.grossWeight / 1000 < 95
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 240
-      //     this.weighingList.actualWeighingFee = 240
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 95 ||
-      //     this.weighingList.grossWeight / 1000 < 105
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 260
-      //     this.weighingList.actualWeighingFee = 260
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 105 ||
-      //     this.weighingList.grossWeight / 1000 < 120
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 300
-      //     this.weighingList.actualWeighingFee = 300
-      //   }
-      // } else if (this.weighingList.carModel == '冷藏箱(抠箱)') {
-      //   if (this.weighingList.grossWeight / 1000 < 50) {
-      //     this.weighingList.receivableWeighingFee = 360
-      //     this.weighingList.actualWeighingFee = 360
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 50 ||
-      //     this.weighingList.grossWeight / 1000 < 65
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 390
-      //     this.weighingList.actualWeighingFee = 390
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 65 ||
-      //     this.weighingList.grossWeight / 1000 < 75
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 410
-      //     this.weighingList.actualWeighingFee = 410
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 75 ||
-      //     this.weighingList.grossWeight / 1000 < 80
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 430
-      //     this.weighingList.actualWeighingFee = 430
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 80 ||
-      //     this.weighingList.grossWeight / 1000 < 85
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 450
-      //     this.weighingList.actualWeighingFee = 450
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 85 ||
-      //     this.weighingList.grossWeight / 1000 < 95
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 480
-      //     this.weighingList.actualWeighingFee = 480
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 95 ||
-      //     this.weighingList.grossWeight / 1000 < 105
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 500
-      //     this.weighingList.actualWeighingFee = 500
-      //   } else if (
-      //     this.weighingList.grossWeight / 1000 > 105 ||
-      //     this.weighingList.grossWeight / 1000 < 120
-      //   ) {
-      //     this.weighingList.receivableWeighingFee = 540
-      //     this.weighingList.actualWeighingFee = 540
-      //   }
-      // } else {
-      //   this.weighingList.receivableWeighingFee = ''
-      // }
     },
     tabClick(val) {
       this.mListTop = []
@@ -1991,7 +1584,8 @@ export default {
           this.weighingList.boxNoOther =
             val.qualityInspectionManagement.boxNoOther
           this.weighingList.titleNo = val.qualityInspectionManagement.titleNo
-          this.weighingList.titleNoOther = val.qualityInspectionManagement.titleNoOther
+          this.weighingList.titleNoOther =
+            val.qualityInspectionManagement.titleNoOther
           // if (this.tpyeNo == 2 && this.status == 1 && val && val.qualityInspectionManagement.confirm == 0 && this
           //   .warehouseName != '克东千丰库') {
           //   this.submitAllow = true
@@ -2002,8 +1596,10 @@ export default {
           // }
           this.paramType = val.qualityInspectionManagement.paramType
         }
-
-        this.coverImgList.push(val.addressUrl)
+        if (val.addressUrl) {
+          this.coverImgList.push(val.addressUrl)
+          console.log('this.coverImgList', this.coverImgList.toString())
+        }
       }
       console.log(val)
       this.weighingList.addressUrl = val.addressUrl
@@ -2117,18 +1713,6 @@ export default {
       }
     },
     async print() {
-      if (!this.photoInfo) {
-        let _src = await this.getAPhoto()
-        if (!_src) {
-          this.$message({
-            message: '拍照失败,请重新保存!',
-            type: 'warning'
-          })
-          return
-        }
-        this.photoInfo = _src
-        this.coverImgList.push(_src)
-      }
       if (this.reader) {
         this.reader.cancel()
       }
@@ -2217,36 +1801,28 @@ export default {
           return
         }
 
-          this.weighingList.addressUrl = this.weighingList.addressUrl+','+this.coverImgList.toString()
-      }
-<<<<<<< HEAD
-=======
-      else{
-          this.weighingList.addressUrl = this.coverImgList.toString()
+        this.weighingList.addressUrl =
+          this.weighingList.addressUrl + ',' + this.coverImgList.toString()
       }
->>>>>>> 0cdbde441704903f128ea4965b50cf2fc68528ff
       // if (this.tpyeNo == 2) {
       //   if (this.submitAllow) {
       //     this.$message.error('该条质检信息未确认')
       //     return
       //   }
       // }
+      if (!this.photoInfo) {
+        this.getAPhoto()
+      }
       this.$confirm('确定保存检斤信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       })
         .then(() => {
-<<<<<<< HEAD
           this.deptBudgetList.secretaryWeigher = localStorage.getItem(
             'ws-pf_staffName'
           )
           this.weighingList.addressUrl = this.coverImgList.toString()
-=======
-          this.deptBudgetList.secretaryWeigher =
-            localStorage.getItem('ws-pf_staffName')
-          // this.weighingList.addressUrl = this.coverImgList.toString()
->>>>>>> 0cdbde441704903f128ea4965b50cf2fc68528ff
           var that = this
           var warehousing = {}
           //贸易入库保存需要再走入库接口
@@ -2591,103 +2167,25 @@ export default {
                       })
                       this.idPrint = response
 
-                      if (
-                        this.weighingList.serviceManagementType == 1 &&
-                        (this.warehouseName == '鲅鱼圈金信库' ||
-                          this.warehouseName == '洮南向阳乡金昊' ||
-                          this.warehouseName == '白城内陆港' ||
-                          this.warehouseName == '山东园丰库' ||
-                          this.warehouseName == '杜尔伯特家禾库' ||
-                          this.warehouseName == '甘南宏旗库' ||
-                          this.warehouseName == '洮南新友谊兴旺库' ||
-                          this.warehouseName == '佳屹农仓储库')
-                      ) {
+                      if (this.weighingList.serviceManagementType == 1) {
                         if (
                           this.weighingList.seller &&
                           this.weighingList.buyer
                         ) {
                           let cang = {}
-                          cang.value = this.weighingList.seller
-                          cang.label = this.weighingList.seller
-                          let cang1 = {}
-                          cang1.value = this.weighingList.buyer
-                          cang1.label = this.weighingList.buyer
-
-                          if (this.warehouseName == '佳屹农仓储库') {
-                            this.customerOptions = [
-                              {
-                                label: this.weighingList.customer,
-                                value: this.weighingList.customer
-                              }
-                            ]
-                            if (this.check(this.weighingList.buyer, 3)) {
-                              this.companyNameEWOptions.push(cang1)
-                              this.companyName = this.weighingList.buyer
-                            }
-                          } else {
-                            if (this.check(this.weighingList.buyer, 2)) {
-                              this.companyNameEWOptions.push(cang1)
-                            }
-                          }
-                          if (this.check(this.weighingList.seller, 1)) {
-                            this.ewCustomerOptions.push(cang)
+                          cang.value = this.weighingList.buyer
+                          cang.label = this.weighingList.buyer
+                          if (this.check(this.weighingList.buyer, 3)) {
+                            this.companyNameOptions.push(cang)
                           }
+                          this.companyName = this.weighingList.buyer
                         }
                       }
-                      if (this.warehouseName == '鲅鱼圈金信库') {
-                        getbinNumber({ id: that.cangid })
-                          .toPromise()
-                          .then(response => {
-                            this.binNumberList1 =
-                              response.warehousePositionInfoList
-                            this.isShowPrintType = true
-                          })
-                      } else {
-                        this.isShowPrintType = true
-                      }
-
+                      this.isShowPrintType = true
                       this.getList()
                       this.photoInfo = ''
                       this.coverImgList = []
                     })
-                  // addstorageputList(that.inOutData).toPromise().then((response) => {
-                  //   this.weighingList.warehouseId = this.cangid;
-                  //   this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
-                  //   tare(this.weighingList)
-                  //     .toPromise()
-                  //     .then((response) => {
-                  //       console.log(1111)
-                  //       // if (this.reader) {
-                  //       //   this.reader.cancel()
-                  //       // }
-                  //       this.$notify.success({
-                  //         title: '成功',
-                  //         message: '保存成功',
-                  //       })
-                  //       this.idPrint = response
-                  //       if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
-                  //           .warehouseName == '洮南向阳乡金昊' || this
-                  //           .warehouseName == '白城内陆港')) {
-                  //         if (this.weighingList.seller && this.weighingList.buyer) {
-                  //           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)
-                  //           }
-                  //         }
-                  //       }
-                  //       this.isShowPrintType = true
-                  //       this.getList()
-                  //     })
-                  //     .catch((response) => {})
-                  // })
                 })
             } else {
               //收购入库皮检

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

@@ -201,11 +201,25 @@
                 @click="showImg(scope.row.addressUrl.split(',')[0])"
               />
               <img
-                v-if="scope.row.addressUrl.split(',')[1]"
-                :src="scope.row.addressUrl.split(',')[1]"
+                v-if="
+                  scope.row.addressUrl.split(',')[
+                    scope.row.addressUrl.split(',').length - 1
+                  ]
+                "
+                :src="
+                  scope.row.addressUrl.split(',')[
+                    scope.row.addressUrl.split(',').length - 1
+                  ]
+                "
                 alt=""
                 style="width:100px"
-                @click="showImg(scope.row.addressUrl.split(',')[1])"
+                @click="
+                  showImg(
+                    scope.row.addressUrl.split(',')[
+                      scope.row.addressUrl.split(',').length - 1
+                    ]
+                  )
+                "
               />
             </div>
           </template>

+ 89 - 175
src/views/outboundManagement/weighingManagementNew.vue

@@ -28,7 +28,8 @@
           <!-- <el-button @click="weightweight" type="success" plain>确定</el-button> -->
         </div>
         <div class="bottom">
-          <div class="bg-left titleup">
+          <div id="video-container"></div>
+          <!-- <div class="bg-left titleup">
             <span class="word_css">实时监控</span>
           </div>
           <div style="position:relative;">
@@ -39,7 +40,7 @@
             ></div>
             <video id="videoDo" class="video"></video>
           </div>
-          <canvas id="canvasId" v-show="false" class="canvas"></canvas>
+          <canvas id="canvasId" v-show="false" class="canvas"></canvas> -->
           <!-- <div v-if="!monitorUrl1" class="video1">
           <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
           <div>监控视频未连接</div>
@@ -695,6 +696,8 @@
   </div>
 </template>
 <script>
+var player = null
+var accessToken = null
 import {
   grossWeight,
   getbinNumber,
@@ -718,6 +721,7 @@ import {
   getstaff,
   getReceiptTaskNo
 } from '@/model/warehouse/index'
+import { getToken } from '@/model/houseSelfCollect/index'
 import { getcomp } from '@/model/indexRx'
 import axios from 'axios'
 import weightCheckPrint from './component/weightCheckPrint.vue'
@@ -726,6 +730,7 @@ import html2canvas from 'html2canvas'
 import WsUpload from '@/components/WsUpload'
 import BalanceAlert from '@/components/balanceAlert'
 import { EventBus } from 'base-core-lib'
+import EZUIKit from 'ezuikit-js'
 export default {
   components: {
     WsUpload,
@@ -874,7 +879,6 @@ export default {
     }
   },
   mounted() {
-    this.cameraImgFile()
     getcomp({
       userMobilePhone: JSON.parse(
         localStorage.getItem('ws_login_getTenantInfoByUser')
@@ -900,77 +904,38 @@ export default {
   },
   activated() {},
   methods: {
-    cameraImgFile() {
-      let _this = this
-      if (this.canvas !== null) {
-        let cxt = this.canvas.getContext('2d')
-        cxt.clearRect(0, 0, this.canvas.width, this.canvas.height)
-      }
-      // 老的浏览器可能根本没有实现 mediaDevices,所以我们可以先设置一个空的对象
-      if (navigator.mediaDevices === undefined) {
-        navigator.mediaDevices = {}
-      }
-      // 一些浏览器部分支持 mediaDevices。我们不能直接给对象设置 getUserMedia
-      // 因为这样可能会覆盖已有的属性。这里我们只会在没有getUserMedia属性的时候添加它。
-      if (navigator.mediaDevices.getUserMedia === undefined) {
-        navigator.mediaDevices.getUserMedia = function(constraints) {
-          // 首先,如果有getUserMedia的话,就获得它
-          var getUserMedia =
-            navigator.webkitGetUserMedia || navigator.mozGetUserMedia
-
-          // 一些浏览器根本没实现它 - 那么就返回一个error到promise的reject来保持一个统一的接口
-          if (!getUserMedia) {
-            return Promise.reject(
-              new Error('getUserMedia is not implemented in this browser')
-            )
+    getAPhoto() {
+      var capturePicturePromise = player.capturePicture(
+        `${new Date().getTime()}`
+      )
+      capturePicturePromise.then(res => {
+        console.log('promise 获取 数据', res)
+        let b = this.dataURLtoFile(
+          this.transformUint8ArrayToBase64(res.data.fileUint8Array),
+          'printImage'
+        )
+        let formdata = new FormData()
+        formdata.append('file', b)
+        axios({
+          method: 'post',
+          url: this.global.uploadPath,
+          data: formdata
+        }).then(response => {
+          console.log('response.data.data.url', response.data.data.url)
+          this.photoInfo = response.data.data.url
+          if (this.photoInfo) {
+            this.coverImgList.push(this.photoInfo)
           }
-          // 否则,为老的navigator.getUserMedia方法包裹一个Promise
-          return new Promise(function(resolve, reject) {
-            getUserMedia.call(navigator, constraints, resolve, reject)
-          })
-        }
-      }
-      navigator.mediaDevices
-        .getUserMedia({ video: true, audio: false })
-        .then(function(stream) {
-          _this.videoShow = true
-          _this.$nextTick(() => {
-            let video = document.getElementById('videoDo')
-            video.srcObject = stream
-            video.onloadedmetadata = function(e) {
-              video.play()
-            }
-          })
         })
-        .catch(function(err) {
-          _this.videoShow = false
-          _this.$message.warning('未发现可拍照设备或出现其他错误!')
-        })
-    },
-    getAPhoto() {
-      return new Promise((resolve, reject) => {
-        let video = document.getElementById('videoDo')
-
-        this.canvas = document.getElementById('canvasId')
-        this.canvas
-          .getContext('2d')
-          .drawImage(video, 0, 0, this.canvas.width, this.canvas.height)
-        //把canvas图像转为img图片
-        this.photoInfo = this.canvas.toDataURL('image/png')
-        if (this.photoInfo !== '') {
-          let b = this.dataURLtoFile(this.photoInfo, ' carImage')
-          let formdata = new FormData()
-          formdata.append('file', b)
-          axios({
-            method: 'post',
-            url: this.global.uploadPath,
-            data: formdata
-          }).then(response => {
-            resolve(response.data.data.url)
-          })
-        }
       })
     },
+    transformUint8ArrayToBase64(array) {
+      var binary = ''
+      for (var len = array.byteLength, i = 0; i < len; i++) {
+        binary += String.fromCharCode(array[i])
+      }
+      return 'data:image/png;base64,' + window.btoa(binary).replace(/=/g, '')
+    },
     findFormItem(el) {
       const parent = el.parentElement
       if (!parent) return document.body
@@ -1571,8 +1536,9 @@ export default {
               bulkDensity: '',
               mildewGrain: ''
             }
-            debugger
-            this.coverImgList.push(response.addressUrl)
+            if (response.addressUrl) {
+              this.coverImgList.push(response.addressUrl)
+            }
           })
       }
 
@@ -1690,18 +1656,6 @@ export default {
       }
     },
     async print() {
-      if (!this.photoInfo) {
-        let _src = await this.getAPhoto()
-        if (!_src) {
-          this.$message({
-            message: '拍照失败,请重新保存!',
-            type: 'warning'
-          })
-          return
-        }
-        this.photoInfo = _src
-        this.coverImgList.push(_src)
-      }
       this.weighingList.warehouseType = this.warehouseType
       console.log(
         this.weighingList,
@@ -1877,7 +1831,9 @@ export default {
       }
       this.weighingList.compId = localStorage.getItem('ws-pf_compId')
       this.weighingList.warehouseName = this.warehouseName
-
+      if (!this.photoInfo) {
+        this.getAPhoto()
+      }
       this.$confirm('确定保存检斤信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -2105,95 +2061,18 @@ export default {
                 })
                   .toPromise()
                   .then(response => {
-                    if (
-                      this.warehouseName == '鲅鱼圈金信库' ||
-                      this.warehouseName == '哈尔滨依兰库' ||
-                      this.warehouseName == '白城内陆港' ||
-                      this.warehouseName == '山东园丰库' ||
-                      this.warehouseName == '杜尔伯特家禾库' ||
-                      this.warehouseName == '洮南新友谊兴旺库' ||
-                      this.warehouseName == '甘南宏旗库' ||
-                      this.warehouseName == '佳屹农仓储库'
-                    ) {
-                      this.weighingList = response
-                      this.inspect = JSON.parse(
-                        JSON.stringify(this.weighingList)
-                      )
-                      if (this.weighingList.contractManagement) {
-                        let cang = {}
-                        if (
-                          this.weighingList.contractManagement.agreementType ==
-                          '代储合同'
-                        ) {
-                          cang.value = this.weighingList.contractManagement.buyer
-                          cang.label = this.weighingList.contractManagement.buyer
-                          if (this.warehouseName == '佳屹农仓储库') {
-                            if (
-                              this.check(
-                                this.weighingList.contractManagement.buyer,
-                                3
-                              )
-                            ) {
-                              this.companyNameOptions.push(cang)
-                            }
-                            this.companyName = this.weighingList.contractManagement.buyer
-                          } else {
-                            if (
-                              this.check(
-                                this.weighingList.contractManagement.buyer,
-                                1
-                              )
-                            ) {
-                              this.ewCustomerOptions.push(cang)
-                            }
-                          }
-                        } else {
-                          cang.value = this.weighingList.contractManagement.seller
-                          cang.label = this.weighingList.contractManagement.seller
-                          if (this.warehouseName == '佳屹农仓储库') {
-                            if (
-                              this.check(
-                                this.weighingList.contractManagement.seller,
-                                3
-                              )
-                            ) {
-                              this.companyNameOptions.push(cang)
-                            }
-                            this.companyName = this.weighingList.contractManagement.seller
-                          } else {
-                            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)
-                        }
-                        if (
-                          this.weighingList.contractManagement.agreementType ==
-                          '代储合同'
-                        ) {
-                          this.myCompanyCustomer = this.weighingList.contractManagement.seller
-                        } else {
-                          this.myCompanyCustomer = this.weighingList.contractManagement.buyer
-                        }
-                      }
-
-                      this.isShowPrintType = true
-                    } else {
+                    this.weighingList = response
+                    this.inspect = JSON.parse(JSON.stringify(this.weighingList))
+                    if (this.weighingList.contractManagement) {
+                      let cang = {}
+                      cang.value = this.weighingList.contractManagement.buyer
+                      cang.label = this.weighingList.contractManagement.buyer
+                      this.companyNameOptions.push(cang)
+                      this.companyName = this.weighingList.contractManagement.buyer
+                      let cang1 = {}
+                      cang1.value = this.weighingList.contractManagement.buyer
+                      cang1.label = this.weighingList.contractManagement.buyer
+                      this.myCompanyCustomer = this.weighingList.contractManagement.seller
                       this.isShowPrintType = true
                     }
                   })
@@ -2387,6 +2266,22 @@ export default {
           } else {
             this.disabled = true
           }
+          this.monitorUrl2 = this.warehouseList1[i].monitorUrl2
+          let _this = this
+          if (_this.monitorUrl2) {
+            player = new EZUIKit.EZUIKitPlayer({
+              id: 'video-container', // 视频容器ID
+              accessToken: accessToken,
+              url: _this.monitorUrl2,
+              // simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
+              template: 'standard',
+              width: 550,
+              height: 350
+            })
+            window.player = player
+          } else {
+            player.stop()
+          }
           this.positionInfos = this.warehouseList1[i].positionInfos
           this.warehouseCount = this.warehouseList1[i].outCount
           this.warehouseNo = this.warehouseList1[i].commonWarehouseNo
@@ -2890,6 +2785,7 @@ export default {
               this.warehouseCount1 = response[i].outCount
               this.warehouseNo = response[i].commonWarehouseNo
               this.warehouseType = response[i].warehouseType
+              this.monitorUrl2 = response[i].monitorUrl2
               if (response[i].allowEdit == 1) {
                 this.disabled = false
               } else {
@@ -2904,6 +2800,7 @@ export default {
               this.warehouseCount1 = response[0].outCount
               this.warehouseNo = response[0].commonWarehouseNo
               this.warehouseType = response[0].warehouseType
+              this.monitorUrl2 = response[0].monitorUrl2
               if (response[0].allowEdit == 1) {
                 this.disabled = false
               } else {
@@ -2913,7 +2810,24 @@ export default {
             }
           }
           this.warehouseList1 = response
-
+          getToken()
+            .toPromise()
+            .then(response => {
+              accessToken = response
+              player = new EZUIKit.EZUIKitPlayer({
+                id: 'video-container', // 视频容器ID
+                accessToken: accessToken,
+                url: this.monitorUrl2,
+                template: 'standard',
+                width: 550,
+                height: 350,
+                handleCapturePicture: res => {
+                  console.log('rereer', res)
+                }
+              })
+              window.player = player
+              window.accessToken = accessToken
+            })
           this.deptBudgetList.warehouseName = this.warehouseName
           this.getList()
         })

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

@@ -120,10 +120,20 @@
               @click="showImg(scope.row.addressUrl.split(',')[0])"
             />
             <img
-              :src="scope.row.addressUrl.split(',')[1]"
+              :src="
+                scope.row.addressUrl.split(',')[
+                  scope.row.addressUrl.split(',').length - 1
+                ]
+              "
               alt=""
               style="width:100px"
-              @click="showImg(scope.row.addressUrl.split(',')[1])"
+              @click="
+                showImg(
+                  scope.row.addressUrl.split(',')[
+                    scope.row.addressUrl.split(',').length - 1
+                  ]
+                )
+              "
             />
           </div>
         </template>