|
@@ -15,6 +15,8 @@
|
|
|
<div class="rx-sc" v-if="!isDetails">
|
|
<div class="rx-sc" v-if="!isDetails">
|
|
|
<div class="c_title">领料记录 </div>
|
|
<div class="c_title">领料记录 </div>
|
|
|
<el-button type="primary" size="mini" style="margin: 0 5px" @click="handleAdd">新增</el-button>
|
|
<el-button type="primary" size="mini" style="margin: 0 5px" @click="handleAdd">新增</el-button>
|
|
|
|
|
+ <!-- <el-button type="primary" size="mini" @click="openOutsourcingPicking()">委外领料</el-button> -->
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -42,20 +44,29 @@
|
|
|
v-if="detailedShow"
|
|
v-if="detailedShow"
|
|
|
:detailedObj="detailedObj"
|
|
:detailedObj="detailedObj"
|
|
|
></detailed>
|
|
></detailed>
|
|
|
|
|
+
|
|
|
|
|
+ <outsourcingPickingList v-if="outsourcingPickingShow" ref="outsourcingPickingListRef" @closeOutsourcingPicking="closeOutsourcingPicking"></outsourcingPickingList>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { pickDetails } from '@/api/produce/picking';
|
|
import { pickDetails } from '@/api/produce/picking';
|
|
|
import detailed from './detailed.vue';
|
|
import detailed from './detailed.vue';
|
|
|
|
|
+ import outsourcingPickingList from './outsourcingPickingList.vue';
|
|
|
|
|
+ import { getTaskInstanceById } from '@/api/produce/index';
|
|
|
|
|
+
|
|
|
import { boolean } from 'mathjs';
|
|
import { boolean } from 'mathjs';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'picking-details',
|
|
name: 'picking-details',
|
|
|
- components: { detailed },
|
|
|
|
|
|
|
+ components: { detailed,outsourcingPickingList },
|
|
|
props:{
|
|
props:{
|
|
|
isDetails:{
|
|
isDetails:{
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false
|
|
default: false
|
|
|
|
|
+ },
|
|
|
|
|
+ workTaskId:{
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
@@ -65,6 +76,7 @@ import { boolean } from 'mathjs';
|
|
|
detailedObj: null,
|
|
detailedObj: null,
|
|
|
|
|
|
|
|
statusList: ['未领料', '领料中', '已出库', '已驳回'],
|
|
statusList: ['未领料', '领料中', '已出库', '已驳回'],
|
|
|
|
|
+ outsourcingPickingShow:false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -127,6 +139,12 @@ import { boolean } from 'mathjs';
|
|
|
slot: 'action'
|
|
slot: 'action'
|
|
|
}
|
|
}
|
|
|
];
|
|
];
|
|
|
|
|
+ },
|
|
|
|
|
+ taskObj() {
|
|
|
|
|
+ return this.$store.state.user.taskObj;
|
|
|
|
|
+ },
|
|
|
|
|
+ clientEnvironmentId() {
|
|
|
|
|
+ return this.$store.state.user.info.clientEnvironmentId;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -156,7 +174,37 @@ import { boolean } from 'mathjs';
|
|
|
|
|
|
|
|
detailedClose() {
|
|
detailedClose() {
|
|
|
this.detailedShow = false;
|
|
this.detailedShow = false;
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ openOutsourcingPicking(){
|
|
|
|
|
+ console.log('this.workListIds',this.workListIds)
|
|
|
|
|
+ if(this.workListIds.length == 1){
|
|
|
|
|
+ this.getTaskInstanceByIdFn()
|
|
|
|
|
+ // this.outsourcingPickingShow=true
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$message.warning('只能选择一条工单进行委外领料');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ closeOutsourcingPicking(){
|
|
|
|
|
+ this.outsourcingPickingShow=false
|
|
|
|
|
+ },
|
|
|
|
|
+ //获取工单列表
|
|
|
|
|
+ getTaskInstanceByIdFn() {
|
|
|
|
|
+ getTaskInstanceById(this.workListIds[0]).then((res) => {
|
|
|
|
|
+ // console.log(res,this.workTaskId, 'res2345678');
|
|
|
|
|
+ let { data } = res;
|
|
|
|
|
+ if (data.length) {
|
|
|
|
|
+ let arr = data.filter(item => item.taskId == this.workTaskId)
|
|
|
|
|
+ console.log(arr,this.workTaskId, 'res2345678');
|
|
|
|
|
+ if(arr[0].existOutsource){
|
|
|
|
|
+ this.outsourcingPickingShow=true
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$message.warning('当前工序不能委外领料');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
created() {}
|
|
created() {}
|
|
|
};
|
|
};
|