Commit b028b8e9 by ext.wangyuman1

订单

1 parent 3ace2c08
import request from '@/utils/request'
let getway = window.lwConfig.services.wecom
const service = getway + '/customer'
const order = getway + '/weSubstitute/customer/order'
/**
* 客户列表
......@@ -280,3 +281,26 @@ export function findCustomerAddWay(params) {
params,
})
}
// 订单 - 订单状态
export function orderStatus(params) {
return request({
url: getway + '/substitute/customer/order/property/order/status',
params,
})
}
// 订单 - 订单列表
export function orderList(params) {
return request({
url: order,
params,
})
}
// 订单 - 详情
export function orderDetail(id) {
return request({
url: order + '/' + id,
})
}
......@@ -61,6 +61,14 @@ export function remove(id) {
})
}
export function fnRemove(ids) {
return request({
url: groundBase + '/property',
method: 'delete',
params: { ids },
})
}
// 列表新增
export function add(data) {
return request({
......
<template>
<div>
<el-dialog
title="订单详情"
v-model="dialogVisible"
width="30%"
v-if="dialogVisible"
:before-close="handleClose"
>
<div class="g-card">
<div class="title">订单信息</div>
</div>
<div class="g-card">
<div class="title">商品信息</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { orderDetail } from '@/api/customer'
export default {
data() {
return {
dialogVisible: false,
ruleForm: {},
}
},
props: {
visible: {
type: Boolean,
default: false,
},
id: {
type: String,
default: '',
},
},
watch: {
visible: {
handler(val) {
this.dialogVisible = val
if (!val) {
this.ruleForm = {}
} else {
this.orderDetail(this.id)
}
},
},
},
methods: {
// 点击×按钮
handleClose() {
this.$emit('close', false)
},
orderDetail(id) {
orderDetail(id).then((res) => {
console.log(res)
})
},
},
}
</script>
<style></style>
......@@ -159,6 +159,7 @@ import {
getList,
remove,
listMove,
fnRemove,
getCodeCategoryList,
addCodeCategory,
updateCodeCategory,
......@@ -322,14 +323,18 @@ export default {
this.msgInfo('请选择要删除项!')
return
}
const ids = id || this.ids.join(',')
const ids = this.ids.join(',')
this.$confirm('是否确认删除?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(ids)
if (id) {
return remove(id)
} else {
return fnRemove(ids)
}
})
.then(() => {
this.msgSuccess('删除成功')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!