Commit d60e5a30 authored by zhengke's avatar zhengke
parents 1ca2f4ac ab0f4c14
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
@click="EditCustom(props.row)" /> @click="EditCustom(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="客户审批" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="客户审批"
@click="AuditCustomer(props.row)" /> @click="AuditCustomer(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="删除"
@click="RemoveCustomer(props.row)" />
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
...@@ -115,7 +118,6 @@ ...@@ -115,7 +118,6 @@
field: 'CreateTimeStr', field: 'CreateTimeStr',
align: 'left' align: 'left'
}, },
{ {
name: 'optioned', name: 'optioned',
label: '操作', label: '操作',
...@@ -140,9 +142,8 @@ ...@@ -140,9 +142,8 @@
this.isShowCustomForm = false; this.isShowCustomForm = false;
this.isShowRightForm = false; this.isShowRightForm = false;
}, },
//新增或者修改 //新增或者修改客户
EditCustom(obj) { EditCustom(obj) {
if (obj) { if (obj) {
this.customerObj = obj this.customerObj = obj
} else { } else {
...@@ -160,7 +161,42 @@ ...@@ -160,7 +161,42 @@
this.isShowRightForm = true this.isShowRightForm = true
}, },
refreshQuestion() { refreshQuestion() {
this.getList() this.getList()
},
//删除客户
RemoveCustomer(obj) {
let that = this;
var message = "您正在进行删除【" + obj.CustomerName + "】行为,一旦执行无法找回,是否确认执行?";;
this.$q.dialog({
title: "删除客户",
message: message,
isShowEditClassRoomForm: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
var delMsg = {
CustomerId: obj.CustomerId,
};
RemoveCustomer(delMsg).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
that.refreshQuestion();
}
})
});
}, },
//获取分页数据 //获取分页数据
getList() { getList() {
...@@ -168,12 +204,10 @@ ...@@ -168,12 +204,10 @@
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
this.loading = false; this.loading = false;
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
console.log(res, '数据');
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
} }
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment