新建入库单据 入库单据管理页面 供应商修改 对应字段你修改

This commit is contained in:
liuhanqing
2025-10-20 10:26:30 +08:00
parent 5a128b6d9a
commit ecb2fe1722
7 changed files with 49 additions and 25 deletions

View File

@@ -41,14 +41,7 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="供应商" prop="supplierId">
<el-input
v-model="form.supplierName"
placeholder="请选择供应商"
@click.native="openSupplierSelector"
readonly
/>
</el-form-item>
<!-- 供应商选择已移至表格中 -->
</el-col>
</el-row>
</el-form>
@@ -71,8 +64,18 @@
<el-table :data="productList" border style="width: 100%">
<el-table-column type="index" label="序号" align="center"/>
<el-table-column label="物料编码" align="left" prop="productId" />
<el-table-column label="物料名称" align="left" prop="productName" />
<el-table-column fixed label="物料编码" align="left" prop="productId" />
<el-table-column fixed label="物料名称" align="left" prop="productName" />
<el-table-column label="供应商" align="left" prop="supplierId">
<template slot-scope="scope">
<el-input
v-model="scope.row.supplierName"
placeholder="请选择供应商"
@click.native="openSupplierSelectorForRow(scope.row, scope.$index)"
readonly
/>
</template>
</el-table-column>
<el-table-column label="规格型号" align="left" prop="spec" />
<el-table-column label="生产图号" align="left" prop="cargoNo" />
<el-table-column label="单位" align="left" prop="unit" />
@@ -349,10 +352,8 @@ export default {
{required: true, message: "请选择供应商", trigger: "change"}
],
inType:[
{required: true, message: "请选择单据类型", trigger: "change"}
{required: true, message: "请选择形态类型", trigger: "change"}
]
},
// 仓库选项
warehouseOptions: [],
@@ -364,6 +365,10 @@ export default {
supplierList: [],
// 选中的供应商
selectedSupplier: null,
// 当前操作的行
currentRow: null,
// 当前操作的行索引
currentRowIndex: null,
// 供应商总数
supplierTotal: 0,
// 供应商加载状态
@@ -449,8 +454,10 @@ export default {
});
},
/** 打开供应商选择对话框 */
openSupplierSelector() {
/** 打开供应商选择对话框(表格行) */
openSupplierSelectorForRow(row, index) {
this.currentRowIndex = index;
this.currentRow = row;
this.getSupplierListForDialog();
this.supplierDialog = true;
},
@@ -490,9 +497,14 @@ export default {
this.$modal.msgError("请选择一个供应商");
return;
}
this.form.supplierId = this.selectedSupplier.supplierNo;
this.form.supplierName = this.selectedSupplier.supplierName;
if (this.currentRow) {
// 为表格行设置供应商
this.currentRow.supplierId = this.selectedSupplier.supplierNo;
this.currentRow.supplierName = this.selectedSupplier.supplierName;
}
this.supplierDialog = false;
this.currentRow = null;
this.currentRowIndex = null;
},
/** 取消选择供应商 */
@@ -651,7 +663,11 @@ export default {
spare8: item.spare8,
spare9: item.spare9,
unit:item.unit,
productName: item.productName
productName: item.productName,
price: item.price,
spec : item.spec,
cargoNo: item.cargoNo,
supplierId: item.supplierId,
}))
};
addStockinNew(data).then(() => {

View File

@@ -151,7 +151,6 @@
</template>
</el-table-column>
<el-table-column label="仓库" align="left" prop="warehouseName"/><!--仓库-->
<el-table-column label="供应商" align="left" prop="supplierName"/><!--供应商-->
<el-table-column label="创建人" align="left" prop="createManName"/><!--创建人-->
<el-table-column label="部门" align="left" prop="departmentName"/><!--部门-->
<el-table-column label="建立时间" align="left" prop="createDate"/><!--建立时间-->
@@ -172,6 +171,7 @@
<el-table-column label="主单ID" align="left" prop="stockinId" width="160"/><!--主单ID-->
<el-table-column label="物料编码" align="left" prop="productId"/><!--物料编码-->
<el-table-column label="物料名称" align="left" prop="productName" width="160"/><!--物料编码-->
<el-table-column label="供应商" align="left" prop="supplierName"/><!--供应商-->
<el-table-column label="规格型号" align="left" prop="spec" />
<el-table-column label="生产图号" align="left" prop="cargoNo" />
<el-table-column label="单位" align="left" prop="unit" />
@@ -198,7 +198,7 @@
<el-table-column label="台次" align="left" prop="spare5"/>
<el-table-column label="合同号" align="left" prop="spare6"/>
<el-table-column label="件次" align="left" prop="spare7"/>
<el-table-column label="批次" align="left" prop="spare8"/>
<el-table-column label="批次" align="left" prop="lotNo"/>
<el-table-column label="单价" align="left" prop="price"/>
<el-table-column label="管理号" align="left" prop="spare9"/>
<el-table-column label="计划数量" align="right" prop="quantity"/><!--计划数量-->
@@ -210,6 +210,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="detailTotal>0"