| | |
| | | <div> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | @pagination="pagination" |
| | | :column="column" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | |
| | | <el-input v-model="user.phone" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="加急额度" prop="num"> |
| | | <el-input v-model="user.num" size="small" clearable></el-input> |
| | | <el-input-number |
| | | v-model="user.num" |
| | | size="small" |
| | | clearable |
| | | :min="0" |
| | | ></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="客户编号" prop="code2"> |
| | | <el-input v-model="user.code2" size="small" clearable></el-input> |
| | |
| | | import { |
| | | addCustom, |
| | | selectCustomPageList, |
| | | delCustomById, |
| | | upCustom, |
| | | } from "@/api/system/customer"; |
| | | export default { |
| | |
| | | label: "操作", |
| | | operation: [ |
| | | { |
| | | name: "委托记录", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | console.log(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "协议记录", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | console.log(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "编辑", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.openFormDia("edit", row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "删除", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.delCustomRow(row); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | mounted() { |
| | | this.getList(); |
| | | }, |
| | | watch: { |
| | | addDia(newVal) { |
| | | if (!newVal) { |
| | | this.user = {}; |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | // 查询客户列表 |
| | | getList() { |
| | | this.tableLoading = true; |
| | |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data; |
| | | this.page.total = res.total; |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | |
| | | this.getList(); |
| | | }, |
| | | openFormDia(type, row) { |
| | | this.addDia = true; |
| | | this.formTitle = type === "add" ? "新增客户" : "编辑客户"; |
| | | this.operationType = type; |
| | | if (row) { |
| | | this.user = this.HaveJson(row); |
| | | } |
| | | this.addDia = true; |
| | | }, |
| | | delCustomRow(row) { |
| | | this.$confirm("确认删除该条客户记录吗?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delCustomById({ id: row.id }).then((res) => { |
| | | if (res.status === 200) { |
| | | this.$message.success("删除成功"); |
| | | } |
| | | this.getList(); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | customAdd() { |
| | | this.$refs["userForm"].validate((valid) => { |