|
|
@ -1,6 +1,23 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="app-container">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
|
|
|
|
<el-form-item label="采购订单号" prop="poNo">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="queryParams.poNo"
|
|
|
|
|
|
|
|
placeholder="请输入采购订单号"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="销售订单号" prop="saleorderCode">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="queryParams.saleorderCode"
|
|
|
|
|
|
|
|
placeholder="请输入销售订单号"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="物料编号" prop="materialCode">
|
|
|
|
<el-form-item label="物料编号" prop="materialCode">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.materialCode"
|
|
|
|
v-model="queryParams.materialCode"
|
|
|
@ -9,7 +26,7 @@
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料名称" prop="poNo">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.materialName"
|
|
|
|
v-model="queryParams.materialName"
|
|
|
|
placeholder="请输入物料名称"
|
|
|
|
placeholder="请输入物料名称"
|
|
|
@ -17,15 +34,17 @@
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料规格" prop="poNo">
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="规格参数" prop="barcodeSpec">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.materialSpec"
|
|
|
|
v-model="queryParams.barcodeSpec"
|
|
|
|
placeholder="请输入物料规格"
|
|
|
|
placeholder="请输入规格参数"
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="批次标识" prop="batchFlag">
|
|
|
|
<el-form-item label="批次标识" prop="batchFlag">
|
|
|
|
<el-select v-model="queryParams.batchFlag" placeholder="请选择批次标识" clearable>
|
|
|
|
<el-select v-model="queryParams.batchFlag" placeholder="请选择批次标识" clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
@ -36,14 +55,7 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="采购订单号" prop="poNo">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="queryParams.poNo"
|
|
|
|
|
|
|
|
placeholder="请输入采购订单号"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="打印标识" prop="printFlag">
|
|
|
|
<el-form-item label="打印标识" prop="printFlag">
|
|
|
|
<el-select v-model="queryParams.printFlag" placeholder="请选择打印标识" clearable>
|
|
|
|
<el-select v-model="queryParams.printFlag" placeholder="请选择打印标识" clearable>
|
|
|
@ -76,18 +88,6 @@
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
plain
|
|
|
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
@click="handleInternalAdd"
|
|
|
|
|
|
|
|
v-hasPermi="['mes:barcode:internalAdd']"
|
|
|
|
|
|
|
|
>生产新增
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
@ -124,7 +124,7 @@
|
|
|
|
>打印
|
|
|
|
>打印
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
|
|
|
<!--right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar-->
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="barcodeList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table v-loading="loading" :data="barcodeList" @selection-change="handleSelectionChange">
|
|
|
@ -147,7 +147,7 @@
|
|
|
|
<el-table-column label="条码内容" align="center" prop="barcodeInfo" v-if="columns[5].visible" width="100"/>
|
|
|
|
<el-table-column label="条码内容" align="center" prop="barcodeInfo" v-if="columns[5].visible" width="100"/>
|
|
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[31].visible" width="100"/>
|
|
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[31].visible" width="100"/>
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[8].visible" width="100"/>
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[8].visible" width="100"/>
|
|
|
|
<el-table-column label="物料规格" align="center" prop="materialSpec" v-if="columns[32].visible" width="150"/>
|
|
|
|
<el-table-column label="规格参数" align="center" prop="barcodeSpec" v-if="columns[33].visible" width="150"/>
|
|
|
|
<el-table-column label="批次标识" align="center" prop="batchFlag" v-if="columns[3].visible">
|
|
|
|
<el-table-column label="批次标识" align="center" prop="batchFlag" v-if="columns[3].visible">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<dict-tag :options="dict.type.active_flag" :value="scope.row.batchFlag"/>
|
|
|
|
<dict-tag :options="dict.type.active_flag" :value="scope.row.batchFlag"/>
|
|
|
@ -268,24 +268,6 @@
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="条码类型" prop="barcodeType">-->
|
|
|
|
|
|
|
|
<!-- <el-radio-group v-model="form.barcodeType">-->
|
|
|
|
|
|
|
|
<!-- <el-radio-->
|
|
|
|
|
|
|
|
<!-- v-for="dict in dict.type.barcode_type"-->
|
|
|
|
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
|
|
|
|
<!-- :label="dict.value"-->
|
|
|
|
|
|
|
|
<!-- >{{dict.label}}</el-radio>-->
|
|
|
|
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<!-- <el-form-item label="条码内容" prop="barcodeInfo">-->
|
|
|
|
|
|
|
|
<!-- <el-input v-model="form.barcodeInfo" placeholder="请输入条码内容" />-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<!-- <el-form-item label="批次代码" prop="batchCode">-->
|
|
|
|
|
|
|
|
<!-- <el-input v-model="form.batchCode" placeholder="请输入批次代码" />-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<!-- <el-form-item label="托盘RFID代码" prop="palletInfoCode">-->
|
|
|
|
|
|
|
|
<!-- <el-input v-model="form.palletInfoCode" placeholder="请输入托盘RFID代码" />-->
|
|
|
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
<el-form-item label="物料ID" prop="materialId" v-if="false">
|
|
|
|
<el-form-item label="物料ID" prop="materialId" v-if="false">
|
|
|
|
<el-input v-model="form.materialId" placeholder="请输入物料ID"/>
|
|
|
|
<el-input v-model="form.materialId" placeholder="请输入物料ID"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -295,6 +277,12 @@
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-input v-model="form.materialName" :disabled="true"/>
|
|
|
|
<el-input v-model="form.materialName" :disabled="true"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="物料规格" prop="materialSpec">
|
|
|
|
|
|
|
|
<el-input v-model="form.materialSpec" :disabled="true"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="规格参数" prop="barcodeSpec">
|
|
|
|
|
|
|
|
<el-input v-model="form.barcodeSpec" :disabled="true"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="批次标识" prop="batchFlag">
|
|
|
|
<el-form-item label="批次标识" prop="batchFlag">
|
|
|
|
<el-radio-group v-model="form.batchFlag" :disabled="saleBatchFlagDisable">
|
|
|
|
<el-radio-group v-model="form.batchFlag" :disabled="saleBatchFlagDisable">
|
|
|
@ -317,17 +305,20 @@
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
批次数量
|
|
|
|
批次数量
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input v-model="form.amount" placeholder="请在物料信息中维护" :disabled="saleBatchAmountDisabled"/>
|
|
|
|
<el-input v-model="form.amount" placeholder="请在物料信息中维护"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item prop="barcodeAmount">
|
|
|
|
<el-form-item prop="barcodeAmount">
|
|
|
|
<span slot="label">
|
|
|
|
<span slot="label">
|
|
|
|
<el-tooltip content="需要打印条码的数量,如果需要贴10个条码则需要生成10个" placement="top">
|
|
|
|
<el-tooltip content="需要打印条码的数量,如果需要贴10个物料条码则需要生成10个" placement="top">
|
|
|
|
<i class="el-icon-question"></i>
|
|
|
|
<i class="el-icon-question"></i>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
条码数量
|
|
|
|
条码数量
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<el-input v-model="form.barcodeAmount" disabled/>
|
|
|
|
<el-input v-model="form.barcodeAmount" disabled/>
|
|
|
|
|
|
|
|
<span v-if="form.currentOrderBindAmount!==0 || form.currentSafeBindAmount !==0"><b>订单条码数量:</b>{{
|
|
|
|
|
|
|
|
form.currentOrderBindAmount
|
|
|
|
|
|
|
|
}} <b>安全库存条码数量:</b>{{ form.currentSafeBindAmount }}</span>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="生产日期" prop="productionDate">
|
|
|
|
<el-form-item label="生产日期" prop="productionDate">
|
|
|
@ -379,7 +370,7 @@
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button type="primary" :loading="submitLoading" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
@ -413,6 +404,9 @@
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-input v-model="internalForm.materialName" :disabled="true"/>
|
|
|
|
<el-input v-model="internalForm.materialName" :disabled="true"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="物料规格" prop="materialSpec">
|
|
|
|
|
|
|
|
<el-input v-model="internalForm.materialSpec" :disabled="true"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="生产日期" prop="productionDate">
|
|
|
|
<el-form-item label="生产日期" prop="productionDate">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker clearable
|
|
|
@ -457,13 +451,13 @@
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-input v-model="noPurchaseForm.materialName" readonly/>
|
|
|
|
<el-input v-model="noPurchaseForm.materialName" readonly/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料规格" prop="materialName">
|
|
|
|
<el-form-item label="物料规格" prop="barcodeSpec">
|
|
|
|
<el-input v-model="noPurchaseForm.materialSpec" type="textarea" readonly/>
|
|
|
|
<el-input v-model="noPurchaseForm.barcodeSpec" type="textarea" readonly/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="批次标识" prop="batchFlag">
|
|
|
|
<el-form-item label="批次标识" prop="batchFlag">
|
|
|
|
<el-radio-group v-model="noPurchaseForm.batchFlag" :disabled="noPurchaseBatchFlagDisable">
|
|
|
|
<el-radio-group v-model="noPurchaseForm.batchFlag">
|
|
|
|
<el-radio
|
|
|
|
<el-radio
|
|
|
|
v-for="dict in dict.type.active_flag"
|
|
|
|
v-for="dict in dict.type.active_flag"
|
|
|
|
:key="dict.value"
|
|
|
|
:key="dict.value"
|
|
|
@ -520,7 +514,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="submitNoPurchaseAddForm">确 定</el-button>
|
|
|
|
<el-button type="primary" :loading="submitLoading" @click="submitNoPurchaseAddForm">确 定</el-button>
|
|
|
|
<el-button @click="cancelNoPurchase">取 消</el-button>
|
|
|
|
<el-button @click="cancelNoPurchase">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
@ -540,8 +534,8 @@
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-input v-model="regularForm.materialName" readonly/>
|
|
|
|
<el-input v-model="regularForm.materialName" readonly/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料规格" prop="materialSpec">
|
|
|
|
<el-form-item label="物料规格" prop="barcodeSpec">
|
|
|
|
<el-input v-model="regularForm.materialSpec" readonly/>
|
|
|
|
<el-input v-model="regularForm.barcodeSpec" readonly/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -588,7 +582,7 @@
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
listBarcode, getBarcode, delBarcode, addBarcode, updateBarcode,
|
|
|
|
listBarcode, getBarcode, delBarcode, addBarcode, updateBarcode,
|
|
|
|
printBarcodes, getMaterialInfoByErpId, selectProductBarcodeInfoByBarcodeInfo,
|
|
|
|
printBarcodes, getMaterialInfoByErpId, selectProductBarcodeInfoByBarcodeInfo,
|
|
|
|
addInternalBarcode, regenerateBarcode, checkBarcode,addNoPurchaseBarcode, addRegularBarcode
|
|
|
|
addInternalBarcode, regenerateBarcode, checkRawStock, addNoPurchaseBarcode, addRegularBarcode
|
|
|
|
} from "@/api/mes/barcode";
|
|
|
|
} from "@/api/mes/barcode";
|
|
|
|
import addPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue';
|
|
|
|
import addPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue';
|
|
|
|
import selectMaterial from '@//views/mes/materialinfo/selectMaterial.vue';
|
|
|
|
import selectMaterial from '@//views/mes/materialinfo/selectMaterial.vue';
|
|
|
@ -626,6 +620,7 @@ export default {
|
|
|
|
title: "",
|
|
|
|
title: "",
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
|
|
|
|
submitLoading: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
@ -642,6 +637,7 @@ export default {
|
|
|
|
materialCode: null,
|
|
|
|
materialCode: null,
|
|
|
|
materialName: null,
|
|
|
|
materialName: null,
|
|
|
|
materialSpec: null,
|
|
|
|
materialSpec: null,
|
|
|
|
|
|
|
|
barcodeSpec:null,
|
|
|
|
manufacturerId: null,
|
|
|
|
manufacturerId: null,
|
|
|
|
amount: null,
|
|
|
|
amount: null,
|
|
|
|
machineName: null,
|
|
|
|
machineName: null,
|
|
|
@ -719,6 +715,7 @@ export default {
|
|
|
|
{key: 30, label: `安全库存`, visible: true},
|
|
|
|
{key: 30, label: `安全库存`, visible: true},
|
|
|
|
{key: 31, label: `物料编码`, visible: true},
|
|
|
|
{key: 31, label: `物料编码`, visible: true},
|
|
|
|
{key: 32, label: `物料规格`, visible: true},
|
|
|
|
{key: 32, label: `物料规格`, visible: true},
|
|
|
|
|
|
|
|
{key: 33, label: `规格参数`, visible: true},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -727,8 +724,8 @@ export default {
|
|
|
|
internalForm: {},
|
|
|
|
internalForm: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
internalRules: {
|
|
|
|
internalRules: {
|
|
|
|
poNo: [
|
|
|
|
productBarcode: [
|
|
|
|
{required: true, message: "采购订单号不能为空", trigger: "change"}
|
|
|
|
{required: true, message: "成品条码不能为空", trigger: "change"}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
batchFlag: [
|
|
|
|
batchFlag: [
|
|
|
|
{required: true, message: "批次标识不能为空", trigger: "change"}
|
|
|
|
{required: true, message: "批次标识不能为空", trigger: "change"}
|
|
|
@ -751,9 +748,13 @@ export default {
|
|
|
|
noPurchaseBatchAmountDisabled: true,
|
|
|
|
noPurchaseBatchAmountDisabled: true,
|
|
|
|
|
|
|
|
|
|
|
|
saleBatchFlagDisable: true,
|
|
|
|
saleBatchFlagDisable: true,
|
|
|
|
saleBatchAmountDisabled: true,
|
|
|
|
orderBindAmount: 0,
|
|
|
|
|
|
|
|
safeBindAmount: 0,
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
noPurchaseRules: {
|
|
|
|
noPurchaseRules: {
|
|
|
|
|
|
|
|
materialCode: [
|
|
|
|
|
|
|
|
{required: true, message: "物料不能为空", trigger: "change"}
|
|
|
|
|
|
|
|
],
|
|
|
|
batchFlag: [
|
|
|
|
batchFlag: [
|
|
|
|
{required: true, message: "批次标识不能为空", trigger: "blur"}
|
|
|
|
{required: true, message: "批次标识不能为空", trigger: "blur"}
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -770,7 +771,7 @@ export default {
|
|
|
|
regularForm: {},
|
|
|
|
regularForm: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
regularRules: {
|
|
|
|
regularRules: {
|
|
|
|
materialCode2: [
|
|
|
|
materialCode: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
required: true, message: "物料不能为空", trigger: ["blur", "change"]
|
|
|
|
required: true, message: "物料不能为空", trigger: ["blur", "change"]
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -826,6 +827,10 @@ export default {
|
|
|
|
batchCode: null,
|
|
|
|
batchCode: null,
|
|
|
|
palletInfoCode: null,
|
|
|
|
palletInfoCode: null,
|
|
|
|
materialId: null,
|
|
|
|
materialId: null,
|
|
|
|
|
|
|
|
materialCode: null,
|
|
|
|
|
|
|
|
materialName: null,
|
|
|
|
|
|
|
|
materialSpec: null,
|
|
|
|
|
|
|
|
barcodeSpec: null,
|
|
|
|
manufacturerId: null,
|
|
|
|
manufacturerId: null,
|
|
|
|
amount: null,
|
|
|
|
amount: null,
|
|
|
|
barcodeAmount: null,
|
|
|
|
barcodeAmount: null,
|
|
|
@ -846,7 +851,9 @@ export default {
|
|
|
|
bindBy: null,
|
|
|
|
bindBy: null,
|
|
|
|
bindTime: null,
|
|
|
|
bindTime: null,
|
|
|
|
updateBy: null,
|
|
|
|
updateBy: null,
|
|
|
|
updateTime: null
|
|
|
|
updateTime: null,
|
|
|
|
|
|
|
|
currentOrderBindAmount: 0,
|
|
|
|
|
|
|
|
currentSafeBindAmount: 0
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -879,30 +886,60 @@ export default {
|
|
|
|
/** 提交采购订单按钮 */
|
|
|
|
/** 提交采购订单按钮 */
|
|
|
|
submitPurchaseOrderForm() {
|
|
|
|
submitPurchaseOrderForm() {
|
|
|
|
let selectedRow = this.$refs.purchaseOrderRef.selectedRow;
|
|
|
|
let selectedRow = this.$refs.purchaseOrderRef.selectedRow;
|
|
|
|
|
|
|
|
this.form.batchFlag = null;
|
|
|
|
|
|
|
|
this.form.amount = null;
|
|
|
|
|
|
|
|
this.form.materialCode = null;
|
|
|
|
|
|
|
|
this.form.materialId = null;
|
|
|
|
|
|
|
|
this.form.materialName = null;
|
|
|
|
|
|
|
|
this.form.materialSpec = null;
|
|
|
|
|
|
|
|
this.form.barcodeSpec = null;
|
|
|
|
|
|
|
|
this.form.projectNo = null;
|
|
|
|
|
|
|
|
this.form.purchaseOrderId = null;
|
|
|
|
|
|
|
|
//本次待生成订单条码数量
|
|
|
|
|
|
|
|
this.form.currentOrderBindAmount = null;
|
|
|
|
|
|
|
|
//本次待生成安全库存条码数量
|
|
|
|
|
|
|
|
this.form.currentSafeBindAmount = null;
|
|
|
|
|
|
|
|
//本次生成条码总数量
|
|
|
|
|
|
|
|
this.form.barcodeAmount = null;
|
|
|
|
|
|
|
|
this.form.poNo = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let currentOrderBindAmount = parseInt(selectedRow.orderBindAmount) - parseInt(selectedRow.orderBarcodeAmount);
|
|
|
|
|
|
|
|
let currentSafeBindAmount = parseInt(selectedRow.safeBindAmount) - parseInt(selectedRow.safeBarcodeAmount)
|
|
|
|
|
|
|
|
let canBindAmount = currentOrderBindAmount + currentSafeBindAmount;
|
|
|
|
|
|
|
|
if (selectedRow.mesMaterialId === null || selectedRow.mesMaterialId === '' || selectedRow.mesMaterialId === 0) {
|
|
|
|
|
|
|
|
this.$modal.msgError("物料信息不存在");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (canBindAmount <= 0) {
|
|
|
|
|
|
|
|
this.$modal.msgError("无可生成条码数量");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$set(this.form, "poNo", selectedRow.poNo);
|
|
|
|
this.form.barcodeType = '1';//条码类型(1原材料,2半成品,3成品,4背板)
|
|
|
|
this.form.barcodeType = '1';//条码类型(1原材料,2半成品,3成品,4背板)
|
|
|
|
// this.form.materialId = selectedRow.materialId;//在物料信息中对应的是ERPID
|
|
|
|
// this.form.materialId = selectedRow.materialId;//在物料信息中对应的是ERPID
|
|
|
|
|
|
|
|
this.form.materialId = selectedRow.mesMaterialId;//物料信息表中物料ID主键
|
|
|
|
this.form.materialCode = selectedRow.materialCode;
|
|
|
|
this.form.materialCode = selectedRow.materialCode;
|
|
|
|
this.form.materialName = selectedRow.materialName;
|
|
|
|
this.form.materialName = selectedRow.materialName;
|
|
|
|
|
|
|
|
this.form.materialSpec = selectedRow.materialSpec;
|
|
|
|
this.form.projectNo = selectedRow.projectNo;
|
|
|
|
this.form.projectNo = selectedRow.projectNo;
|
|
|
|
this.form.purchaseOrderId = selectedRow.purchaseOrderId;
|
|
|
|
this.form.purchaseOrderId = selectedRow.purchaseOrderId;
|
|
|
|
this.form.poNo = selectedRow.poNo;
|
|
|
|
this.form.barcodeSpec = selectedRow.specificationParameter;
|
|
|
|
this.form.barcodeAmount = selectedRow.orderAmount;
|
|
|
|
//本次待生成订单条码数量
|
|
|
|
|
|
|
|
this.form.currentOrderBindAmount = currentOrderBindAmount;
|
|
|
|
|
|
|
|
//本次待生成安全库存条码数量
|
|
|
|
|
|
|
|
this.form.currentSafeBindAmount = currentSafeBindAmount;
|
|
|
|
|
|
|
|
//本次生成条码总数量
|
|
|
|
|
|
|
|
this.form.barcodeAmount = canBindAmount;
|
|
|
|
|
|
|
|
|
|
|
|
this.form.batchFlag = null;
|
|
|
|
|
|
|
|
this.form.amount = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getMaterialInfoByErpId(selectedRow.materialId).then(response => {
|
|
|
|
|
|
|
|
if (response.data == null) {
|
|
|
|
|
|
|
|
this.$modal.msgError("物料信息不存在");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (response.data.batchFlag != null) {
|
|
|
|
if (selectedRow.batchFlag != null && selectedRow.batchFlag !== '') {
|
|
|
|
this.form.batchFlag = response.data.batchFlag;
|
|
|
|
|
|
|
|
this.form.materialId = response.data.materialId;
|
|
|
|
|
|
|
|
this.saleBatchFlagDisable = true;
|
|
|
|
this.saleBatchFlagDisable = true;
|
|
|
|
|
|
|
|
this.form.batchFlag = selectedRow.batchFlag;
|
|
|
|
if (this.form.batchFlag === this.BATCH_FLAG.YES) {
|
|
|
|
if (this.form.batchFlag === this.BATCH_FLAG.YES) {
|
|
|
|
this.form.amount = response.data.batchAmount;
|
|
|
|
this.form.amount = selectedRow.batchAmount;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.form.amount = 1;
|
|
|
|
this.form.amount = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -910,7 +947,13 @@ export default {
|
|
|
|
this.saleBatchFlagDisable = false;
|
|
|
|
this.saleBatchFlagDisable = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.saleBatchAmountDisabled = this.form.amount != null && this.form.amount > 0;
|
|
|
|
|
|
|
|
|
|
|
|
getMaterialInfoByErpId(selectedRow.materialId).then(response => {
|
|
|
|
|
|
|
|
if (response.data == null) {
|
|
|
|
|
|
|
|
this.$modal.msgError("物料信息不存在");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.purchaseOrderOpen = false;
|
|
|
|
this.purchaseOrderOpen = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -976,19 +1019,15 @@ export default {
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.barcodeId != null) {
|
|
|
|
this.submitLoading = true;
|
|
|
|
updateBarcode(this.form).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
|
|
|
this.open = false;
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
addBarcode(this.form).then(response => {
|
|
|
|
addBarcode(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
}).finally(e => {
|
|
|
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -1024,6 +1063,9 @@ export default {
|
|
|
|
batchCode: null,
|
|
|
|
batchCode: null,
|
|
|
|
palletInfoCode: null,
|
|
|
|
palletInfoCode: null,
|
|
|
|
materialId: null,
|
|
|
|
materialId: null,
|
|
|
|
|
|
|
|
materialCode: null,
|
|
|
|
|
|
|
|
materialName: null,
|
|
|
|
|
|
|
|
materialSpec: null,
|
|
|
|
manufacturerId: null,
|
|
|
|
manufacturerId: null,
|
|
|
|
amount: null,
|
|
|
|
amount: null,
|
|
|
|
barcodeAmount: null,
|
|
|
|
barcodeAmount: null,
|
|
|
@ -1053,7 +1095,7 @@ export default {
|
|
|
|
handleInternalAdd() {
|
|
|
|
handleInternalAdd() {
|
|
|
|
this.resetInternal();
|
|
|
|
this.resetInternal();
|
|
|
|
this.internalOpen = true;
|
|
|
|
this.internalOpen = true;
|
|
|
|
this.title = "添加原材料条码信息";
|
|
|
|
this.title = "添加生产新增原材料条码信息";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
selectProductBarcodeInfoByBarcodeInfo() {
|
|
|
|
selectProductBarcodeInfoByBarcodeInfo() {
|
|
|
@ -1063,6 +1105,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
selectProductBarcodeInfoByBarcodeInfo(this.internalForm.productBarcode).then(response => {
|
|
|
|
selectProductBarcodeInfoByBarcodeInfo(this.internalForm.productBarcode).then(response => {
|
|
|
|
if (response.data == null) {
|
|
|
|
if (response.data == null) {
|
|
|
|
|
|
|
|
this.resetInternal();
|
|
|
|
this.$modal.msgError("成品信息不存在");
|
|
|
|
this.$modal.msgError("成品信息不存在");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1075,6 +1118,10 @@ export default {
|
|
|
|
this.$set(this.internalForm, "saleorderCode", response.data.saleorderCode);
|
|
|
|
this.$set(this.internalForm, "saleorderCode", response.data.saleorderCode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
|
|
this.resetInternal();
|
|
|
|
|
|
|
|
}).finally(e => {
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -1112,6 +1159,9 @@ export default {
|
|
|
|
batchCode: null,
|
|
|
|
batchCode: null,
|
|
|
|
palletInfoCode: null,
|
|
|
|
palletInfoCode: null,
|
|
|
|
materialId: null,
|
|
|
|
materialId: null,
|
|
|
|
|
|
|
|
materialCode: null,
|
|
|
|
|
|
|
|
materialName:null,
|
|
|
|
|
|
|
|
barcodeSpec:null,
|
|
|
|
manufacturerId: null,
|
|
|
|
manufacturerId: null,
|
|
|
|
amount: null,
|
|
|
|
amount: null,
|
|
|
|
barcodeAmount: null,
|
|
|
|
barcodeAmount: null,
|
|
|
@ -1154,11 +1204,12 @@ export default {
|
|
|
|
submitSelectMaterialForm() {
|
|
|
|
submitSelectMaterialForm() {
|
|
|
|
if (this.noPurchaseOpen) {
|
|
|
|
if (this.noPurchaseOpen) {
|
|
|
|
let selectedRow = this.$refs.selectMaterialRef.selectedRow;
|
|
|
|
let selectedRow = this.$refs.selectMaterialRef.selectedRow;
|
|
|
|
|
|
|
|
this.$set(this.noPurchaseForm, "materialCode", selectedRow.materialCode);
|
|
|
|
|
|
|
|
|
|
|
|
this.noPurchaseForm.barcodeType = '1';//条码类型(1原材料,2半成品,3成品,4背板)
|
|
|
|
this.noPurchaseForm.barcodeType = '1';//条码类型(1原材料,2半成品,3成品,4背板)
|
|
|
|
this.noPurchaseForm.materialId = selectedRow.materialId;
|
|
|
|
this.noPurchaseForm.materialId = selectedRow.materialId;
|
|
|
|
this.noPurchaseForm.materialCode = selectedRow.materialCode;
|
|
|
|
|
|
|
|
this.noPurchaseForm.materialName = selectedRow.materialName;
|
|
|
|
this.noPurchaseForm.materialName = selectedRow.materialName;
|
|
|
|
this.noPurchaseForm.materialSpec = selectedRow.materialSpec;
|
|
|
|
this.noPurchaseForm.barcodeSpec = selectedRow.materialSpec;
|
|
|
|
this.noPurchaseForm.batchFlag = selectedRow.batchFlag;
|
|
|
|
this.noPurchaseForm.batchFlag = selectedRow.batchFlag;
|
|
|
|
|
|
|
|
|
|
|
|
if (this.noPurchaseForm.batchFlag == null || this.noPurchaseForm.batchFlag === '') {
|
|
|
|
if (this.noPurchaseForm.batchFlag == null || this.noPurchaseForm.batchFlag === '') {
|
|
|
@ -1187,10 +1238,12 @@ export default {
|
|
|
|
submitNoPurchaseAddForm() {
|
|
|
|
submitNoPurchaseAddForm() {
|
|
|
|
this.$refs["noPurchaseForm"].validate(valid => {
|
|
|
|
this.$refs["noPurchaseForm"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
this.submitLoading = true;
|
|
|
|
|
|
|
|
const checkNoPurchaseForm = {materialId: this.noPurchaseForm.materialId};
|
|
|
|
const noPurchaseForm = this.noPurchaseForm;
|
|
|
|
const noPurchaseForm = this.noPurchaseForm;
|
|
|
|
checkBarcode(noPurchaseForm).then(response => {
|
|
|
|
checkRawStock(checkNoPurchaseForm).then(response => {
|
|
|
|
if (response.data === 2) {
|
|
|
|
if (response.data) {
|
|
|
|
this.$modal.confirm('已经有此物料的的条码,请确认是否继续生成?').then(function () {
|
|
|
|
this.$modal.confirm('已经有此物料库存,请确认是否继续生成条码?').then(function () {
|
|
|
|
return addNoPurchaseBarcode(noPurchaseForm)
|
|
|
|
return addNoPurchaseBarcode(noPurchaseForm)
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
@ -1207,6 +1260,8 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).finally(e => {
|
|
|
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1233,6 +1288,9 @@ export default {
|
|
|
|
batchCode: null,
|
|
|
|
batchCode: null,
|
|
|
|
palletInfoCode: null,
|
|
|
|
palletInfoCode: null,
|
|
|
|
materialId: null,
|
|
|
|
materialId: null,
|
|
|
|
|
|
|
|
materialCode: null,
|
|
|
|
|
|
|
|
materialName: null,
|
|
|
|
|
|
|
|
barcodeSpec: null,
|
|
|
|
manufacturerId: null,
|
|
|
|
manufacturerId: null,
|
|
|
|
amount: null,
|
|
|
|
amount: null,
|
|
|
|
barcodeAmount: null,
|
|
|
|
barcodeAmount: null,
|
|
|
@ -1270,10 +1328,10 @@ export default {
|
|
|
|
submitRegularSelectMaterialForm() {
|
|
|
|
submitRegularSelectMaterialForm() {
|
|
|
|
let selectedRow = this.$refs.selectMaterialRef.selectedRow;
|
|
|
|
let selectedRow = this.$refs.selectMaterialRef.selectedRow;
|
|
|
|
this.regularForm.barcodeType = '9';//条码类型(1原材料,2半成品,3成品,4背板,9固定条码)
|
|
|
|
this.regularForm.barcodeType = '9';//条码类型(1原材料,2半成品,3成品,4背板,9固定条码)
|
|
|
|
|
|
|
|
this.$set(this.regularForm, "materialCode", selectedRow.materialCode);
|
|
|
|
this.regularForm.materialId = selectedRow.materialId;
|
|
|
|
this.regularForm.materialId = selectedRow.materialId;
|
|
|
|
this.regularForm.materialCode = selectedRow.materialCode;
|
|
|
|
|
|
|
|
this.regularForm.materialName = selectedRow.materialName;
|
|
|
|
this.regularForm.materialName = selectedRow.materialName;
|
|
|
|
this.regularForm.materialSpec = selectedRow.materialSpec;
|
|
|
|
this.regularForm.barcodeSpec = selectedRow.materialSpec;
|
|
|
|
|
|
|
|
|
|
|
|
this.selectMaterialVisible = false;
|
|
|
|
this.selectMaterialVisible = false;
|
|
|
|
|
|
|
|
|
|
|
@ -1284,10 +1342,13 @@ export default {
|
|
|
|
submitRegularAddForm() {
|
|
|
|
submitRegularAddForm() {
|
|
|
|
this.$refs["regularForm"].validate(valid => {
|
|
|
|
this.$refs["regularForm"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
this.submitLoading = true;
|
|
|
|
addRegularBarcode(this.regularForm).then(response => {
|
|
|
|
addRegularBarcode(this.regularForm).then(response => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.regularOpen = false;
|
|
|
|
this.regularOpen = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
}).finally(e => {
|
|
|
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|