|
|
@@ -6,7 +6,201 @@
|
|
|
<div class="rx-bc"> </div>
|
|
|
</div>
|
|
|
|
|
|
+ <el-table
|
|
|
+ ref="oneJobQualityBom"
|
|
|
+ class="table_content"
|
|
|
+ :max-height="600"
|
|
|
+ :data="list"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ style="width: 100%"
|
|
|
+ stripe
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column label="序号" type="index" width="55">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ $index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
+ <el-table-column label="次数" type="index" width="80">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <div
|
|
|
+ class="tag_box"
|
|
|
+ v-if="
|
|
|
+ Object.prototype.hasOwnProperty.call(row, 'extInfo') &&
|
|
|
+ Object.prototype.hasOwnProperty.call(
|
|
|
+ row.extInfo,
|
|
|
+ 'productionTimes'
|
|
|
+ ) &&
|
|
|
+ Object.prototype.hasOwnProperty.call(
|
|
|
+ row.extInfo.productionTimes,
|
|
|
+ item.currentTaskDiagram.taskId
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{ row.extInfo.productionTimes[item.currentTaskDiagram.taskId] }}
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tag_box" v-if="row.isCache">缓</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="编码" type="code" minWidth="110">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.code }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="名称" type="name" minWidth="110">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.name }}
|
|
|
+
|
|
|
+ ({{
|
|
|
+ row.rootCategoryLevelId == 2
|
|
|
+ ? '在制品'
|
|
|
+ : row.rootCategoryLevelId == 23
|
|
|
+ ? '半成品'
|
|
|
+ : row.rootCategoryLevelId == 9
|
|
|
+ ? '产品'
|
|
|
+ : row.rootCategoryLevelId == 28
|
|
|
+ ? '废品'
|
|
|
+ : ''
|
|
|
+ }})
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="型号" type="modelType">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.modelType }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="规格" type="specification">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.specification }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="牌号" type="brandNum">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.brandNum }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="包装库存" type="brandNum">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.packingCountBase }}/ {{ row.minUnit }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ v-if="singleReport == 1"
|
|
|
+ :label="
|
|
|
+ item.currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道重量'
|
|
|
+ "
|
|
|
+ type="weightUnit"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <div v-if="item.currentTaskDiagram.isFirstTask == 1">
|
|
|
+ {{ row.extInfo.weight || 0 }} {{ row.extInfo.weightUnit }}</div
|
|
|
+ >
|
|
|
+ <div v-if="item.currentTaskDiagram.isFirstTask == 0">
|
|
|
+ {{ row.extInfo.newWeight || 0 }}
|
|
|
+ {{ row.extInfo.weightUnit }}</div
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column v-if="singleReport == 1" label="刻码" type="engrave">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.extInfo.engrave }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ v-if="singleReport == 1"
|
|
|
+ label="物料代号"
|
|
|
+ type="materielCode"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.extInfo.materielCode }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ v-if="singleReport == 1 && deviceList.length > 0"
|
|
|
+ width="140"
|
|
|
+ label="设备"
|
|
|
+ type="deviceId"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <el-select
|
|
|
+ class="content_num"
|
|
|
+ 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>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ v-if="singleReport == 1 && deviceList.length > 0"
|
|
|
+ label="炉次号"
|
|
|
+ width="90"
|
|
|
+ type="heatNumber"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <el-input
|
|
|
+ size="mini"
|
|
|
+ class="content_num"
|
|
|
+ v-model="row.extInfo.heatNumber"
|
|
|
+ placeholder="请输入炉次号"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ v-if="singleReport == 1"
|
|
|
+ label="数量"
|
|
|
+ width="90"
|
|
|
+ type="feedQuantity"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <el-input
|
|
|
+ size="mini"
|
|
|
+ class="content_num"
|
|
|
+ v-model="row.feedQuantity"
|
|
|
+ placeholder="数量"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ v-if="singleReport == 1"
|
|
|
+ label="位置"
|
|
|
+ width="110"
|
|
|
+ type="feedQuantity"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ {{ row.extInfo.position }}
|
|
|
+ </template>
|
|
|
+ </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>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -24,24 +218,66 @@
|
|
|
default: () => []
|
|
|
},
|
|
|
|
|
|
- currentTaskDiagram: {
|
|
|
+ item: {
|
|
|
type: Object,
|
|
|
default: () => {}
|
|
|
},
|
|
|
isDetails: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
+ },
|
|
|
+ singleReport: {
|
|
|
+ default: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ watch: {
|
|
|
+ equipmentList: {
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
+ handler(newVal) {
|
|
|
+ this.deviceList = newVal;
|
|
|
+ this.changeHeatNumber();
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ deviceList: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ changeHeatNumber() {
|
|
|
+ this.deviceList.forEach((f) => {
|
|
|
+ this.list.forEach((o) => {
|
|
|
+ if (
|
|
|
+ o.deviceId &&
|
|
|
+ f.instanceId == o.deviceId &&
|
|
|
+ this.deviceList.length > 1
|
|
|
+ ) {
|
|
|
+ o.extInfo.heatNumber = f.extInfo.heatNumber;
|
|
|
+ this.$forceUpdate();
|
|
|
+ } else if (this.deviceList.length == 1) {
|
|
|
+ o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
|
|
|
+ this.$forceUpdate();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .materialBor {
|
|
|
- border: 1rpx solid #157a2c;
|
|
|
+ .tag_box {
|
|
|
+ display: inline-block;
|
|
|
+ padding: 1px 6px;
|
|
|
+ margin-right: 6px;
|
|
|
+ background: #e6a23c;
|
|
|
+ font-size: 11px;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 2px;
|
|
|
}
|
|
|
</style>
|