|
|
@@ -0,0 +1,565 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-form
|
|
|
+ ref="form"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="120px"
|
|
|
+ class="el-form-box"
|
|
|
+ >
|
|
|
+ <header-title title="基本信息"></header-title>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="质检工单编码:" prop="qualityWorkOrderCode">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="form.qualityWorkOrderCode"
|
|
|
+ placeholder=" "
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="质检工单名称:" prop="qualityWorkOrderName">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="form.qualityWorkOrderName"
|
|
|
+ placeholder=" "
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="来源单号:" prop="sourceCode">
|
|
|
+ <el-input disabled v-model="form.sourceCode" placeholder=" " />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="类型:" prop="qualityType">
|
|
|
+ <DictSelection
|
|
|
+ dictName="质检计划类型"
|
|
|
+ v-model="form.qualityType"
|
|
|
+ disabled
|
|
|
+ ></DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="编码:" prop="productCode">
|
|
|
+ <el-input disabled v-model="form.productCode" placeholder=" " />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="名称:" prop="productName">
|
|
|
+ <el-input disabled v-model="form.productName" placeholder=" " />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="批次号:" prop="batchNo">
|
|
|
+ <el-input disabled v-model="form.batchNo" placeholder=" " />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="规格:" prop="specification">
|
|
|
+ <el-input disabled v-model="form.specification" placeholder=" " />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="型号:" prop="modelType">
|
|
|
+ <el-input disabled v-model="form.modelType" placeholder=" " />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="牌号:" prop="brandNo">
|
|
|
+ <el-input disabled v-model="form.brandNo" placeholder=" " />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="总数:" prop="total">
|
|
|
+ <el-input disabled v-model="form.total" placeholder=" ">
|
|
|
+ <template slot="append">
|
|
|
+ {{ form.measureUnit }}
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <header-title title="来源清单"></header-title>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="sourceTable"
|
|
|
+ :columns="tableColumns"
|
|
|
+ :datasource="tableList"
|
|
|
+ :initLoad="false"
|
|
|
+ :needPage="false"
|
|
|
+ height="300px"
|
|
|
+ full-height="calc(100vh - 120px)"
|
|
|
+ >
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ 累计取样数量:{{ form.sampleQuantity }}{{ form.unit }}
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ <header-title title="请样信息"> </header-title>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="请样目的:" prop="pleasePurpose">
|
|
|
+ <el-input
|
|
|
+ v-model="form.pleasePurpose"
|
|
|
+ placeholder="请输入"
|
|
|
+ disabled
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="请样数量:" prop="pleaseQuantity">
|
|
|
+ <el-input
|
|
|
+ v-model="form.pleaseQuantity"
|
|
|
+ placeholder="请输入"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <template slot="append">
|
|
|
+ {{ form.pleaseUnit }}
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="4">
|
|
|
+ <el-form-item label="单位:" prop="pleaseUnit">
|
|
|
+ <DictSelection
|
|
|
+ dictName="计量单位"
|
|
|
+ clearable
|
|
|
+ v-model="form.pleaseUnit"
|
|
|
+ filter-placeholder="请输入计量单位搜索"
|
|
|
+ @change="changeSamUnit"
|
|
|
+ ></DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+ </el-row>
|
|
|
+ <header-title title="取样信息"> </header-title>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="质检方式:" prop="qualityMode">
|
|
|
+ <DictSelection
|
|
|
+ dictName="取样类型"
|
|
|
+ v-model="form.qualityMode"
|
|
|
+ disabled
|
|
|
+ ></DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="记录方法:" prop="recordingMethod">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="form.recordingMethod"
|
|
|
+ placeholder="请选择"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in sampleQuantityList"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ :key="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row v-if="form.qualityMode == '2'">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="取样:" prop="sampleNumber">
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="form.conditionType"
|
|
|
+ placeholder="请选择"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in sampleNumberList"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ :key="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6" v-if="form.conditionType == 2">
|
|
|
+ <el-form-item prop="quantity">
|
|
|
+ <el-input
|
|
|
+ v-model="form.quantity"
|
|
|
+ placeholder="请输入"
|
|
|
+ disabled
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" v-if="form.conditionType == 2">
|
|
|
+ <el-form-item prop="unit" label-width="0">
|
|
|
+ <DictSelection
|
|
|
+ dictName="计量单位"
|
|
|
+ clearable
|
|
|
+ disabled
|
|
|
+ v-model="form.unit"
|
|
|
+ filter-placeholder="请输入计量单位搜索"
|
|
|
+ ></DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8" v-if="form.conditionType == 2">
|
|
|
+ <el-form-item prop="portion" label="数量">
|
|
|
+ <el-input
|
|
|
+ v-model="form.portion"
|
|
|
+ disabled
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10" v-if="form.conditionType == 1">
|
|
|
+ <el-form-item prop="portion" label="数量">
|
|
|
+ <el-input
|
|
|
+ v-model="form.portion"
|
|
|
+ disabled
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10" v-if="form.conditionType == 1">
|
|
|
+ <el-form-item prop="packingUnit" label="单位">
|
|
|
+ <el-input
|
|
|
+ v-model="form.unit"
|
|
|
+ disabled
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <header-title title="样品信息"></header-title>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="showSampleListTable"
|
|
|
+ :columns="tableColumns1"
|
|
|
+ :datasource="sampleList"
|
|
|
+ :needPage="false"
|
|
|
+ height="400px"
|
|
|
+ full-height="calc(100vh - 120px)"
|
|
|
+ ></ele-pro-table>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ const defForm = {
|
|
|
+ code: '', //编码
|
|
|
+ name: '', //名称
|
|
|
+ conditionType: '',
|
|
|
+ quantity: '',
|
|
|
+ unit: '',
|
|
|
+ portion: '',
|
|
|
+ qualityMode: '',
|
|
|
+ recordingMethod: 1,
|
|
|
+ pleaseQuantity: '',
|
|
|
+ pleasePurpose: '',
|
|
|
+ pleaseUnit: '',
|
|
|
+ sampleQuantity: '',
|
|
|
+ qualityWorkOrderId: '',
|
|
|
+ qualityWorkOrderCode: '',
|
|
|
+ qualityWorkOrderName: '',
|
|
|
+ isFirstSampling: ''
|
|
|
+ };
|
|
|
+ import { getById } from '@/api/bpm/components/samplingRecords';
|
|
|
+ export default {
|
|
|
+ components: {},
|
|
|
+ props: {
|
|
|
+ businessId: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form: { ...defForm },
|
|
|
+ rules: {
|
|
|
+ name: [
|
|
|
+ { required: true, message: '名称不能为空', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ factoriesId: [
|
|
|
+ { required: true, message: '请选择工厂', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ bomId: [
|
|
|
+ { required: true, message: '请选择BOM版本', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ bomCategory: [
|
|
|
+ { required: true, message: '请选择BOM类型', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ produceRoutingId: [
|
|
|
+ { required: true, message: '请选择工艺路线', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ code: [{ required: true, message: '编码不能为空', trigger: 'change' }]
|
|
|
+ },
|
|
|
+ sampleQuantityList: [
|
|
|
+ { label: '批样', value: 1 },
|
|
|
+ { label: '单样全部', value: 2 }
|
|
|
+ ],
|
|
|
+ sampleNumberList: [
|
|
|
+ { label: '取整样', value: 1 },
|
|
|
+ { label: '取小样', value: 2 }
|
|
|
+ ],
|
|
|
+ tableColumns1: [
|
|
|
+ {
|
|
|
+ label: '样品编码',
|
|
|
+ prop: 'sampleCode',
|
|
|
+ width: '200',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '编码',
|
|
|
+ prop: 'categoryCode',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称',
|
|
|
+ prop: 'categoryName',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ { label: '批次号', prop: 'batchNo', align: 'center' },
|
|
|
+ { label: '发货条码', prop: 'barcodes', align: 'center' },
|
|
|
+ { label: '包装编码', prop: 'packageNo', align: 'center' },
|
|
|
+ { label: '包装数量', prop: 'packingQuantity', align: 'center' },
|
|
|
+ { label: '包装单位', prop: 'packingUnit', align: 'center' },
|
|
|
+ { label: '计量数量', prop: 'measureQuantity', align: 'center' },
|
|
|
+ { label: '计量单位', prop: 'measureUnit', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '供应商名称',
|
|
|
+ prop: 'supplierName',
|
|
|
+ align: 'center',
|
|
|
+ width: '120'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '供应商代号',
|
|
|
+ prop: 'supplierCode',
|
|
|
+ align: 'center',
|
|
|
+ width: '120'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '物料代号',
|
|
|
+ prop: 'materielDesignation',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'materielDesignation',
|
|
|
+ width: '120'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '客户代号',
|
|
|
+ prop: 'clientCode',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'clientCode',
|
|
|
+ width: '120'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '刻码',
|
|
|
+ prop: 'engrave',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'engrave',
|
|
|
+ width: '120'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '机型',
|
|
|
+ prop: 'modelKey',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '颜色',
|
|
|
+ prop: 'colorKey',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '重量',
|
|
|
+ prop: 'weight',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'weight',
|
|
|
+ width: '120'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '重量单位',
|
|
|
+ prop: 'weightUnit',
|
|
|
+ align: 'center',
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ { label: '仓库', prop: 'warehouseName', align: 'center', width: 100 },
|
|
|
+ { label: '货区', prop: 'areaName', align: 'center' },
|
|
|
+ { label: '货架', prop: 'goodsShelfName', align: 'center' },
|
|
|
+ { label: '货位', prop: 'goodsAllocationName', align: 'center' },
|
|
|
+ { label: '生产日期', prop: 'productionDate', align: 'center' },
|
|
|
+ { label: '采购日期', prop: 'purchaseDate', align: 'center' }
|
|
|
+ ],
|
|
|
+ tableColumns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '编码',
|
|
|
+ prop: 'categoryCode',
|
|
|
+ width: 150,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称',
|
|
|
+ prop: 'categoryName',
|
|
|
+ width: '150',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '批次号',
|
|
|
+ prop: 'batchNo',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '发货条码',
|
|
|
+ prop: 'barcodes',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '包装编码',
|
|
|
+ prop: 'packageNo',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ { label: '包装数量', prop: 'packingQuantity', align: 'center' },
|
|
|
+ { label: '包装单位', prop: 'packingUnit', align: 'center' },
|
|
|
+
|
|
|
+ { label: '计量数量', prop: 'measureQuantity', align: 'center' },
|
|
|
+ { label: '计量单位', prop: 'measureUnit', align: 'center' },
|
|
|
+ { label: '物料代号', prop: 'materielDesignation', align: 'center' },
|
|
|
+ { label: '客户代号', prop: 'clientCode', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '供应商名称',
|
|
|
+ prop: 'supplierName',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '供应商代号',
|
|
|
+ prop: 'supplierCode',
|
|
|
+ align: 'center',
|
|
|
+ width: '120',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ { label: '刻码', prop: 'engrave', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '机型',
|
|
|
+ prop: 'modelKey',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '颜色',
|
|
|
+ prop: 'colorKey',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ { label: '重量', prop: 'weight', align: 'center' },
|
|
|
+ { label: '重量单位', prop: 'weightUnit', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '仓库',
|
|
|
+ prop: 'warehouseName',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ { label: '货区', prop: 'areaName', align: 'center' },
|
|
|
+ { label: '货架', prop: 'goodsShelfName', align: 'center' },
|
|
|
+ { label: '货位', prop: 'goodsAllocationName', align: 'center' },
|
|
|
+ {
|
|
|
+ label: '生产日期',
|
|
|
+ prop: 'productionDate',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '采购日期',
|
|
|
+ prop: 'purchaseDate',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ packingSpecificationOption: [],
|
|
|
+ sampleList: [],
|
|
|
+ schemeList: [],
|
|
|
+ tableList: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ computed: {},
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async init() {
|
|
|
+ getById(this.businessId).then((res) => {
|
|
|
+ [
|
|
|
+ 'id',
|
|
|
+ 'code',
|
|
|
+ 'name',
|
|
|
+ 'createTime',
|
|
|
+ 'createUserId',
|
|
|
+ 'status',
|
|
|
+ 'approvalStatus',
|
|
|
+ 'approvalUserId'
|
|
|
+ ].forEach((it) => {
|
|
|
+ delete res.qualityWorkOrderVO[it];
|
|
|
+ });
|
|
|
+ this.form = { ...res, ...res.qualityWorkOrderVO };
|
|
|
+
|
|
|
+ if (res.qualityWorkOrderVO.conditionType == 1) {
|
|
|
+ this.$set(this.form, 'portion', res.quantity);
|
|
|
+ console.log(this.form,'(this.form')
|
|
|
+ } else {
|
|
|
+ this.$set(this.form, 'portion', res.copies);
|
|
|
+ }
|
|
|
+
|
|
|
+ this.sampleList = res.qualitySampleList;
|
|
|
+ this.tableList = res.qualityInventoryList;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .basic-details-title {
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 45px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .add-product {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ font-size: 30px;
|
|
|
+ color: #1890ff;
|
|
|
+ margin: 10px 0;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+</style>
|