获取商品列表
var that=this;
that.$axios({
method: "GET",
url: GLOBAL.baseURL+"/pethospital/goods/list"
})
.then(res=>{
//后台返回数据
})
后台返回数据样例
{
"msg": "success",
"code": 0,
"page": {
"totalCount": 0,
"pageSize": 10,
"totalPage": 0,
"currPage": 1,
"list": [
{
"goodsId": 1,
"goodsName": "佩玛思特狗粮深海鱼油通用型幼犬粮15kg金毛泰迪佩玛斯特30斤主粮",
"goodsImg": "https://img.alicdn.com/imgextra/i3/498177478/O1CN01bJvt15256yNiY7iaV_!!498177478-0-lubanu-s.jpg_430x430q90.jpg",
"goodsPrice": 489,
"goodsStock": 21312,
"goodsSales": 3213
}
]
}
}
查询商品
var that=this;
that.$axios({
method: "GET",
url: GLOBAL.baseURL+"/pethospital/goods/info",
params:{
s:that.select_word
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0,
"goods": [
{
"goodsId": 1,
"goodsName": "佩玛思特狗粮深海鱼油通用型幼犬粮15kg金毛泰迪佩玛斯特30斤主粮",
"goodsImg": "https://img.alicdn.com/imgextra/i3/498177478/O1CN01bJvt15256yNiY7iaV_!!498177478-0-lubanu-s.jpg_430x430q90.jpg",
"goodsPrice": 489,
"goodsStock": 21312,
"goodsSales": 3213
}
]
}
添加商品
var that=this;
that.$axios({
method: "POST",
url: GLOBAL.baseURL+"/pethospital/goods/save",
data:{
goodsName:that.goods_name,
goodsImg:that.goods_img,
goodsPrice:that.goods_price,
goodsStock:that.goods_stock
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0
}
删除商品
var that=this;
that.$axios({
method: "POST",
url: GLOBAL.baseURL+"/pethospital/goods/delete",
data:{
//goodsIds 是一个数组,商品id的数组
goodsIds:that.goodsIds
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0
}
修改商品信息
var that=this;
that.$axios({
method: "POST",
url: GLOBAL.baseURL+"/pethospital/goods/update",
data:{
//需要修改哪个信息就修改传哪个参数
goodsId:that.goodsId //这个参数必须要
goodsName:that.goods_name,
goodsImg:that.goods_img,
goodsPrice:that.goods_price,
goodsStock:that.goods_stock
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0
}
会员列表
var that=this;
that.$axios({
method: "GET",
url: GLOBAL.baseURL+"/pethospital/member/list"
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0,
"page": {
"totalCount": 0,
"pageSize": 10,
"totalPage": 0,
"currPage": 1,
"list": [
{
"id": 1,
"data": "2020-06-01 16:00:00",
"name": "赵婧",
"phone": "13562527548",
"petName": "贝贝",
"type": "博美"
},
{
"id": 2,
"data": "2020-06-24 16:00:00",
"name": "陈婷",
"phone": "15632524875",
"petName": "扣扣",
"type": "斗牛"
},
{
"id": 3,
"data": "2020-06-30 16:00:00",
"name": "何丽",
"phone": "13562547849",
"petName": "豆豆",
"type": "美短"
},
{
"id": 4,
"data": "2020-07-07 16:00:00",
"name": "李莉",
"phone": "154785658525",
"petName": "花花",
"type": "阿拉斯加"
},
{
"id": 5,
"data": "2020-07-26 16:00:00",
"name": "zhangsan",
"phone": "ssss",
"petName": "sss",
"type": "金毛"
}
]
}
}
修改会员信息
var that=this;
that.$axios({
method: "POST",
url: GLOBAL.baseURL+"/pethospital/memeber/update",
data:{
//需要修改哪个信息就修改传哪个参数
id:that.id // 会员id这个参数必须要
name:that.name,
phone:that.phone,
petName:that.petName,
type:that.type
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0
}
添加会员
var that=this;
that.$axios({
method: "POST",
url: GLOBAL.baseURL+"/pethospital/memeber/save",
data:{
name:that.name,
phone:that.phone,
petName:that.petName,
type:that.type
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0
}
删除会员
var that=this;
that.$axios({
method: "POST",
url: GLOBAL.baseURL+"/pethospital/memeber/delete",
data:{
Ids:that.Ids ///会员id的数组
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0
}
查询会员
var that=this;
that.$axios({
method: "GET",
url: GLOBAL.baseURL+"/pethospital/goods/info",
params:{
s:that.select_word
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0,
"member": [
{
"id": 6,
"data": "2020-07-27 16:00:00",
"name": "qsg",
"phone": "123534534",
"petName": "rocket",
"type": "金毛"
}
]
}
获取交易列表
var that=this;
that.$axios({
method: "GET",
url: GLOBAL.baseURL+"/pethospital/deal/list"
})
.then(res=>{
//后台返回数据
})
后台返回数据样例
{
"msg": "success",
"code": 0,
"page": {
"totalCount": 0,
"pageSize": 10,
"totalPage": 0,
"currPage": 1,
"list": [
{
"id": 1,
"data": "2020-06-30 16:00:00",
"name": "梁超",
"petName": "贝贝",
"type": "博美",
"therapeuticRegimen": "绝育",
"cases": "手术后住院观察1天",
"status": false
},
{
"id": 2,
"data": "2020-07-01 16:00:00",
"name": "崔雷",
"petName": "丽丽",
"type": "金毛",
"therapeuticRegimen": "眼角被咬伤,轻微化脓",
"cases": "消炎药,清理伤口,包扎",
"status": true
},
{
"id": 3,
"data": "2020-07-07 16:00:00",
"name": "韩磊",
"petName": "安安",
"type": "英短",
"therapeuticRegimen": "绝育",
"cases": "手术后住院观察1天",
"status": true
}
]
}
}
查询交易信息
var that=this;
that.$axios({
method: "GET",
url: GLOBAL.baseURL+"/pethospital/deal/info",
params:{
s:that.select_word
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"deal": [
{
"id": 1,
"data": "2020-06-30 16:00:00",
"name": "梁超",
"petName": "贝贝",
"type": "博美",
"therapeuticRegimen": "绝育",
"cases": "手术后住院观察1天",
"status": false
}
],
"code": 0
}
换班信息列表
var that=this;
that.$axios({
method: "GET",
url: GLOBAL.baseURL+"/pethospital/shiftchange/list"
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0,
"page": {
"totalCount": 0,
"pageSize": 10,
"totalPage": 0,
"currPage": 1,
"list": [
{
"id": 1,
"dutyPersonId": 1,
"dutyPersonName": "骄傲是你的",
"actualPersonId": 2,
"actualPersonName": "的撒厚度啥的",
"changeReason": "打算打算阿松大撒大是大苏打",
"changeTime": "2020-01-02"
}
]
}
}
查询换班信息信息
var that=this;
that.$axios({
method: "GET",
url: GLOBAL.baseURL+"/pethospital/shiftchange/info",
params:{
s:that.select_word
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0,
"shiftChange": [
{
"id": 1,
"dutyPersonId": 1,
"dutyPersonName": "骄傲是你的",
"actualPersonId": 2,
"actualPersonName": "的撒厚度啥的",
"changeReason": "打算打算阿松大撒大是大苏打",
"changeTime": "2020-01-02"
}
]
}
修改换班信息
var that=this;
that.$axios({
method: "POST",
url: GLOBAL.baseURL+"/pethospital/goods/update",
data:{
//需要修改哪个信息就修改传哪个参数
id:that.id //这个参数必须要
dutyPersonId:that.dutyPersonId,
dutyPersonName:that.dutyPersonName,
actualPersonId:that.actualPersonId,
actualPersonName:that.actualPersonName,
changeReason:that.changeReason,
changeTime:that.changeTimes
}
})
.then(res=>{
//后台返回数据
})
后台返回样例
{
"msg": "success",
"code": 0
}