master
xy 3 years ago
parent 5b1789c93d
commit ccd65788c0

@ -23,3 +23,11 @@ export function effct(params){
params
})
}
export function checkAge(params){
return request({
method:'get',
url:'/api/admin/chart/check-age',
params
})
}

@ -6,7 +6,7 @@ export default {
default:'medium'
},
height: {
type: Number
type: [Number,String]
},
list: {
type: Array,

@ -694,6 +694,7 @@ export default {
this.$successMessage(this.type, '客户')
this.$emit('refresh')
this.isShow = false
this.$router.push(`/schedule/schedule?product_type_id=${this.form1.product_type_id}`)
})
}else{
this.$emit('refresh')

@ -15,9 +15,10 @@
<el-select
placeholder="关联板块"
multiple
collapse-tags
v-model="select.product_type_id"
size="small"
style="width: 300px; margin-right: 10px"
style="min-width: 200px; margin-right: 10px"
>
<el-option
v-for="(item, index) in types"
@ -282,10 +283,10 @@ export default {
width: "180",
customFn: (row) => {
let getColor = () => {
if (getAgeByIdcard(row.idcard) >= row.max_age) {
return "orange";
if (row.near_age == 2) {
return "rgb(232,102,33)";
}
if (row.near_age) {
if (row.near_age == 1) {
return "yellow";
}
};

@ -0,0 +1,103 @@
<template>
<div>
<el-drawer
size="42%"
title="超龄人员"
:visible="isShow"
direction="rtl"
@close="$emit('update:isShow', false)"
>
<div>
<xy-table
height="80%"
style="margin: auto 6px"
:is-page="false"
:list="list"
:table-item="table"
>
<template v-slot:btns>
<el-table-column label="操作" min-width="80">
<template v-slot:default="scope">
<el-button
size="small"
type="primary"
@click="signOut(scope.row)"
>签退</el-button
>
</template>
</el-table-column>
</template>
</xy-table>
</div>
</el-drawer>
</div>
</template>
<script>
import { checkAge } from "@/api/chart";
import { save as customerSave } from "@/api/customer/index";
import { deepCopy } from "@/utils";
export default {
props: {
isShow: {
type: Boolean,
default: false,
},
},
data() {
return {
total: 0,
list: [],
table: [
{
prop: "name",
label: "姓名",
width: 120,
},
{
label: "年龄",
prop: "age",
width: 80,
},
{
label: "身份证",
width: 166,
prop: "idcard",
},
{
prop: "phone",
label: "手机号",
width: "160",
},
],
};
},
methods: {
signOut(row) {
let data = deepCopy(row);
data.status = 3;
customerSave(data).then(res => {
this.$message({
type:'success',
message:'签退成功'
})
this.getList()
})
},
async getList() {
const res = await checkAge();
this.list = res;
if(this.list.length > 0){
this.$emit('update:isShow',true)
}
},
},
computed: {},
created() {
this.getList();
},
};
</script>
<style scoped lang="scss"></style>

@ -3,6 +3,7 @@
<div class="block" style="padding-top: 10px;display: flex;
justify-content: flex-end;">
<el-button type="primary" round style="margin-right: 10px" @click="isShowDraw = true">超龄查看</el-button>
<el-date-picker v-model="month" type="month" placeholder="选择月" @change="loadData()">
</el-date-picker>
</div>
@ -20,6 +21,8 @@
<div id="line-chart"></div>
</div>
</div>
<draw :isShow.sync="isShowDraw"></draw>
</div>
</template>
@ -29,18 +32,41 @@
import {
getChartsHome
} from "../../api/dashboard.js"
import draw from './components/draw.vue'
export default {
components: {
PanelGroup
PanelGroup,
draw
},
data() {
return {
isShowDraw:false,
col: '',
line: '',
business_data: [],
collect_data: [],
list: {},
list: {
"business": {
"server_money_total": 0,
"nurse_money_total": 0,
"remain_money_total": 0
},
"person_efficiency": {
"server_time_total": "0",
"expect": 0,
"act": 0
},
"customer": {
"active": 0,
"add": 0,
"wash": 0
},
"order": {
"server_total": 0,
"cycle_total": 0,
"unit_total": 0
},
},
customerArr: [],
orderArr: [],
chartData: {},
@ -186,13 +212,13 @@
})
}
},
created() {
created() {
this.month=this.$moment().format("YYYY-MM")
this.loadData();
},
mounted() {
//setInterval(()=>{ this.isShowDraw = !this.isShowDraw},3000)
//this.init()
@ -313,4 +339,4 @@
}
</style>
</style>

@ -48,9 +48,9 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>打卡类型
</div>
<div class="xy-table-item-content">
<el-select v-model="form.type" clearable placeholder="请选择打卡类型 " style="width: 300px;">
<el-option v-for="item in types" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
<Select v-model="form.type" size="default" clearable placeholder="请选择打卡类型 " style="width: 300px;">
<Option v-for="item in types" :label="item.value" :value="item.id">{{item.value}}</Option>
</Select>
</div>
</div>
@ -60,7 +60,7 @@
服务记录
</div>
<div class="xy-table-item-content">
<xy-table style="margin-top: 20px;" size="mini" :height="200" :is-page="false" :list="scheduleInfo().sku" :table-item="skuTable">
<xy-table style="margin-top: 20px;" size="mini" :height="200" :is-page="false" :list="selectedRow().sku" :table-item="skuTable">
<template v-slot:btns><</template>
</xy-table>
</div>
@ -128,7 +128,7 @@
default:()=>[{id:1,value:'签到'},{id:2,value:'过程打卡'},{id:3,value:'签退'}]
}
},
inject:['scheduleInfo'],
inject:['selectedRow'],
data() {
return {
isShow: false,
@ -237,7 +237,7 @@
})
}
if(this.form.type === 3){
let promiseAll = this.scheduleInfo().sku.map(item => {
let promiseAll = this.selectedRow().sku.map(item => {
return saveSku({
id:item.id,
schedule_list_id:item.schedule_list_id,
@ -256,7 +256,7 @@
watch: {
isShow(val) {
if (val) {
console.log(1111,this.scheduleInfo().sku)
console.log(1111,this.selectedRow().sku)
this.form.schedule_list_id = this.scheduleListId
if (this.type === 'editor') {
this.getDetail()

@ -48,7 +48,7 @@
type="primary"
size="small"
style="margin-left: 4px"
@click="editor(scope)"
@click="editor(scope.row)"
>编辑</Button
>
@ -73,6 +73,17 @@
</xy-table>
</template>
<template v-else>
<el-button
style="margin: 10px 0"
size="small"
round
type="primary"
@click="
($refs['addScheduleListLog'].type = 'add'),
($refs['addScheduleListLog'].isShow = true)
"
>录入服务记录</el-button
>
<el-timeline style="margin-left: 8px">
<el-timeline-item
v-for="item in list"
@ -80,6 +91,13 @@
:timestamp="item.created_at"
placement="top"
>
<Button
type="primary"
size="small"
style="margin-left: 4px;margin-bottom: 8px;"
@click="editor(item)"
>编辑</Button
>
<el-card>
<h4>{{ typeFormat(item.type) }}</h4>
<p>{{ item.address }}</p>
@ -100,7 +118,7 @@
</el-drawer>
<detail ref="detail" @close="isShow = true"></detail>
<addScheduleListLog ref="addScheduleListLog"></addScheduleListLog>
<addScheduleListLog ref="addScheduleListLog" @refresh="getList,()=>$emit('refresh')"></addScheduleListLog>
</div>
</template>
@ -215,8 +233,8 @@ export default {
};
},
methods: {
editor(scope) {
this.$refs["addScheduleListLog"].fileList = scope.row.upload_list.map(
editor(row) {
this.$refs["addScheduleListLog"].fileList = row.upload_list.map(
(item) => {
return {
url: item.upload?.url,
@ -225,7 +243,7 @@ export default {
};
}
);
this.$refs["addScheduleListLog"].id = scope.row.id;
this.$refs["addScheduleListLog"].id = row.id;
this.$refs["addScheduleListLog"].type = "editor";
this.$refs["addScheduleListLog"].isShow = true;
},
@ -350,4 +368,7 @@ export default {
.pop-confirm {
z-index: 3000 !important;
}
.avue-dialog{
z-index:9999 !important;
}
</style>

@ -139,6 +139,7 @@
</div>
<xy-table
:row-style="tableRowStyle"
:default-expand-all="false"
:list="list"
:table-item="table"
@ -187,7 +188,7 @@
</template>
</xy-table>
<draw ref="draw" :type="2"></draw>
<draw ref="draw" :type="2" @refresh="getList"></draw>
</div>
</template>
@ -281,8 +282,18 @@ export default {
width: 140,
label:'实际服务时间',
customFn:row => {
const getTime = () => {
if(row.sign_out && row.sign_in){
let seconds = this.$moment(row.sign_out).diff(row.sign_in,'seconds')
let point = seconds % 60
let min = parseInt(seconds / 60)
return `${min}分钟${point}`
}else{
return 0
}
}
return (
<span>{ (row.sign_out && row.sign_in) ? this.$moment(row.sign_out).diff(row.sign_in,'minutes') : 0 }</span>
<span>{ getTime() }</span>
)
}
},
@ -396,9 +407,34 @@ export default {
};
},
methods: {
tableRowStyle({row, rowIndex}){
let selectTime = row.sku.reduce((pre,cur) => {
return pre + Number(cur.time ?? 0)
},0)
let actTime = Math.round( this.$moment(row.sign_out).diff(row.sign_in,'seconds') / 60)
if(Math.abs(selectTime - actTime) <= 5){
return
}
if(Math.abs(selectTime - actTime) <= 10 && Math.abs(selectTime - actTime) > 5){
return {
'background':'rgb(255,227,150)'
}
}
if(Math.abs(selectTime - actTime) > 10){
return {
'background':'rgb(253,165,122)'
}
}
},
pickMonth(e){
this.select.start_start_time = this.$moment(e).startOf('month').format('YYYY-MM-DD HH:mm:ss')
this.select.end_start_time = this.$moment(e).endOf('month').format('YYYY-MM-DD HH:mm:ss')
if(e){
this.select.start_start_time = this.$moment(e).startOf('month').format('YYYY-MM-DD HH:mm:ss')
this.select.end_start_time = this.$moment(e).endOf('month').format('YYYY-MM-DD HH:mm:ss')
}else{
this.select.start_start_time = ''
this.select.end_start_time = ''
}
},
destroy(row){
@ -426,8 +462,8 @@ export default {
},
async getList() {
const res = await scheduleList(this.select)
this.list = res.data
this.total = res.total
this.list = res.list.data
this.total = res.list.total
},
exports(){
@ -501,4 +537,10 @@ export default {
}
}
}
</style>
<style>
.has-time{
z-index:9998 !important;
}
</style>

@ -1,16 +1,58 @@
<template>
<div>
<xy-dialog ref="dialog" :form="form" :is-show.sync="isShow" :rules="rules" :title="type === 'add' ? '新增产品' : '编辑产品'"
:width="70"
type="form" @submit="submit">
<xy-dialog
ref="dialog"
:form="form"
:is-show.sync="isShow"
:rules="rules"
:title="type === 'add' ? '新增产品' : '编辑产品'"
:width="70"
type="form"
@submit="submit"
>
<template v-slot:product_type_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>业务板块
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>业务板块
</div>
<div class="xy-table-item-content">
<el-select v-model="form.product_type_id" placeholder="请选择业务板块" style="width: 300px">
<el-option v-for="item in productType" :key="item.id" :label="item.name" :value="item.id"></el-option>
<el-select
v-model="form.product_type_id"
placeholder="请选择业务板块"
style="width: 300px"
>
<el-option
v-for="item in productType"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:area_id>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>区域
</div>
<div class="xy-table-item-content">
<el-select
v-model="form.area_id"
placeholder="请选择区域"
style="width: 300px"
>
<el-option
v-for="item in areas"
:key="item.id"
:label="item.value"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
@ -19,10 +61,17 @@
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>名称
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" clearable placeholder="请输入产品名称" style="width: 300px;"></el-input>
<el-input
v-model="form.name"
clearable
placeholder="请输入产品名称"
style="width: 300px"
></el-input>
</div>
</div>
</template>
@ -30,11 +79,27 @@
<template v-slot:cycle>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>周期
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>周期
</div>
<div class="xy-table-item-content">
<el-select v-model="form.cycle" style="width: 300px;" placeholder="请选择周期">
<el-option v-for="(item,index) in [{label:'年',value:1},{label:'月',value:2},{label:'周',value:3},{label:'次',value:4}]" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-select
v-model="form.cycle"
style="width: 300px"
placeholder="请选择周期"
>
<el-option
v-for="(item, index) in [
{ label: '年', value: 1 },
{ label: '月', value: 2 },
{ label: '周', value: 3 },
{ label: '次', value: 4 },
]"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
@ -43,13 +108,17 @@
<template v-slot:service_rule>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>服务时长规则
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>服务时长规则
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.service_rule"
active-text="总时长"
inactive-text="单次限时"
style="width: 300px;"></el-switch>
<el-switch
v-model="form.service_rule"
active-text="总时长"
inactive-text="单次限时"
style="width: 300px"
></el-switch>
</div>
</div>
</template>
@ -57,10 +126,17 @@
<template v-slot:total v-if="form.service_rule">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>总计时长
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>总计时长
</div>
<div class="xy-table-item-content xy-table-item-min">
<el-input v-model="form.total" clearable placeholder="请输入总计时长" style="width: 300px;"/>
<el-input
v-model="form.total"
clearable
placeholder="请输入总计时长"
style="width: 300px"
/>
</div>
</div>
</template>
@ -68,10 +144,17 @@
<template v-slot:time_lenth v-else>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>单次时长
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>单次时长
</div>
<div class="xy-table-item-content xy-table-item-min">
<el-input v-model="form.time_lenth" clearable placeholder="请输入单次时长" style="width: 300px;"/>
<el-input
v-model="form.time_lenth"
clearable
placeholder="请输入单次时长"
style="width: 300px"
/>
</div>
</div>
</template>
@ -79,11 +162,19 @@
<template v-slot:frequency>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>周期内服务次数
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>周期内服务次数
</div>
<div class="xy-table-item-content">
<el-input-number v-model="form.frequency" :controls="false" :precision="0" clearable
placeholder="请输入周期内服务次数" style="width: 300px;"/>
<el-input-number
v-model="form.frequency"
:controls="false"
:precision="0"
clearable
placeholder="请输入周期内服务次数"
style="width: 300px"
/>
</div>
</div>
</template>
@ -91,11 +182,26 @@
<template v-slot:purchase_price>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购单价
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>采购单价
</div>
<div class="xy-table-item-content" :class="form.service_rule ? 'xy-table-item-min_price' : 'xy-table-item-price'">
<el-input-number v-model="form.purchase_price" :controls="false" :precision="2" clearable
placeholder="请输入采购单价" style="width: 300px;"/>
<div
class="xy-table-item-content"
:class="
form.service_rule
? 'xy-table-item-min_price'
: 'xy-table-item-price'
"
>
<el-input-number
v-model="form.purchase_price"
:controls="false"
:precision="2"
clearable
placeholder="请输入采购单价"
style="width: 300px"
/>
</div>
</div>
</template>
@ -103,11 +209,26 @@
<template v-slot:nurse_price>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>护工单价
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>护工单价
</div>
<div class="xy-table-item-content" :class="form.service_rule ? 'xy-table-item-min_price' : 'xy-table-item-price'">
<el-input-number v-model="form.nurse_price" :controls="false" :precision="2" clearable placeholder="请输入护工单价"
style="width: 300px;"/>
<div
class="xy-table-item-content"
:class="
form.service_rule
? 'xy-table-item-min_price'
: 'xy-table-item-price'
"
>
<el-input-number
v-model="form.nurse_price"
:controls="false"
:precision="2"
clearable
placeholder="请输入护工单价"
style="width: 300px"
/>
</div>
</div>
</template>
@ -115,11 +236,19 @@
<template v-slot:process_total>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>单次服务打卡次数
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>单次服务打卡次数
</div>
<div class="xy-table-item-content">
<el-input-number v-model="form.process_total" :controls="false" :precision="0" clearable placeholder="请输入护工单价"
style="width: 300px;"/>
<el-input-number
v-model="form.process_total"
:controls="false"
:precision="0"
clearable
placeholder="请输入护工单价"
style="width: 300px"
/>
</div>
</div>
</template>
@ -127,12 +256,25 @@
<template v-slot:type>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>单次规定项目
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>单次规定项目
</div>
<div class="xy-table-item-content">
<el-select v-model="form.type" placeholder="请选择单次规定项目" style="width: 300px">
<el-option v-for="item in [{id:1,value:''},{id:2,value:''}]" :key="item.id" :label="item.value"
:value="item.id"></el-option>
<el-select
v-model="form.type"
placeholder="请选择单次规定项目"
style="width: 300px"
>
<el-option
v-for="item in [
{ id: 1, value: '自由组合' },
{ id: 2, value: '按订单组合' },
]"
:key="item.id"
:label="item.value"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
@ -142,101 +284,91 @@
</template>
<script>
import {save, getForm} from '@/api/product'
import { save, getForm } from "@/api/product";
export default {
props: {
productType: {
type: Array,
default: () => []
}
default: () => [],
},
areas: {
type: Array,
default: () => [],
},
},
data() {
return {
id: '',
id: "",
isShow: false,
type: 'add',
type: "add",
form: {
product_type_id: '',
name: '',
cycle: '',
product_type_id: "",
area_id: "",
name: "",
cycle: "",
frequency: 0,
service_rule:false,
purchase_price: '',
nurse_price: '',
time_lenth: '',
total:'',
process_total:'',
service_rule: false,
purchase_price: "",
nurse_price: "",
time_lenth: "",
total: "",
process_total: "",
},
rules: {
product_type_id: [
{required: true, message: '请选择产品板块'}
],
name: [
{required: true, message: '请填写名称'}
],
cycle: [
{required: true, message: '请填写周期'}
],
frequency: [
{required: true, message: '请填写服务次数'}
],
purchase_price: [
{required: true, message: '请填写采购单价'}
],
nurse_price: [
{required: true, message: '请填写护工单价'}
],
time_lenth: [
{required: true, message: '请填写单词时长'}
],
type: [
{required: true, message: '请选择规定项目'}
],
}
}
product_type_id: [{ required: true, message: "请选择产品板块" }],
area_id: [{ required: true, message: "请选择区域" }],
name: [{ required: true, message: "请填写名称" }],
cycle: [{ required: true, message: "请填写周期" }],
frequency: [{ required: true, message: "请填写服务次数" }],
purchase_price: [{ required: true, message: "请填写采购单价" }],
nurse_price: [{ required: true, message: "请填写护工单价" }],
time_lenth: [{ required: true, message: "请填写单词时长" }],
type: [{ required: true, message: "请选择规定项目" }],
},
};
},
methods: {
async getDetail() {
const res = await getForm(this.id)
this.$integrateData(this.form, res)
this.form.service_rule = res.service_rule === 2
const res = await getForm(this.id);
this.$integrateData(this.form, res);
this.form.service_rule = res.service_rule === 2;
},
submit() {
this.form.service_rule = this.form.service_rule ? 2 : 1
if (this.type === 'editor') {
Object.defineProperty(this.form, 'id', {
this.form.service_rule = this.form.service_rule ? 2 : 1;
if (this.type === "editor") {
Object.defineProperty(this.form, "id", {
value: this.id,
writable: true,
configurable: true,
enumerable: true
})
enumerable: true,
});
}
save(this.form).then(res => {
this.$successMessage(this.type, '产品')
this.$emit('refresh')
this.isShow = false
})
}
save(this.form).then((res) => {
this.$successMessage(this.type, "产品");
this.$emit("refresh");
this.isShow = false;
});
},
},
watch: {
isShow(val) {
if (val) {
if (this.type === 'editor') {
this.getDetail()
if (this.type === "editor") {
this.getDetail();
}
} else {
this.id = ''
this.type = ''
this.$refs['dialog'].reset()
delete this.form.id
this.id = "";
this.type = "";
this.$refs["dialog"].reset();
delete this.form.id;
}
}
}
}
},
},
};
</script>
<style lang="scss" scoped>
@ -247,24 +379,23 @@ export default {
::v-deep .el-input__inner {
text-align: left !important;
}
.xy-table-item-min{
::v-deep .el-input__clear{
.xy-table-item-min {
::v-deep .el-input__clear {
position: relative;
right: 46px;
z-index: 2;
}
}
.xy-table-item-min_price{
.xy-table-item-min_price {
position: relative;
&::after{
&::after {
position: absolute;
right: 0;
top: 0;
content:'(元/分钟)'
content: "(元/分钟)";
}
::v-deep .el-input__clear{
::v-deep .el-input__clear {
position: relative;
right: 46px;
z-index: 2;

@ -26,7 +26,7 @@
@pageSizeChange="e => select.page_size = e"
@pageIndexChange="e => {select.page = e;getList()}"></xy-table>
<add-product ref="addProduct" :product-type="productType" @refresh="getList"></add-product>
<add-product ref="addProduct" :areas="areas" :product-type="productType" @refresh="getList"></add-product>
</div>
</template>
@ -34,6 +34,7 @@
import {getList,destroy} from '@/api/product'
import {getparameter} from '@/api/system/dictionary'
import {getList as getTypes} from '@/api/productType'
import { getAuthTypes,getAuthAreas } from "@/utils/auth"
import addProduct from "@/views/product/productComponent/addProduct";
@ -47,6 +48,7 @@ export default {
page:1,
page_size:10
},
areas:[],
productType: [],
total:0,
@ -154,9 +156,11 @@ export default {
this.total = res.total
console.log(this.list)
},
getAreas(){
this.areas = getAuthAreas(this)
},
async getProductType() {
const res = await getTypes({page_size: 999},false)
this.productType = res.data
this.productType = getAuthTypes(this)
},
editor(row){
@ -174,6 +178,7 @@ export default {
mounted() {
this.getList()
this.getProductType()
this.getAreas()
}
}
</script>

@ -230,6 +230,13 @@ export default {
this.$refs['addSchedule'].isShow = true
}
},
beforeRouteEnter(to,from,next){
next(vm => {
if(from.path === '/customer/customer'){
vm.select.product_type_id = typeof to.query.product_type_id === 'string' ? Number(to.query.product_type_id) : ''
}
})
},
mounted() {
this.getTypes()
this.getProducts()

Loading…
Cancel
Save