<template>
<view>
<!-- 工作 -->
<scroll-view v-if="show_work" style="width:100vw;height:80vh;background: #F2F2F2;" scroll-y="true" class="scroll-Y"
@scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll">
<!-- 销售 -->
<view style="background-color: #FFFFFF;margin: 10rpx;border-radius: 15rpx;padding:10rpx;"
v-if="dingdanshow">
<view class="top">
<view style="margin: 10rpx;font-size: 32rpx; font-weight:bold;margin-bottom:10rpx;">
订单管理
</view>
</view>
<view style="font-size:26rpx;">
<view class="post" style="display:flex;flex-direction:row;width: 100%;flex-wrap:wrap;">
<navigator url="../Check_list/Online_order" hover-class="none" class="main" v-if="Check_lay1">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/jd.png"></image>
</view>
<view>
线上订单确认
</view>
</navigator>
<!-- <navigator url="../Check_list/Check_list" hover-class="none" class="main" v-if="Check_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/jd.png"></image>
</view>
<view>
检单
</view>
</navigator> -->
<navigator url="../Order_information/Order_information" hover-class="none" class="main"
v-if="Order_lay">
<view class="">
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/ddxxzl.png" mode="">
</image>
</view>
<view class="">
订单信息总览
</view>
</navigator>
<navigator url="../../pages/order/orderSearch" hover-class="none" class="main" v-if="Order_search">
<view class="">
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/ddcx.png" mode=""></image>
</view>
<view class="">
订单查询
</view>
</navigator>
<navigator url="../Order_disinfection/Order_disinfection" hover-class="none" class="main"
v-if="xiaodu">
<view class="">
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/disinfect.png" mode="">
</image>
</view>
<view class="">
订单消毒
</view>
</navigator>
<navigator url="../Packagemanagement/Packagemanagement" hover-class="none" class="main"
v-if="baoguo">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/bggl.png"></image>
</view>
<view class="test" style="">
包裹管理
</view>
</navigator>
<navigator url="../packship/packshipmain" hover-class="none" class="main" v-if="packship">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/bggl.png"></image>
</view>
<view class="test" style="">
装箱发货
</view>
</navigator>
<navigator url="../dingdan/qrcodebinding" hover-class="none" class="main" v-if="dingdan">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/erweima.png"></image>
</view>
<view class="test" style="">
二维码绑定
</view>
</navigator>
</view>
</view>
</view>
<!-- 订单 -->
<view style="background-color: #FFFFFF;margin:0 10rpx 10rpx 10rpx;border-radius: 15rpx;padding:10rpx;"
v-if="shengchan">
<view class="top">
<view style="margin: 10rpx;font-size: 32rpx; font-weight:bold;margin-bottom:10rpx;">
生产管理
</view>
</view>
<view style="font-size:26rpx;">
<view class="post" style="display:flex;flex-direction:row;width: 100%;flex-wrap:wrap;">
<navigator url="../Order_scanning/Order_scanning" hover-class="none" class="main"
v-if="scanning_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/scsm.png"></image>
</view>
<view class="test">
生产扫描
</view>
</navigator>
<!-- <navigator url="../jiaojie/jiaojie" hover-class="none" class="main" v-if="shengchanjiaojie">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/scsm.png"></image>
</view>
<view class="test">
生产交接
</view>
</navigator> -->
<navigator url="../quality_testing/quality_testing1" hover-class="none" class="main"
v-if="testing_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/zj.png"></image>
</view>
<view class="test">
过程质检
</view>
</navigator>
<navigator url="../quality_testing/quality_testing" hover-class="none" class="main"
v-if="testing_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/zj.png"></image>
</view>
<view class="test">
出厂质检
</view>
</navigator>
<navigator url="../Production_workload/Production_workload" hover-class="none" class="main"
v-if="Production_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/zpgl.png"></image>
</view>
<view class="test">
生产工作量
</view>
</navigator>
<navigator url="../../packageA/pages/Rework/Rework" hover-class="none" class="main"
v-if="Rework_lay">
<view>
<image src="https://yagumobileapi2.yaguyun.com/img/yddimg/img/fglfx.png"></image>
</view>
<view class="test">
返工率分析
</view>
</navigator>
<navigator url="../Photo_management/Photo_management" hover-class="none" class="main"
v-if="Photo_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/zpgl.png"></image>
</view>
<view class="test">
照片管理
</view>
</navigator>
<navigator url="../Internal_return/Internal_return" hover-class="none" class="main"
v-if="Internal_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/nf.png"></image>
</view>
<view class="test">
内返
</view>
</navigator>
<!-- <navigator url="../wai_return/Internal_return" hover-class="none" class="main" v-if="waifan">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/nf.png"></image>
</view>
<view class="test">
外返分析
</view>
</navigator> -->
<navigator url="../Abutment/Abutment" class="main" hover-class="none" v-if="Abutment_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/jtcx.png"></image>
</view>
<view class="test">
基台查询
</view>
</navigator>
<navigator url="../return/return" class="main" hover-class="none" v-if="Abutment_fanhui">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/jtfh.png"></image>
</view>
<view class="test">
基台返回
</view>
</navigator>
<navigator url="../photograph/photograph" hover-class="none" class="main" v-if="Abutment_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/jtpz.png"></image>
</view>
<view>
基台拍照
</view>
</navigator>
<navigator url="../Inventory/Inventory" hover-class="none" class="main" v-if="Abutment_lay">
<view class="">
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/jtpd.png" mode=""></image>
</view>
<view class="">
基台盘点
</view>
</navigator>
<!-- jiaojie/jiaojie -->
<!-- Processhandover/Processhandover -->
<navigator url="../jiaojie/jiaojie" hover-class="none" class="main" v-if="handoverlayout">
<view class="">
<image src="https://yagumobileapi2.yaguyun.com/img/yddimg/gxje.png" mode=""></image>
</view>
<view class="">
工序交接
</view>
</navigator>
<navigator url="../Manual_measurement/Manual_measurement" hover-class="none" class="main"
v-if="shoudongjiliang">
<view class="">
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/jilaing.png" mode="">
</image>
</view>
<view class="">
手动计量
</view>
</navigator>
<navigator url="../daiwen/daiwen" hover-class="none" class="main" v-if="daiwen">
<view>
<image src="https://yagumobileapi.yaguyun.com/image/kh_dcl.png"></image>
</view>
<view class="test">
生产待问
</view>
</navigator>
<navigator url="../Order_scanning/Order_scanning_new" hover-class="none" class="main"
v-if="scanning_lay_new">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/scan.png"> </image>
</view>
<view class="test">
生产扫描
</view>
</navigator>
</view>
</view>
</view>
<!-- 生产 -->
<view style="background-color: #FFFFFF;margin:0 10rpx 10rpx 10rpx;border-radius: 15rpx;padding:10rpx;"
v-if="Warehouse_lay">
<view class="top">
<view style="margin: 10rpx;font-size: 32rpx; font-weight:bold;margin-bottom:10rpx;">
学习园地
</view>
</view>
<view class="post" style="display:flex;flex-direction:row;width: 100%;flex-wrap:wrap;">
<navigator url="../Operationstandard/Operationstandard" hover-class="none" class="main">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/zybz.png"></image>
</view>
<view class="test" style="">
作业标准
</view>
</navigator>
<navigator url="../Casepresentation/Casepresentation" hover-class="none" class="main">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/alzs.png"></image>
</view>
<view class="test" style="">
案例展示
</view>
</navigator>
<navigator url="../gsgg/gsgg" hover-class="none" class="main">
<view>
<image src="https://yagumobileapi2.yaguyun.com/img/yddimg/gsgg.png"></image>
</view>
<view class="test" style="">
公司公告
</view>
</navigator>
</view>
</view>
<!-- 人事 -->
<view style="background-color: #FFFFFF;margin:0 10rpx 10rpx 10rpx;border-radius: 15rpx;padding:10rpx;">
<!-- v-if="linchuang" -->
<view class="top">
<view style="margin: 15rpx;font-size: 32rpx; font-weight:bold;margin-bottom:10rpx;">
临床服务
</view>
</view>
<view style="font-size:26rpx;">
<view class="post" style="display:flex;flex-direction:row;width: 100%;flex-wrap:wrap;">
<navigator url="../Clinical_orders/Clinical_orders" hover-class="none" class="main">
<!-- v-if="Clinical_lay" -->
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/fwddcx.png"></image>
</view>
<view class="test">
服务义齿订单
</view>
</navigator>
<navigator url="../Clinical_orders/Clinical_services" hover-class="none" class="main">
<!-- v-if="services_lay" -->
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/lcfw.png"></image>
</view>
<view class="test">
临床服务查询
</view>
</navigator>
<!-- <navigator url="../Clinical_orders/point_services" hover-class="none" class="main"> -->
<!-- v-if="point_lay" -->
<!-- <view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/zdfw.png"></image>
</view>
<view class="test">
驻点服务查询
</view>
</navigator> -->
<navigator url="../Clinical_orders/my_Reimbursement" hover-class="none" class="main">
<!-- v-if="Reimbursement_lay" -->
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/wdbx.png"></image>
</view>
<view class="test">
临床服务报销
</view>
</navigator>
</view>
</view>
</view>
<!-- 审批 -->
<view style="background-color: #FFFFFF;margin:0 10rpx 10rpx 10rpx;border-radius: 15rpx;padding:10rpx;"
v-if="shenpi">
<view class="top">
<view style="margin: 10rpx;font-size: 32rpx; font-weight:bold;margin-bottom:10rpx;">
辅助功能
</view>
</view>
<view class="post" style="display:flex;flex-direction:row;width: 100%;flex-wrap:wrap;">
<navigator url="../My_approval/Onecleaning_list" class="main" hover-class="none" v-if="shenpi">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/spgl.png"></image>
</view>
<view class="test" style="">
审批管理
</view>
</navigator>
</view>
</view>
<!-- 仓库管理 -->
<view style="background-color: #FFFFFF;margin:0 10rpx 10rpx 10rpx;border-radius: 15rpx;padding:10rpx;">
<view class="top">
<view style="margin: 10rpx;font-size: 32rpx; font-weight:bold;margin-bottom:10rpx;">
仓库管理
</view>
</view>
<view class="post" style="display:flex;flex-direction:row;width: 100%;flex-wrap:wrap;">
<navigator url="../RowTeethOutbound/RowTeethOutbound" hover-class="none" class="main"
v-if="paiyachuku">
<view class="">
<image src="https://yagumobileapi2.yaguyun.com/img/yddimg/pyck.png" mode=""></image>
</view>
<view class="">
排牙出库
</view>
</navigator>
<navigator url="../lingliao/Materialrequisition" hover-class="none" class="main"
v-if="lingliaoshenqing">
<view class="">
<image src="https://yagumobileapi2.yaguyun.com/img/yddimg/llsq.png" mode=""></image>
</view>
<view class="">
领料申请
</view>
</navigator>
<navigator url="../lingliaoshenpi/lingliaoshenpi" hover-class="none" class="main"
v-if="lingliaoshenpi">
<view class="">
<image src="https://yagumobileapi2.yaguyun.com/img/yddimg/llsp.png" mode=""></image>
</view>
<view class="">
领料审批
</view>
</navigator>
<navigator url="../Warehouse/Warehouse" hover-class="none" class="main" v-if="Warehouse_lay">
<view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/ckpd.png"></image>
</view>
<view class="test" style="">
库位盘点
</view>
</navigator>
</view>
</view>
</scroll-view>
<!-- 我的 -->
<scroll-view v-if="show_mine" style="width:100vw;height:90vh;background:#F2F2F2;" scroll-y="true" class="scroll-Y"
@scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll">
<view class=""
style="width: 100vw;height: 320rpx;background: url(https://yagumobileapi.yaguyun.com/image/index.jpg);">
<view class=""
style="background: rgba(255,255,255,0.5); border-radius: 50%;height: 150rpx;width: 150rpx;position: relative;margin-top: 82rpx;margin-left: 298rpx;">
<image v-if="null ==headurl" class=""
style="border-radius:50%;height: 140rpx;width: 140rpx;position: absolute;text-align: center;align-items: center;position: absolute;margin:5rpx;"
:src=img @click="uploadavater">
</image>
<image v-else class=""
style="border-radius:50%;height: 69px;width: 69px;position: absolute;text-align: center;align-items: center;margin: 3px;"
:src="headurl" @click="uploadavater">
</image>
</view>
</view>
<view class="" style="background-color: #FFFFFF;width: 100%;font-size: 30;">
<view class="top">
<view class="" style="margin: 15rpx;font-size: 32rpx; font-weight:bold;margin-bottom:10rpx;">
辅助功能
</view>
</view>
<view class="" style="font-size:26rpx;margin-top: 20rpx;">
<view class="" style="display: flex;">
<view class="main_mine" @click="Switch_factory_mine">
<view class="">
<image src="https://yagumobileapi.yaguyun.com/image/qiehuan.png" mode=""></image>
</view>
<view class="">
切换工厂
</view>
</view>
<view class="main_mine" @click="untying">
<view class="">
<image src="https://yagumobileapi.yaguyun.com/image/tuichu.png" mode=""></image>
</view>
<view class="">
退出登录
</view>
</view>
</view>
</view>
</view>
<view class="top_layout">
<view class="text_layout">
公司名称:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{factory}}</text>
</view>
</view>
<view class="top_layout">
<view class="text_layout">
员工姓名:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{name}}</text>
</view>
</view>
<view class="top_layout">
<view class="text_layout">
部门名称:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{department}}</text>
</view>
</view>
<view class="top_layout">
<view class="text_layout">
手机号码:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{phone}}</text>
</view>
</view>
<view class="top_layout">
<view class="text_layout">
入职时间:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{time}}</text>
</view>
</view>
<view class="top_layout">
<view class="text_layout">
型号:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{model}}</text>
</view>
</view>
<view class="top_layout" @click="printmachineselect">
<view class="text_layout">
蓝牙打印机:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{printmachine}}</text>
</view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/6.png" mode=""
style="width: 50rpx;height: 50rpx;margin-right:10upx;"></image>
</view>
<view class="top_layout" @click="kdprintmachineselect">
<view class="text_layout">
快递单打印机:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{printmachinekd}}</text>
</view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/6.png" mode=""
style="width: 50rpx;height: 50rpx;margin-right:10upx;"></image>
</view>
<view class="top_layout" @click="zxprintmachineselect">
<view class="text_layout">
装箱单打印机:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{printmachinezx}}</text>
</view>
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/6.png" mode=""
style="width: 50rpx;height: 50rpx;margin-right:10upx;"></image>
</view>
<picker @change="zhijiantemplateChange" mode="selector" :value="zjPrintindex" :range="Print_template"
:range-key="'printtemplate_title'">
<view class="top_layout" style="display: flex; justify-content: space-between;">
<view class="" style="flex: 2;display: flex;">
<view class="text_layout">
质检打印模板:
</view>
<view class="text_content">{{Print_template[zjPrintindex].printtemplate_title}}</view>
</view>
<view class="">
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/6.png" mode=""
style="width: 50rpx;height: 50rpx;margin-right:10upx;"></image>
</view>
</view>
</picker>
<picker @change="onlinetemplateChange" mode="selector" :value="linePrintindex" :range="Print_template"
:range-key="'printtemplate_title'">
<view class="top_layout" style="display: flex; justify-content: space-between;">
<view class="" style="flex: 2;display: flex;">
<view class="text_layout">
线上订单模板:
</view>
<view class="text_content">{{Print_template[linePrintindex].printtemplate_title}}</view>
</view>
<view class="">
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/6.png" mode=""
style="width: 50rpx;height: 50rpx;margin-right:10upx;"></image>
</view>
</view>
</picker>
<picker @change="daiwentemplateChange" mode="selector" :value="daiwenPrintindex" :range="Print_template"
:range-key="'printtemplate_title'" v-if="daiwenisshow">
<view class="top_layout" style="display: flex; justify-content: space-between;">
<view class="" style="flex: 2;display: flex;">
<view class="text_layout">
待问模板:
</view>
<view class="text_content">{{Print_template[daiwenPrintindex].printtemplate_title}}</view>
</view>
<view class="">
<image src="https://yagumobileapi.yaguyun.com/img/yddimg/img/6.png" mode=""
style="width: 50rpx;height: 50rpx;margin-right:10upx;"></image>
</view>
</view>
</picker>
<view class="top_layout">
<view class="text_layout">
移动端版本号:
</view>
<view style="flex:1;">
<text style="margin-left: 10upx;">{{banben}}</text>
</view>
</view>
<view class="" style="display: flex;align-items: center;justify-content: center;margin-top: 40rpx;">
<view style="color: #C0C0C0;" @click="goPrivacy">隐私政策</view>|<view style="color: #C0C0C0;"
@click="goUser_Agreement">用户协议</view>
</view>
<view class="modal-mask flex v-c h-c" v-if="factoryVisible">
<view class="hospital-modal white-blk">
<view class="hd bd">请选择工厂</view>
<scroll-view scroll-y="true" style="height:300rpx;">
<radio-group @change="factoryChange">
<label class="hospital-item flex v-c" v-for="(item,index) in factoryList" :key="index">
<view class="flex-1">{{item.user_Belonging}}</view>
<radio :value="index" :checked="item.key == activeFactory.key"
style="transform: scale(0.7);" />
</label>
</radio-group>
</scroll-view>
<view class="btn-wrap" style="margin-bottom:10upx;">
<button type="default" plain size="mid" class="full round mt-30"
@click="confirmHospital">确认</button>
</view>
</view>
</view>
</scroll-view>
<!-- 底部导航栏 -->
<view class="commodity_attr_box">
<view style="display:flex; width:100vw; flex-direction:row;height:100upx;align-items: center;">
<view class="bottomlayout1" @click="work()">
<view class="bottomlayout2">
<image class="img" src="../../static/work1.png" style="width:60rpx;height:55rpx" mode=""
v-if="show_work"></image>
<image class="img" src=" ../../static/work0.png" style="width:60rpx;height:55rpx" mode="" v-else>
</image>
<view style="font-size: 20rpx;color:#0000BF;font-weight:bold" v-if="show_work">工作</view>
<view style="font-size: 20rpx;color:#707070;font-weight:bold" v-else>工作</view>
</view>
</view>
<view class="bottomlayout1" @click="mines()">
<view class="bottomlayout2">
<image class="img" src=" ../../static/mine1.png" style="width:60rpx;height:60rpx" mode=""
v-if="show_mine"></image>
<image class="img" src=" ../../static/mine0.png" style="width:60rpx;height:60rpx" mode="" v-else>
</image>
<view style="font-size: 20rpx;color:#0000BF;font-weight:bold" v-if="show_mine">我的</view>
<view style="font-size: 20rpx;color:#707070;font-weight:bold" v-else>我的</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import config from '../../static/js/config.js'
export default {
components: {},
data() {
return {
//工作
share: {
title: 'ALAPI',
path: '/pages/work/work',
imageUrl: '',
desc: '',
content: '',
},
dingdanshow: true,
Check_lay: true, //检单布局
Check_lay1: true, //检单布局
Order_lay: true, //订单信息总览布局
packship: true, //
Order_search: true,
scanning_lay: true, //生产扫描布局
scanning_lay_new: true, //新生产扫描布局
testing_lay: true, //质检布局
Production_lay: true, //生产工作量布局
Rework_lay: true, //返工分析布局
Photo_lay: true, //照片管理布局
Internal_lay: true, //内返布局
Abutment_lay: true, //基台布局
Abutment_fanhui: true, //基台返回
Warehouse_lay: true, //仓库盘点布局
Clinical_lay: true, //服务订单查询布局
services_lay: true, //临床服务布局
point_lay: true, //驻点服务布局
Reimbursement_lay: true, //我的报销布局
shenpi: true,
linchuang: true,
shengchan: true,
shengchanjiaojie: true,
daiwen: true,
waifan: true,
handoverlayout: true,
baoguo: true,
xiaodu: true,
shoudongjiliang: true,
paiyachuku: true,
lingliaoshenqing: true,
lingliaoshenpi: true,
pingguobanben: "",
percent: 0,
dingdan: true, //二维码订单
//我的
img: "https://yagumobileapi2.yaguyun.com/img/loo.png",
headurl: null,
name: "",
department: "",
phone: "",
banben: "",
time: "",
factory: "",
factoryVisible: false,
factoryList: [],
activeFactory: null,
code: null,
time: "",
postindex: 0, //蓝牙打印
postdata: [], //蓝牙打印
// Automaticindex: 0, //自动打印
// Automatic_printing: [], //自动打印
Printindex: 0, //打印模板
Print_template: [{
printtemplate_title: "未选择"
}], //打印模板
zjPrintindex: 0, //质检打印
linePrintindex: 0, //线上订单打印
daiwenPrintindex: 0, //待问
activeHospital: null,
printmachine: "", //打印机名称
printmachinekd: "", //快递打印机名称
printmachinezx: "", //装箱打印机名称
packagename: "", //包名
daiwenisshow: true,
model: "", //型号
show_work: true, //工作
show_mine: false //我的
}
},
onLoad() {
this.getInfo()
this.getprintModel()
//工作
// #ifdef APP-PLUS
//判断是pda隐藏扫描按钮
if (this.utils.isPDA()) {
this.scanning_lay_new = false //新生产扫描布局
var webView = this.$mp.page.$getAppWebview();
// 修改buttons
webView.setTitleNViewButtonStyle(0, {
width: '0',
});
}
// #endif
// wx.showShareMenu({
// withShareTicket: true,
// //设置下方的Menus菜单,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
// menus: ["shareAppMessage", "shareTimeline"]
// })
// uni.setStorageSync('role', "0")
// if (!uni.getStorageSync('AuthToken')) {
// uni.showToast({
// title: "您还没有登陆,正在跳转登陆页...请稍后",
// icon: 'none',
// duration: 2000
// });
// setTimeout(function() {
// //返回上一页
// uni.reLaunch({
// url: '/move/login/login'
// })
// }, 2000);
// return;
// }
console.log("==========66666666666============")
//我的
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
// 获取本地版本号
console.log('获取本地本版', wgtinfo);
console.log(222222222, wgtinfo.versionCode);
this.banben = wgtinfo.version
if (wgtinfo.name.indexOf("齿邦") != -1) {
this.img = "/static/loo.png"
}
})
// console.log("--",uni.getSystemInfoSync())
console.log(uni.getStorageSync('AuthToken'))
if (uni.getSystemInfoSync().platform == 'ios') {
this.daiwenisshow = false
}
},
onShow() {
// #ifdef MP-WEIXIN
if (wx.hideHomeButton) {
wx.hideHomeButton();
}
// #endif
//工作
// #ifdef APP-PLUS
uni.getSystemInfo({
success: function(res) {
console.log("======", res)
uni.setStorageSync("model", res.model)
console.log("======", res.model)
if (this.utils.isPDA()) {
console.log("============pda========")
this.scanning_lay_new = false //新生产扫描布局
var webView = this.$mp.page.$getAppWebview();
// 修改buttons
webView.setTitleNViewButtonStyle(0, {
width: '0',
});
}
}
});
// #endif
// this.Switch_factory()
let platform = uni.getSystemInfoSync().platform
if (platform == 'ios') {
console.log('我是iOS')
this.pingguo()
} else if (platform == 'android') {
console.log('我是安卓')
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
// 获取本地版本号
console.log('获取本地本版', wgtinfo);
console.log(222222222, wgtinfo.versionCode);
this.banben = wgtinfo.version
// this.updateApp(wgtinfo.name)
})
}
uni.hideLoading()
var userinfo = uni.getStorageSync("UserInfo")
if (uni.getStorageSync("machine").length == 0) {
this.printmachine = "未选择"
} else {
this.printmachine = uni.getStorageSync("machine")
}
if (uni.getStorageSync("machinekd").length == 0) {
this.printmachinekd = "未选择"
} else {
this.printmachinekd = uni.getStorageSync("machinekd")
}
if (uni.getStorageSync("machinezx").length == 0) {
this.printmachinezx = "未选择"
} else {
this.printmachinezx = uni.getStorageSync("machinezx")
}
console.log("onshow1111111111111111111", userinfo)
this.name = userinfo.staff_name
this.tel = userinfo.staff_mobilephone
this.factory = userinfo.belonging
//工厂列表
this.factoryList = uni.getStorageSync("FactoryList")
this.activeFactory = uni.getStorageSync("ActiveFactory")
uni.setStorageSync("name", userinfo.staff_name)
uni.setStorageSync("staff_kingscancode", userinfo.staff_kingscancode)
// #ifdef APP-PLUS
var that = this
uni.getSystemInfo({
success: function(res) {
console.log("======", res)
that.model = res.model
console.log("======", res.model)
}
});
// #endif
},
methods:
pingguo() {
var that = this
uni.request({
url: 'http://itunes.apple.com/cn/lookup?id=1544933190',
data: {},
success: (res) => {
that.pingguobanben = res.data.results[0].version.replace(/\./g, "")
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
console.log('获取本地本版=======', Number(wgtinfo.version.replace(/\./g, "")),
this.pingguobanben);
if (Number(wgtinfo.version.replace(/\./g, "")) < Number(this
.pingguobanben)) {
setTimeout(function() {
uni.showToast({
title: '判断有新版本,即将跳转应用商店更新...',
duration: 2000,
icon: "none"
});
}, 1000);
setTimeout(function() {
let appleId = 1544933190
plus.runtime.launchApplication({
action: `itms-apps://itunes.apple.com/cn/app/id${appleId}?mt=8`
}, function(e) {
console.log(
'Open system default browser failed: ' +
e.message);
});
}, 1000);
}
})
}
})
},
onNavigationBarButtonTap(e) {
if (uni.getStorageSync("model") == "PDA") {
this.$toast("请用pda自带的扫描功能!")
return
}
uni.scanCode({
onlyFromCamera: true,
scanType: ['qrCode'],
success: (res) => {
console.log("111" + res.result)
uni.setStorageSync('scanLoginToken', res.result)
uni.navigateTo({
url: '/move/scanLogin/scanLogin'
})
},
fail: (err) => {
console.log(err)
// 需要注意的是小程序扫码不需要申请相机权限
}
});
},
getInfo() {
uni.showLoading({
title: '加载中'
});
this.$post("/Basic/MyInformation").then((data) => {
this.headurl = data.data.headPortrait
this.department = data.data.staff_department_guid.toString()
this.time = data.data.staff_entrytime //.split(" ")[0]
this.phone = data.data.mobilephoneNO
this.factory = data.data.staff_factoryid
this.name = data.data.name
uni.setStorageSync("staff_guid", data.data.id) //员工guid
uni.setStorageSync("staff_number", data.data.staff_number) //员工编号
uni.setStorageSync("name", data.data.name)
uni.setStorageSync("department", data.data.bepartment)
var userinfo = data.data
if (userinfo.staff_permissions.charAt(4) == 0) {
this.Check_lay = false //检单布局
}
if (userinfo.staff_permissions.charAt(23) == 0) {
this.Check_lay1 = false //线上订单布局
}
if (userinfo.staff_permissions.charAt(115) == 0) {
this.Order_lay = false //订单信息总览布局111
}
if (userinfo.staff_permissions.charAt(22) == 0) {
this.Order_search = false
}
if (userinfo.staff_permissions.charAt(110) == 0) {
this.scanning_lay = false //生产扫描布局111
this.scanning_lay_new = false //新生产扫描布局
}
if (userinfo.staff_permissions.charAt(174) == 0) {
this.testing_lay = false //质检布局1111
}
if (userinfo.staff_permissions.charAt(136) == 0) {
this.Production_lay = false //生产工作量布局1111
}
if (userinfo.staff_permissions.charAt(577) == 0) {
this.Rework_lay = false //返工分析布局222
}
if (userinfo.staff_permissions.charAt(141) == 0) {
this.shengchanjiaojie = false //生产交接
}
if (userinfo.staff_permissions.charAt(117) == 0) {
this.daiwen = false //代问
}
if (userinfo.staff_permissions.charAt(777) == 0) {
this.waifan = false //外返
}
if (userinfo.staff_permissions.charAt(55) == 0) {
this.Photo_lay = false //照片管理布局111
}
if (userinfo.staff_permissions.charAt(1) == 0) {
this.baoguo = false //包裹
}
if (userinfo.staff_permissions.charAt(43) == 0) {
this.packship = false //装箱发货43
}
if (userinfo.staff_permissions.charAt(112) == 0) {
this.Internal_lay = false //内返布局111
}
if (userinfo.staff_permissions.charAt(122) == 0) {
this.Abutment_lay = false //基台布局1111
}
if (userinfo.staff_permissions.charAt(126) == 0) {
this.Abutment_fanhui = false //基台布局1111
}
if (userinfo.staff_permissions.charAt(290) == 0) {
this.Warehouse_lay = false //仓库盘点布局111
}
if (userinfo.staff_permissions.charAt(97) == 0) {
this.Clinical_lay = false //服务订单查询布局11
}
if (userinfo.staff_permissions.charAt(937) == 0) {
this.services_lay = false //临床服务布局11
}
if (userinfo.staff_permissions.charAt(941) == 0) {
this.point_lay = false //驻点服务布局111
}
if (userinfo.staff_permissions.charAt(685) == 0) {
this.Reimbursement_lay = false //我的报销布局111
}
if (userinfo.staff_permissions.charAt(998) == 0) {
this.shenpi = false //审批布局222
}
if (userinfo.staff_permissions.charAt(4) == 0) {
this.xiaodu = false //消毒审批
}
if (userinfo.staff_permissions.charAt(133) == 0) {
this.shoudongjiliang = false //消毒审批
}
if (userinfo.staff_permissions.charAt(285) == 0) {
this.lingliaoshenpi = false //消毒审批
}
if (userinfo.staff_permissions.charAt(282) == 0) {
this.lingliaoshenqing = false //消毒审批
}
//pda隐藏新生成扫描
if (this.utils.isPDA()) {
this.scanning_lay_new == false
}
if (this.scanning_lay == false && this.scanning_lay_new == false && this.testing_lay ==
false && this
.Production_lay == false && this
.Rework_lay ==
false && this.Photo_lay == false && this.Internal_lay == false &&
this.Abutment_lay == false && this.Abutment_fanhui == false && this.Internal_lay == false
) {
this.shengchan = false
}
if (this.Order_lay == false && this.Order_search == false && this.Check_lay == false && this
.Check_lay1 ==
false) {
this.dingdanshow = false
}
if (this.Clinical_lay == false && this.services_lay == false && this.point_lay == false && this
.Reimbursement_lay ==
false) {
this.linchuang = false
}
uni.hideLoading()
}, (error) => {
uni.hideLoading()
this.$toast(error.msg)
})
},
//我的
onlinetemplateChange(e) {
this.linePrintindex = e.detail.value
uni.setStorageSync("lineprintmodel", this.Print_template[this.linePrintindex])
console.log("------lineprintmodel----------", uni.getStorageSync("lineprintmodel"))
},
daiwentemplateChange(e) {
this.daiwenPrintindex = e.detail.value
console.log("待问", this.daiwenPrintindex)
uni.setStorageSync("daiwenprintmodel", this.Print_template[this.daiwenPrintindex])
},
zhijiantemplateChange(e) {
this.zjPrintindex = e.detail.value
uni.setStorageSync("zjprintmodel", this.Print_template[this.zjPrintindex])
},
//蓝牙打印机选择
printmachineselect() {
uni.navigateTo({
url: '/move/mine/selectprintmachine'
})
},
//蓝牙打印机选择
printmachineselect() {
uni.setStorageSync("type", "1")
uni.navigateTo({
url: '/move/mine/selectprintmachine?type=1'
})
},
//快递打印机选择
kdprintmachineselect() {
uni.setStorageSync("type", "2")
uni.navigateTo({
url: '/move/mine/selectprintmachine?type=2'
})
},
//装箱单打印机选择
zxprintmachineselect() {
uni.setStorageSync("type", "3")
uni.navigateTo({
url: '/move/mine/selectprintmachine?type=3'
})
},
// 蓝牙打印
bindpostChange(e) {
this.postindex = e.target.value
},
// 自动打印
bindAutomaticindexChange(e) {
this.Automaticindex = e.target.value
},
// 打印模板
bindPrint_templateChange(e) {
this.Printindex = e.target.value
},
uploadavater() {
uni.chooseImage({
count: 1,
success: (chooseImageRes) => {
console.log(chooseImageRes)
this.upload(chooseImageRes.tempFilePaths[0])
},
})
},
factoryChange(e) {
let index = e.detail.value
this.activeFactory = this.factoryList[index]
},
//退出登录
untying() {
try {
uni.setStorageSync("AuthToken", "")
// uni.clearStorageSync();
} catch (e) {
// error
}
if (!uni.getStorageSync('AuthToken')) {
uni.showToast({
title: "退出登录成功!",
icon: 'none',
duration: 1000
});
uni.setStorageSync("orderauxiliarytype_guid", '')
uni.setStorageSync("orderauxiliarytype_name", '')
setTimeout(function() {
//返回上一页
uni.reLaunch({
url: '/pages/login/login'
})
}, 1000);
return;
} else {
console.log("token===", uni.getStorageSync("AuthToken"))
}
},
goPrivacy() {
uni.navigateTo({
url: "/moveUser_Agreement/Privacy"
})
},
goUser_Agreement() {
uni.navigateTo({
url: "/moveUser_Agreement/User_Agreement"
})
},
//获取打印模板
getprintModel() {
uni.showLoading({
title: '加载中'
});
this.$post("/Printinterface/print", {
"mbguid": "",
"templatetype": ""
}).then((data) => {
this.Print_template = data.data
// console.log("打印信息",this.Print_template )
if (this.Print_template.length > 0) {
var aa = 0
for (var i = 0; i < this.Print_template.length; i++) {
if (uni.getStorageSync("zjprintmodel").printtemplate_title == this.Print_template[i]
.printtemplate_title) {
this.zjPrintindex = i
aa = 1
uni.setStorageSync("zjprinttitle", this.Print_template[i].printtemplate_title)
uni.setStorageSync("zjprintmodel", this.Print_template[this.zjPrintindex])
}
}
if (aa == 0) {
this.zjPrintindex = 0
uni.setStorageSync("zjprinttitle", this.Print_template[0].printtemplate_title)
uni.setStorageSync("zjprintmodel", this.Print_template[0])
}
var bb = 0
for (var i = 0; i < this.Print_template.length; i++) {
if (uni.getStorageSync("lineprintmodel").printtemplate_title == this.Print_template[i]
.printtemplate_title) {
this.linePrintindex = i
bb = 1
uni.setStorageSync("lineprinttitle", this.Print_template[i].printtemplate_title)
uni.setStorageSync("lineprintmodel", this.Print_template[this.linePrintindex])
}
}
if (bb == 0) {
this.linePrintindex = 0
uni.setStorageSync("lineprinttitle", this.Print_template[0].printtemplate_title)
uni.setStorageSync("lineprintmodel", this.Print_template[0])
}
var cc = 0
for (var i = 0; i < this.Print_template.length; i++) {
if (uni.getStorageSync("daiwenprintmodel").printtemplate_title == this.Print_template[
i].printtemplate_title) {
this.daiwenPrintindex = i
cc = 1
uni.setStorageSync("daiwenprinttitle", this.Print_template[i].printtemplate_title)
uni.setStorageSync("daiwenprintmodel", this.Print_template[this.daiwenPrintindex])
}
}
if (cc == 0) {
this.daiwenPrintindex = 0
uni.setStorageSync("daiwenprinttitle", this.Print_template[0].printtemplate_title)
uni.setStorageSync("daiwenprintmodel", this.Print_template[0])
}
} else {
uni.setStorageSync("lineprinttitle", "未选择")
uni.setStorageSync("zjprinttitle", "未选择")
uni.setStorageSync("daiwenprinttitle", "未选择")
}
uni.hideLoading()
}, (error) => {
uni.hideLoading()
this.$toast(error.msg)
})
},
getToken() {
console.log("qqqq", this.activeFactory)
uni.showLoading({
title: '加载中'
});
this.$post("/Login/ObtainToken", {
key: this.activeFactory.key,
secret: this.activeFactory.secret,
phone_No: this.activeFactory.phone_No
}).then((data) => {
console.log("token111111", data)
console.log(data.data)
this.activeFactory.token = data.msg
uni.setStorageSync('ActiveFactory', this.activeFactory)
uni.setStorageSync('UserInfo', data.data)
uni.setStorageSync('AuthToken', data.msg)
uni.setStorageSync('FactoryList', this.factoryList)
this.name = data.data.name
uni.setStorageSync("name", data.data.name)
this.factory = data.data.belonging
this.getInfo()
uni.hideLoading()
}, (error) => {
uni.hideLoading()
this.$toast(error.msg)
})
},
Switch_factory_mine() {
this.$post("/PersonalInformation/SwitchFactory").then((data) => {
//this.$toast('发送成功')
console.log('切换工厂', data)
console.log('ly', this.factory)
this.factoryList = data.data
for (var i = 0; i < data.data.length; i++) {
if (data.data[i].user_Belonging == this.factory) {
this.activeFactory = data.data[i]
break
}
}
this.factoryVisible = true
getApp().globalData.state = 0
uni.setStorageSync("zuijin", [])
console.log("getApp().globalData.state", getApp().globalData.state)
uni.setStorageSync('saleline', "")
}, (error) => {
this.$toast(error.msg)
})
},
confirmHospital() {
if (this.activeFactory.user_Belonging == this.factory) {
this.factoryVisible = false
return
}
this.getToken()
this.factoryVisible = false
},
// 上传头像
upload(filePath) {
return new Promise((resolve, reject) => {
let token = wx.getStorageSync('AuthToken')
uni.uploadFile({
url: config.baseApi + '/PersonalInformation/UploadPicture',
filePath: filePath,
name: 'file',
header: {
"Authorization": `Bearer ${token}`
},
formData: {},
success: (uploadFileRes) => {
console.log(uploadFileRes)
console.log("filePath", filePath)
this.getInfo()
},
fail(err) {
uni.hideLoading()
console.log(err)
reject(err)
},
complete() {
}
});
})
},
//切换页面
work() {
uni.setNavigationBarTitle({
title: '工作',
})
this.show_mine = false
this.show_index = false
this.show_work = true
},
mines() {
uni.setNavigationBarTitle({
title: '我的',
})
this.show_work = false
this.show_index = false
this.show_mine = true
}
}
}
</script>
<style>
.content_work {
background-color: #f2f2f2;
width: 100%;
position: absolute;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.main {
display: flex;
flex-direction: column;
width: 22%;
align-items: center;
margin: 10upx;
}
.top {
display: flex;
justify-content: space-between;
}
image {
width: 60upx;
height: 60upx;
}
.test {
margin-top: 5upx;
}
.xq {
font-size: 26rpx;
margin: 15rpx;
margin-bottom: 0;
}
.content_mine {
display: flex;
flex-direction: column;
align-items: center;
}
.top {
display: flex;
justify-content: space-between;
}
.left {
width: 140rpx;
height: 50rpx;
line-height: 50rpx;
color: #a0a0a0;
text-align: right;
margin-top: 10rpx;
}
.right {
word-break: break-all;
height: 50rpx;
line-height: 50rpx;
float: left;
margin-left: 16rpx;
margin-top: 10rpx;
}
.overflow_view {
height: 70rpx;
line-height: 70rpx;
border-bottom: 1px solid #e5e5e5;
padding-left: 30rpx;
}
.navigation_background {
position: relative;
}
.overflow_view {
height: 70rpx;
line-height: 70rpx;
border-bottom: 1px solid #e5e5e5;
padding-left: 30rpx;
}
.top_layout {
display: flex;
width: 100vw;
height: 80upx;
background-color: #ffffff;
border-bottom: 1px solid #d2d2d2;
flex-direction: row;
font-size: 26upx;
align-items: center;
justify-content: center;
}
.text_layout {
padding-left: 30rpx;
}
/* image {
width: 120upx;
height: 120upx;
} */
.search image {
height: 50upx;
width: 50upx;
position: absolute;
top: 12px;
right: 12px;
z-index: 5;
}
.main_mine {
display: flex;
flex-direction: column;
flex: 1;
align-items: center;
margin: 10upx;
}
.navigation {
width: 25vw;
flex: 1;
}
.commodity_attr_box {
width: 100%;
height:20vh;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
background: #fff;
}
.bottomlayout1 {
flex: 1;
height: 100upx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.bottomlayout2 {
display: flex;
flex-direction: row;
align-items: center;
}
</style>
0 个回复