lion 4 months ago
parent 5f68c8d693
commit c04e415644

@ -3,5 +3,5 @@ ENV='development'
# base api
VUE_APP_BASE_API=https://yikangyang-test.ali251.langye.net
VUE_APP_UPLOAD_API=https://yikangyangyikangyang-test.ali251.langye.net/api/admin/upload-file
VUE_APP_UPLOAD_API=https://yikangyang-test.ali251.langye.net/api/admin/upload-file
VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview

@ -101,6 +101,12 @@
:formatter="({ cellValue }) => (status.get(cellValue))"
:edit-render="{ name: 'VxeTreeSelect', options: Array.from(status), props: { multiple: false }, optionProps: { value: '0', label: '1' } }"
/>
<vxe-column
header-align="center"
field="paid_at"
width="160"
title="支付时间"
/>
<vxe-column
header-align="center"
@ -140,12 +146,12 @@
width="160"
title="订单数量"
/>
<vxe-column
<!-- <vxe-column
header-align="center"
field="hospital.name"
width="160"
title="就诊医院"
/>
/> -->
<vxe-column
header-align="center"
@ -158,7 +164,7 @@
align="center"
field="user_archive.name"
width="160"
title="就诊人"
title="服务对象"
/>
<vxe-column
@ -173,14 +179,14 @@
align="center"
field="appoint_mobile"
width="160"
title="预约人电话"
title="下单人电话"
/>
<vxe-column
align="center"
field="appoint_name"
width="120"
title="预约人"
title="下单人"
/>
<vxe-column
@ -190,6 +196,18 @@
title="陪诊师性别"
:formatter="({ cellValue }) => (new Map([[0, '任意'],[1, '男'],[2, '女']]).get(cellValue))"
/>
<vxe-column
field="nurse.name"
width="120"
title="护工姓名"
/>
<vxe-column
header-align="center"
field="nurse_salary"
width="160"
title="护工工资"
:edit-render="{ name: 'input', attrs: { type: 'text' } }"
/>
<vxe-column
field="files"
@ -321,6 +339,8 @@ export default {
page: 1,
page_size: 20,
keyword: '',
sort_type:'DESC',
sort_name:'paid_at',
show_relation: ['userArchive', 'hospital']
},
total: 0,
@ -492,7 +512,7 @@ export default {
filter.push({
key: 'nurse_id',
op: 'notnull',
value: ''
value: '1'
})
filter.push({
key: 'status',
@ -509,7 +529,7 @@ export default {
filter.push({
key: 'nurse_id',
op: 'isnull',
value: ''
value: '1'
})
} else if (this.searchForm.status !== '') {
//
@ -522,7 +542,7 @@ export default {
const res = await index({
...this.select,
show_relation: ['accompanyProduct', 'userArchive'],
show_relation: ['accompanyProduct', 'userArchive', 'nurse'],
filter: filter
}, false)
this.tableData = res.data

@ -10,6 +10,21 @@
@close="$emit('update:isShow', false)"
>
<section class="drawer-container">
<div class="drawer-container__form-salary">
<el-form ref="salaryForm" :model="form" :rules="rules" label-width="120px">
<el-form-item label="护工工资" prop="nurse_salary">
<el-input-number
v-model="form.nurse_salary"
:precision="2"
:step="0.01"
:min="0"
placeholder="请输入护工工资"
style="width: 100%"
/>
</el-form-item>
</el-form>
</div>
<vxe-table
ref="table"
class="drawer-container__form"
@ -222,7 +237,15 @@ export default {
idcardOptions: [{ data: '' }],
row: {},
loading: false,
visible: false
visible: false,
form: {
nurse_salary: null
},
rules: {
nurse_salary: [
{ required: true, message: '请输入护工工资', trigger: 'blur' }
]
}
}
},
computed: {},
@ -244,6 +267,10 @@ export default {
},
visible(newVal) {
this.$emit('update:isShow', newVal)
if (!newVal) {
//
this.resetForm()
}
}
},
methods: {
@ -261,26 +288,46 @@ export default {
this.$confirm('确定关闭窗口?')
.then((_) => {
this.$refs['table'].clearRadioRow()
this.resetForm()
done()
})
.catch((_) => {})
},
resetForm() {
if (this.$refs['salaryForm']) {
this.$refs['salaryForm'].resetFields()
}
this.form.nurse_salary = null
},
submit() {
//
this.$refs['salaryForm'].validate((valid) => {
if (!valid) {
return false
}
//
if (!this.row.id || !this.$refs['table'].getRadioRecord(true)) {
this.$message.warning('请先选择护工')
return false
}
this.$confirm('确定分配?')
.then((_) => {
if (this.row.id && this.$refs['table'].getRadioRecord(true)) {
save({
id: this.row.id,
nurse_id: this.$refs['table'].getRadioRecord(true).id,
nurse_salary: this.form.nurse_salary,
status: 0
}).then((_) => {
this.$message.success('分配成功!')
this.$emit('update:visible', false)
this.resetForm()
this.visible = false
this.$emit('refresh')
})
}
})
.catch((_) => {})
})
}
}
}
@ -293,7 +340,8 @@ export default {
display: flex;
flex-direction: column;
&__form {
&__form-salary {
margin-bottom: 20px;
}
&__footer {

Loading…
Cancel
Save