up
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
/*
|
||||
2024 12 16
|
||||
新增props:"upFlag",用于更新父组件表单数据
|
||||
新增props:"warehouseInfo",用于获取仓库信息
|
||||
*/
|
||||
/* 2024 12 16 新增props:"upFlag",用于更新父组件表单数据
|
||||
新增props:"warehouseInfo",用于获取仓库信息 */
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row v-if="optType != 'view'" :gutter="10" class="mb8">
|
||||
@@ -55,10 +52,7 @@
|
||||
>导入</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -66,12 +60,7 @@
|
||||
:data="productrecptlineList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
fixed="left"
|
||||
/>
|
||||
<el-table-column type="selection" width="55" align="center" fixed="left" />
|
||||
<el-table-column
|
||||
label="产品物料编码"
|
||||
width="120px"
|
||||
@@ -141,11 +130,15 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品物料编码" prop="itemCode">
|
||||
<el-input
|
||||
v-model="form.itemCode"
|
||||
placeholder="请输入产品物料编码"
|
||||
readonly
|
||||
/>
|
||||
<el-input v-model="form.itemCode" placeholder="请输入产品物料编码" readonly>
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleSelectProduct"
|
||||
icon="el-icon-search"
|
||||
v-if="title === '添加产品入库记录行'"
|
||||
></el-button>
|
||||
</el-input>
|
||||
<ItemSelect ref="itemSelect" @onSelected="onItemSelected"> </ItemSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -159,22 +152,14 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="unitOfMeasure">
|
||||
<el-input
|
||||
v-model="form.unitOfMeasure"
|
||||
placeholder="请输入单位"
|
||||
readonly
|
||||
/>
|
||||
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格型号" prop="specification">
|
||||
<el-input
|
||||
v-model="form.specification"
|
||||
placeholder="请输入内容"
|
||||
readonly
|
||||
/>
|
||||
<el-input v-model="form.specification" placeholder="请输入内容" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -209,11 +194,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -251,10 +232,7 @@
|
||||
</el-upload>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitXlsx"
|
||||
:disabled="!(ProAllArr.length > 0)"
|
||||
<el-button type="primary" @click="submitXlsx" :disabled="!(ProAllArr.length > 0)"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="cancelXlsx">取 消</el-button>
|
||||
@@ -273,6 +251,7 @@ import {
|
||||
} from "@/api/mes/wm/productrecptline";
|
||||
import StockSelect from "@/components/stockSelect/single.vue";
|
||||
import { getTreeList } from "@/api/mes/wm/warehouse";
|
||||
import ItemSelect from "@/components/itemSelect/single.vue";
|
||||
// 引入xlsx
|
||||
import * as XLSX from "xlsx";
|
||||
// 引入lodash
|
||||
@@ -284,6 +263,7 @@ export default {
|
||||
name: "Productrecptline",
|
||||
components: {
|
||||
StockSelect,
|
||||
ItemSelect
|
||||
},
|
||||
props: {
|
||||
recptId: null,
|
||||
@@ -358,9 +338,7 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
itemId: [{ required: true, message: "产品不能为空", trigger: "blur" }],
|
||||
warehouseId: [
|
||||
{ required: true, message: "入库仓库不能为空", trigger: "blur" },
|
||||
],
|
||||
warehouseId: [{ required: true, message: "入库仓库不能为空", trigger: "blur" }],
|
||||
quantityRecived: [
|
||||
{ required: true, message: "入库数量不能为空", trigger: "blur" },
|
||||
],
|
||||
@@ -394,7 +372,7 @@ export default {
|
||||
this.$modal.msgError("数据导入失败,请稍后重试!");
|
||||
});
|
||||
},
|
||||
// 关闭 导入xlsx的弹窗
|
||||
// 关闭 导入xlsx的弹窗
|
||||
cancelXlsx() {
|
||||
this.ImprotXlsxFlag = false;
|
||||
// 清空文件列表
|
||||
@@ -666,6 +644,20 @@ export default {
|
||||
this.form.areaId = obj[2];
|
||||
}
|
||||
},
|
||||
//物料选择弹出框
|
||||
handleSelectProduct() {
|
||||
this.$refs.itemSelect.showFlag = true;
|
||||
},
|
||||
//物料选择弹出框
|
||||
onItemSelected(obj) {
|
||||
if (obj != undefined && obj != null) {
|
||||
this.form.itemId = obj.itemId;
|
||||
this.form.itemCode = obj.itemCode;
|
||||
this.form.itemName = obj.itemName;
|
||||
this.form.specification = obj.specification;
|
||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeUpdate() {
|
||||
console.log(
|
||||
|
Reference in New Issue
Block a user