123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936 |
- <template>
- <view class="page-container uni-column">
- <view class="logo-container uni-row">
- <image class="logo" src="../../static/images/logo.png" />
- <view style="position: absolute; right: 4px;top: 0px;"><text>版本号:{{versionName}}</text></view>
- </view>
- <view class="title"><text class="label">德迈仕数字生产线管理平台</text></view>
- <view class="user-info-container uni-row">
- <view class="icon"><text class="label">{{ userInfo.nickName.charAt(0) }}</text></view>
- <view class="user-info uni-column">
- <view class="nickname uni-row"><text class="label">用户名: {{ userInfo.userName }}</text></view>
- <view class="nickname uni-row"><text class="label">ID:{{ userInfo.userId }}</text></view>
- <!-- <view class="process uni-row"><text class="label">当前工段:</text><text class="label">{{ deptName }}</text> -->
- <!-- </view> -->
- </view>
- </view>
- <view class="user-info uni-column" style="margin: 0 20rpx 20rpx 20rpx;width: 94%;">
- <uni-section title="当前厂别" type="square">
- <uni-data-select v-model="curSelectedTenantId" :localdata="tenantList" :clear="false"
- @change="handleTenantChange"></uni-data-select>
- </uni-section>
- <uni-section title="当前工段" type="square">
- <uni-data-select v-model="curSelectedDeptId" :localdata="userDeptsByTenantId" :clear="false"
- @change="handleDeptChange"></uni-data-select>
- </uni-section>
- </view>
- <view class="scroll-container" style="padding-bottom:120rpx;">
- <!-- <view class="business-btn uni-row" v-if="showOther" @click="handleRecerptSfprod"><text class="label">半成品接收</text></view> -->
- <view class="business-btn uni-row" v-if="showOther" @click="handeleToReportHistory">
- <text class="label">我的报工</text>
- </view>
- <view v-if="showQuick && !showOutsource " class="business-btn uni-row" @click="handleFastToProductionPlan">
- <text class="label">快速报工</text>
- </view>
- <view class="business-btn uni-row" v-if="showTakeStock" @click="handleToTakeStock">
- <text class="label">盘点</text>
- </view>
- <view class="business-btn uni-row" v-if="showOther && !showSizing && !showOutsource"
- @click="handleToProductionPlan">
- <text class="label">报工</text>
- </view>
- <view class="business-btn uni-row" v-if="showOther && !showSizing && !showOutsource && showAssistDaywork"
- @click="handleToAssistDaywork">
- <text class="label">集中报工</text>
- </view>
- <view class="business-btn uni-row" v-if="showInnerTurnover && !showOutsource" @click="handleInnerTurnover">
- <text class="label">内部周转</text>
- </view>
- <view class="business-btn uni-row" v-if="showSizing && !showOutsource" @click="handleToSorting">
- <text class="label">分选报工</text>
- </view>
- <view class="business-btn uni-row" v-if="showOutsource && !showSortOutsource"
- @click="handleToNormalOutsource">
- <text class="label">委外报工</text>
- </view>
- <view class="business-btn uni-row" v-if="showOutsource && showSortOutsource "
- @click="handleToUnNormalOutsource">
- <text class="label">委外分选</text>
- </view>
- <view class="business-btn uni-row" v-if="showAuxiliary && !showOutsource" @click="handleToAuxiliary">
- <text class="label">辅助工序报工</text>
- </view>
- <view class="business-btn uni-row" @click="handleToGetLotInfo">
- <text class="label">扫码查询批次信息</text>
- </view>
- <!-- <view class="business-btn uni-row" v-if="showInspector" @click="handleToProcessInspection">
- <text class="label">序检</text>
- </view> -->
- <view class="business-btn uni-row" v-if="!showOutsource" @click="handleToInspectionReceive">
- <text class="label">检测领取</text>
- </view>
- <view class="business-btn uni-row" v-if="!showOutsource" @click="handleToInspectionDetails">
- <text class="label">检查列表</text>
- </view>
- <view class="business-btn uni-row" v-if="showOutsourcedInspector && !showOutsource"
- @click="handleToOutsourcedInspection">
- <text class="label">外协检查</text>
- </view>
- <view class="business-btn uni-row" v-if="showDeliveryInspection && !showOutsource"
- @click="handleToDeliveryInspection">
- <text class="label">交检</text>
- </view>
- <view class="business-btn uni-row" v-if="showFirstArticleInspection && !showOutsource"
- @click="handleToFirstInspection">
- <text class="label">首件检</text>
- </view>
- <view class="business-btn uni-row" v-if="showOnSiteInspector && !showOutsource"
- @click="handleToOnSiteInspection">
- <text class="label">巡检</text>
- </view>
- <view class="business-btn uni-row" v-if="showInstrumentRoomInspection && !showOutsource"
- @click="handleToInstrumentInspection">
- <text class="label">仪器室</text>
- </view>
- <view class="business-btn uni-row" v-if="!showOutsource " @click="handleToFactoryInspection">
- <text class="label">出厂检</text>
- </view>
- <view class="business-btn uni-row" v-if="showAdjust && !showOutsource" @click="handleToAdjust">
- <text class="label">交检审核</text>
- </view>
- <!-- v-hasRoles="['porter']" 可通过v-Roles自定义指令进行显隐 -->
- <view class="business-btn uni-row" v-if="showTurn && !showOutsource" @click="handleToHandlingList">
- <text class="label">周转</text>
- </view>
- <view class="business-btn uni-row" v-if="showOutSourceList && !showOutsource" @click="handleOutsourceList">
- <text class="label">外协验箱</text>
- </view>
- <view class="business-btn uni-row" v-if="showChangeTurnover && !showOutsource"
- @click="handleChangeTurnover">
- <text class="label">更换工段加工</text>
- </view>
- </view>
- <view class="bottom-btn-container">
- <!-- <view class="start-batch-btn uni-row" @click="handleToEquiPmentList"><text class="label">绑定设备</text></view> -->
- <view class="start-batch-btn uni-row" @click="handleSwitchOrQuit">
- <text class="label">切换 / 退出账号</text>
- </view>
- </view>
- </view>
- <dialog-confirm ref="confirm" @submit="logout"></dialog-confirm>
- <dialog-inspectionChamber ref="inspectionChanberRef"
- @handleSelectInspectionChamber='handleSelectInspectionChamber'></dialog-inspectionChamber>
- <QrScanner v-if="showQrCodeReader" @decode="onDecodeHandler" @close="qrReaderClose" />
- </template>
- <script setup>
- import {
- ref
- } from 'vue'
- import {
- onLoad,
- onReady
- } from '@dcloudio/uni-app'
- import QrScanner from '../vueQrCode/index.vue'
- import {
- getSubPlanDetailsList
- } from '../../api/business/subPlanDetails'
- import {
- checkCarrier
- } from '../../api/business/processInspection'
- import {
- getTenantList,
- } from '@/api/login/index.js'
- import {
- getUserDeptList
- } from '@/api/dept/dept.js'
- import {
- listInnerTurnover
- } from '../../api/business/innerTurnover'
- import {
- store
- } from '@/store/index.js'
- const userName = ref('') // 用户名
- const curSelectedDeptId = ref(null) // 用户当前选择的工段
- const curSelectedTenantId = ref(null) // 用户当前选择的厂别
- const userInfo = ref({}) // 用户信息
- const tenantList = ref([]) // 厂别列表
- const userDeptList = ref([]) // 用户所在所有工段列表
- const userDeptsByTenantId = ref([])
- const confirm = ref(null) // 确认组件
- const inspectionChanberRef = ref(null)
- const showOutsource = ref(false)
- const showSortOutsource = ref(false)
- const showTurn = ref(false)
- const showOther = ref(false)
- const showInspector = ref(false);
- const showOnSiteInspector = ref(false)
- const showInstrumentRoomInspection = ref(false)
- const showAdjust = ref(false)
- const showAuxiliary = ref(false)
- const showQuick = ref(false)
- const showSizing = ref(false)
- const showTakeStock = ref(false)
- const showInnerTurnover = ref(false)
- const showOutsourcedInspector = ref(false)
- const showDeliveryInspection = ref(false)
- const showFirstArticleInspection = ref(false)
- const showOutSourceList = ref(false)
- const showChangeTurnover = ref(false)
- const showQrCodeReader = ref(false);
- const showAssistDaywork = ref(false)
- const versionName = ref(null)
- onLoad(() => {
- uni.getSystemInfo({
- success: function(res) {
- versionName.value = res.appVersion;
- }
- });
- console.log(versionName.value)
- console.log(store.userInfo)
- userInfo.value = store.userInfo || {
- nickName: ""
- };
- store.tenantId = userInfo.value.tenantId;
- // console.log("-----------", store.userInfo.roles)
- // console.log("-----permissions-----", store.userInfo)
- if (store.userInfo.roles.some(item => item.roleId == 124) && store.userInfo.roles.length > 1) {
- console.log("111")
- showTurn.value = true;
- showOther.value = true;
- } else if (store.userInfo.roles.some(item => item.roleId == 124) && store.userInfo.roles.length == 1) {
- console.log("222")
- showTurn.value = true;
- showOther.value = false;
- } else if (store.userInfo.roles.some(item => item.roleId == 128)) {
- console.log("333")
- showInspector.value = true
- } else {
- console.log("444")
- showTurn.value = false;
- showOther.value = true;
- }
- //盘点状态
- if (store.userInfo.takeStock) {
- showTakeStock.value = true
- } else {
- showTakeStock.value = false
- }
- //巡检
- if (store.userInfo.roles.some(item => item.roleKey == 'patrolInspection')) {
- showOnSiteInspector.value = true
- } else {
- showOnSiteInspector.value = false
- }
- //交检
- if (store.userInfo.roles.some(item => item.roleKey == 'deliveryInspection')) {
- showDeliveryInspection.value = true
- } else {
- showDeliveryInspection.value = false
- }
- //仪器室
- if (store.userInfo.roles.some(item => item.roleKey == 'instrumentRoomInspection')) {
- showInstrumentRoomInspection.value = true
- } else {
- showInstrumentRoomInspection.value = false
- }
- //首件检
- if (store.userInfo.roles.some(item => item.roleKey == 'firstArticleInspection')) {
- showFirstArticleInspection.value = true
- } else {
- showFirstArticleInspection.value = false
- }
- //交检审核
- if (store.userInfo.roles.some(item => item.roleKey == 'adjuster')) {
- showAdjust.value = true
- } else {
- showAdjust.value = false
- }
- //协助报工
- if (store.userInfo.permissions.some(item => item === 'business:assistDaywork:list') || store.userInfo
- .permissions.some(item => item === "*:*:*")) {
- showAssistDaywork.value = true
- } else {
- showAssistDaywork.value = false
- }
- if (store.userInfo.permissions.some(item => item === 'business:outsource:checkBox') || store.userInfo
- .permissions.some(item => item === "*:*:*")) {
- showOutSourceList.value = true;
- } else {
- showOutSourceList.value = false;
- }
- if (store.userInfo.permissions.some(item => item === 'business:switchDept:change') || store.userInfo
- .permissions.some(item => item === "*:*:*")) {
- showChangeTurnover.value = true;
- } else {
- showChangeTurnover.value = false;
- }
- if (store.userInfo.roles.some(item => item.roleId == 129)) {
- showOutsourcedInspector.value = true
- // showOther.value = true;
- }
- init();
- })
- /******************************** 定义一些方法 ********************************/
- function init() {
- getTenant();
- getUserDepts(store.userInfo.userId, store.tenantId);
- //getUserDeptsByTenantId(store.tenantId);
- }
- // 获取租户列表
- function getTenant() {
- getTenantList().then((res) => {
- if (res.code == 200) {
- for (var i = 0; i < res.rows.length; i++) {
- tenantList.value[i] = {
- text: res.rows[i].orgName,
- value: res.rows[i].id
- }
- }
- curSelectedTenantId.value = store.userInfo.tenantId;
- }
- })
- }
- // 获取人员工段
- function getUserDepts(userId, tenantId) {
- userDeptsByTenantId.value = []
- getUserDeptList(userId).then((res) => {
- if (res.code == 200) {
- userDeptList.value = res.data;
- for (let i = 0; i < res.data.length; i++) {
- if (res.data[i].tenantId == tenantId) {
- userDeptsByTenantId.value.push({
- text: res.data[i].deptName,
- value: res.data[i].deptId
- })
- }
- }
- console.log(userDeptsByTenantId.value)
- if (userDeptsByTenantId.value && userDeptsByTenantId.value.length > 0) {
- curSelectedDeptId.value = userDeptsByTenantId.value[0].value
- console.log(curSelectedDeptId.value)
- let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
- store.curDeptDetails = curDept
- console.log(curDept, "77777")
- if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey ==
- 'sortingInspector')) {
- showSizing.value = true
- } else {
- showSizing.value = false
- }
- if (curDept.isSortPackaging == 1) {
- showSortOutsource.value = true
- } else {
- showSortOutsource.value = false
- }
- if (curDept.isOutsourcing == 1) {
- showOutsource.value = true
- } else {
- showOutsource.value = false
- }
- console.log(store)
- handleSelectInnerTurnover()
- }
- if (res.data.some(v => v.hasQuick === 1) &&
- (store.userInfo.permissions.some(item => item ===
- 'business:quickDaywork:list') || store.userInfo
- .permissions.some(item => item === "*:*:*"))
- ) {
- showQuick.value = true
- } else {
- showQuick.value = false
- }
- }
- })
- }
- // 根据租户id获取到工段
- function getUserDeptsByTenantId(tenantId) {
- userDeptsByTenantId.value = [];
- let newArr = userDeptList.value.filter((item, index, arrs) => item.tenantId == tenantId);
- for (var i = 0; i < newArr.length; i++) {
- userDeptsByTenantId.value.push({
- text: newArr[i].deptName,
- value: newArr[i].deptId
- })
- }
- if (newArr && newArr.length > 0) {
- curSelectedDeptId.value = userDeptsByTenantId.value[0].value
- let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
- store.curDeptDetails = curDept
- if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey ==
- 'sortingInspector')) {
- showSizing.value = true
- } else {
- showSizing.value = false
- }
- console.log(store)
- handleSelectInnerTurnover()
- }
- }
- /*
- // 半成品接收
- function handleRecerptSfprod() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/recerptSfprod/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- */
- function handeleToReportHistory() {
- uni.navigateTo({
- url: '/pages/reportHistory/index'
- })
- }
- function handleToGetLotInfo() {
- uni.navigateTo({
- url: '/pages/queryLotInfo/index'
- })
- }
- function handleInnerTurnover() {
- uni.navigateTo({
- url: '/pages/innerTurnover/index'
- })
- }
- function handleFastToProductionPlan() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/fastProductionPlan/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- function handleToProductionPlan() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/productionPlan/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- function handleToNormalOutsource() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/outsourceProductionPlan/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //检查列表
- function handleToInspectionDetails() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/inspectionDetails/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //盘点
- function handleToTakeStock() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/takeStock/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //交检审核
- function handleToAdjust() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/deliveryExamine/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- // 分选
- function handleToSorting() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/sortProductionPlan/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //H5扫码器回调
- function onDecodeHandler(data) {
- showQrCodeReader.value = false;
- let vehicleObj = {
- carrierCode: data
- };
- if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
- uni.showToast({
- icon: "none",
- title: "请扫载具码",
- duration: 1000
- })
- return;
- }
- checkCarrier({
- carrierCode: vehicleObj.carrierCode,
- }).then(response => {
- if (response.code == 200) {
- uni.navigateTo({
- url: "/pages/processInspectionReceive/form",
- success: (res) => {
- // 通过eventChannel向被打开页面传送数据
- res.eventChannel.emit("inspecionCarrierCode", {
- carrierCode: vehicleObj.carrierCode
- })
- }
- })
- } else {
- uni.showToast({
- icon: 'none',
- title: response.msg,
- duration: 2000
- })
- }
- })
- }
- //H5扫码器关闭
- function qrReaderClose() {
- showQrCodeReader.value = false;
- }
- //检查列表
- function handleToInspectionReceive() {
- showQrCodeReader.value = true;
- // const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
- // if (mpaasScanModule) {
- // // 调用插件的 mpaasScan 方法
- // mpaasScanModule.mpaasScan({
- // // 扫码识别类型,参数可多选,qrCode、barCode,
- // // 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
- // scanType: ["qrCode", "barCode"],
- // // 是否隐藏相册,默认false不隐藏
- // hideAlbum: false,
- // },
- // (ret) => {
- // console.log(ret);
- // let vehicleObj = {
- // carrierCode: ret.resp_result
- // };
- // if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
- // uni.showToast({
- // icon: "none",
- // title: "请扫载具码",
- // duration: 1000
- // })
- // return;
- // }
- // checkCarrier({
- // carrierCode: vehicleObj.carrierCode,
- // }).then(response => {
- // if (response.code == 200) {
- // uni.navigateTo({
- // url: "/pages/processInspectionReceive/form",
- // success: (res) => {
- // // 通过eventChannel向被打开页面传送数据
- // res.eventChannel.emit("inspecionCarrierCode", {
- // carrierCode: vehicleObj.carrierCode
- // })
- // }
- // })
- // } else {
- // uni.showToast({
- // icon: 'none',
- // title: response.msg,
- // duration: 2000
- // })
- // }
- // })
- // }
- // );
- // } else {
- // // 测试时用
- // checkCarrier({
- // carrierCode: "300086",
- // }).then(response => {
- // if (response.code == 200) {
- // uni.navigateTo({
- // url: "/pages/processInspectionReceive/form",
- // success: (res) => {
- // // 通过eventChannel向被打开页面传送数据
- // res.eventChannel.emit("inspecionCarrierCode", {
- // carrierCode: "300086"
- // })
- // }
- // })
- // } else {
- // uni.showToast({
- // icon: 'none',
- // title: response.msg,
- // duration: 2000
- // })
- // }
- // })
- // }
- }
- // 外协检查
- function handleToOutsourcedInspection() {
- uni.navigateTo({
- url: '/pages/outsourcedInspection/index'
- })
- }
- // 工序检查
- function handleToProcessInspection() {
- uni.navigateTo({
- url: '/pages/processInspection/index'
- })
- }
- //检查
- function handleToInspection() {
- inspectionTypeDialog.value.open()
- }
- function handleToHandlingList() {
- console.log(store)
- uni.navigateTo({
- url: '/pages/handlingList/index'
- })
- }
- function handleOutsourceList() {
- uni.navigateTo({
- url: '/pages/outsourcedReturnCheck/index'
- })
- }
- //协助报工
- function handleToAssistDaywork() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/assistDaywork/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //
- function handleChangeTurnover() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/switchDept/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //交检
- function handleToDeliveryInspection() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/deliveryInspection/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //首件检
- function handleToFirstInspection() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/firstInspection/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //巡检
- function handleToOnSiteInspection() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/onSiteInspection/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- //仪器室
- function handleToInstrumentInspection() {
- //选择仪器室
- inspectionChanberRef.value.open()
- }
- function handleSelectInspectionChamber(data) {
- uni.navigateTo({
- url: "/pages/instrumentRoomInspection/index",
- success: (res) => {
- // 通过eventChannel向被打开页面传送数据
- res.eventChannel.emit("inspectionChamberInfo", {
- data: data
- })
- }
- })
- }
- //出厂检
- function handleToFactoryInspection() {
- uni.navigateTo({
- url: '/pages/factoryInspection/index'
- })
- }
- function logout() {
- uni.reLaunch({
- url: '/pages/index/index'
- })
- }
- function handleSwitchOrQuit() {
- let msg = "确认退出登录吗?"
- confirm.value.open(msg);
- }
- /*
- // 绑定设备
- function handleToEquiPmentList() {
- uni.navigateTo({
- url: "/pages/equipmentList/index"
- })
- }
- */
- function handleTenantChange() {
- console.log(curSelectedTenantId)
- store.tenantId = curSelectedTenantId.value
- curSelectedDeptId.value = null
- getUserDeptsByTenantId(store.tenantId)
- }
- function handleDeptChange() {
- let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
- store.curDeptDetails = curDept
- if (curDept.deptCode === '105060' || store.userInfo.roles.some(item => item.roleKey ==
- 'sortingInspector')) {
- showSizing.value = true
- } else {
- showSizing.value = false
- }
- if (curDept.isOutsourcing == 1) {
- showOutsource.value = true
- } else {
- showOutsource.value = false
- }
- if (curDept.isSortPackaging == 1) {
- showSortOutsource.value = true
- } else {
- showSortOutsource.value = false
- }
- console.log(store)
- handleSelectInnerTurnover()
- }
- //查询当前工段当前操作者是否能看见内部周转按钮
- function handleSelectInnerTurnover() {
- listInnerTurnover({
- deptId: store.curDeptDetails.deptId,
- userId: store.userInfo.userId
- }).then(res => {
- if (res.code == 200) {
- showInnerTurnover.value = res.rows.length > 0 ? true : false
- }
- })
- }
- function handleToAuxiliary() {
- if (curSelectedDeptId.value) {
- uni.navigateTo({
- url: '/pages/auxiliaryDaywork/index'
- })
- } else {
- uni.showToast({
- icon: "none",
- title: "请选择工段"
- })
- }
- }
- </script>
- <style lang="scss">
- .page-container {
- height: calc(100% - 208rpx);
- overflow: auto;
- }
- .logo-container {
- justify-content: center;
- .logo {
- width: 120rpx;
- height: 120rpx;
- }
- }
- .title {
- align-items: center;
- .label {
- font-size: 40rpx;
- font-weight: bold;
- }
- }
- .user-info-container {
- margin: 16rpx 0 20rpx 20rpx;
- align-items: center;
- .icon {
- width: 120rpx;
- height: 120rpx;
- justify-content: center;
- align-items: center;
- border-radius: 60rpx;
- border: 1px solid #e1e1e1;
- .label {
- font-size: 64rpx;
- }
- }
- .user-info {
- box-sizing: border-box;
- padding-top: 8rpx;
- margin-left: 24rpx;
- justify-content: center;
- // font-size: 20rpx;
- .nickname {
- margin-bottom: 16rpx;
- .label {
- font-weight: bold;
- font-size: 32rpx;
- }
- }
- .process {
- .label {
- font-size: 32rpx;
- }
- }
- }
- .data-select {
- flex: 3;
- width: 100%;
- height: 50rpx;
- border-radius: 18rpx;
- background-color: #FFF;
- .data-select-options {
- width: 200rpx;
- }
- }
- }
- .business-btn {
- margin: 0 20rpx 20rpx 20rpx;
- background-color: #fff;
- min-height: 100rpx;
- width: 94%;
- align-items: center;
- justify-content: center;
- border: 1rpx solid #e1e1e1;
- border-radius: 8rpx;
- .label {
- font-size: 35rpx;
- }
- }
- .bottom-btn-container {
- position: fixed;
- right: 0;
- bottom: 0;
- left: 0;
- height: 50px;
- border-top: 1px solid #999999;
- padding: 16rpx 32rpx;
- align-items: center;
- background-color: #fff;
- justify-content: space-evenly;
- .start-batch-btn {
- // background-color: grey;
- background-color: #1684fc;
- // margin-bottom: 24rpx;
- border-radius: 8rpx;
- justify-content: center;
- align-items: center;
- height: 50rpx;
- flex: 1;
- width: 100%;
- .label {
- font-size: 32rpx;
- color: #ffffff;
- }
- }
- }
- </style>
|