|
@@ -15,10 +15,12 @@
|
|
|
</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-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-data-select v-model="curSelectedDeptId" :localdata="userDeptsByTenantId" :clear="false"
|
|
|
+ @change="handleDeptChange"></uni-data-select>
|
|
|
</uni-section>
|
|
|
</view>
|
|
|
<!-- <view class="business-btn uni-row" v-if="showOther" @click="handleRecerptSfprod"><text class="label">半成品接收</text></view> -->
|
|
@@ -34,7 +36,7 @@
|
|
|
<view class="business-btn uni-row" v-if="showSizing" @click="handleToSorting">
|
|
|
<text class="label">分选报工</text>
|
|
|
</view>
|
|
|
- <view class="business-btn uni-row" v-if="showOther" @click="handleToProcessInspection">
|
|
|
+ <view class="business-btn uni-row" v-if="showInspector" @click="handleToProcessInspection">
|
|
|
<text class="label">序检</text>
|
|
|
</view>
|
|
|
<!-- v-hasRoles="['porter']" 可通过v-Roles自定义指令进行显隐 -->
|
|
@@ -83,10 +85,12 @@
|
|
|
const confirm = ref(null) // 确认组件
|
|
|
const showTurn = ref(false)
|
|
|
const showOther = ref(false)
|
|
|
+ const showInspector = ref(false);
|
|
|
const showQuick = ref(false)
|
|
|
const showSizing = ref(false)
|
|
|
|
|
|
onLoad(() => {
|
|
|
+ console.log("gabwlhjkdb lakjwhdnkj;lawnbd;kjlawbjd", store);
|
|
|
userInfo.value = store.userInfo || {
|
|
|
nickName: ""
|
|
|
};
|
|
@@ -97,6 +101,9 @@
|
|
|
} else if (store.userInfo.roles.some(item => item.roleId == 124) && store.userInfo.roles.length == 1) {
|
|
|
showTurn.value = true;
|
|
|
showOther.value = false;
|
|
|
+ } else if (store.userInfo.roles.some(item => item.roleId == 128) && store.userInfo.roles.length == 1) {
|
|
|
+ showInspector.value = true
|
|
|
+ showOther.value = true;
|
|
|
} else {
|
|
|
showTurn.value = false;
|
|
|
showOther.value = true;
|
|
@@ -204,7 +211,7 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 分选
|
|
|
function handleToSorting() {
|
|
|
if (curSelectedDeptId.value) {
|
|
@@ -218,7 +225,7 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 工序检查
|
|
|
function handleToProcessInspection() {
|
|
|
uni.navigateTo({
|
|
@@ -264,7 +271,7 @@
|
|
|
let curDept = userDeptList.value.find(item => item.deptId === curSelectedDeptId.value)
|
|
|
store.curDeptDetails = curDept
|
|
|
if (curDept.deptName === '分选') {
|
|
|
- showSizing.value = true
|
|
|
+ showSizing.value = true
|
|
|
} else {
|
|
|
showSizing.value = false
|
|
|
}
|