|
|
|
@ -1,6 +1,31 @@
|
|
|
|
|
<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="materialCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.materialCode"
|
|
|
|
|
placeholder="请输入物料编码"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料名称" prop="poNo">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.materialName"
|
|
|
|
|
placeholder="请输入物料名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料规格" prop="poNo">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.materialSpec"
|
|
|
|
|
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
|
|
|
|
@ -11,16 +36,6 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="条码类型" prop="barcodeType">-->
|
|
|
|
|
<!-- <el-select v-model="queryParams.barcodeType" placeholder="请选择条码类型" clearable>-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="dict in dict.type.barcode_type"-->
|
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
|
<!-- :label="dict.label"-->
|
|
|
|
|
<!-- :value="dict.value"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item label="采购订单号" prop="poNo">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.poNo"
|
|
|
|
@ -119,7 +134,9 @@
|
|
|
|
|
|
|
|
|
|
<el-table-column label="批次代码" align="center" prop="batchCode" v-if="columns[6].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="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="batchFlag" v-if="columns[3].visible">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.active_flag" :value="scope.row.batchFlag"/>
|
|
|
|
@ -429,6 +446,9 @@
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="批次标识" prop="batchFlag">
|
|
|
|
@ -445,15 +465,15 @@
|
|
|
|
|
<!-- <el-form-item label="供应商ID" prop="manufacturerId">-->
|
|
|
|
|
<!-- <el-input v-model="form.manufacturerId" placeholder="请输入供应商ID" />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item prop="amount" v-if="noPurchaseForm.batchFlag==='1'">
|
|
|
|
|
<!--el-form-item prop="amount" v-if="noPurchaseForm.batchFlag==='1'">
|
|
|
|
|
<span slot="label">
|
|
|
|
|
<el-tooltip content="每个物料条码中包含的数量,如:一袋螺丝有60个" placement="top">
|
|
|
|
|
<i class="el-icon-question"></i>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
批次数量
|
|
|
|
|
</span>
|
|
|
|
|
<el-input v-model="noPurchaseForm.amount" placeholder="请在物料信息中维护"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-input v-model="noPurchaseForm.amount" placeholder="请在物料信息中维护" />
|
|
|
|
|
</el-form-item-->
|
|
|
|
|
|
|
|
|
|
<el-form-item prop="barcodeAmount">
|
|
|
|
|
<span slot="label">
|
|
|
|
@ -557,7 +577,7 @@
|
|
|
|
|
import {
|
|
|
|
|
listBarcode, getBarcode, delBarcode, addBarcode, updateBarcode,
|
|
|
|
|
printBarcodes, getMaterialInfoByErpId, selectProductBarcodeInfoByBarcodeInfo,
|
|
|
|
|
addInternalBarcode, regenerateBarcode, addNoPurchaseBarcode, addRegularBarcode
|
|
|
|
|
addInternalBarcode, regenerateBarcode, checkBarcode,addNoPurchaseBarcode, addRegularBarcode
|
|
|
|
|
} from "@/api/mes/barcode";
|
|
|
|
|
import addPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue';
|
|
|
|
|
import selectMaterial from '@//views/mes/materialinfo/selectMaterial.vue';
|
|
|
|
@ -607,6 +627,9 @@ export default {
|
|
|
|
|
batchCode: null,
|
|
|
|
|
palletInfoCode: null,
|
|
|
|
|
materialId: null,
|
|
|
|
|
materialCode: null,
|
|
|
|
|
materialName: null,
|
|
|
|
|
materialSpec: null,
|
|
|
|
|
manufacturerId: null,
|
|
|
|
|
amount: null,
|
|
|
|
|
machineName: null,
|
|
|
|
@ -682,6 +705,8 @@ export default {
|
|
|
|
|
{key: 28, label: `更新时间`, visible: false},
|
|
|
|
|
{key: 29, label: `销售订单号`, visible: true},
|
|
|
|
|
{key: 30, label: `安全库存`, visible: true},
|
|
|
|
|
{key: 31, label: `物料编码`, visible: true},
|
|
|
|
|
{key: 32, label: `物料规格`, visible: true},
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -720,9 +745,6 @@ export default {
|
|
|
|
|
batchFlag: [
|
|
|
|
|
{required: true, message: "批次标识不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
amount: [
|
|
|
|
|
{required: true, message: "批次数量不能为空", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
barcodeAmount: [
|
|
|
|
|
{required: true, message: "条码数量不能为空", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
@ -1098,7 +1120,8 @@ export default {
|
|
|
|
|
bindBy: null,
|
|
|
|
|
bindTime: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateTime: null
|
|
|
|
|
updateTime: null,
|
|
|
|
|
confirmFlag:null
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("noPurchaseForm");
|
|
|
|
|
},
|
|
|
|
@ -1123,6 +1146,7 @@ export default {
|
|
|
|
|
this.noPurchaseForm.materialId = selectedRow.materialId;
|
|
|
|
|
this.noPurchaseForm.materialCode = selectedRow.materialCode;
|
|
|
|
|
this.noPurchaseForm.materialName = selectedRow.materialName;
|
|
|
|
|
this.noPurchaseForm.materialSpec = selectedRow.materialSpec;
|
|
|
|
|
this.noPurchaseForm.batchFlag = selectedRow.batchFlag;
|
|
|
|
|
|
|
|
|
|
if (this.noPurchaseForm.batchFlag == null || this.noPurchaseForm.batchFlag === '') {
|
|
|
|
@ -1151,16 +1175,33 @@ export default {
|
|
|
|
|
submitNoPurchaseAddForm() {
|
|
|
|
|
this.$refs["noPurchaseForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
const noPurchaseForm = this.noPurchaseForm;
|
|
|
|
|
checkBarcode(noPurchaseForm).then(response => {
|
|
|
|
|
if (response.data === 2) {
|
|
|
|
|
this.$modal.confirm('已经有此物料的的条码,请确认是否继续生成?').then(function () {
|
|
|
|
|
return addNoPurchaseBarcode(noPurchaseForm)
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.noPurchaseOpen = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
addNoPurchaseBarcode(this.noPurchaseForm).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.noPurchaseOpen = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancelNoPurchase() {
|
|
|
|
|
this.noPurchaseOpen = false;
|
|
|
|
|