|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- title="新建处置单"
|
|
|
|
|
|
|
+ title="新建"
|
|
|
:visible.sync="visible"
|
|
:visible.sync="visible"
|
|
|
:before-close="handleClose"
|
|
:before-close="handleClose"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
@@ -12,13 +12,13 @@
|
|
|
<el-form :model="productForm" ref="productForm">
|
|
<el-form :model="productForm" ref="productForm">
|
|
|
<el-row :gutter="24">
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="处置单号" prop="code" label-width="90px">
|
|
|
|
|
|
|
+ <el-form-item label="回收单号" prop="code" label-width="90px">
|
|
|
<el-input v-model="productForm.code" disabled=""></el-input>
|
|
<el-input v-model="productForm.code" disabled=""></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="处置单名称" prop="name" label-width="90px">
|
|
|
|
|
|
|
+ <el-form-item label="回收单名称" prop="name" label-width="90px">
|
|
|
<el-input v-model="productForm.name"></el-input>
|
|
<el-input v-model="productForm.name"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -49,28 +49,85 @@
|
|
|
<div class="name">物料名称</div>
|
|
<div class="name">物料名称</div>
|
|
|
<div class="content">{{ item.name }}</div>
|
|
<div class="content">{{ item.name }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col col2">
|
|
|
|
|
- <div class="name">计量单位</div>
|
|
|
|
|
- <div class="content">{{ item.measuringUnit }}</div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="name">型号</div>
|
|
|
|
|
+ <div class="content">{{ item.modelType }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="name">规格</div>
|
|
|
|
|
+ <div class="content">{{ item.specification }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="name">牌号</div>
|
|
|
|
|
+ <div class="content">{{ item.brandNum }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col col3">
|
|
|
|
|
- <div class="name">处置重量</div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="name">数量</div>
|
|
|
<div class="content content_num">
|
|
<div class="content content_num">
|
|
|
<el-input v-model="productWeight"></el-input>
|
|
<el-input v-model="productWeight"></el-input>
|
|
|
- <DictSelection
|
|
|
|
|
- dictName="计量单位"
|
|
|
|
|
- style="width: 160px; margin-left: 10px"
|
|
|
|
|
- v-model="productUnit"
|
|
|
|
|
- ></DictSelection>
|
|
|
|
|
|
|
+ <div style="margin-left: 8px"> {{ item.measuringUnit }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col pd6">
|
|
|
|
|
- <el-button type="primary" size="mini" @click="handWorkOrder()"
|
|
|
|
|
- >新增</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div style="margin: 6px">
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="handWorkOrder()"
|
|
|
|
|
+ >新增</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div v-if="item.byProdList && item.byProdList.length > 0">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :ref="`form222${idx}`"
|
|
|
|
|
+ class="table_content"
|
|
|
|
|
+ :max-height="300"
|
|
|
|
|
+ :data="item.byProdList"
|
|
|
|
|
+ tooltip-effect="dark"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ stripe
|
|
|
|
|
+ border
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column label="序号" type="index" width="60">
|
|
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
|
|
+ {{ $index }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column label="编码" prop="categoryCode">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="名称" prop="categoryName">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="型号" prop="modelType"> </el-table-column>
|
|
|
|
|
+ <el-table-column label="规格" prop="specification">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column label="工序" prop="taskName"> </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column label="合格品数量" prop="formedNum">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="不合格品数量" prop="notFormedNum">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column label="回收" prop="quantity" width="160px">
|
|
|
|
|
+ <el-input v-model="row.quantity" disabled size="mini">
|
|
|
|
|
+ <template slot="append">{{ row.unit }}</template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column label="操作" fixed="right" width="100px">
|
|
|
|
|
+ <template slot-scope="{ $index, row }">
|
|
|
|
|
+ <el-link type="danger" @click="removeItem(idx, $index)"
|
|
|
|
|
+ >删除</el-link
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -92,6 +149,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { getCode } from '@/api/produce/workOrder';
|
|
import { getCode } from '@/api/produce/workOrder';
|
|
|
|
|
+ import { listDisposeBy } from '@/api/byProduct/index';
|
|
|
import ProductModal from './ProductModal.vue';
|
|
import ProductModal from './ProductModal.vue';
|
|
|
import produceOrder from '@/views/pick/pickApply/components/produceOrder.vue';
|
|
import produceOrder from '@/views/pick/pickApply/components/produceOrder.vue';
|
|
|
export default {
|
|
export default {
|
|
@@ -113,7 +171,6 @@
|
|
|
tableRules: {},
|
|
tableRules: {},
|
|
|
|
|
|
|
|
productWeight: null,
|
|
productWeight: null,
|
|
|
- productUnit: null,
|
|
|
|
|
|
|
|
|
|
orderShow: false
|
|
orderShow: false
|
|
|
};
|
|
};
|
|
@@ -140,6 +197,7 @@
|
|
|
|
|
|
|
|
determineChoose(title, row, idx) {
|
|
determineChoose(title, row, idx) {
|
|
|
if (title == '选择物料') {
|
|
if (title == '选择物料') {
|
|
|
|
|
+ console.log(row, idx);
|
|
|
this.materialList[0] = row;
|
|
this.materialList[0] = row;
|
|
|
|
|
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
@@ -148,18 +206,42 @@
|
|
|
|
|
|
|
|
handWorkOrder() {
|
|
handWorkOrder() {
|
|
|
if (!this.productWeight) {
|
|
if (!this.productWeight) {
|
|
|
- return this.$message.error('请输入处置重量');
|
|
|
|
|
- }
|
|
|
|
|
- if (!this.productUnit) {
|
|
|
|
|
- return this.$message.error('请输入处置重量单位');
|
|
|
|
|
|
|
+ return this.$message.error('请输入数量');
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
this.orderShow = true;
|
|
this.orderShow = true;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
workSelect(ids, taskId) {
|
|
workSelect(ids, taskId) {
|
|
|
console.log(ids, taskId);
|
|
console.log(ids, taskId);
|
|
|
|
|
|
|
|
|
|
+ let param = {
|
|
|
|
|
+ categoryId: this.materialList[0].id,
|
|
|
|
|
+ taskId: taskId,
|
|
|
|
|
+ workOrderIds: ids
|
|
|
|
|
+ };
|
|
|
|
|
+ listDisposeBy(param).then((res) => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ let _arr = []
|
|
|
|
|
+
|
|
|
|
|
+ let _totalWeight = 0;
|
|
|
|
|
+
|
|
|
|
|
+ res.materialList.forEach(item => {
|
|
|
|
|
+ _totalWeight += Number(item.formedNum || 0 ) + Number(item.notFormedNum || 0 );
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ this.$set(this.materialList[0], 'byProdList', res);
|
|
|
|
|
+
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
this.orderShow = false;
|
|
this.orderShow = false;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ removeItem(idx, index) {
|
|
|
|
|
+ this.materialList[idx].byProdList.splice(index, 1);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -191,7 +273,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.col {
|
|
.col {
|
|
|
- width: 20%;
|
|
|
|
|
|
|
+ width: 16.666%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
min-width: 200px;
|
|
min-width: 200px;
|
|
@@ -209,7 +291,7 @@
|
|
|
padding: 4px;
|
|
padding: 4px;
|
|
|
width: 80px;
|
|
width: 80px;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- background-color: #d0e4d5;
|
|
|
|
|
|
|
+ background-color: #ededed;
|
|
|
color: #000;
|
|
color: #000;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -219,14 +301,6 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .col2 {
|
|
|
|
|
- width: 10%;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .col3 {
|
|
|
|
|
- width: 30%;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
.pd6 {
|
|
.pd6 {
|
|
|
padding: 0 6px;
|
|
padding: 0 6px;
|
|
|
}
|
|
}
|