|
|
@@ -0,0 +1,489 @@
|
|
|
+<template>
|
|
|
+ <div class="ele-body">
|
|
|
+ <el-card shadow="never" class="tabs_box">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="closeDetail"
|
|
|
+ >关闭</el-button
|
|
|
+ >
|
|
|
+ <headerTitle style="margin-top: 10px" />
|
|
|
+ <el-form
|
|
|
+ ref="form"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ label-position="right"
|
|
|
+ label-width="140px"
|
|
|
+ >
|
|
|
+ <el-row :gutter="10" class="basic">
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="计划编号:">
|
|
|
+ <el-input v-model="form.planCode" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="批次号:">
|
|
|
+ <el-input v-model="form.batchNo" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="编码:">
|
|
|
+ <el-input v-model="form.categoryCode" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="名称:">
|
|
|
+ <el-input v-model="form.categoryName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="零部件图号:">
|
|
|
+ <el-input v-model="form.imgCode" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <!-- <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="计划数量:">
|
|
|
+ <el-input v-model="form.order" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
+ <!-- <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="BOM类型:">
|
|
|
+ <el-input v-model="form.order" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
+ <!-- <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="BOM版本:">
|
|
|
+ <el-input v-model="form.order" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
+ <!-- <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="投料控制清单号:">
|
|
|
+ <el-input v-model="form.order" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="需求订单号:">
|
|
|
+ <el-input v-model="form.code" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="顶级产品编号:">
|
|
|
+ <el-input v-model="form.topCategoryName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="顶级产品名称:">
|
|
|
+ <el-input v-model="form.topCategoryName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
|
|
|
+ <el-form-item label="生产工单号:">
|
|
|
+ <el-input v-model="form.order" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <seek-page :seekList="seekList" @search="search"></seek-page>
|
|
|
+
|
|
|
+ <!--feedingControlQty -->
|
|
|
+
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="detailList"
|
|
|
+ :selection.sync="selection"
|
|
|
+ row-key="id"
|
|
|
+ cache-key="entrust_list_data"
|
|
|
+ :height="tableHeight"
|
|
|
+ :pageSize="20"
|
|
|
+ @fullscreen-change="fullscreenChange"
|
|
|
+ >
|
|
|
+ <template #quantity="{ row }">
|
|
|
+ <span
|
|
|
+ >{{ row.feedingControlQty ? row.feedingControlQty : 0 }}/{{
|
|
|
+ row.quantity ? row.quantity : 0
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #componentAttribute="{ row }">
|
|
|
+ <el-tag size="small">{{
|
|
|
+ componentAttributeMap[row.componentAttribute]
|
|
|
+ }}</el-tag>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #attributeType="{ row }">
|
|
|
+ <el-tag type="success" size="small">{{
|
|
|
+ attributeTypeMap[row.attributeType]
|
|
|
+ }}</el-tag>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #produceType="{ row }">
|
|
|
+ <el-tag type="warning" size="small">{{
|
|
|
+ produceTypeMap[row.produceType]
|
|
|
+ }}</el-tag></template
|
|
|
+ >
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ getRequirementListOrderDetail,
|
|
|
+ getRequirementListOrderDetailPage
|
|
|
+ } from '@/api/requirementListOrder';
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ form: {},
|
|
|
+ rules: {},
|
|
|
+ tableHeight: 'calc(100vh - 560px)',
|
|
|
+ selection: [],
|
|
|
+ detailList: [],
|
|
|
+
|
|
|
+ componentAttributeMap: {
|
|
|
+ 1: '自制件',
|
|
|
+ 2: '采购件',
|
|
|
+ 3: '外协件',
|
|
|
+ 4: '受托件'
|
|
|
+ },
|
|
|
+
|
|
|
+ attributeTypeMap: {
|
|
|
+ 1: '总装',
|
|
|
+ 2: '部装',
|
|
|
+ 3: '零件',
|
|
|
+ 4: '原材料'
|
|
|
+ },
|
|
|
+ produceTypeMap: {
|
|
|
+ 1: '加工',
|
|
|
+ 2: '装配',
|
|
|
+ 3: '下料'
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ computed: {
|
|
|
+ columns() {
|
|
|
+ return [
|
|
|
+ // {
|
|
|
+ // columnKey: 'selection',
|
|
|
+ // type: 'selection',
|
|
|
+ // width: 45,
|
|
|
+ // align: 'center',
|
|
|
+ // fixed: 'left'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'categoryLevelName',
|
|
|
+ label: '物料分类',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ ,
|
|
|
+ {
|
|
|
+ prop: 'componentAttribute',
|
|
|
+ label: '属性类型',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'componentAttribute'
|
|
|
+ },
|
|
|
+ ,
|
|
|
+ {
|
|
|
+ prop: 'attributeType',
|
|
|
+ label: '存货类型',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'attributeType'
|
|
|
+ },
|
|
|
+ ,
|
|
|
+ {
|
|
|
+ prop: 'produceType',
|
|
|
+ label: '生产类型',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'produceType'
|
|
|
+ },
|
|
|
+ ,
|
|
|
+ {
|
|
|
+ prop: 'categoryCode',
|
|
|
+ label: '物料编码',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ ,
|
|
|
+ {
|
|
|
+ prop: 'type',
|
|
|
+ label: '需求订单号',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'type'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'categoryName',
|
|
|
+ label: '物料名称',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'specification',
|
|
|
+ label: '规格',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'categorySize',
|
|
|
+ label: '尺寸',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'baseQuantity',
|
|
|
+ label: '基本数量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'quantity',
|
|
|
+ label: '投料控制数量/定额数量',
|
|
|
+ width: 190,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'quantity'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'brandNum',
|
|
|
+ label: '牌号',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'weight',
|
|
|
+ label: '重量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'pickQuantity',
|
|
|
+ label: '已领数量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'unPickQuantity',
|
|
|
+ label: '未领数量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'outQuantity',
|
|
|
+ label: '已出库数量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'unOutQuantity',
|
|
|
+ label: '未出库数量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'feedQuantity',
|
|
|
+ label: '已投数量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'unFeedQuantity',
|
|
|
+ label: '未投数量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'oddmentsQuantity',
|
|
|
+ label: '余料数量',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'createUserName',
|
|
|
+ label: '创建人',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ },
|
|
|
+
|
|
|
+ seekList() {
|
|
|
+ return [
|
|
|
+ // {
|
|
|
+ // label: '计划编号:',
|
|
|
+ // value: 'name',
|
|
|
+ // type: 'input',
|
|
|
+ // labelWidth: 100
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: '批次号:',
|
|
|
+ // value: 'name',
|
|
|
+ // type: 'input',
|
|
|
+ // labelWidth: 80
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '编码:',
|
|
|
+ value: 'categoryCode',
|
|
|
+ type: 'input',
|
|
|
+ labelWidth: 50
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ mounted() {
|
|
|
+ this.initPage();
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ initPage() {
|
|
|
+ const { id } = this.$route.query;
|
|
|
+ if (!id) return;
|
|
|
+
|
|
|
+ this.getDetailData(id);
|
|
|
+ this.getDetailPage(id);
|
|
|
+ },
|
|
|
+
|
|
|
+ datasource() {
|
|
|
+ return [];
|
|
|
+ },
|
|
|
+
|
|
|
+ open() {
|
|
|
+ this.visible = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ cancel() {
|
|
|
+ this.visible = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ search() {},
|
|
|
+
|
|
|
+ closeDetail() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$router.back();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ async getDetailData(id) {
|
|
|
+ this.form = (await getRequirementListOrderDetail(id)) || {};
|
|
|
+ },
|
|
|
+
|
|
|
+ async getDetailPage(id) {
|
|
|
+ const res = await getRequirementListOrderDetailPage({
|
|
|
+ materialRequirementsId: id
|
|
|
+ });
|
|
|
+ this.detailList = res?.list || [];
|
|
|
+ },
|
|
|
+
|
|
|
+ fullscreenChange(fullscreen) {
|
|
|
+ if (fullscreen) {
|
|
|
+ this.tableHeight = 'calc(100vh - 120px)';
|
|
|
+ } else {
|
|
|
+ this.tableHeight = 'calc(100vh - 560px)';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+ ::v-deep .el-form-item {
|
|
|
+ margin-bottom: 15px !important;
|
|
|
+ }
|
|
|
+</style>
|