|
@@ -1,13 +1,12 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div>
|
|
|
|
|
- <div class="title_box rx-bc mt6">
|
|
|
|
|
- <div class="name">物料清单({{list.length || 0}})个 </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="rx-bc"> </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="title_box rx-bc mt6">
|
|
|
|
|
+ <div class="name">物料清单({{ list.length || 0 }})个 </div>
|
|
|
|
|
|
|
|
|
|
+ <div class="rx-bc"> </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <el-table
|
|
|
|
|
|
|
+ <el-table
|
|
|
:ref="`semiProductBom`"
|
|
:ref="`semiProductBom`"
|
|
|
class="table_content"
|
|
class="table_content"
|
|
|
:max-height="600"
|
|
:max-height="600"
|
|
@@ -17,234 +16,256 @@
|
|
|
stripe
|
|
stripe
|
|
|
border
|
|
border
|
|
|
>
|
|
>
|
|
|
-
|
|
|
|
|
<el-table-column label="序号" type="index" width="55">
|
|
<el-table-column label="序号" type="index" width="55">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
{{ $index + 1 }}
|
|
{{ $index + 1 }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="编码" type="code" minWidth="110" >
|
|
|
|
|
|
|
+ <el-table-column label="编码" type="code" minWidth="110">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ row.code}}
|
|
|
|
|
|
|
+ {{ row.code }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column label="名称" type="name" minWidth="110">
|
|
|
|
|
|
|
+ <el-table-column label="名称" type="name" minWidth="110">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ row.name}} ({{row.rootCategoryLevelId == 2 ? '在制品' : row.rootCategoryLevelId == 23 ? '半成品' : row.rootCategoryLevelId == 9 ? '产品' : item.rootCategoryLevelId == 28 ? '废品' : '' }})
|
|
|
|
|
|
|
+ {{ row.name }} ({{
|
|
|
|
|
+ row.rootCategoryLevelId == 2
|
|
|
|
|
+ ? '在制品'
|
|
|
|
|
+ : row.rootCategoryLevelId == 23
|
|
|
|
|
+ ? '半成品'
|
|
|
|
|
+ : row.rootCategoryLevelId == 9
|
|
|
|
|
+ ? '产品'
|
|
|
|
|
+ : item.rootCategoryLevelId == 28
|
|
|
|
|
+ ? '废品'
|
|
|
|
|
+ : ''
|
|
|
|
|
+ }})
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column label="型号" type="modelType" >
|
|
|
|
|
|
|
+ <el-table-column label="型号" type="modelType">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ row.modelType}}
|
|
|
|
|
|
|
+ {{ row.modelType }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="规格" type="specification" >
|
|
|
|
|
|
|
+ <el-table-column label="规格" type="specification">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ row.specification}}
|
|
|
|
|
|
|
+ {{ row.specification }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="牌号" type="brandNum" >
|
|
|
|
|
|
|
+ <el-table-column label="牌号" type="brandNum">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{ row.brandNum}}
|
|
|
|
|
|
|
+ {{ row.brandNum }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="包装库存" type="brandNum" >
|
|
|
|
|
|
|
+ <el-table-column label="包装库存" type="brandNum">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
{{ row.packingCountBase }}/ {{ row.minUnit }}
|
|
{{ row.packingCountBase }}/ {{ row.minUnit }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
-
|
|
|
|
|
|
|
|
|
|
- <el-table-column v-if="singleReport == 1" :label="currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道重量'" type="weightUnit" >
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-if="singleReport == 1"
|
|
|
|
|
+ :label="currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道重量'"
|
|
|
|
|
+ type="weightUnit"
|
|
|
|
|
+ >
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
<div v-if="currentTaskDiagram.isFirstTask == 1">
|
|
<div v-if="currentTaskDiagram.isFirstTask == 1">
|
|
|
- {{ row.extInfo.weight || 0 }} {{ row.extInfo.weightUnit }}</div
|
|
|
|
|
- >
|
|
|
|
|
- <div v-if="currentTaskDiagram.isFirstTask == 0">
|
|
|
|
|
- {{ row.extInfo.newWeight || 0 }}
|
|
|
|
|
- {{ row.extInfo.weightUnit }}</div
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ {{ row.extInfo.weight || 0 }} {{ row.extInfo.weightUnit }}</div
|
|
|
|
|
+ >
|
|
|
|
|
+ <div v-if="currentTaskDiagram.isFirstTask == 0">
|
|
|
|
|
+ {{ row.extInfo.newWeight || 0 }}
|
|
|
|
|
+ {{ row.extInfo.weightUnit }}</div
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column v-if="singleReport == 1" label="刻码" type="engrave" >
|
|
|
|
|
|
|
+ <el-table-column v-if="singleReport == 1" label="刻码" type="engrave">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
{{ row.extInfo.engrave }}
|
|
{{ row.extInfo.engrave }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column v-if="singleReport == 1" label="物料代号" type="materielCode" >
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-if="singleReport == 1"
|
|
|
|
|
+ label="物料代号"
|
|
|
|
|
+ type="materielCode"
|
|
|
|
|
+ >
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
{{ row.extInfo.materielCode }}
|
|
{{ row.extInfo.materielCode }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column v-if="singleReport == 1 && deviceList.length > 0" width="140" label="设备" type="deviceId" >
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-if="singleReport == 1 && deviceList.length > 0"
|
|
|
|
|
+ width="140"
|
|
|
|
|
+ label="设备"
|
|
|
|
|
+ type="deviceId"
|
|
|
|
|
+ >
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-model="row.deviceId"
|
|
|
|
|
- placeholder="请选择"
|
|
|
|
|
- @change="(e) => selectVal(e, row, $index)"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in deviceList"
|
|
|
|
|
- :label="item.name + '-' + item.codeNumber"
|
|
|
|
|
- :value="item.id"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- >
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
|
|
+ v-model="row.deviceId"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ @change="(e) => selectVal(e, row, $index)"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in deviceList"
|
|
|
|
|
+ :label="item.name + '-' + item.codeNumber"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column v-if="singleReport == 1 && deviceList.length > 0" label="炉次号" width="90" type="heatNumber" >
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-if="singleReport == 1 && deviceList.length > 0"
|
|
|
|
|
+ label="炉次号"
|
|
|
|
|
+ width="90"
|
|
|
|
|
+ type="heatNumber"
|
|
|
|
|
+ >
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
<el-input
|
|
<el-input
|
|
|
- size="mini"
|
|
|
|
|
- v-model="row.extInfo.heatNumber"
|
|
|
|
|
- placeholder="请输入炉次号"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ v-model="row.extInfo.heatNumber"
|
|
|
|
|
+ placeholder="请输入炉次号"
|
|
|
|
|
+ />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column v-if="singleReport == 1" label="数量" width="90" type="feedQuantity" >
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-if="singleReport == 1"
|
|
|
|
|
+ label="数量"
|
|
|
|
|
+ width="90"
|
|
|
|
|
+ type="feedQuantity"
|
|
|
|
|
+ >
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- <el-input
|
|
|
|
|
- size="mini"
|
|
|
|
|
- v-model="row.feedQuantity"
|
|
|
|
|
- placeholder="数量"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-input size="mini" v-model="row.feedQuantity" placeholder="数量" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column v-if="singleReport == 1" label="位置" width="110" type="feedQuantity" >
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-if="singleReport == 1"
|
|
|
|
|
+ label="位置"
|
|
|
|
|
+ width="110"
|
|
|
|
|
+ type="feedQuantity"
|
|
|
|
|
+ >
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- {{row.extInfo.position}}
|
|
|
|
|
|
|
+ {{ row.extInfo.position }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column label="操作" fixed="right" width="60px">
|
|
|
|
|
- <template slot-scope="{ $index, row }">
|
|
|
|
|
- <el-link type="danger" @click="getDelete($index)"
|
|
|
|
|
- >删除</el-link
|
|
|
|
|
- >
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ label="操作"
|
|
|
|
|
+ fixed="right"
|
|
|
|
|
+ width="60px"
|
|
|
|
|
+ v-if="!isDetails"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="{ $index, row }">
|
|
|
|
|
+ <el-link type="danger" @click="getDelete($index)">删除</el-link>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- <script>
|
|
|
|
|
- export default {
|
|
|
|
|
- props: {
|
|
|
|
|
- list: {
|
|
|
|
|
- type: Array,
|
|
|
|
|
- default: () => []
|
|
|
|
|
- },
|
|
|
|
|
- equipmentList: {
|
|
|
|
|
- type: Array,
|
|
|
|
|
- default: () => []
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- currentTaskDiagram: {
|
|
|
|
|
- type: Object,
|
|
|
|
|
- default: () => {}
|
|
|
|
|
- },
|
|
|
|
|
- isDetails: {
|
|
|
|
|
- type: Boolean,
|
|
|
|
|
- default: false
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- singleReport: {
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+ export default {
|
|
|
|
|
+ props: {
|
|
|
|
|
+ list: {
|
|
|
|
|
+ type: Array,
|
|
|
|
|
+ default: () => []
|
|
|
|
|
+ },
|
|
|
|
|
+ equipmentList: {
|
|
|
|
|
+ type: Array,
|
|
|
|
|
+ default: () => []
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ currentTaskDiagram: {
|
|
|
|
|
+ type: Object,
|
|
|
|
|
+ default: () => {}
|
|
|
|
|
+ },
|
|
|
|
|
+ isDetails: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ singleReport: {
|
|
|
default: null
|
|
default: null
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- watch: {
|
|
|
|
|
- equipmentList: {
|
|
|
|
|
- immediate: true,
|
|
|
|
|
- deep: true,
|
|
|
|
|
- handler(newVal) {
|
|
|
|
|
- this.deviceList = newVal;
|
|
|
|
|
- this.changeHeatNumber();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ equipmentList: {
|
|
|
|
|
+ immediate: true,
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ handler(newVal) {
|
|
|
|
|
+ this.deviceList = newVal;
|
|
|
|
|
+ this.changeHeatNumber();
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ deviceList: []
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ getDelete(index) {
|
|
|
|
|
+ this.list.splice(index, 1);
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- deviceList: []
|
|
|
|
|
- };
|
|
|
|
|
|
|
+
|
|
|
|
|
+ selectVal(e, item, idx) {
|
|
|
|
|
+ let obj = this.deviceList.find((f) => f.id == e);
|
|
|
|
|
+
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.list[idx],
|
|
|
|
|
+ 'deviceName',
|
|
|
|
|
+ obj.name + '-' + obj.codeNumber
|
|
|
|
|
+ );
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.list[idx]['extInfo'],
|
|
|
|
|
+ 'heatNumber',
|
|
|
|
|
+ obj.extInfo.heatNumber
|
|
|
|
|
+ );
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- methods: {
|
|
|
|
|
- getDelete(index) {
|
|
|
|
|
- this.list.splice(index, 1);
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- selectVal(e, item, idx) {
|
|
|
|
|
- let obj = this.deviceList.find((f) => f.id == e);
|
|
|
|
|
-
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.list[idx],
|
|
|
|
|
- 'deviceName',
|
|
|
|
|
- obj.name + '-' + obj.codeNumber
|
|
|
|
|
- );
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.list[idx]['extInfo'],
|
|
|
|
|
- 'heatNumber',
|
|
|
|
|
- obj.extInfo.heatNumber
|
|
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- changeHeatNumber() {
|
|
|
|
|
- console.log(this.deviceList);
|
|
|
|
|
-
|
|
|
|
|
- this.deviceList.forEach((f) => {
|
|
|
|
|
- this.list.forEach((o) => {
|
|
|
|
|
- if (
|
|
|
|
|
- o.deviceId &&
|
|
|
|
|
- f.id == o.deviceId &&
|
|
|
|
|
- this.deviceList.length > 1
|
|
|
|
|
- ) {
|
|
|
|
|
- o.extInfo.heatNumber = f.extInfo.heatNumber;
|
|
|
|
|
- o['workstationName'] = f.workstationName;
|
|
|
|
|
- } else if (this.deviceList.length == 1) {
|
|
|
|
|
- o['deviceName'] = this.deviceList[0].name;
|
|
|
|
|
- o['deviceId'] = this.deviceList[0].id;
|
|
|
|
|
- o['workstationName'] = this.deviceList[0].workstationName;
|
|
|
|
|
- o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
|
|
|
|
|
-
|
|
|
|
|
- this.$forceUpdate();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
|
|
+ changeHeatNumber() {
|
|
|
|
|
+ console.log(this.deviceList);
|
|
|
|
|
+
|
|
|
|
|
+ this.deviceList.forEach((f) => {
|
|
|
|
|
+ this.list.forEach((o) => {
|
|
|
|
|
+ if (
|
|
|
|
|
+ o.deviceId &&
|
|
|
|
|
+ f.id == o.deviceId &&
|
|
|
|
|
+ this.deviceList.length > 1
|
|
|
|
|
+ ) {
|
|
|
|
|
+ o.extInfo.heatNumber = f.extInfo.heatNumber;
|
|
|
|
|
+ o['workstationName'] = f.workstationName;
|
|
|
|
|
+ } else if (this.deviceList.length == 1) {
|
|
|
|
|
+ o['deviceName'] = this.deviceList[0].name;
|
|
|
|
|
+ o['deviceId'] = this.deviceList[0].id;
|
|
|
|
|
+ o['workstationName'] = this.deviceList[0].workstationName;
|
|
|
|
|
+ o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
|
|
|
|
|
+
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- };
|
|
|
|
|
- </script>
|
|
|
|
|
-
|
|
|
|
|
- <style lang="scss" scoped>
|
|
|
|
|
- .mb4 {
|
|
|
|
|
- margin-bottom: 4px;
|
|
|
|
|
}
|
|
}
|
|
|
- </style>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+ .mb4 {
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|