| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="客户名称" prop="company"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.company" |
| | | @keyup.enter.native="getList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="getList">查 询</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <div class="search_box"> |
| | | <div class="search_item"> |
| | | <span class="search_label">客户名称</span> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.company" |
| | | @keyup.enter.native="getList"></el-input> |
| | | </div> |
| | | <div class="search_button"> |
| | | <el-button type="primary" size="mini" @click="getList">查询</el-button> |
| | | <el-button size="mini" @click="refresh">重置</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openFormDia('add')" icon="el-icon-plus">新增</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"></lims-table> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | :height="'calc(100vh - 250px)'" |
| | | :page="page" :tableLoading="tableLoading" |
| | | @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="formTitle" :visible.sync="addDia" width="450px"> |
| | | <el-form ref="userForm" :model="user" :rules="userRules" label-position="right" label-width="100px"> |
| | |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import {addCustom, delCustomById, selectCustomPageList, upCustom} from "@/api/system/customer"; |
| | | export default { |
| | | name: 'Customer', |
| | | components: { |
| | | limsTable |
| | | }, |
| | |
| | | ], |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:0 |
| | | size:20, |
| | | current:1 |
| | | }, |
| | | tableLoading: false, |
| | | // 编辑客户弹框 |
| | |
| | | formTitle: '', |
| | | addDia: false, |
| | | addPower: true, |
| | | user: {}, |
| | | user: { |
| | | company: '' |
| | | }, |
| | | userRules: { |
| | | company: [{ required: true, message: '请输入客户名称', trigger: 'blur' }], |
| | | companyEn: [{ required: true, message: '请输入客户名称EN', trigger: 'blur' }], |
| | | address: [{ required: true, message: '请输入单位地址', trigger: 'blur' }], |
| | | addressEn: [{ required: true, message: '请输单位地址EN', trigger: 'blur' }], |
| | | addressEn: [{ required: true, message: '请输入单位地址EN', trigger: 'blur' }], |
| | | num: [{ required: true, message: '请输入加急额度', trigger: 'blur' }], |
| | | code2: [{ required: true, message: '请输入客户编号', trigger: 'blur' }], |
| | | }, |
| | |
| | | this.queryParams.company = '' |
| | | this.getList() |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.limit |
| | | this.getList() |
| | | }, |
| | | openFormDia (type, row) { |
| | | this.addDia = true |
| | | this.user = {} |
| | | this.formTitle = type === 'add' ? '新增客户' : '编辑客户' |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | | this.user = row |
| | | this.user = this.HaveJson(row) |
| | | } |
| | | }, |
| | | customAdd() { |
| | |
| | | }) |
| | | }, |
| | | reset () { |
| | | this.addDia = false |
| | | this.user = {} |
| | | this.resetForm("userForm"); |
| | | this.addDia = false |
| | | }, |
| | | delete (row) { |
| | | this.$confirm('是否删除当前数据?', "警告", { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | .search_box { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .search_item { |
| | | margin-bottom: 18px; |
| | | margin-right: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | line-height: 32px; |
| | | } |
| | | .search_label { |
| | | width: 88px; |
| | | font-size: 14px; |
| | | font-weight: 700; |
| | | color: #606266; |
| | | } |
| | | .search_button { |
| | | line-height: 30px; |
| | | } |
| | | </style> |