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