Merge remote-tracking branch 'origin/master'

This commit is contained in:
猫猫guowen
2025-08-21 11:19:11 +08:00
15 changed files with 354 additions and 62 deletions

View File

@@ -3811,6 +3811,8 @@ export default {
},
// ***************客户管理**************
basCustomer: {
customerManagement:'客户管理',
customerNo: '客户编号',
customerGroupNo: '客户基本分类',
customerName: '客户名称',

View File

@@ -332,6 +332,7 @@ export default {
},
// ***************出库单据管理**************
outStockoutManage: {
customerManagement:'客户管理',
stockoutId: '出库单编号',
outType: '出库类型',
status: '单据状态',
@@ -3811,6 +3812,7 @@ export default {
},
// ***************客户管理**************
basCustomer: {
customerManagement:'客户管理',
customerNo: '客户编号',
customerGroupNo: '客户基本分类',
customerName: '客户名称',

View File

@@ -332,6 +332,7 @@ export default {
},
// ***************出库单据管理**************
outStockoutManage: {
stockoutId: '出库单编号',
outType: '出库类型',
status: '单据状态',
@@ -3811,6 +3812,7 @@ export default {
},
// ***************客户管理**************
basCustomer: {
customerManagement:'客户管理',
customerNo: '客户编号',
customerGroupNo: '客户基本分类',
customerName: '客户名称',

View File

@@ -6,7 +6,7 @@
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item :label="$t('receiveStockinAdd.warehouse')" prop="warehouseId">
<el-select v-model="form.warehouseId" :placeholder="$t('receiveStockinAdd.selectWarehouse')">
<el-option
@@ -18,16 +18,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item :label="$t('receiveStockinAdd.supplier')" prop="supplierId">
<el-select v-model="form.supplierId" :placeholder="$t('receiveStockinAdd.selectSupplier')">
<el-option
v-for="item in supplierOptions"
:key="item.id"
:label="item.simpleName"
:value="item.supplierNo"
/>
</el-select>
<el-input
v-model="form.supplierName"
:placeholder="$t('receiveStockinAdd.selectSupplier')"
@click.native="openSupplierSelector"
readonly
/>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
@@ -35,7 +33,7 @@
<el-input v-model="form.batchNo" placeholder="请输入批次号" />
</el-form-item>
</el-col>-->
<el-col :span="8">
<el-col :span="6">
<el-form-item :label="$t('receiveStockinAdd.remark')" prop="remark">
<el-input v-model="form.remark" :placeholder="$t('receiveStockinAdd.inputRemark')"/>
</el-form-item>
@@ -202,6 +200,67 @@
<el-button @click="upload.open = false">{{ $t('receiveStockinAdd.cancel') }}</el-button>
</div>
</el-dialog>
<!-- 供应商选择对话框 -->
<el-dialog title="选择供应商" :visible.sync="supplierDialog" width="800px" append-to-body>
<el-form :model="supplierQueryParams" ref="supplierQueryForm" :inline="true">
<el-form-item label="供应商编号" prop="supplierNo">
<el-input
v-model="supplierQueryParams.supplierNo"
placeholder="请输入供应商编号"
clearable
size="small"
@keyup.enter.native="handleSupplierQuery"
/>
</el-form-item>
<el-form-item label="供应商名称" prop="supplierName">
<el-input
v-model="supplierQueryParams.supplierName"
placeholder="请输入供应商名称"
clearable
size="small"
@keyup.enter.native="handleSupplierQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleSupplierQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetSupplierQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table
ref="supplierTable"
v-loading="supplierLoading"
:data="supplierList"
border
@row-click="handleSupplierRowClick"
highlight-current-row
style="width: 100%"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="供应商编号" align="center" prop="supplierNo" />
<el-table-column label="供应商名称" align="center" prop="supplierName" />
<el-table-column label="简称" align="center" prop="simpleName" />
<el-table-column label="是否可用" align="center" prop="useable">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_available" :value="scope.row.useable"/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="supplierTotal > 0"
:total="supplierTotal"
:page.sync="supplierQueryParams.pageNum"
:limit.sync="supplierQueryParams.pageSize"
@pagination="getSupplierList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelectSupplier">确定</el-button>
<el-button @click="cancelSelectSupplier">取消</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -215,13 +274,14 @@ import {listWarehouse} from "@/api/bas/warehouse"
export default {
name: "InAdd",
dicts: ['sys_normal_disable', 'is_active', 'storage_cond'],
dicts: ['sys_normal_disable', 'is_active', 'storage_cond', 'is_available'],
data() {
return {
// 表单参数
form: {
warehouseId: undefined,
supplierId: undefined,
supplierName: undefined,
remark: undefined,
totalQuantity: 0,
totalAmount: 0,
@@ -245,6 +305,24 @@ export default {
warehouseOptions: [],
// 供应商选项
supplierOptions: [],
// 供应商选择对话框
supplierDialog: false,
// 供应商列表
supplierList: [],
// 选中的供应商
selectedSupplier: null,
// 供应商总数
supplierTotal: 0,
// 供应商加载状态
supplierLoading: false,
// 供应商查询参数
supplierQueryParams: {
pageNum: 1,
pageSize: 10,
supplierNo: null,
supplierName: null
},
// 物料列表
productList: [],
// 物料选择对话框
@@ -311,12 +389,64 @@ export default {
this.productLoading = false;
});
},
/** 获取供应商列表 */
/** 获取供应商列表(下拉框选项) */
getSupplierList() {
listBasSupplier().then(response => {
this.supplierOptions = response.rows;
});
},
/** 打开供应商选择对话框 */
openSupplierSelector() {
this.getSupplierListForDialog();
this.supplierDialog = true;
},
/** 获取供应商列表(对话框数据) */
getSupplierListForDialog() {
this.supplierLoading = true;
listBasSupplier(this.supplierQueryParams).then(response => {
this.supplierList = response.rows;
this.supplierTotal = response.total;
this.supplierLoading = false;
});
},
/** 供应商查询 */
handleSupplierQuery() {
this.supplierQueryParams.pageNum = 1;
this.getSupplierListForDialog();
},
/** 重置供应商查询 */
resetSupplierQuery() {
this.resetForm("supplierQueryForm");
// this.supplierQueryParams.useable = "0";
this.handleSupplierQuery();
},
/** 供应商行点击事件 */
handleSupplierRowClick(row) {
this.selectedSupplier = row;
this.$refs.supplierTable.setCurrentRow(row);
},
/** 确认选择供应商 */
confirmSelectSupplier() {
if (!this.selectedSupplier) {
this.$modal.msgError("请选择一个供应商");
return;
}
this.form.supplierId = this.selectedSupplier.supplierNo;
this.form.supplierName = this.selectedSupplier.supplierName;
this.supplierDialog = false;
},
/** 取消选择供应商 */
cancelSelectSupplier() {
this.selectedSupplier = null;
this.supplierDialog = false;
},
/** 添加物料按钮操作 */
handleAddProduct() {
@@ -393,6 +523,7 @@ export default {
this.form = {
warehouseId: undefined,
supplierId: undefined,
supplierName: undefined,
remark: undefined,
totalQuantity: 0,
totalAmount: 0,
@@ -402,6 +533,8 @@ export default {
// 重置计数器
this.totalQuantity = 0;
this.totalAmount = 0;
// 清空选中的供应商
this.selectedSupplier = null;
// 重置表单校验结果
this.$refs["form"].resetFields();

View File

@@ -9,7 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('inReceiveStockin.materialDesc')" prop="stockSource"><!--物料描述-->
<el-form-item :label="$t('inReceiveStockin.materialDesc')" prop="materialDesc"><!--物料描述-->
<el-input
v-model="queryParams.materialDesc"
:placeholder="$t('inReceiveStockin.inputMaterialDesc')"
@@ -36,7 +36,6 @@
<el-select
v-model="queryParams.status"
:placeholder="$t('inReceiveStockin.selectStatus')"
clearable
@change="handleQuery"
>
<el-option
@@ -327,7 +326,8 @@ export default {
departmentNo: null,
customerNo: null,
classNo: null,
supplierNo: null
supplierNo: null,
materialDesc: null
},
queryDetailParams: {
pageNum: 1,
@@ -391,7 +391,8 @@ export default {
departmentNo: null,
customerNo: null,
classNo: null,
supplierNo: null
supplierNo: null,
materialDesc: null
}
this.resetForm("form")
},

View File

@@ -14,9 +14,11 @@
</el-form-item>
<el-form-item :label="$t('addOutStockout.customer')" prop="customerNo" required><!--客户-->
<el-input
v-model="formData.customerNo"
v-model="formData.customerName"
:placeholder="$t('addOutStockout.inputCustomerNo')"
clearable
@click.native="openCustomerSelector"
readonly
/>
</el-form-item>
<el-form-item :label="$t('addOutStockout.documentType')" prop="outType" required><!--单据类型-->
@@ -105,17 +107,68 @@
<el-button @click="cancelSelectMaterials">{{$t('addOutStockout.cancel')}}<!--取 消--></el-button>
</div>
</el-dialog>
<!-- 选择客户弹窗 -->
<el-dialog :title="$t('basCustomer.customerManagement')" :visible.sync="customerDialog" width="800px" append-to-body>
<el-form :model="customerQueryParams" ref="customerQueryForm" size="small" :inline="true" label-width="100px">
<el-form-item :label="$t('basCustomer.customerNo')" prop="customerNo"><!--客户编号-->
<el-input
v-model="customerQueryParams.customerNo"
:placeholder="$t('basCustomer.inputCustomerNo')"
clearable
@keyup.enter.native="handleCustomerQuery"
/>
</el-form-item>
<el-form-item :label="$t('basCustomer.customerName')" prop="customerName"><!--客户名称-->
<el-input
v-model="customerQueryParams.customerName"
:placeholder="$t('basCustomer.inputCustomerName')"
clearable
@keyup.enter.native="handleCustomerQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleCustomerQuery">{{$t('addOutStockout.search')}}<!--搜索--></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetCustomerQuery">{{$t('addOutStockout.reset')}}<!--重置--></el-button>
</el-form-item>
</el-form>
<el-table ref="customerTable" v-loading="customerLoading" :data="customerList" @row-click="handleCustomerRowClick" highlight-current-row>
<el-table-column :label="$t('basCustomer.customerNo')" align="left" prop="customerNo" /><!--客户编号-->
<el-table-column :label="$t('basCustomer.customerName')" align="left" prop="customerName" /><!--客户名称-->
<!-- <el-table-column :label="$t('basCustomer.simpleName')" align="left" prop="simpleName" />客户简称 -->
<el-table-column :label="$t('basCustomer.useable')" align="left" prop="useable">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_available" :value="scope.row.useable"/>
</template>
</el-table-column><!--是否可用-->
</el-table>
<pagination
v-show="customerTotal > 0"
:total="customerTotal"
:page.sync="customerQueryParams.pageNum"
:limit.sync="customerQueryParams.pageSize"
@pagination="getCustomerList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmSelectCustomer">{{$t('addOutStockout.confirm')}}<!--确 定--></el-button>
<el-button @click="cancelSelectCustomer">{{$t('addOutStockout.cancel')}}<!--取 消--></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listProductAndStock,saveOutStock } from "@/api/out/outStockout";
import {listWarehouse} from "@/api/bas/warehouse";
import { listBasCustomer } from "@/api/bas/BasCustomer";
import Pagination from "@/components/Pagination";
export default {
name: "AddOutStock",
dicts: ['out_bill_type', 'bill_status'],
dicts: ['out_bill_type', 'bill_status', 'is_available'],
components: {
Pagination
},
@@ -124,8 +177,10 @@ export default {
// 遮罩层
loading: false,
materialLoading: false,
customerLoading: false,
// 总条数
total: 0,
customerTotal: 0,
// 表单验证规则
rules: {
warehouseId: [
@@ -142,6 +197,7 @@ export default {
formData: {
warehouseId: null,
customerNo: null,
customerName: null, // 添加客户名称字段,用于显示
outType: null
},
// 仓库选项
@@ -164,6 +220,20 @@ export default {
productName: null,
quantity: null,
warehouseId: null
},
// 客户选择弹窗
customerDialog: false,
// 客户列表数据
customerList: [],
// 当前选中的客户
selectedCustomer: null,
// 客户查询参数
customerQueryParams: {
pageNum: 1,
pageSize: 10,
customerNo: null,
customerName: null,
useable: '1' // 默认只查询可用的客户
}
};
},
@@ -181,6 +251,51 @@ export default {
this.warehouseOptions = response.rows;
});
},
/** 打开客户选择弹窗 */
openCustomerSelector() {
this.customerDialog = true;
this.getCustomerList();
},
/** 获取客户列表 */
getCustomerList() {
this.customerLoading = true;
listBasCustomer(this.customerQueryParams).then(response => {
this.customerList = response.rows;
this.customerTotal = response.total;
this.customerLoading = false;
});
},
/** 客户搜索按钮操作 */
handleCustomerQuery() {
this.customerQueryParams.pageNum = 1;
this.getCustomerList();
},
/** 客户重置按钮操作 */
resetCustomerQuery() {
this.resetForm("customerQueryForm");
this.customerQueryParams.useable = '1'; // 保持默认只查询可用的客户
this.handleCustomerQuery();
},
/** 客户行点击事件 */
handleCustomerRowClick(row) {
this.selectedCustomer = row;
this.$refs['customerTable']?.setCurrentRow(row);
},
/** 确认选择客户 */
confirmSelectCustomer() {
if (!this.selectedCustomer) {
this.$modal.msgError(this.$t('basCustomer.pleaseSelectCustomer'));
return;
}
this.formData.customerNo = this.selectedCustomer.customerNo;
this.formData.customerName = this.selectedCustomer.customerName;
this.customerDialog = false;
},
/** 取消选择客户 */
cancelSelectCustomer() {
this.selectedCustomer = null;
this.customerDialog = false;
},
/** 打开选择物资弹窗 */
handleSelectMaterials() {
if (!this.formData.warehouseId) {
@@ -289,9 +404,11 @@ export default {
this.formData = {
warehouseId: null,
customerNo: null,
customerName: null,
outType: null
};
this.materialList = [];
this.selectedCustomer = null;
},
/** 重新建单 */
handleReload() {