|
@@ -10,7 +10,7 @@
|
|
<div class="distribution_con contentRoll">
|
|
<div class="distribution_con contentRoll">
|
|
<div class="distribution_box" v-for="item,index in distributionList" :key="index">
|
|
<div class="distribution_box" v-for="item,index in distributionList" :key="index">
|
|
<div class="distribution_ItemBom">
|
|
<div class="distribution_ItemBom">
|
|
- <van-checkbox v-model="item.prodProcedure.isSelected" @click="itemChecked" shape="square">
|
|
|
|
|
|
+ <van-checkbox v-if="!beDeptList" v-model="item.prodProcedure.isSelected" @click="itemChecked" shape="square">
|
|
</van-checkbox>
|
|
</van-checkbox>
|
|
<div class="PlanItem">
|
|
<div class="PlanItem">
|
|
<span>{{ item.prodProcedure.name }}</span>
|
|
<span>{{ item.prodProcedure.name }}</span>
|
|
@@ -40,7 +40,7 @@
|
|
<span class="" v-if="item.teamNames">{{ item.teamNames }}</span>
|
|
<span class="" v-if="item.teamNames">{{ item.teamNames }}</span>
|
|
<span style="color: #1989fa;" v-if="!item.teamNames && beDeptList" @click="distributionProp(item,index,'add')">分配</span>
|
|
<span style="color: #1989fa;" v-if="!item.teamNames && beDeptList" @click="distributionProp(item,index,'add')">分配</span>
|
|
<div>
|
|
<div>
|
|
- <span style="color: #1989fa;" v-if="item.prodProcedureTeamList" @click="workShowHide(index)">{{ item.flg ? paiArr[0] : paiArr[1] }}</span>
|
|
|
|
|
|
+ <span style="color: #1989fa;" v-if="item.prodProcedureTeamList.length>0" @click="workShowHide(index)">{{ item.flg ? paiArr[0] : paiArr[1] }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="width: 100%">
|
|
<div style="width: 100%">
|
|
@@ -68,13 +68,14 @@
|
|
<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"></ChooseSomeone>
|
|
</van-popup>
|
|
</van-popup>
|
|
</div>
|
|
</div>
|
|
-<div class="formBatch">
|
|
|
|
|
|
+ <div class="formBatch" v-if="!beDeptList">
|
|
<van-checkbox v-model="isAllChecked" :disabled="distributionList.length == 0" @click="allChecked" shape="square" style="padding-left:3vw"></van-checkbox>
|
|
<van-checkbox v-model="isAllChecked" :disabled="distributionList.length == 0" @click="allChecked" shape="square" style="padding-left:3vw"></van-checkbox>
|
|
<div style="padding:1vh 2vw">
|
|
<div style="padding:1vh 2vw">
|
|
<van-button @click="batchReceive()" :disabled="!isCanAgree || distributionList.length == 0" type="info" size="small">批量接收</van-button>
|
|
<van-button @click="batchReceive()" :disabled="!isCanAgree || distributionList.length == 0" type="info" size="small">批量接收</van-button>
|
|
|
|
+ <van-button @click="cancellationReceiveBatch()" :disabled="!isCanAgree || distributionList.length == 0" 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> -->
|
|
<!-- <van-button @click="batchAgree(false)" :disabled="!isCanAgree || distributionList.length == 0" type="danger" size="small" style="margin-left:2vw">批量驳回</van-button> -->
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -139,6 +140,38 @@ export default {
|
|
this.getPeople()
|
|
this.getPeople()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ cancellationReceiveBatch(){
|
|
|
|
+ let ids = ''
|
|
|
|
+ console.log(this.user)
|
|
|
|
+ let resArr= this.distributionList.map(item=>{
|
|
|
|
+ if(item.prodProcedure.isSelected){
|
|
|
|
+ if(item.prodProcedureTeamList.filter(i=>i.userId==this.user.id).length>0){
|
|
|
|
+ return item.prodProcedureTeamList.filter(i=>i.userId==this.user.id)[0].planProcedureId
|
|
|
|
+ }else{
|
|
|
|
+ return "-1"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ console.log('res===============',resArr)
|
|
|
|
+ ids = resArr.join(",").trim()
|
|
|
|
+ if(resArr.length > 0){
|
|
|
|
+ this.$axios.post(
|
|
|
|
+ "/plan/cancellationReceiveBatch",
|
|
|
|
+ {
|
|
|
|
+ ids:ids
|
|
|
|
+ }
|
|
|
|
+ ).then(res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.isAllChecked=false
|
|
|
|
+ this.isCanAgree=false
|
|
|
|
+ this.getDistributionList()
|
|
|
|
+ } else {
|
|
|
|
+ this.$toast.clear();
|
|
|
|
+ this.$toast.fail(res.msg);
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => { this.$toast.clear(); })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 批量操作
|
|
// 批量操作
|
|
allChecked(){
|
|
allChecked(){
|
|
if(this.isAllChecked){
|
|
if(this.isAllChecked){
|
|
@@ -176,13 +209,13 @@ export default {
|
|
if(item.prodProcedureTeamList.filter(i=>i.userId==this.user.id).length>0){
|
|
if(item.prodProcedureTeamList.filter(i=>i.userId==this.user.id).length>0){
|
|
return item.prodProcedureTeamList.filter(i=>i.userId==this.user.id)[0].id
|
|
return item.prodProcedureTeamList.filter(i=>i.userId==this.user.id)[0].id
|
|
}else{
|
|
}else{
|
|
- return ""
|
|
|
|
|
|
+ return "-1"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
console.log('res===============',resArr)
|
|
console.log('res===============',resArr)
|
|
|
|
+ ids = resArr.join(",").trim()
|
|
if(resArr.length > 0){
|
|
if(resArr.length > 0){
|
|
- ids = resArr.join(",").trim()
|
|
|
|
this.$axios.post(
|
|
this.$axios.post(
|
|
"/plan/receivePlan",
|
|
"/plan/receivePlan",
|
|
{
|
|
{
|