parent
ce640e71ed
commit
fa72a54964
@ -0,0 +1,33 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function getList(params){
|
||||
return request({
|
||||
method:'get',
|
||||
url:'/api/admin/order/get-list',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getForm(id,params){
|
||||
return request({
|
||||
method:'get',
|
||||
url:`/api/admin/order/get-form/${id}`,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:'/api/admin/order/save',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(id,data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:`/api/admin/order/delete/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function customerList(params){
|
||||
return request({
|
||||
method:'get',
|
||||
url:'/api/admin/schedule/customer-list',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function customerDetail(params){
|
||||
return request({
|
||||
method:'get',
|
||||
url:'/api/admin/schedule/customer-detail',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function scheduleSave(params){
|
||||
return request({
|
||||
method:'get',
|
||||
url:'/api/admin/schedule/schedule-save',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function scheduleDelete(data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:'/api/admin/schedule/schedule-delete',
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function getList(params,isLoading=true){
|
||||
return request({
|
||||
method:'get',
|
||||
url:'/api/admin/sku-category/get-list',
|
||||
params,
|
||||
isLoading
|
||||
})
|
||||
}
|
||||
|
||||
export function getForm(id,params){
|
||||
return request({
|
||||
method:'get',
|
||||
url:`/api/admin/sku-category/get-form/${id}`,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:'/api/admin/sku-category/save',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(id,data){
|
||||
return request({
|
||||
method:'post',
|
||||
url:`/api/admin/sku-category/delete/${id}`,
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--查询-->
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" text="订单列表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<Input v-model="select.keyword" style="width: 200px; margin-right: 10px" placeholder="关键字搜索" />
|
||||
<Button type="primary" style="margin-left: 10px" @click="getOrder">查询</Button>
|
||||
<Button type="primary" style="margin-left: 10px" @click="$refs['addOrder'].type = 'add',$refs['addOrder'].isShow = true">创建订单</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<xy-table
|
||||
:total="total"
|
||||
:table-item="table"
|
||||
:list="list"
|
||||
@editor="editor"
|
||||
@destroy="destroy"
|
||||
@pageSizeChange="e => select.page_size = e"
|
||||
@pageIndexChange="e => {select.page = e;getOrder()}"></xy-table>
|
||||
|
||||
<add-order ref="addOrder" @refresh="getOrder"></add-order>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getList,destroy} from '@/api/order'
|
||||
|
||||
import addOrder from "@/views/order/component/addOrder";
|
||||
export default {
|
||||
components:{
|
||||
addOrder
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select:{
|
||||
page:1,
|
||||
page_size:10,
|
||||
keyword:''
|
||||
},
|
||||
|
||||
total:0,
|
||||
list:[
|
||||
|
||||
],
|
||||
table:[
|
||||
{
|
||||
prop:'no',
|
||||
width:220,
|
||||
label:'订单编号'
|
||||
},
|
||||
{
|
||||
prop:'customer.name',
|
||||
label:'客户',
|
||||
width:180
|
||||
},
|
||||
{
|
||||
prop:'product.name',
|
||||
label:'产品',
|
||||
width: 200,
|
||||
align:'left'
|
||||
},
|
||||
{
|
||||
prop:'start_date',
|
||||
label:'开始时间',
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
prop:'end_date',
|
||||
label:'结束时间',
|
||||
width: 200,
|
||||
formatter:(cell,data,value) => {
|
||||
if(value) return value
|
||||
return '未定'
|
||||
}
|
||||
},
|
||||
{
|
||||
prop:'unit_price',
|
||||
label:'单次价格',
|
||||
width: 180,
|
||||
align:'right'
|
||||
},
|
||||
{
|
||||
prop:'total_time',
|
||||
label:'总计时长',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
prop:'total_money',
|
||||
label:'总计金额',
|
||||
width: 180,
|
||||
align:'right'
|
||||
},
|
||||
{
|
||||
prop:'status',
|
||||
label:'执行状态',
|
||||
width: 160,
|
||||
customFn:(row)=>{
|
||||
let statusName = new Map([
|
||||
[0,'未开始'],
|
||||
[1,'进行中'],
|
||||
[2,'已完成'],
|
||||
])
|
||||
let statusColor = new Map([
|
||||
[0,'blue'],
|
||||
[1,'red'],
|
||||
[2,'green'],
|
||||
])
|
||||
return (
|
||||
<div style={{'color':statusColor.get(row.status)}}>{statusName.get(row.status)}</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getOrder(){
|
||||
const res = await getList(this.select)
|
||||
this.total = res.total
|
||||
this.list = res.data
|
||||
console.log(this.list)
|
||||
},
|
||||
|
||||
editor(row){
|
||||
this.$refs['addOrder'].type = 'editor'
|
||||
this.$refs['addOrder'].id = row.id
|
||||
this.$refs['addOrder'].isShow = true
|
||||
},
|
||||
destroy(row){
|
||||
destroy(row.id).then(res => {
|
||||
this.$successMessage('destroy','订单')
|
||||
this.getOrder()
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getOrder()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<div style="padding: 0px 20px">
|
||||
<!--查询-->
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" text="订单列表" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<Input style="width: 200px; margin-right: 10px" placeholder="关键字搜索" />
|
||||
<Button type="primary" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" style="margin-left: 10px" @click="isShowAdd = true">创建订单</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<xy-table :table-item="tableItem"></xy-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableItem:[{
|
||||
label:"名称"
|
||||
},{
|
||||
label: "地址"
|
||||
},{
|
||||
label: "站长"
|
||||
},{
|
||||
label: "联系电话"
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -1,42 +0,0 @@
|
||||
<template>
|
||||
<div style="padding: 0px 20px">
|
||||
<!--查询-->
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" text="产品分类" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<Input style="width: 200px; margin-right: 10px" placeholder="关键字搜索" />
|
||||
<Button type="primary" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" style="margin-left: 10px" @click="isShowAdd = true">创建产品类别</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<xy-table :table-item="tableItem"></xy-table>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isShowAdd:false,
|
||||
tableItem:[{
|
||||
label:"名称"
|
||||
},{
|
||||
label: "排序"
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -1,42 +0,0 @@
|
||||
<template>
|
||||
<div style="padding: 0px 20px">
|
||||
<!--查询-->
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" text="服务项目" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<Input style="width: 200px; margin-right: 10px" placeholder="关键字搜索" />
|
||||
<Button type="primary" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" style="margin-left: 10px" @click="isShowAdd = true">创建服务项目</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<xy-table :table-item="tableItem"></xy-table>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isShowAdd:false,
|
||||
tableItem:[{
|
||||
label:"名称"
|
||||
},{
|
||||
label: "分类"
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -1,42 +0,0 @@
|
||||
<template>
|
||||
<div style="padding: 0px 20px">
|
||||
<!--查询-->
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" text="服务项目分类" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<Input style="width: 200px; margin-right: 10px" placeholder="关键字搜索" />
|
||||
<Button type="primary" style="margin-left: 10px">查询</Button>
|
||||
<Button type="primary" style="margin-left: 10px" @click="isShowAdd = true">创建服务项目分类</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<xy-table :list="[]" :table-item="tableItem"></xy-table>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isShowAdd:false,
|
||||
tableItem:[{
|
||||
label:"名称"
|
||||
},{
|
||||
label:"排序"
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="服务项目分类管理">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div>
|
||||
<Input placeholder="关键字搜索" style="width: 200px; margin-right: 10px"/>
|
||||
<Button style="margin-left: 10px" type="primary">查询</Button>
|
||||
<Button style="margin-left: 10px" type="primary">新建产品
|
||||
</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
|
||||
<xy-table></xy-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getList} from '@/api/skuCategory'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
total:0,
|
||||
list:[],
|
||||
table:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getSkuType(){
|
||||
const res = await getList()
|
||||
console.log(res)
|
||||
this.total = res.total
|
||||
this.list = res.data
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getSkuType()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<xy-dialog></xy-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,201 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="排班管理">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div style="display: flex">
|
||||
<el-tag effect="dark" style="margin-right: 10px;" type="warning">应排客户</el-tag>
|
||||
<el-tag effect="dark" style="margin-right: 10px;" type="success">已排客户</el-tag>
|
||||
<Input placeholder="关键字搜索" style="width: 200px; margin-right: 10px"/>
|
||||
<Button style="margin-right: 10px" type="primary">查询</Button>
|
||||
<xy-selectors>
|
||||
|
||||
</xy-selectors>
|
||||
<Button type="primary">新建产品</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
|
||||
<xy-table
|
||||
:default-expand-all="false"
|
||||
:list="list"
|
||||
:table-item="table"
|
||||
:total="total">
|
||||
<template v-slot:btns>
|
||||
<div></div>
|
||||
</template>
|
||||
</xy-table>
|
||||
|
||||
<add-schedule
|
||||
ref="addSchedule"
|
||||
:products="products"
|
||||
:customers="customers"
|
||||
:nurses="nurses"
|
||||
:levels="levels"></add-schedule>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {customerList} from '@/api/schedule'
|
||||
import {getList as customerIndex} from '@/api/customer'
|
||||
import {getList as productIndex} from '@/api/product'
|
||||
import {getList as nurseIndex} from '@/api/worker'
|
||||
import {getparameter} from '@/api/system/dictionary'
|
||||
|
||||
import addSchedule from "@/views/schedule/component/addSchedule";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
addSchedule
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
},
|
||||
customers:[],
|
||||
products:[],
|
||||
nurses:[],
|
||||
levels:[],
|
||||
|
||||
total: 0,
|
||||
list: [],
|
||||
table: [
|
||||
{
|
||||
type: 'expand',
|
||||
expandFn: (props) => {
|
||||
let {$refs} = this
|
||||
return (
|
||||
<xy-table
|
||||
is-page={false}
|
||||
height={200}
|
||||
list={props.row.orders}
|
||||
table-item={
|
||||
[
|
||||
{
|
||||
prop: 'no',
|
||||
label: '订单编号',
|
||||
width: 210,
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
prop: 'product.name',
|
||||
label: '产品',
|
||||
minWidth: 200,
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
label: '排班状态',
|
||||
width: 160,
|
||||
sortable: false
|
||||
}
|
||||
]
|
||||
}
|
||||
scopedSlots={{
|
||||
btns() {
|
||||
return (
|
||||
<el-table-column
|
||||
width={70}
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="操作"
|
||||
scopedSlots={{
|
||||
default(scope) {
|
||||
return (
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
on={{
|
||||
['click']: () => {
|
||||
$refs['addSchedule'].form.product_id = scope.row.product_id
|
||||
$refs['addSchedule'].form.customer_id = scope.row.customer_id
|
||||
$refs['addSchedule'].isShow = true
|
||||
}
|
||||
}}>排班</Button>
|
||||
)
|
||||
}
|
||||
}}>
|
||||
</el-table-column>
|
||||
)
|
||||
}
|
||||
}}>
|
||||
|
||||
</xy-table>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '客户',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
prop: '',
|
||||
label: '上门地址',
|
||||
minWidth: 320,
|
||||
align: 'left',
|
||||
customFn: (row) => {
|
||||
let add = row.customer_address.filter(item => {
|
||||
return item.default === 1
|
||||
})[0]?.address || row.customer_address[0]?.address || '无地址'
|
||||
return (
|
||||
<div>{add}</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '应服务次数',
|
||||
width: 120,
|
||||
customFn: (row) => {
|
||||
return (
|
||||
<div>{row.orders.length}</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '已排班',
|
||||
width: 120
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getCustomers(){
|
||||
const res = await customerIndex({page_size:9999,page:1},false)
|
||||
this.customers = res.data.data
|
||||
},
|
||||
async getProducts(){
|
||||
const res = await productIndex({page_size:9999,page:1},false)
|
||||
this.products = res.data
|
||||
},
|
||||
async getNurses(){
|
||||
const res = await nurseIndex({page_size:9999,page:1},false)
|
||||
this.nurses = res.data
|
||||
},
|
||||
async getLevels(){
|
||||
const res = await getparameter({number:'disabilityLevel'})
|
||||
this.levels = res.detail
|
||||
},
|
||||
|
||||
async getCustomerList() {
|
||||
const res = await customerList(this.select)
|
||||
this.total = res.total
|
||||
this.list = res.data
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getCustomers()
|
||||
this.getProducts()
|
||||
this.getNurses()
|
||||
this.getLevels()
|
||||
this.getCustomerList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
Loading…
Reference in new issue