|
|
|
|
@ -147,13 +147,14 @@
|
|
|
|
|
>录入</Button
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
v-if="scope.row.nurse_customer_links.length > 0"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click=""
|
|
|
|
|
@click="unBind(scope.row)"
|
|
|
|
|
>解绑</Button
|
|
|
|
|
>
|
|
|
|
|
<el-select
|
|
|
|
|
style="margin-top: 4px"
|
|
|
|
|
style="margin-top: 4px;width: 94px;"
|
|
|
|
|
size="mini"
|
|
|
|
|
v-model="scope.row.status"
|
|
|
|
|
placeholder="状态标识"
|
|
|
|
|
@ -198,6 +199,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getForm, save as saveWorker } from "@/api/worker";
|
|
|
|
|
import { getList, destroy, save } from "@/api/customer";
|
|
|
|
|
import { getparameter } from "@/api/system/dictionary";
|
|
|
|
|
import { getList as getUnit } from "@/api/payUnit";
|
|
|
|
|
@ -509,7 +511,19 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async unBind (row) {
|
|
|
|
|
const { nurse_customer_links } = row;
|
|
|
|
|
|
|
|
|
|
const nurseDatas = await Promise.all(nurse_customer_links.map(i => getForm(i.nurse_id,{},false)))
|
|
|
|
|
console.log(nurseDatas)
|
|
|
|
|
|
|
|
|
|
await Promise.all(nurseDatas.map(item => {
|
|
|
|
|
item.nurse_customer_links = item.nurse_customer_links.filter(i => i.customer_id !== row.id)
|
|
|
|
|
return saveWorker(item)
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
await this.getCustomers()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getDisabilityLevel();
|
|
|
|
|
|