|
@@ -21,8 +21,13 @@
|
|
|
<div class="distribution_box" v-for="item,index in distributionList" :key="index">
|
|
|
<div class="distribution_ItemBom">
|
|
|
<!-- <van-checkbox v-if="todayAndTomorrow" :disabled="item.checkboxDisabled || (item.teamNames&&item.teamNames.indexOf(user.name) == -1)" v-model="item.prodProcedure.isSelected" @click="itemChecked" shape="square"> -->
|
|
|
- <van-checkbox v-if="todayAndTomorrow" v-model="item.prodProcedure.isSelected" @click="itemChecked" shape="square">
|
|
|
- </van-checkbox>
|
|
|
+ <template v-if="user.workTypeId == 1">
|
|
|
+ <van-checkbox v-if="todayAndTomorrow" v-model="item.prodProcedure.isSelected" @click="itemChecked" shape="square">
|
|
|
+ </van-checkbox>
|
|
|
+ </template>
|
|
|
+ <template v-if="user.workTypeId != 1">
|
|
|
+ <van-checkbox v-if="todayAndTomorrow" :disabled="item.checkboxDisabled || (item.teamNames&&item.teamNames.indexOf(user.name) == -1)" v-model="item.prodProcedure.isSelected" @click="itemChecked" shape="square"></van-checkbox>
|
|
|
+ </template>
|
|
|
<div class="PlanItem">
|
|
|
<span>{{item.prodProcedure.seq}}. {{ item.prodProcedure.name }}</span>
|
|
|
</div>
|
|
@@ -77,15 +82,18 @@
|
|
|
</div>
|
|
|
<!-- 弹出层选人 -->
|
|
|
<van-popup v-model="popupShow" round position="bottom" :style="{ height: '80%',background: '#F4F4F4' }" >
|
|
|
- <ChooseSomeone ref="ChooseSomeone" :groupView="this.groupViewNum" :type="this.peopleType" :groupViewBack="true" :peopleList="peopleList" @ChooseSomeoneChanhe="chooseSomeoneChanhe" :peopleListId="peopleListId" :key="ChooseSomeoneKey"></ChooseSomeone>
|
|
|
+ <ChooseSomeone ref="ChooseSomeone" :groupView="this.groupViewNum" :type="this.peopleType" :groupViewBack="true" :peopleList="peopleList" @ChooseSomeoneChanhe="chooseSomeoneChanhe" :peopleListId="peopleListId" :key="ChooseSomeoneKey" :deptId="deptId"></ChooseSomeone>
|
|
|
</van-popup>
|
|
|
</div>
|
|
|
<div class="formBatch" v-if="todayAndTomorrow">
|
|
|
<van-checkbox v-model="isAllChecked" :disabled="distributionList.length == 0" @click="allChecked" shape="square" style="padding-left:3vw"></van-checkbox>
|
|
|
<div style="padding:1vh 2vw">
|
|
|
- <van-button style="margin-right: 10px;" @click="cancelReassignment()" :disabled="doYouWantToCancelTheReassignment" type="info" size="small">取消改派</van-button>
|
|
|
- <van-button style="margin-right: 10px;" @click="showReassignment()" :disabled="isItPossibleToReassign" type="info" size="small">改派</van-button>
|
|
|
- <van-button style="margin-right: 10px;" @click="batchReceive()" :disabled="canBatchOperationsBePerformed" type="info" size="small">批量接收</van-button>
|
|
|
+ <template v-if="user.workTypeId == 1">
|
|
|
+ <van-button style="margin-right: 10px;" @click="cancelReassignment()" :disabled="doYouWantToCancelTheReassignment" type="info" size="small">取消改派</van-button>
|
|
|
+ <van-button style="margin-right: 10px;" @click="showReassignment()" :disabled="isItPossibleToReassign" type="info" size="small">改派</van-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <van-button style="margin-right: 10px;" @click="batchReceive()" :disabled="canBatchOperationsBePerformed" type="info" size="small">批量接收</van-button>
|
|
|
<van-button @click="cancellationReceiveBatch()" :disabled="canBatchOperationsBePerformed" type="info" size="small">批量取消接收</van-button>
|
|
|
|
|
|
<!-- <van-button @click="batchAgree(false)" :disabled="!isCanAgree || distributionList.length == 0" type="danger" size="small" style="margin-left:2vw">批量驳回</van-button> -->
|
|
@@ -145,7 +153,9 @@ export default {
|
|
|
{ value: 1, text: '其他工位' },
|
|
|
{ value: 2, text: '全部' },
|
|
|
],
|
|
|
- dropDownSelectionValue: 0
|
|
|
+ dropDownSelectionValue: 0,
|
|
|
+
|
|
|
+ deptId: '',
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -212,8 +222,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
cancelReassignment() {
|
|
|
- const str = (this.distributionList || []).map(item => item.prodProcedure && item.prodProcedure.name).join(',')
|
|
|
- const ids = (this.distributionList || []).map(item => item.id).join(',')
|
|
|
+ const selectedData = this.distributionList.filter(item => item.prodProcedure && item.prodProcedure.isSelected)
|
|
|
+ const str = (selectedData || []).map(item => item.prodProcedure && item.prodProcedure.name).join(',')
|
|
|
+ const ids = (selectedData || []).map(item => item.id).join(',')
|
|
|
Dialog.confirm({
|
|
|
title: '取消改派',
|
|
|
message: `确定取消【${str}】改派吗?`,
|
|
@@ -443,6 +454,13 @@ export default {
|
|
|
)
|
|
|
},
|
|
|
distributionProp(item, index, str, itemObj) {
|
|
|
+ console.log(item, '<==== 123321')
|
|
|
+ const { isTransfer = 0, stationId } = item
|
|
|
+ if(isTransfer == 1 && stationId) {
|
|
|
+ this.deptId = stationId
|
|
|
+ } else {
|
|
|
+ this.deptId = ''
|
|
|
+ }
|
|
|
this.ChooseSomeoneKey++
|
|
|
if(str=='add'){
|
|
|
this.peopleType=0;
|