|
@@ -10,7 +10,7 @@
|
|
|
<div class="distribution_con contentRoll">
|
|
|
<div class="distribution_box" v-for="item,index in distributionList" :key="index">
|
|
|
<div class="distribution_ItemBom">
|
|
|
- <van-checkbox v-if="!beDeptList" v-model="item.prodProcedure.isSelected" @click="itemChecked" shape="square">
|
|
|
+ <van-checkbox :disabled="item.checkboxDisabled" v-model="item.prodProcedure.isSelected" @click="itemChecked" shape="square">
|
|
|
</van-checkbox>
|
|
|
<div class="PlanItem">
|
|
|
<span>{{ item.prodProcedure.name }}</span>
|
|
@@ -91,6 +91,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ user:JSON.parse(localStorage.getItem("userInfo")),
|
|
|
isAllChecked: false,
|
|
|
activeNames: ['1'],
|
|
|
beDeptList: JSON.parse(localStorage.getItem('beDeptList')), // 是否为工长
|
|
@@ -301,7 +302,21 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.code == "ok") {
|
|
|
res.data.forEach(item => { item.flg = false })
|
|
|
- this.distributionList = res.data
|
|
|
+ let arr = res.data
|
|
|
+ // checkboxDisabled
|
|
|
+ for(var i in arr) {
|
|
|
+ arr[i].checkboxDisabled = true
|
|
|
+ if(arr[i].prodProcedureTeamList.length > 0) {
|
|
|
+ let arrList = arr[i].prodProcedureTeamList.filter(item => item.status == 0 && item.userId==this.user.id)
|
|
|
+ console.log(arrList, 'arrList')
|
|
|
+ if(arrList.length > 0) {
|
|
|
+ arr[i].checkboxDisabled = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // this.distributionList = res.data
|
|
|
+ console.log(arr,'')
|
|
|
+ this.distributionList = arr
|
|
|
} else {
|
|
|
this.$toast.clear();
|
|
|
this.$toast.fail(res.msg);
|