|
@@ -1,13 +1,46 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- 投料
|
|
|
|
|
- {{ workListIds }}
|
|
|
|
|
|
|
+ <div class="top_fixed">
|
|
|
|
|
+ <el-button type="primary" size="mini">一键投料</el-button>
|
|
|
|
|
+ <el-button type="primary" size="mini">清空缓存</el-button>
|
|
|
|
|
+ <el-button type="primary" size="mini">缓存</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="feed_box">
|
|
|
|
|
+ <div v-for="(item, index) in List" :key="index" class="card_box">
|
|
|
|
|
+ <div class="title_box rx-bc">
|
|
|
|
|
+ <div class="name">工单信息 </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="rx-bc">
|
|
|
|
|
+ <el-button type="text" size="mini">出库单</el-button>
|
|
|
|
|
+ <el-button type="text" size="mini">添加物料</el-button>
|
|
|
|
|
+ <el-button type="text" size="mini">清空缓存</el-button>
|
|
|
|
|
+ <el-button type="text" size="mini">缓存</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <workOrderBom :item="item"></workOrderBom>
|
|
|
|
|
+
|
|
|
|
|
+ <paramBom
|
|
|
|
|
+ v-if="item.paramDetailList.length != 0"
|
|
|
|
|
+ :list="item.paramDetailList"
|
|
|
|
|
+ ></paramBom>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import { workorderList } from '@/api/produce/workOrder';
|
|
|
|
|
+
|
|
|
|
|
+ import workOrderBom from './components/workOrderBom.vue';
|
|
|
|
|
+ import paramBom from './components/paramBom.vue';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'feeding',
|
|
name: 'feeding',
|
|
|
|
|
+ components: {
|
|
|
|
|
+ workOrderBom,
|
|
|
|
|
+ paramBom
|
|
|
|
|
+ },
|
|
|
props: {
|
|
props: {
|
|
|
workListIds: {
|
|
workListIds: {
|
|
|
type: Array,
|
|
type: Array,
|
|
@@ -16,8 +49,173 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ taskObj() {
|
|
|
|
|
+ return this.$store.state.user.taskObj;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ workListIds: {
|
|
|
|
|
+ handler(val) {
|
|
|
|
|
+ this.getList(val);
|
|
|
|
|
+ },
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ immediate: true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
- return {};
|
|
|
|
|
|
|
+ return {
|
|
|
|
|
+ List: []
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ getList(ids) {
|
|
|
|
|
+ let param = {
|
|
|
|
|
+ ids: ids,
|
|
|
|
|
+ taskId: this.taskObj.id
|
|
|
|
|
+ };
|
|
|
|
|
+ workorderList(param).then((res) => {
|
|
|
|
|
+ this.List = res.map((m) => {
|
|
|
|
|
+ m.workOrderId = m.id;
|
|
|
|
|
+ m.paramDetailList = [
|
|
|
|
|
+ {
|
|
|
|
|
+ id: '1787807095306399746',
|
|
|
|
|
+ parentId: '1747889385528365058',
|
|
|
|
|
+ sort: '',
|
|
|
|
|
+ code: 'GYCS20240507255',
|
|
|
|
|
+ name: '重量',
|
|
|
|
|
+ versions: '',
|
|
|
|
|
+ status: '',
|
|
|
|
|
+ description: '',
|
|
|
|
|
+ defaultValue: '20.14',
|
|
|
|
|
+ unitName: '摄氏度',
|
|
|
|
|
+ minValue: '',
|
|
|
|
|
+ maxValue: '',
|
|
|
|
|
+ textType: '1',
|
|
|
|
|
+ categoryType: 0,
|
|
|
|
|
+ notNull: 0,
|
|
|
|
|
+ remark: '',
|
|
|
|
|
+ workCenterId: null,
|
|
|
|
|
+ workCenterName: '',
|
|
|
|
|
+ controlName: '',
|
|
|
|
|
+ produceList: [],
|
|
|
|
|
+ qualityParam: [],
|
|
|
|
|
+ beatParam: null,
|
|
|
|
|
+ normalHours: null,
|
|
|
|
|
+ materialQuota: [],
|
|
|
|
|
+ resource: [],
|
|
|
|
|
+ replaceMaterial: []
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ m.instanceList = []; // 物料
|
|
|
|
|
+ m.equipmentList = []; // 设备
|
|
|
|
|
+ m.modelList = []; // 模具
|
|
|
|
|
+ m.aridRegionList = []; // 干燥区
|
|
|
|
|
+ m.packingList = []; // 包装
|
|
|
|
|
+ m.palletList = []; // 舟皿
|
|
|
|
|
+ m.revolvingDiskList = []; // 周转盘
|
|
|
|
|
+ m.semiProductList = []; //半成品
|
|
|
|
|
+
|
|
|
|
|
+ if (m.pickOutInList.length > 0) {
|
|
|
|
|
+ m.pickOutInList.forEach((f) => {
|
|
|
|
|
+ if (f.rootCategoryLevelId == 1) {
|
|
|
|
|
+ m.instanceList.push(f);
|
|
|
|
|
+ } else if (f.rootCategoryLevelId == 4) {
|
|
|
|
|
+ m.modelList.push(f);
|
|
|
|
|
+ } else if (f.rootCategoryLevelId == 5) {
|
|
|
|
|
+ m.modelList.push(f);
|
|
|
|
|
+ } else if (f.rootCategoryLevelId == 11) {
|
|
|
|
|
+ m.aridRegionList.push(f);
|
|
|
|
|
+ } else if (f.rootCategoryLevelId == 13) {
|
|
|
|
|
+ m.packingList.push(f);
|
|
|
|
|
+ } else if (f.rootCategoryLevelId == 8) {
|
|
|
|
|
+ m.palletList.push(f);
|
|
|
|
|
+ } else if (f.rootCategoryLevelId == 26) {
|
|
|
|
|
+ m.revolvingDiskList.push(f);
|
|
|
|
|
+ } else if (
|
|
|
|
|
+ [23, 2, 9, 28].includes(Number(f.rootCategoryLevelId))
|
|
|
|
|
+ ) {
|
|
|
|
|
+ m.semiProductList.push(f);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 处理字段
|
|
|
|
|
+ m.quality == '' ? (m.quality = {}) : '';
|
|
|
|
|
+
|
|
|
|
|
+ if (!Object.prototype.hasOwnProperty.call(m, 'product')) {
|
|
|
|
|
+ m.product = '{}';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ delete m.id;
|
|
|
|
|
+ if (this.taskObj.id) {
|
|
|
|
|
+ m.taskId = this.taskObj.id;
|
|
|
|
|
+ m.taskName = this.taskObj.name;
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...m
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
|
+ .top_fixed {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .feed_box {
|
|
|
|
|
+ margin-top: 6px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: calc(100vh - 70px - 50px - 80px - 60px);
|
|
|
|
|
+ overflow-y: scroll;
|
|
|
|
|
+ overflow-x: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .card_box {
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ padding: 8px;
|
|
|
|
|
+ border-radius: 2px;
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss">
|
|
|
|
|
+.mt6{
|
|
|
|
|
+ margin-top: 6px;
|
|
|
|
|
+}
|
|
|
|
|
+ .title_box {
|
|
|
|
|
+ .name {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-style: normal;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #157a2c;
|
|
|
|
|
+ padding-left: 5px;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ &:before {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ content: '';
|
|
|
|
|
+ left: 0px;
|
|
|
|
|
+ top: 0px;
|
|
|
|
|
+ bottom: 0px;
|
|
|
|
|
+ width: 2px;
|
|
|
|
|
+ height: 14px;
|
|
|
|
|
+ background: #157a2c;
|
|
|
|
|
+ margin: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|