驾驶舱&基础信息配置
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
<script>
|
||||
import CustomerInfoAdd from './components/customerInfoAdd.vue';
|
||||
import { getCustomerConfigPage,delCustomerConfig } from '@/api/basicInfoConfig';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
@@ -32,8 +33,9 @@ const tableProps = [
|
||||
label: '客户编码'
|
||||
},
|
||||
{
|
||||
prop: 'jd',
|
||||
label: '所属基地'
|
||||
prop: 'factoryNameList',
|
||||
label: '所属基地',
|
||||
filter: (val) => val ? val.join(',') :'-'
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@@ -46,13 +48,13 @@ export default {
|
||||
type: 'input',
|
||||
label: '客户名称',
|
||||
placeholder: '客户名称',
|
||||
param: 'cName'
|
||||
param: 'name'
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '客户编码',
|
||||
placeholder: '客户编码',
|
||||
param: 'ccode'
|
||||
param: 'code'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -72,11 +74,13 @@ export default {
|
||||
}
|
||||
],
|
||||
listQuery:{
|
||||
name:'',
|
||||
code:'',
|
||||
pageSize:20,
|
||||
pageNo:1
|
||||
},
|
||||
total:2,
|
||||
tableData:[{name:'111',id:1}],
|
||||
total:0,
|
||||
tableData:[],
|
||||
tableProps,
|
||||
tableBtn:[
|
||||
{
|
||||
@@ -92,13 +96,18 @@ export default {
|
||||
centervisible: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getDataList();
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.name = val.name
|
||||
this.listQuery.code = val.code
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getList();
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
@@ -110,7 +119,15 @@ export default {
|
||||
}
|
||||
},
|
||||
getDataList() {
|
||||
|
||||
getCustomerConfigPage({...this.listQuery}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list;
|
||||
this.total = res.data.total;
|
||||
}else{
|
||||
this.tableData = [];
|
||||
this.total = 0;
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClick(val) {
|
||||
switch (val.type) {
|
||||
@@ -135,14 +152,15 @@ export default {
|
||||
},
|
||||
successSubmit() {
|
||||
this.handleCancel();
|
||||
this.getList();
|
||||
this.getDataList();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('确定删除客户"' + row.name + '吗?').then(function() {
|
||||
deleteModel(row.id).then(response => {
|
||||
that.getList();
|
||||
that.$modal.msgSuccess("删除成功");
|
||||
let _this = this;
|
||||
_this.$modal.confirm('确定删除客户"' + row.name + '吗?').then(function() {
|
||||
delCustomerConfig({id:row.id}).then(response => {
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
_this.getDataList();
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user