master
xy 3 years ago
parent 84b7f7775a
commit 06d456e2dc

@ -191,7 +191,7 @@
style="width: 300px" style="width: 300px"
@change="productPick"> @change="productPick">
<el-option <el-option
v-for="item in products" v-for="item in productFilter"
value-key="id" value-key="id"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
@ -446,6 +446,7 @@ export default {
remark: '', remark: '',
level_type:'', level_type:'',
level_id: '', level_id: '',
status:1
}, },
rules: { rules: {
name: [ name: [
@ -596,6 +597,7 @@ export default {
contact_phone: '', contact_phone: '',
idcard_address: '', idcard_address: '',
area:'', area:'',
status:1,
customer_address_list: [], customer_address_list: [],
sex: '', sex: '',
birthday: '', birthday: '',
@ -625,7 +627,6 @@ export default {
product_type_id:item product_type_id:item
} }
}) })
console.log(this.form.product_type_customer_links)
}, },
deleteAddress({$index,row}){ deleteAddress({$index,row}){
@ -820,6 +821,13 @@ export default {
}else{ }else{
return this.rules return this.rules
} }
},
productFilter(){
if(this.form.product_type_customer_links.length === 0) return this.products
let ids = this.form.product_type_customer_links.map(item => item.product_type_id)
return this.products.filter(item => {
return ids.indexOf(item.product_type_id) !== -1
})
} }
}, },
watch: { watch: {

@ -134,20 +134,20 @@
</div> </div>
</template> </template>
<template v-slot:status> <!-- <template v-slot:status>-->
<div class="xy-table-item"> <!-- <div class="xy-table-item">-->
<div class="xy-table-item-label"> <!-- <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>-->
<div class="xy-table-item-content"> <!-- <div class="xy-table-item-content">-->
<div style="width: 300px;display: flex;"> <!-- <div style="width: 300px;display: flex;">-->
<el-radio v-model="form.status" :label="0"></el-radio> <!-- <el-radio v-model="form.status" :label="0"></el-radio>-->
<el-radio v-model="form.status" :label="1"></el-radio> <!-- <el-radio v-model="form.status" :label="1"></el-radio>-->
<el-radio v-model="form.status" :label="2"></el-radio> <!-- <el-radio v-model="form.status" :label="2"></el-radio>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
</xy-dialog> </xy-dialog>
</div> </div>
</template> </template>

@ -112,6 +112,26 @@
" "
>录入</Button >录入</Button
> >
<el-select
style="margin-top: 4px"
size="mini"
v-model="scope.row.status"
placeholder="状态标识"
@change="e => {
save(scope.row).then(res => getCustomers)
}"
>
<el-option
v-for="item in [
{ value: 1, label: '正常' },
{ value: 2, label: '暂停' },
{ value: 3, label: '退签' },
]"
:label="item.label"
:value="item.value"
:key="item.value"
></el-option>
</el-select>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@ -136,12 +156,12 @@
</template> </template>
<script> <script>
import { getList, destroy } from "@/api/customer"; import { getList, destroy,save } from "@/api/customer";
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
import { getList as getUnit } from "@/api/payUnit"; import { getList as getUnit } from "@/api/payUnit";
import { getList as getTypes } from "@/api/productType"; import { getList as getTypes } from "@/api/productType";
import { deepCopy } from "@/utils"; import { deepCopy } from "@/utils";
import {getAuthAreas, getAuthTypes} from "@/utils/auth" import { getAuthAreas, getAuthTypes } from "@/utils/auth";
import addCustomer from "@/views/customer/component/addCustomer"; import addCustomer from "@/views/customer/component/addCustomer";
import addOrder from "./component/addOrder"; import addOrder from "./component/addOrder";
@ -328,6 +348,7 @@ export default {
}; };
}, },
methods: { methods: {
save,
async getLevelTypes() { async getLevelTypes() {
const types = await getparameter( const types = await getparameter(
{ {
@ -369,11 +390,11 @@ export default {
async getTypes() { async getTypes() {
this.types = getAuthTypes(this); this.types = getAuthTypes(this);
this.select.product_type_id = this.types.map(item => item.id) this.select.product_type_id = this.types.map((item) => item.id);
}, },
async getCity() { async getCity() {
let authAreaIds = getAuthAreas(this).map(item => item.id) let authAreaIds = getAuthAreas(this).map((item) => item.id);
let city = await getparameter( let city = await getparameter(
{ {
number: "city", number: "city",
@ -387,13 +408,13 @@ export default {
}, },
false false
); );
let resArea = [] let resArea = [];
area?.detail.forEach(item => { area?.detail.forEach((item) => {
if(authAreaIds.indexOf(item.id) !== -1){ if (authAreaIds.indexOf(item.id) !== -1) {
resArea.push(item) resArea.push(item);
} }
}) });
city.detail[i].children = resArea city.detail[i].children = resArea;
for (let j = 0; j < area.detail.length; j++) { for (let j = 0; j < area.detail.length; j++) {
let street = await getparameter( let street = await getparameter(
@ -421,14 +442,16 @@ export default {
}); });
}, },
}, },
mounted() { created() {
this.getDisabilityLevel(); this.getDisabilityLevel();
this.getLevelTypes(); this.getLevelTypes();
this.getCustomers();
this.getCity(); this.getCity();
this.getAccounts(); this.getAccounts();
this.getTypes();
}, },
async mounted() {
await this.getTypes();
await this.getCustomers();
}
}; };
</script> </script>

@ -69,8 +69,8 @@ import { getparameter } from '@/api/system/dictionary'
import { AMapManager,lazyAMapApiLoaderInstance } from 'vue-amap' import { AMapManager,lazyAMapApiLoaderInstance } from 'vue-amap'
import { getList } from '@/api/customer' import { getList } from '@/api/customer'
import {getList as getTypes} from "@/api/productType"; import {getList as getTypes} from "@/api/productType";
import {deepCopy} from "@/utils"; import { deepCopy } from "@/utils";
import { getAuthAreas } from "@/utils/auth"; import { getAuthAreas,getAuthTypes } from "@/utils/auth";
const amapManager = new AMapManager() const amapManager = new AMapManager()
export default { export default {
@ -105,11 +105,8 @@ export default {
}, },
async getTypes() { async getTypes() {
const res = await getTypes({ this.types = getAuthTypes(this)
page: 1, this.selector.product_type_id = this.types.map(item => item.id)
page_size: 9999
}, false)
this.types = res.data
}, },
async getAreas(){ async getAreas(){
@ -129,12 +126,14 @@ export default {
} }
}) })
city.detail[i].children = resArea city.detail[i].children = resArea
this.selector.area_id = resArea[0].id
} }
this.areas = city.detail this.areas = city.detail
console.log(1111,this.areas)
this.areas.forEach(item1 => { this.areas.forEach(item1 => {
this.areaMap.set(item1.id,item1.remark) //this.areaMap.set(item1.id,item1.remark)
if(item1.children && item1.children.length > 0){ if(item1.children && item1.children.length > 0){
item1.children.forEach(item2 => { item1.children.forEach(item2 => {
@ -267,6 +266,8 @@ export default {
}, },
async mounted() { async mounted() {
await this.getTypes()
await this.getAreas()
await this.getCustomers() await this.getCustomers()
lazyAMapApiLoaderInstance.load().then(() => { lazyAMapApiLoaderInstance.load().then(() => {
this.map = new AMap.Map('amapContainer',{ this.map = new AMap.Map('amapContainer',{
@ -278,8 +279,6 @@ export default {
}, },
created() { created() {
this.initLoad() this.initLoad()
this.getAreas()
this.getTypes()
} }
} }
</script> </script>

@ -9,6 +9,35 @@
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div style="display: flex"> <div style="display: flex">
<el-select
filterable
size="small"
v-model="select.nurse_name"
placeholder="选择护工姓名"
clearable
style="width: 200px;margin-right: 10px;"
>
<el-option
v-for="item in nurses"
:value="item.name"
:label="item.name"
:key="item.id"
></el-option>
</el-select>
<el-select
size="small"
v-model="select.status"
placeholder="选择状态"
clearable
style="width: 200px;margin-right: 10px;"
>
<el-option
v-for="item in [{value:0,label:'待护理'},{value:1,label:'护理中'},{value:2,label:'已护理'}]"
:value="item.value"
:label="item.label"
:key="item.value"
></el-option>
</el-select>
<Input <Input
v-model="select.keyword" v-model="select.keyword"
placeholder="关键字搜索" placeholder="关键字搜索"
@ -22,24 +51,6 @@
> >
<xy-selectors @search="(select.page = 1), getList()" @reset="reset"> <xy-selectors @search="(select.page = 1), getList()" @reset="reset">
<template> <template>
<div class="select-item">
<div class="select-item__label">护工姓名</div>
<el-select
filterable
size="small"
v-model="select.nurse_name"
placeholder="选择护工姓名"
clearable
style="width: 200px"
>
<el-option
v-for="item in nurses"
:value="item.name"
:label="item.name"
:key="item.id"
></el-option>
</el-select>
</div>
<div class="select-item"> <div class="select-item">
<div class="select-item__label">客户姓名</div> <div class="select-item__label">客户姓名</div>
@ -116,22 +127,6 @@
> >
</el-date-picker> </el-date-picker>
</div> </div>
<div class="select-item">
<div class="select-item__label">状态</div>
<el-radio v-model="select.status" :label="0"
>待护理</el-radio
>
<el-radio v-model="select.status" :label="1"
>护理中</el-radio
>
<el-radio v-model="select.status" :label="2"
>已护理</el-radio
>
<el-radio v-model="select.status" label=""
>全部</el-radio
>
</div>
</template> </template>
</xy-selectors> </xy-selectors>
@ -393,11 +388,6 @@ export default {
prop:'admin.name', prop:'admin.name',
label:'创建人', label:'创建人',
width: 140 width: 140
},
{
prop:'department.name',
label:'创建人部门',
width: 180
} }
], ],
total: 0, total: 0,

@ -150,20 +150,20 @@
</div> </div>
</template> </template>
<template v-slot:status> <!-- <template v-slot:status>-->
<div class="xy-table-item"> <!-- <div class="xy-table-item">-->
<div class="xy-table-item-label"> <!-- <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>-->
<div class="xy-table-item-content"> <!-- <div class="xy-table-item-content">-->
<div style="width: 300px;display: flex;"> <!-- <div style="width: 300px;display: flex;">-->
<el-radio v-model="form.status" :label="0"></el-radio> <!-- <el-radio v-model="form.status" :label="0"></el-radio>-->
<el-radio v-model="form.status" :label="1"></el-radio> <!-- <el-radio v-model="form.status" :label="1"></el-radio>-->
<el-radio v-model="form.status" :label="2"></el-radio> <!-- <el-radio v-model="form.status" :label="2"></el-radio>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
</xy-dialog> </xy-dialog>
</div> </div>
</template> </template>

@ -167,11 +167,6 @@ export default {
) )
} }
}, },
{
label: '应服务次数',
width: 120,
prop:'service_times'
},
{ {
label: '已排班', label: '已排班',
width: 120, width: 120,

@ -179,7 +179,7 @@ export default {
}, },
{ {
prop:'has_arrange', prop:'has_arrange',
label:'已排班', label:'待完成',
width:120 width:120
}, },
{ {
@ -202,13 +202,13 @@ export default {
width:150 width:150
}, },
{ {
prop:'start_time', prop:'sign_in',
label:'开始时间', label:'签到时间',
width: 170 width: 170
}, },
{ {
prop:'end_time', prop:'sign_out',
label:'结束时间', label:'签退时间',
width: 170 width: 170
}, },
{ {

Loading…
Cancel
Save