master
xy 3 years ago
parent 84b7f7775a
commit 06d456e2dc

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

@ -134,20 +134,20 @@
</div>
</template>
<template v-slot:status>
<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">
<div style="width: 300px;display: flex;">
<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="2"></el-radio>
</div>
</div>
</div>
</template>
<!-- <template v-slot:status>-->
<!-- <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">-->
<!-- <div style="width: 300px;display: flex;">-->
<!-- <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="2"></el-radio>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
</xy-dialog>
</div>
</template>

@ -112,6 +112,26 @@
"
>录入</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>
</el-table-column>
</template>
@ -136,12 +156,12 @@
</template>
<script>
import { getList, destroy } from "@/api/customer";
import { getList, destroy,save } from "@/api/customer";
import { getparameter } from "@/api/system/dictionary";
import { getList as getUnit } from "@/api/payUnit";
import { getList as getTypes } from "@/api/productType";
import { deepCopy } from "@/utils";
import {getAuthAreas, getAuthTypes} from "@/utils/auth"
import { getAuthAreas, getAuthTypes } from "@/utils/auth";
import addCustomer from "@/views/customer/component/addCustomer";
import addOrder from "./component/addOrder";
@ -328,6 +348,7 @@ export default {
};
},
methods: {
save,
async getLevelTypes() {
const types = await getparameter(
{
@ -369,11 +390,11 @@ export default {
async getTypes() {
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() {
let authAreaIds = getAuthAreas(this).map(item => item.id)
let authAreaIds = getAuthAreas(this).map((item) => item.id);
let city = await getparameter(
{
number: "city",
@ -387,13 +408,13 @@ export default {
},
false
);
let resArea = []
area?.detail.forEach(item => {
if(authAreaIds.indexOf(item.id) !== -1){
resArea.push(item)
let resArea = [];
area?.detail.forEach((item) => {
if (authAreaIds.indexOf(item.id) !== -1) {
resArea.push(item);
}
})
city.detail[i].children = resArea
});
city.detail[i].children = resArea;
for (let j = 0; j < area.detail.length; j++) {
let street = await getparameter(
@ -421,14 +442,16 @@ export default {
});
},
},
mounted() {
created() {
this.getDisabilityLevel();
this.getLevelTypes();
this.getCustomers();
this.getCity();
this.getAccounts();
this.getTypes();
},
async mounted() {
await this.getTypes();
await this.getCustomers();
}
};
</script>

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

@ -9,6 +9,35 @@
<div slot="content"></div>
<slot>
<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
v-model="select.keyword"
placeholder="关键字搜索"
@ -22,24 +51,6 @@
>
<xy-selectors @search="(select.page = 1), getList()" @reset="reset">
<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__label">客户姓名</div>
@ -116,22 +127,6 @@
>
</el-date-picker>
</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>
</xy-selectors>
@ -393,11 +388,6 @@ export default {
prop:'admin.name',
label:'创建人',
width: 140
},
{
prop:'department.name',
label:'创建人部门',
width: 180
}
],
total: 0,

@ -150,20 +150,20 @@
</div>
</template>
<template v-slot:status>
<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">
<div style="width: 300px;display: flex;">
<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="2"></el-radio>
</div>
</div>
</div>
</template>
<!-- <template v-slot:status>-->
<!-- <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">-->
<!-- <div style="width: 300px;display: flex;">-->
<!-- <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="2"></el-radio>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
</xy-dialog>
</div>
</template>

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

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

Loading…
Cancel
Save