|
@@ -30,17 +30,74 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
+
|
|
|
|
|
+ <div v-for="(item, idx) in materialList" :key="idx">
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ :ref="`form22${idx}`"
|
|
|
|
|
+ :model="{ pickList: item }"
|
|
|
|
|
+ :rules="tableRules"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ label-position="left"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="tableZ_box">
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="name">物料编码</div>
|
|
|
|
|
+ <div class="content">{{ item.code }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="name">物料名称</div>
|
|
|
|
|
+ <div class="content">{{ item.name }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col col2">
|
|
|
|
|
+ <div class="name">计量单位</div>
|
|
|
|
|
+ <div class="content">{{ item.measuringUnit }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col col3">
|
|
|
|
|
+ <div class="name">处置重量</div>
|
|
|
|
|
+ <div class="content content_num">
|
|
|
|
|
+ <el-input v-model="productWeight"></el-input>
|
|
|
|
|
+ <DictSelection
|
|
|
|
|
+ dictName="计量单位"
|
|
|
|
|
+ style="width: 160px; margin-left: 10px"
|
|
|
|
|
+ v-model="productUnit"
|
|
|
|
|
+ ></DictSelection>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col pd6">
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="handWorkOrder()"
|
|
|
|
|
+ >新增</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <template slot="footer">
|
|
|
|
|
+ <el-button size="mini" @click="handleClose">取 消</el-button>
|
|
|
|
|
+ <el-button size="mini" type="primary" @click="save()">确 定</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
<ProductModal ref="productRefs" @changeProduct="determineChoose" />
|
|
<ProductModal ref="productRefs" @changeProduct="determineChoose" />
|
|
|
|
|
+
|
|
|
|
|
+ <produceOrder
|
|
|
|
|
+ v-if="orderShow"
|
|
|
|
|
+ @close="orderShow = false"
|
|
|
|
|
+ @workSelect="workSelect"
|
|
|
|
|
+ ></produceOrder>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { getCode } from '@/api/produce/workOrder';
|
|
import { getCode } from '@/api/produce/workOrder';
|
|
|
import ProductModal from './ProductModal.vue';
|
|
import ProductModal from './ProductModal.vue';
|
|
|
|
|
+ import produceOrder from './produceOrder.vue';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
- ProductModal
|
|
|
|
|
|
|
+ ProductModal,
|
|
|
|
|
+ produceOrder
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -49,7 +106,16 @@
|
|
|
productForm: {
|
|
productForm: {
|
|
|
code: null,
|
|
code: null,
|
|
|
name: null
|
|
name: null
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ materialList: [],
|
|
|
|
|
+
|
|
|
|
|
+ tableRules: {},
|
|
|
|
|
+
|
|
|
|
|
+ productWeight: null,
|
|
|
|
|
+ productUnit: null,
|
|
|
|
|
+
|
|
|
|
|
+ orderShow: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -66,15 +132,109 @@
|
|
|
this.productForm.code = await getCode('dispose_code');
|
|
this.productForm.code = await getCode('dispose_code');
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ save() {},
|
|
|
|
|
+
|
|
|
categorySelect() {
|
|
categorySelect() {
|
|
|
this.$refs.productRefs.open({}, '选择物料', '1', null);
|
|
this.$refs.productRefs.open({}, '选择物料', '1', null);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
determineChoose(title, row, idx) {
|
|
determineChoose(title, row, idx) {
|
|
|
if (title == '选择物料') {
|
|
if (title == '选择物料') {
|
|
|
- console.log(row);
|
|
|
|
|
|
|
+ this.materialList[0] = row;
|
|
|
|
|
+
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ handWorkOrder() {
|
|
|
|
|
+ if (!this.productWeight) {
|
|
|
|
|
+ return this.$message.error('请输入处置重量');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!this.productUnit) {
|
|
|
|
|
+ return this.$message.error('请输入处置重量单位');
|
|
|
}
|
|
}
|
|
|
|
|
+ this.orderShow = true;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ workSelect(ids, taskId) {
|
|
|
|
|
+ console.log(ids, taskId);
|
|
|
|
|
+
|
|
|
|
|
+ this.orderShow = false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+ .content_num {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 2px;
|
|
|
|
|
+ --input-background-color: #f0f8f2;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .table_content {
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .tableZ_box {
|
|
|
|
|
+ border: 1px solid #e3e5e5;
|
|
|
|
|
+ margin: 6px 0;
|
|
|
|
|
+
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ border-bottom: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .row {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .col {
|
|
|
|
|
+ width: 20%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ min-width: 200px;
|
|
|
|
|
+ min-height: 32px;
|
|
|
|
|
+ border-bottom: 1px solid #e3e5e5;
|
|
|
|
|
+ border-right: 1px solid #e3e5e5;
|
|
|
|
|
+
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ border-right: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .name {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 4px;
|
|
|
|
|
+ width: 80px;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background-color: #d0e4d5;
|
|
|
|
|
+ color: #000;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .content {
|
|
|
|
|
+ padding: 4px 6px;
|
|
|
|
|
+ color: #000;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .col2 {
|
|
|
|
|
+ width: 10%;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .col3 {
|
|
|
|
|
+ width: 30%;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .pd6 {
|
|
|
|
|
+ padding: 0 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|
|
|
|
|
+
|
|
|
|
|
+<style>
|
|
|
|
|
+ :v-deep .el-form-item__error {
|
|
|
|
|
+ bottom: -6px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|