现场调试修改 入库 出库 放货重新分配货位

This commit is contained in:
liuhanqing
2025-12-26 13:23:28 +08:00
parent ced125c8e9
commit 6b56e5f2ad
53 changed files with 3397 additions and 1832 deletions

View File

@@ -50,3 +50,12 @@ export function barcodePrinting(data) {
data:data
})
}
// 绑定托盘
export function bindTray(data) {
return request({
url: '/in/stockInDetail/bindTray',
method: 'post',
data: data
})
}

View File

@@ -115,7 +115,18 @@
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-download"
size="mini"
:disabled="detailSingle"
@click="bindTrayCode"
v-hasPermi="['in:stockIn:barcodePrinting']"
>绑定托盘
</el-button>
<!-- <el-button
type="info"
plain
icon="el-icon-download"
@@ -123,8 +134,8 @@
:disabled="detailMultiple"
@click="handleBarcodePrinting"
v-hasPermi="['in:stockIn:barcodePrinting']"
>打印条码<!--打印条码-->
</el-button>
>打印条码&lt;!&ndash;打印条码&ndash;&gt;
</el-button>-->
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -226,6 +237,39 @@
@pagination="getDetailList"
/>
<!-- 绑定托盘对话框 -->
<el-dialog :title="'绑定托盘'" :visible.sync="bindOpen" width="600px" append-to-body>
<el-descriptions title="物料信息" :column="2" border>
<el-descriptions-item label="物料编码">{{ bindData.productId }}</el-descriptions-item>
<el-descriptions-item label="物料名称">{{ bindData.productName }}</el-descriptions-item>
<el-descriptions-item label="计划数量">{{ bindData.quantity}}</el-descriptions-item>
<el-descriptions-item label="子单ID">{{ bindData.stockinDetailId }}</el-descriptions-item>
</el-descriptions>
<el-form ref="bindForm" :model="bindForm" :rules="bindRules" label-width="100px" style="margin-top: 20px;">
<el-form-item label="仓库" prop="warehouseId">
<el-select v-model="bindForm.warehouseId" placeholder="请选择仓库" style="width: 100%">
<el-option
v-for="item in warehouseOptions"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
/>
</el-select>
</el-form-item>
<el-form-item label="托盘条码" prop="trayCode">
<el-input v-model="bindForm.trayCode" placeholder="请输入托盘条码" />
</el-form-item>
<el-form-item label="绑定数量" prop="quantity">
<el-input-number v-model="bindForm.quantity" :min="1" :max="bindData.quantity" label="绑定数量" style="width: 100%"></el-input-number>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBind">确 定</el-button>
<el-button @click="cancelBind">取 消</el-button>
</div>
</el-dialog>
<!-- 打印模板 -->
<vue-easy-print v-show="true" ref="easyPrint2">
<div v-for="item in printData" :key="item.stockinDetailId" style="page-break-after:always" class="vue-easy-print">
@@ -249,7 +293,7 @@ import {
reviewStockIn,
confirmationStockIn
} from "@/api/in/stockIn"
import {listStockInDetail, barcodePrinting} from "@/api/in/stockInDetail"
import {listStockInDetail, barcodePrinting, bindTray} from "@/api/in/stockInDetail"
import {getLodop} from "@/plugins/LodopFuncs.js"
import {listWarehouse} from "@/api/bas/warehouse";
import vueEasyPrint from 'vue-easy-print'
@@ -277,6 +321,30 @@ export default {
stockInListSelected: [],
stockInDetailListSelected: [],
printData:[],
bindData:{
stockinDetailId:"",
productId:"",
productName:"",
quantity:""
},
// 绑定托盘弹出层
bindOpen: false,
bindForm: {
warehouseId: null,
trayCode: null,
quantity: null
},
bindRules: {
warehouseId: [
{ required: true, message: "仓库不能为空", trigger: "change" }
],
trayCode: [
{ required: true, message: "托盘条码不能为空", trigger: "blur" }
],
quantity: [
{ required: true, message: "绑定数量不能为空", trigger: "blur" }
]
},
// 非单个禁用
single: true,
detailSingle: true,
@@ -470,6 +538,52 @@ export default {
this.$modal.msgError('只有执行中的单据可以确认')
}
},
/*绑定托盘*/
bindTrayCode(row){
if (this.stockInDetailListSelected.length === 0) {
this.$modal.msgWarning('请选择要绑定的子单据')
return
}
if (this.stockInDetailListSelected.length > 1) {
this.$modal.msgWarning('只能选择一条子单据托盘绑定')
return
}
this.bindData = this.stockInDetailListSelected[0];
this.bindForm = {
warehouseId: null,
trayCode: null,
quantity: this.bindData.quantity
};
// 如果主单有仓库信息,可以尝试默认选中(可选)
// if (this.stockInListSelected.length > 0) {
// this.bindForm.warehouseId = this.stockInListSelected[0].warehouseId;
// }
this.bindOpen = true;
},
submitBind() {
this.$refs["bindForm"].validate(valid => {
if (valid) {
const data = {
stockinDetailId: this.bindData.stockinDetailId,
warehouseId: this.bindForm.warehouseId,
trayCode: this.bindForm.trayCode,
quantity: this.bindForm.quantity
};
bindTray(data).then(response => {
this.$modal.msgSuccess("绑定成功");
this.bindOpen = false;
this.getDetailList(this.bindData.stockinId);
});
}
});
},
cancelBind() {
this.bindOpen = false;
this.resetForm("bindForm");
},
/** 打印条码按钮操作 */
handleBarcodePrinting(row){
this.printData = this.stockInDetailListSelected

View File

@@ -0,0 +1,355 @@
<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="customerNo">
<el-input v-model="queryParams.customerNo" placeholder="请输入客户编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="queryParams.simpleName" placeholder="请输入简称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="queryParams.useable" placeholder="请选择是否可用" clearable>
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['bas:BasCustomer:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['bas:BasCustomer:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BasCustomerList" @selection-change="handleSelectionChange" max-height="700">
<el-table-column type="selection" align="center" />
<el-table-column label="客户编号" align="left" prop="customerNo" />
<!-- <el-table-column label="客户类别" align="left" prop="customerGroupNo" /> -->
<el-table-column label="客户名称" align="left" prop="customerName" />
<el-table-column label="简称" align="left" prop="simpleName" />
<el-table-column label="是否可用" 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-column label="备注" align="left" prop="remark" />
<!-- <el-table-column width="120" label="业务部门" align="left" prop="businessDepartment" />
<el-table-column width="120" label="业务员" align="left" prop="salesman" />
<el-table-column width="120" label="助记码" align="left" prop="mnemonicCode" />
<el-table-column width="120" label="客户类型" align="left" prop="type" />
<el-table-column width="120" label="纳税人识别号" align="left" prop="taxpayerRegistrationNumber" />
<el-table-column width="120" label="财务组织" align="left" prop="organization" />
<el-table-column width="120" label="上级客户" align="left" prop="supCustomer" />
<el-table-column width="120" label="个人客户" align="left" prop="retailInvestor" />
<el-table-column width="120" label="国家/地区" align="left" prop="country" />
<el-table-column width="120" label="时区" align="left" prop="timeZone" />
<el-table-column width="120" label="数据格式" align="left" prop="dataFormat" />
<el-table-column width="120" label="联系人" align="left" prop="contactName" />
<el-table-column width="120" label="装运国家" align="left" prop="shipment" />
<el-table-column width="120" label="税种" align="left" prop="taxCategory" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改客户对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="客户编号" prop="customerNo">
<el-input v-model="form.customerNo" placeholder="请输入客户编号" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="form.simpleName" placeholder="请输入简称" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="form.useable" placeholder="请选择是否可用">
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
<!-- <el-form-item label="业务部门" prop="businessDepartment">
<el-input v-model="form.businessDepartment" placeholder="请输入业务部门" />
</el-form-item>
<el-form-item label="业务员" prop="salesman">
<el-input v-model="form.salesman" placeholder="请输入业务员" />
</el-form-item>
<el-form-item label="助记码" prop="mnemonicCode">
<el-input v-model="form.mnemonicCode" placeholder="请输入助记码" />
</el-form-item>
<el-form-item label="客户类型" prop="type">
<el-input v-model="form.type" placeholder="请输入客户类型" />
</el-form-item>
<el-form-item label="纳税人识别号" prop="taxpayerRegistrationNumber">
<el-input v-model="form.taxpayerRegistrationNumber" placeholder="请输入纳税人识别号" />
</el-form-item>
<el-form-item label="财务组织" prop="organization">
<el-input v-model="form.organization" placeholder="请输入财务组织" />
</el-form-item>
<el-form-item label="上级客户" prop="supCustomer">
<el-input v-model="form.supCustomer" placeholder="请输入上级客户" />
</el-form-item>
<el-form-item label="个人客户" prop="retailInvestor">
<el-input v-model="form.retailInvestor" placeholder="请输入个人客户" />
</el-form-item>
<el-form-item label="国家/地区" prop="country">
<el-input v-model="form.country" placeholder="请输入国家/地区" />
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input v-model="form.timeZone" placeholder="请输入时区" />
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input v-model="form.dataFormat" placeholder="请输入数据格式" />
</el-form-item>
<el-form-item label="联系人" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="装运国家" prop="shipment">
<el-input v-model="form.shipment" placeholder="请输入装运国家" />
</el-form-item>
<el-form-item label="税种" prop="taxCategory">
<el-input v-model="form.taxCategory" placeholder="请输入税种" />
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBasCustomer, getBasCustomer, delBasCustomer, addBasCustomer, updateBasCustomer } from "@/api/bas/BasCustomer"
export default {
name: "BasCustomer",
dicts:['is_available'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户管理表格数据
BasCustomerList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "ID不能为空", trigger: "blur" }
],
customerNo: [
{ required: true, message: "客户编号不能为空", trigger: "blur" }
],
customerName: [
{ required: true, message: "客户名称不能为空", trigger: "blur" }
],
useable: [
{ required: true, message: "是否可用不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询客户管理列表 */
getList() {
this.loading = true
listBasCustomer(this.queryParams).then(response => {
this.BasCustomerList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
id: null,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
remark: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加客户"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getBasCustomer(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改客户"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("添加成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除客户编号为"' + ids + '"的数据项?').then(function() {
return delBasCustomer(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('bas/BasCustomer/export', {
...this.queryParams
}, `BasCustomer_${new Date().getTime()}.xlsx`)
}
}
}
</script>
<style scoped>
/* 统一表单控件宽度 */
.el-select,
.el-input {
width: 100%;
}
</style>

View File

@@ -0,0 +1,355 @@
<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="customerNo">
<el-input v-model="queryParams.customerNo" placeholder="请输入客户编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="queryParams.simpleName" placeholder="请输入简称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="queryParams.useable" placeholder="请选择是否可用" clearable>
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['bas:BasCustomer:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['bas:BasCustomer:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BasCustomerList" @selection-change="handleSelectionChange" max-height="700">
<el-table-column type="selection" align="center" />
<el-table-column label="客户编号" align="left" prop="customerNo" />
<!-- <el-table-column label="客户类别" align="left" prop="customerGroupNo" /> -->
<el-table-column label="客户名称" align="left" prop="customerName" />
<el-table-column label="简称" align="left" prop="simpleName" />
<el-table-column label="是否可用" 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-column label="备注" align="left" prop="remark" />
<!-- <el-table-column width="120" label="业务部门" align="left" prop="businessDepartment" />
<el-table-column width="120" label="业务员" align="left" prop="salesman" />
<el-table-column width="120" label="助记码" align="left" prop="mnemonicCode" />
<el-table-column width="120" label="客户类型" align="left" prop="type" />
<el-table-column width="120" label="纳税人识别号" align="left" prop="taxpayerRegistrationNumber" />
<el-table-column width="120" label="财务组织" align="left" prop="organization" />
<el-table-column width="120" label="上级客户" align="left" prop="supCustomer" />
<el-table-column width="120" label="个人客户" align="left" prop="retailInvestor" />
<el-table-column width="120" label="国家/地区" align="left" prop="country" />
<el-table-column width="120" label="时区" align="left" prop="timeZone" />
<el-table-column width="120" label="数据格式" align="left" prop="dataFormat" />
<el-table-column width="120" label="联系人" align="left" prop="contactName" />
<el-table-column width="120" label="装运国家" align="left" prop="shipment" />
<el-table-column width="120" label="税种" align="left" prop="taxCategory" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改客户对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="客户编号" prop="customerNo">
<el-input v-model="form.customerNo" placeholder="请输入客户编号" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="form.simpleName" placeholder="请输入简称" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="form.useable" placeholder="请选择是否可用">
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
<!-- <el-form-item label="业务部门" prop="businessDepartment">
<el-input v-model="form.businessDepartment" placeholder="请输入业务部门" />
</el-form-item>
<el-form-item label="业务员" prop="salesman">
<el-input v-model="form.salesman" placeholder="请输入业务员" />
</el-form-item>
<el-form-item label="助记码" prop="mnemonicCode">
<el-input v-model="form.mnemonicCode" placeholder="请输入助记码" />
</el-form-item>
<el-form-item label="客户类型" prop="type">
<el-input v-model="form.type" placeholder="请输入客户类型" />
</el-form-item>
<el-form-item label="纳税人识别号" prop="taxpayerRegistrationNumber">
<el-input v-model="form.taxpayerRegistrationNumber" placeholder="请输入纳税人识别号" />
</el-form-item>
<el-form-item label="财务组织" prop="organization">
<el-input v-model="form.organization" placeholder="请输入财务组织" />
</el-form-item>
<el-form-item label="上级客户" prop="supCustomer">
<el-input v-model="form.supCustomer" placeholder="请输入上级客户" />
</el-form-item>
<el-form-item label="个人客户" prop="retailInvestor">
<el-input v-model="form.retailInvestor" placeholder="请输入个人客户" />
</el-form-item>
<el-form-item label="国家/地区" prop="country">
<el-input v-model="form.country" placeholder="请输入国家/地区" />
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input v-model="form.timeZone" placeholder="请输入时区" />
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input v-model="form.dataFormat" placeholder="请输入数据格式" />
</el-form-item>
<el-form-item label="联系人" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="装运国家" prop="shipment">
<el-input v-model="form.shipment" placeholder="请输入装运国家" />
</el-form-item>
<el-form-item label="税种" prop="taxCategory">
<el-input v-model="form.taxCategory" placeholder="请输入税种" />
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBasCustomer, getBasCustomer, delBasCustomer, addBasCustomer, updateBasCustomer } from "@/api/bas/BasCustomer"
export default {
name: "BasCustomer",
dicts:['is_available'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户管理表格数据
BasCustomerList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "ID不能为空", trigger: "blur" }
],
customerNo: [
{ required: true, message: "客户编号不能为空", trigger: "blur" }
],
customerName: [
{ required: true, message: "客户名称不能为空", trigger: "blur" }
],
useable: [
{ required: true, message: "是否可用不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询客户管理列表 */
getList() {
this.loading = true
listBasCustomer(this.queryParams).then(response => {
this.BasCustomerList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
id: null,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
remark: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加客户"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getBasCustomer(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改客户"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("添加成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除客户编号为"' + ids + '"的数据项?').then(function() {
return delBasCustomer(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('bas/BasCustomer/export', {
...this.queryParams
}, `BasCustomer_${new Date().getTime()}.xlsx`)
}
}
}
</script>
<style scoped>
/* 统一表单控件宽度 */
.el-select,
.el-input {
width: 100%;
}
</style>

View File

@@ -0,0 +1,355 @@
<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="customerNo">
<el-input v-model="queryParams.customerNo" placeholder="请输入客户编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="queryParams.simpleName" placeholder="请输入简称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="queryParams.useable" placeholder="请选择是否可用" clearable>
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['bas:BasCustomer:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['bas:BasCustomer:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BasCustomerList" @selection-change="handleSelectionChange" max-height="700">
<el-table-column type="selection" align="center" />
<el-table-column label="客户编号" align="left" prop="customerNo" />
<!-- <el-table-column label="客户类别" align="left" prop="customerGroupNo" /> -->
<el-table-column label="客户名称" align="left" prop="customerName" />
<el-table-column label="简称" align="left" prop="simpleName" />
<el-table-column label="是否可用" 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-column label="备注" align="left" prop="remark" />
<!-- <el-table-column width="120" label="业务部门" align="left" prop="businessDepartment" />
<el-table-column width="120" label="业务员" align="left" prop="salesman" />
<el-table-column width="120" label="助记码" align="left" prop="mnemonicCode" />
<el-table-column width="120" label="客户类型" align="left" prop="type" />
<el-table-column width="120" label="纳税人识别号" align="left" prop="taxpayerRegistrationNumber" />
<el-table-column width="120" label="财务组织" align="left" prop="organization" />
<el-table-column width="120" label="上级客户" align="left" prop="supCustomer" />
<el-table-column width="120" label="个人客户" align="left" prop="retailInvestor" />
<el-table-column width="120" label="国家/地区" align="left" prop="country" />
<el-table-column width="120" label="时区" align="left" prop="timeZone" />
<el-table-column width="120" label="数据格式" align="left" prop="dataFormat" />
<el-table-column width="120" label="联系人" align="left" prop="contactName" />
<el-table-column width="120" label="装运国家" align="left" prop="shipment" />
<el-table-column width="120" label="税种" align="left" prop="taxCategory" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改客户对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="客户编号" prop="customerNo">
<el-input v-model="form.customerNo" placeholder="请输入客户编号" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="form.simpleName" placeholder="请输入简称" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="form.useable" placeholder="请选择是否可用">
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
<!-- <el-form-item label="业务部门" prop="businessDepartment">
<el-input v-model="form.businessDepartment" placeholder="请输入业务部门" />
</el-form-item>
<el-form-item label="业务员" prop="salesman">
<el-input v-model="form.salesman" placeholder="请输入业务员" />
</el-form-item>
<el-form-item label="助记码" prop="mnemonicCode">
<el-input v-model="form.mnemonicCode" placeholder="请输入助记码" />
</el-form-item>
<el-form-item label="客户类型" prop="type">
<el-input v-model="form.type" placeholder="请输入客户类型" />
</el-form-item>
<el-form-item label="纳税人识别号" prop="taxpayerRegistrationNumber">
<el-input v-model="form.taxpayerRegistrationNumber" placeholder="请输入纳税人识别号" />
</el-form-item>
<el-form-item label="财务组织" prop="organization">
<el-input v-model="form.organization" placeholder="请输入财务组织" />
</el-form-item>
<el-form-item label="上级客户" prop="supCustomer">
<el-input v-model="form.supCustomer" placeholder="请输入上级客户" />
</el-form-item>
<el-form-item label="个人客户" prop="retailInvestor">
<el-input v-model="form.retailInvestor" placeholder="请输入个人客户" />
</el-form-item>
<el-form-item label="国家/地区" prop="country">
<el-input v-model="form.country" placeholder="请输入国家/地区" />
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input v-model="form.timeZone" placeholder="请输入时区" />
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input v-model="form.dataFormat" placeholder="请输入数据格式" />
</el-form-item>
<el-form-item label="联系人" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="装运国家" prop="shipment">
<el-input v-model="form.shipment" placeholder="请输入装运国家" />
</el-form-item>
<el-form-item label="税种" prop="taxCategory">
<el-input v-model="form.taxCategory" placeholder="请输入税种" />
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBasCustomer, getBasCustomer, delBasCustomer, addBasCustomer, updateBasCustomer } from "@/api/bas/BasCustomer"
export default {
name: "BasCustomer",
dicts:['is_available'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户管理表格数据
BasCustomerList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "ID不能为空", trigger: "blur" }
],
customerNo: [
{ required: true, message: "客户编号不能为空", trigger: "blur" }
],
customerName: [
{ required: true, message: "客户名称不能为空", trigger: "blur" }
],
useable: [
{ required: true, message: "是否可用不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询客户管理列表 */
getList() {
this.loading = true
listBasCustomer(this.queryParams).then(response => {
this.BasCustomerList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
id: null,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
remark: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加客户"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getBasCustomer(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改客户"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("添加成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除客户编号为"' + ids + '"的数据项?').then(function() {
return delBasCustomer(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('bas/BasCustomer/export', {
...this.queryParams
}, `BasCustomer_${new Date().getTime()}.xlsx`)
}
}
}
</script>
<style scoped>
/* 统一表单控件宽度 */
.el-select,
.el-input {
width: 100%;
}
</style>

View File

@@ -0,0 +1,355 @@
<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="customerNo">
<el-input v-model="queryParams.customerNo" placeholder="请输入客户编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="queryParams.simpleName" placeholder="请输入简称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="queryParams.useable" placeholder="请选择是否可用" clearable>
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['bas:BasCustomer:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['bas:BasCustomer:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BasCustomerList" @selection-change="handleSelectionChange" max-height="700">
<el-table-column type="selection" align="center" />
<el-table-column label="客户编号" align="left" prop="customerNo" />
<!-- <el-table-column label="客户类别" align="left" prop="customerGroupNo" /> -->
<el-table-column label="客户名称" align="left" prop="customerName" />
<el-table-column label="简称" align="left" prop="simpleName" />
<el-table-column label="是否可用" 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-column label="备注" align="left" prop="remark" />
<!-- <el-table-column width="120" label="业务部门" align="left" prop="businessDepartment" />
<el-table-column width="120" label="业务员" align="left" prop="salesman" />
<el-table-column width="120" label="助记码" align="left" prop="mnemonicCode" />
<el-table-column width="120" label="客户类型" align="left" prop="type" />
<el-table-column width="120" label="纳税人识别号" align="left" prop="taxpayerRegistrationNumber" />
<el-table-column width="120" label="财务组织" align="left" prop="organization" />
<el-table-column width="120" label="上级客户" align="left" prop="supCustomer" />
<el-table-column width="120" label="个人客户" align="left" prop="retailInvestor" />
<el-table-column width="120" label="国家/地区" align="left" prop="country" />
<el-table-column width="120" label="时区" align="left" prop="timeZone" />
<el-table-column width="120" label="数据格式" align="left" prop="dataFormat" />
<el-table-column width="120" label="联系人" align="left" prop="contactName" />
<el-table-column width="120" label="装运国家" align="left" prop="shipment" />
<el-table-column width="120" label="税种" align="left" prop="taxCategory" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改客户对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="客户编号" prop="customerNo">
<el-input v-model="form.customerNo" placeholder="请输入客户编号" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="form.simpleName" placeholder="请输入简称" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="form.useable" placeholder="请选择是否可用">
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
<!-- <el-form-item label="业务部门" prop="businessDepartment">
<el-input v-model="form.businessDepartment" placeholder="请输入业务部门" />
</el-form-item>
<el-form-item label="业务员" prop="salesman">
<el-input v-model="form.salesman" placeholder="请输入业务员" />
</el-form-item>
<el-form-item label="助记码" prop="mnemonicCode">
<el-input v-model="form.mnemonicCode" placeholder="请输入助记码" />
</el-form-item>
<el-form-item label="客户类型" prop="type">
<el-input v-model="form.type" placeholder="请输入客户类型" />
</el-form-item>
<el-form-item label="纳税人识别号" prop="taxpayerRegistrationNumber">
<el-input v-model="form.taxpayerRegistrationNumber" placeholder="请输入纳税人识别号" />
</el-form-item>
<el-form-item label="财务组织" prop="organization">
<el-input v-model="form.organization" placeholder="请输入财务组织" />
</el-form-item>
<el-form-item label="上级客户" prop="supCustomer">
<el-input v-model="form.supCustomer" placeholder="请输入上级客户" />
</el-form-item>
<el-form-item label="个人客户" prop="retailInvestor">
<el-input v-model="form.retailInvestor" placeholder="请输入个人客户" />
</el-form-item>
<el-form-item label="国家/地区" prop="country">
<el-input v-model="form.country" placeholder="请输入国家/地区" />
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input v-model="form.timeZone" placeholder="请输入时区" />
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input v-model="form.dataFormat" placeholder="请输入数据格式" />
</el-form-item>
<el-form-item label="联系人" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="装运国家" prop="shipment">
<el-input v-model="form.shipment" placeholder="请输入装运国家" />
</el-form-item>
<el-form-item label="税种" prop="taxCategory">
<el-input v-model="form.taxCategory" placeholder="请输入税种" />
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBasCustomer, getBasCustomer, delBasCustomer, addBasCustomer, updateBasCustomer } from "@/api/bas/BasCustomer"
export default {
name: "BasCustomer",
dicts:['is_available'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户管理表格数据
BasCustomerList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "ID不能为空", trigger: "blur" }
],
customerNo: [
{ required: true, message: "客户编号不能为空", trigger: "blur" }
],
customerName: [
{ required: true, message: "客户名称不能为空", trigger: "blur" }
],
useable: [
{ required: true, message: "是否可用不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询客户管理列表 */
getList() {
this.loading = true
listBasCustomer(this.queryParams).then(response => {
this.BasCustomerList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
id: null,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
remark: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加客户"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getBasCustomer(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改客户"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("添加成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除客户编号为"' + ids + '"的数据项?').then(function() {
return delBasCustomer(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('bas/BasCustomer/export', {
...this.queryParams
}, `BasCustomer_${new Date().getTime()}.xlsx`)
}
}
}
</script>
<style scoped>
/* 统一表单控件宽度 */
.el-select,
.el-input {
width: 100%;
}
</style>

View File

@@ -0,0 +1,355 @@
<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="customerNo">
<el-input v-model="queryParams.customerNo" placeholder="请输入客户编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="queryParams.simpleName" placeholder="请输入简称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="queryParams.useable" placeholder="请选择是否可用" clearable>
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['bas:BasCustomer:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['bas:BasCustomer:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BasCustomerList" @selection-change="handleSelectionChange" max-height="700">
<el-table-column type="selection" align="center" />
<el-table-column label="客户编号" align="left" prop="customerNo" />
<!-- <el-table-column label="客户类别" align="left" prop="customerGroupNo" /> -->
<el-table-column label="客户名称" align="left" prop="customerName" />
<el-table-column label="简称" align="left" prop="simpleName" />
<el-table-column label="是否可用" 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-column label="备注" align="left" prop="remark" />
<!-- <el-table-column width="120" label="业务部门" align="left" prop="businessDepartment" />
<el-table-column width="120" label="业务员" align="left" prop="salesman" />
<el-table-column width="120" label="助记码" align="left" prop="mnemonicCode" />
<el-table-column width="120" label="客户类型" align="left" prop="type" />
<el-table-column width="120" label="纳税人识别号" align="left" prop="taxpayerRegistrationNumber" />
<el-table-column width="120" label="财务组织" align="left" prop="organization" />
<el-table-column width="120" label="上级客户" align="left" prop="supCustomer" />
<el-table-column width="120" label="个人客户" align="left" prop="retailInvestor" />
<el-table-column width="120" label="国家/地区" align="left" prop="country" />
<el-table-column width="120" label="时区" align="left" prop="timeZone" />
<el-table-column width="120" label="数据格式" align="left" prop="dataFormat" />
<el-table-column width="120" label="联系人" align="left" prop="contactName" />
<el-table-column width="120" label="装运国家" align="left" prop="shipment" />
<el-table-column width="120" label="税种" align="left" prop="taxCategory" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改客户对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="客户编号" prop="customerNo">
<el-input v-model="form.customerNo" placeholder="请输入客户编号" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="form.simpleName" placeholder="请输入简称" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-select v-model="form.useable" placeholder="请选择是否可用">
<el-option
v-for="dict in dict.type.is_available"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
<!-- <el-form-item label="业务部门" prop="businessDepartment">
<el-input v-model="form.businessDepartment" placeholder="请输入业务部门" />
</el-form-item>
<el-form-item label="业务员" prop="salesman">
<el-input v-model="form.salesman" placeholder="请输入业务员" />
</el-form-item>
<el-form-item label="助记码" prop="mnemonicCode">
<el-input v-model="form.mnemonicCode" placeholder="请输入助记码" />
</el-form-item>
<el-form-item label="客户类型" prop="type">
<el-input v-model="form.type" placeholder="请输入客户类型" />
</el-form-item>
<el-form-item label="纳税人识别号" prop="taxpayerRegistrationNumber">
<el-input v-model="form.taxpayerRegistrationNumber" placeholder="请输入纳税人识别号" />
</el-form-item>
<el-form-item label="财务组织" prop="organization">
<el-input v-model="form.organization" placeholder="请输入财务组织" />
</el-form-item>
<el-form-item label="上级客户" prop="supCustomer">
<el-input v-model="form.supCustomer" placeholder="请输入上级客户" />
</el-form-item>
<el-form-item label="个人客户" prop="retailInvestor">
<el-input v-model="form.retailInvestor" placeholder="请输入个人客户" />
</el-form-item>
<el-form-item label="国家/地区" prop="country">
<el-input v-model="form.country" placeholder="请输入国家/地区" />
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input v-model="form.timeZone" placeholder="请输入时区" />
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input v-model="form.dataFormat" placeholder="请输入数据格式" />
</el-form-item>
<el-form-item label="联系人" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="装运国家" prop="shipment">
<el-input v-model="form.shipment" placeholder="请输入装运国家" />
</el-form-item>
<el-form-item label="税种" prop="taxCategory">
<el-input v-model="form.taxCategory" placeholder="请输入税种" />
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBasCustomer, getBasCustomer, delBasCustomer, addBasCustomer, updateBasCustomer } from "@/api/bas/BasCustomer"
export default {
name: "BasCustomer",
dicts:['is_available'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户管理表格数据
BasCustomerList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "ID不能为空", trigger: "blur" }
],
customerNo: [
{ required: true, message: "客户编号不能为空", trigger: "blur" }
],
customerName: [
{ required: true, message: "客户名称不能为空", trigger: "blur" }
],
useable: [
{ required: true, message: "是否可用不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询客户管理列表 */
getList() {
this.loading = true
listBasCustomer(this.queryParams).then(response => {
this.BasCustomerList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
id: null,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
remark: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加客户"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getBasCustomer(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改客户"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("添加成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除客户编号为"' + ids + '"的数据项?').then(function() {
return delBasCustomer(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('bas/BasCustomer/export', {
...this.queryParams
}, `BasCustomer_${new Date().getTime()}.xlsx`)
}
}
}
</script>
<style scoped>
/* 统一表单控件宽度 */
.el-select,
.el-input {
width: 100%;
}
</style>

View File

@@ -392,13 +392,13 @@
<dict-tag :options="dict.type.product_type" :value="scope.row.productType"/>
</template>
</el-table-column>
<el-table-column label="是否系统项" align="center" prop="systemItem">
<el-table-column label="是否系统项" align="center" prop="systemItem" width="160">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.systemItem"/>
</template>
</el-table-column>
<el-table-column label="物料创建时间" align="center" prop="productCtm" width="160" />
<el-table-column label="物料创建人" align="center" prop="productCtu" />
<el-table-column label="创建时间" align="center" prop="productCtm" width="160" />
<el-table-column label="创建人" align="center" prop="productCtu" />
<el-table-column label="库存上限" align="center" prop="upperNum" />
<el-table-column label="库存下限" align="center" prop="limitNum" />
<el-table-column label="是否可用" align="center" prop="enableFlag">
@@ -436,7 +436,7 @@
</template>
</el-table-column>
<el-table-column label="管理号" align="center" prop="managementNo" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@@ -453,7 +453,7 @@
v-hasPermi="['search:ViewOutJobFlow:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table-column>-->
</el-table>
<pagination