Commit 42885d15 authored by mengmeng's avatar mengmeng

Merge branch 'lings' into 'master'

机构管理员操作

See merge request !1
parents 8a668c82 700aa28d
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
<el-form-item> <el-form-item>
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input> <el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
</el-form-item> </el-form-item>
<el-select v-model="dataForm.status" filterable placeholder="订单状态">
<el-option label="未审核" value="0"></el-option>
<el-option label="审核通过" value="1"></el-option>
<el-option label="审核未通过" value="2"></el-option>
</el-select>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
...@@ -66,7 +71,8 @@ export default { ...@@ -66,7 +71,8 @@ export default {
deleteIsBatch: true deleteIsBatch: true
}, },
dataForm: { dataForm: {
id: '' id: '',
status:''
} }
} }
}, },
......
<template> <template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> <el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="订单编号" prop="orderNum"> <!--<el-form-item label="订单编号" prop="orderNum">-->
<el-input v-model="dataForm.orderNum" placeholder="订单编号"></el-input> <!--<el-input v-model="dataForm.orderNum" placeholder="订单编号"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="订单状态 0未接单 ,1已接单 2已完成 3已取消" prop="status"> <!--<el-form-item label="订单状态 0未接单 ,1已接单 2已完成 3已取消" prop="status">-->
<el-input v-model="dataForm.status" placeholder="订单状态 0未接单 ,1已接单 2已完成 3已取消"></el-input> <!--<el-input v-model="dataForm.status" placeholder="订单状态 0未接单 ,1已接单 2已完成 3已取消"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="订单状态名称" prop="statusName"> <el-form-item label="订单状态" prop="statusName">
<el-input v-model="dataForm.statusName" placeholder="订单状态名称"></el-input> <el-input v-model="dataForm.statusName" placeholder="订单状态名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="详细地址" prop="address"> <el-form-item label="详细地址" prop="address">
<el-input v-model="dataForm.address" placeholder="详细地址"></el-input> <el-input v-model="dataForm.address" placeholder="详细地址"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="订单所属的服务id" prop="serviceId"> <!--<el-form-item label="订单所属的服务id" prop="serviceId">-->
<el-input v-model="dataForm.serviceId" placeholder="订单所属的服务id"></el-input> <!--<el-input v-model="dataForm.serviceId" placeholder="订单所属的服务id"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="订单所属的服务名称" prop="serviceName"> <el-form-item label="服务名称" prop="serviceName">
<el-input v-model="dataForm.serviceName" placeholder="订单所属的服务名称"></el-input> <el-input v-model="dataForm.serviceName" placeholder="订单所属的服务名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="预约人" prop="appointmentPerson"> <el-form-item label="预约人" prop="appointmentPerson">
...@@ -31,42 +31,42 @@ ...@@ -31,42 +31,42 @@
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input> <el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="接单人id" prop="orderRecipientId"> <!--<el-form-item label="接单人id" prop="orderRecipientId">-->
<el-input v-model="dataForm.orderRecipientId" placeholder="接单人id"></el-input> <!--<el-input v-model="dataForm.orderRecipientId" placeholder="接单人id"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="接单人姓名" prop="orderRecipientName"> <el-form-item label="服务人姓名" prop="orderRecipientName">
<el-input v-model="dataForm.orderRecipientName" placeholder="接单人姓名"></el-input> <el-input v-model="dataForm.orderRecipientName" placeholder="接单人姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="单时间" prop="orderRecipientTime"> <el-form-item label="单时间" prop="orderRecipientTime">
<el-input v-model="dataForm.orderRecipientTime" placeholder="接单时间"></el-input> <el-input v-model="dataForm.orderRecipientTime" placeholder="接单时间"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="接单人电话" prop="orderRecipientPhone"> <el-form-item label="服务人电话" prop="orderRecipientPhone">
<el-input v-model="dataForm.orderRecipientPhone" placeholder="接单人电话"></el-input> <el-input v-model="dataForm.orderRecipientPhone" placeholder="接单人电话"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="订单实际金额" prop="actPrice"> <!--<el-form-item label="订单实际金额" prop="actPrice">-->
<el-input v-model="dataForm.actPrice" placeholder="订单实际金额"></el-input> <!--<el-input v-model="dataForm.actPrice" placeholder="订单实际金额"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="所属社区名称" prop="communityName"> <el-form-item label="所属社区名称" prop="communityName">
<el-input v-model="dataForm.communityName" placeholder="所属社区名称"></el-input> <el-input v-model="dataForm.communityName" placeholder="所属社区名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属社区id" prop="communityId"> <!--<el-form-item label="所属社区id" prop="communityId">-->
<el-input v-model="dataForm.communityId" placeholder="所属社区id"></el-input> <!--<el-input v-model="dataForm.communityId" placeholder="所属社区id"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="部门ID" prop="deptId"> <!--<el-form-item label="部门ID" prop="deptId">-->
<el-input v-model="dataForm.deptId" placeholder="部门ID"></el-input> <!--<el-input v-model="dataForm.deptId" placeholder="部门ID"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="订单发起人" prop="creatorName"> <el-form-item label="订单发起人" prop="creatorName">
<el-input v-model="dataForm.creatorName" placeholder="订单发起人"></el-input> <el-input v-model="dataForm.creatorName" placeholder="订单发起人"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="订单发起人联系电话" prop="creatorTel"> <el-form-item label="订单发起人联系电话" prop="creatorTel">
<el-input v-model="dataForm.creatorTel" placeholder="订单发起人联系电话"></el-input> <el-input v-model="dataForm.creatorTel" placeholder="订单发起人联系电话"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="更新者" prop="updater"> <!--<el-form-item label="更新者" prop="updater">-->
<el-input v-model="dataForm.updater" placeholder="更新者"></el-input> <!--<el-input v-model="dataForm.updater" placeholder="更新者"></el-input>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="更新时间" prop="updateDate"> <!--<el-form-item label="更新时间" prop="updateDate">-->
<el-input v-model="dataForm.updateDate" placeholder="更新时间"></el-input> <!--<el-input v-model="dataForm.updateDate" placeholder="更新时间"></el-input>-->
</el-form-item> <!--</el-form-item>-->
</el-form> </el-form>
<template slot="footer"> <template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> <el-button @click="visible = false">{{ $t('cancel') }}</el-button>
......
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<!--<el-form-item label="订单编号" prop="orderNum">-->
<!--<el-input v-model="dataForm.orderNum" placeholder="订单编号"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单状态 0未接单 ,1已接单 2已完成 3已取消" prop="status">-->
<!--<el-input v-model="dataForm.status" placeholder="订单状态 0未接单 ,1已接单 2已完成 3已取消"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="订单状态" prop="statusName">
<el-input v-model="dataForm.statusName" placeholder="订单状态名称"></el-input>
</el-form-item>
<el-form-item label="详细地址" prop="address">
<el-input v-model="dataForm.address" placeholder="详细地址"></el-input>
</el-form-item>
<!--<el-form-item label="订单所属的服务id" prop="serviceId">-->
<!--<el-input v-model="dataForm.serviceId" placeholder="订单所属的服务id"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="服务名称" prop="serviceName">
<el-input v-model="dataForm.serviceName" placeholder="订单所属的服务名称"></el-input>
</el-form-item>
<el-form-item label="预约人" prop="appointmentPerson">
<el-input v-model="dataForm.appointmentPerson" placeholder="预约人"></el-input>
</el-form-item>
<el-form-item label="预约人电话" prop="appointmentPhone">
<el-input v-model="dataForm.appointmentPhone" placeholder="预约人电话"></el-input>
</el-form-item>
<el-form-item label="预约时间" prop="appointmentTime">
<el-input v-model="dataForm.appointmentTime" placeholder="预约时间"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
<!--<el-form-item label="服务人id" prop="orderRecipientId">-->
<!--<el-input v-model="dataForm.orderRecipientId" placeholder="接单人id"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="服务人姓名" prop="orderRecipientName">
<el-input v-model="dataForm.orderRecipientName" placeholder="接单人姓名"></el-input>
</el-form-item>
<el-form-item label="服务人电话" prop="orderRecipientPhone">
<el-input v-model="dataForm.orderRecipientPhone" placeholder="接单人电话"></el-input>
</el-form-item>
<el-form-item label="派单时间" prop="orderRecipientTime">
<el-input v-model="dataForm.orderRecipientTime" placeholder="接单时间"></el-input>
</el-form-item>
<!--<el-form-item label="订单实际金额" prop="actPrice">-->
<!--<el-input v-model="dataForm.actPrice" placeholder="订单实际金额"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="所属社区" prop="communityName">
<el-input v-model="dataForm.communityName" placeholder="所属社区名称"></el-input>
</el-form-item>
<!--<el-form-item label="所属社区id" prop="communityId">-->
<!--<el-input v-model="dataForm.communityId" placeholder="所属社区id"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="部门ID" prop="deptId">-->
<!--<el-input v-model="dataForm.deptId" placeholder="部门ID"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单发起人" prop="creatorName">-->
<!--<el-input v-model="dataForm.creatorName" placeholder="订单发起人"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单发起人联系电话" prop="creatorTel">-->
<!--<el-input v-model="dataForm.creatorTel" placeholder="订单发起人联系电话"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="取消原因" prop="cancelReason">
<el-input v-model="dataForm.cancelReason" placeholder="取消订单原因"></el-input>
</el-form-item>
<!--<el-form-item label="更新者" prop="updater">-->
<!--<el-input v-model="dataForm.updater" placeholder="更新者"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="更新时间" prop="updateDate">-->
<!--<el-input v-model="dataForm.updateDate" placeholder="更新时间"></el-input>-->
<!--</el-form-item>-->
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<!--<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>-->
<el-button type="primary" @click="confirmcancel()">取消接单</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
orderNum: '',
status: '',
statusName: '',
address: '',
serviceId: '',
serviceName: '',
appointmentPerson: '',
appointmentPhone: '',
appointmentTime: '',
remark: '',
orderRecipientId: '',
orderRecipientName: '',
orderRecipientTime: '',
orderRecipientPhone: '',
actPrice: '',
communityName: '',
communityId: '',
deptId: '',
creator: '',
creatorName: '',
creatorTel: '',
createDate: '',
updater: '',
updateDate: '',
cancelReason:''
}
}
},
computed: {
dataRule () {
return {
orderNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
status: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
statusName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
address: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
serviceId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
serviceName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentPerson: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentPhone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
remark: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientPhone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
actPrice: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
communityName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
communityId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
creatorName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
creatorTel: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updater: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updateDate: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
// 获取信息
getInfo () {
this.$http.get(`/serviceOrder/pensionorder/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
confirmcancel () {
this.$http.get('/serviceOrder/pensionorder/organizationHandle',{
params:{
id: this.dataForm.id,
status: 3,
cancel_reason:this.dataForm.cancelReason
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
},
// 表单提交
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/serviceOrder/pensionorder/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? '订单详情' : '订单详情'" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<!--<el-form-item label="订单编号" prop="orderNum">-->
<!--<el-input v-model="dataForm.orderNum" placeholder="订单编号"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单状态 0未接单 ,1已接单 2已完成 3已取消" prop="status">-->
<!--<el-input v-model="dataForm.status" placeholder="订单状态 0未接单 ,1已接单 2已完成 3已取消"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="订单状态" prop="statusName">
<el-input v-model="dataForm.statusName" placeholder="订单状态名称"></el-input>
</el-form-item>
<el-form-item label="详细地址" prop="address">
<el-input v-model="dataForm.address" placeholder="详细地址"></el-input>
</el-form-item>
<!--<el-form-item label="订单所属的服务id" prop="serviceId">-->
<!--<el-input v-model="dataForm.serviceId" placeholder="订单所属的服务id"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="服务名称" prop="serviceName">
<el-input v-model="dataForm.serviceName" placeholder="订单所属的服务名称"></el-input>
</el-form-item>
<el-form-item label="预约人" prop="appointmentPerson">
<el-input v-model="dataForm.appointmentPerson" placeholder="预约人"></el-input>
</el-form-item>
<el-form-item label="预约人电话" prop="appointmentPhone">
<el-input v-model="dataForm.appointmentPhone" placeholder="预约人电话"></el-input>
</el-form-item>
<el-form-item label="预约时间" prop="appointmentTime">
<el-input v-model="dataForm.appointmentTime" placeholder="预约时间"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
<!--<el-form-item label="服务人id" prop="orderRecipientId">-->
<!--<el-input v-model="dataForm.orderRecipientId" placeholder="接单人id"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="服务人姓名" prop="orderRecipientName">
<el-input v-model="dataForm.orderRecipientName" placeholder="接单人姓名"></el-input>
</el-form-item>
<el-form-item label="服务人电话" prop="orderRecipientPhone">
<el-input v-model="dataForm.orderRecipientPhone" placeholder="接单人电话"></el-input>
</el-form-item>
<el-form-item label="派单时间" prop="orderRecipientTime">
<el-input v-model="dataForm.orderRecipientTime" placeholder="接单时间"></el-input>
</el-form-item>
<!--<el-form-item label="订单实际金额" prop="actPrice">-->
<!--<el-input v-model="dataForm.actPrice" placeholder="订单实际金额"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="所属社区" prop="communityName">
<el-input v-model="dataForm.communityName" placeholder="所属社区名称"></el-input>
</el-form-item>
<el-form-item v-show="dataForm.status==3" label="取消原因" prop="cancelReason">
<el-input v-model="dataForm.cancelReason" placeholder="取消订单原因"></el-input>
</el-form-item>
<!--<el-form-item label="所属社区id" prop="communityId">-->
<!--<el-input v-model="dataForm.communityId" placeholder="所属社区id"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="部门ID" prop="deptId">-->
<!--<el-input v-model="dataForm.deptId" placeholder="部门ID"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单发起人" prop="creatorName">-->
<!--<el-input v-model="dataForm.creatorName" placeholder="订单发起人"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单发起人联系电话" prop="creatorTel">-->
<!--<el-input v-model="dataForm.creatorTel" placeholder="订单发起人联系电话"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="更新者" prop="updater">-->
<!--<el-input v-model="dataForm.updater" placeholder="更新者"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="更新时间" prop="updateDate">-->
<!--<el-input v-model="dataForm.updateDate" placeholder="更新时间"></el-input>-->
<!--</el-form-item>-->
</el-form>
<template slot="footer">
<el-button @click="visible = false">关闭</el-button>
<!--<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>-->
<!--<el-button type="primary" @click="confirmReceive()">确认接单</el-button>-->
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
orderNum: '',
status: '',
statusName: '',
address: '',
serviceId: '',
serviceName: '',
appointmentPerson: '',
appointmentPhone: '',
appointmentTime: '',
remark: '',
orderRecipientId: '',
orderRecipientName: '',
orderRecipientTime: '',
orderRecipientPhone: '',
actPrice: '',
communityName: '',
communityId: '',
deptId: '',
creator: '',
creatorName: '',
creatorTel: '',
createDate: '',
updater: '',
updateDate: ''
}
}
},
computed: {
dataRule () {
return {
orderNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
status: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
statusName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
address: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
serviceId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
serviceName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentPerson: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentPhone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
remark: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientPhone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
actPrice: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
communityName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
communityId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
creatorName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
creatorTel: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updater: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updateDate: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
// 获取信息
getInfo () {
this.$http.get(`/serviceOrder/pensionorder/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
confirmReceive () {
this.$http.get('/serviceOrder/pensionorder/organizationHandle',{
params:{
id: this.dataForm.id,
status: 5,
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
},
// 表单提交
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/serviceOrder/pensionorder/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<!--<el-form-item label="订单编号" prop="orderNum">-->
<!--<el-input v-model="dataForm.orderNum" placeholder="订单编号"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单状态 0未接单 ,1已接单 2已完成 3已取消" prop="status">-->
<!--<el-input v-model="dataForm.status" placeholder="订单状态 0未接单 ,1已接单 2已完成 3已取消"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="订单状态" prop="statusName">
<el-input v-model="dataForm.statusName" placeholder="订单状态名称"></el-input>
</el-form-item>
<el-form-item label="详细地址" prop="address">
<el-input v-model="dataForm.address" placeholder="详细地址"></el-input>
</el-form-item>
<!--<el-form-item label="订单所属的服务id" prop="serviceId">-->
<!--<el-input v-model="dataForm.serviceId" placeholder="订单所属的服务id"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="服务名称" prop="serviceName">
<el-input v-model="dataForm.serviceName" placeholder="订单所属的服务名称"></el-input>
</el-form-item>
<el-form-item label="预约人" prop="appointmentPerson">
<el-input v-model="dataForm.appointmentPerson" placeholder="预约人"></el-input>
</el-form-item>
<el-form-item label="预约人电话" prop="appointmentPhone">
<el-input v-model="dataForm.appointmentPhone" placeholder="预约人电话"></el-input>
</el-form-item>
<el-form-item label="预约时间" prop="appointmentTime">
<el-input v-model="dataForm.appointmentTime" placeholder="预约时间"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
<!--<el-form-item label="服务人id" prop="orderRecipientId">-->
<!--<el-input v-model="dataForm.orderRecipientId" placeholder="接单人id"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="服务人姓名" prop="orderRecipientName">-->
<!--<el-input v-model="dataForm.orderRecipientName" placeholder="接单人姓名"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="服务人电话" prop="orderRecipientPhone">-->
<!--<el-input v-model="dataForm.orderRecipientPhone" placeholder="接单人电话"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="派单时间" prop="orderRecipientTime">-->
<!--<el-input v-model="dataForm.orderRecipientTime" placeholder="接单时间"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单实际金额" prop="actPrice">-->
<!--<el-input v-model="dataForm.actPrice" placeholder="订单实际金额"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="所属社区" prop="communityName">
<el-input v-model="dataForm.communityName" placeholder="所属社区名称"></el-input>
</el-form-item>
<!--<el-form-item label="所属社区id" prop="communityId">-->
<!--<el-input v-model="dataForm.communityId" placeholder="所属社区id"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="部门ID" prop="deptId">-->
<!--<el-input v-model="dataForm.deptId" placeholder="部门ID"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单发起人" prop="creatorName">-->
<!--<el-input v-model="dataForm.creatorName" placeholder="订单发起人"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单发起人联系电话" prop="creatorTel">-->
<!--<el-input v-model="dataForm.creatorTel" placeholder="订单发起人联系电话"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="更新者" prop="updater">-->
<!--<el-input v-model="dataForm.updater" placeholder="更新者"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="更新时间" prop="updateDate">-->
<!--<el-input v-model="dataForm.updateDate" placeholder="更新时间"></el-input>-->
<!--</el-form-item>-->
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<!--<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>-->
<el-button type="primary" @click="confirmReceive()">确认接单</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
orderNum: '',
status: '',
statusName: '',
address: '',
serviceId: '',
serviceName: '',
appointmentPerson: '',
appointmentPhone: '',
appointmentTime: '',
remark: '',
orderRecipientId: '',
orderRecipientName: '',
orderRecipientTime: '',
orderRecipientPhone: '',
actPrice: '',
communityName: '',
communityId: '',
deptId: '',
creator: '',
creatorName: '',
creatorTel: '',
createDate: '',
updater: '',
updateDate: ''
}
}
},
computed: {
dataRule () {
return {
orderNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
status: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
statusName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
address: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
serviceId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
serviceName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentPerson: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentPhone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
remark: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientPhone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
actPrice: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
communityName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
communityId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
creatorName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
creatorTel: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updater: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updateDate: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
// 获取信息
getInfo () {
this.$http.get(`/serviceOrder/pensionorder/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
confirmReceive () {
this.$http.get('/serviceOrder/pensionorder/organizationHandle',{
params:{
id: this.dataForm.id,
status: 5,
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
// window.location.reload()
}
})
}).catch(() => {})
},
// 表单提交
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/serviceOrder/pensionorder/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<!--<el-form-item label="订单编号" prop="orderNum">-->
<!--<el-input v-model="dataForm.orderNum" placeholder="订单编号"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单状态 0未接单 ,1已接单 2已完成 3已取消" prop="status">-->
<!--<el-input v-model="dataForm.status" placeholder="订单状态 0未接单 ,1已接单 2已完成 3已取消"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="订单状态" prop="statusName">
<el-input v-model="dataForm.statusName" placeholder="订单状态名称"></el-input>
</el-form-item>
<el-form-item label="详细地址" prop="address">
<el-input v-model="dataForm.address" placeholder="详细地址"></el-input>
</el-form-item>
<!--<el-form-item label="订单所属的服务id" prop="serviceId">-->
<!--<el-input v-model="dataForm.serviceId" placeholder="订单所属的服务id"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="服务名称" prop="serviceName">
<el-input v-model="dataForm.serviceName" placeholder="订单所属的服务名称"></el-input>
</el-form-item>
<el-form-item label="预约人" prop="appointmentPerson">
<el-input v-model="dataForm.appointmentPerson" placeholder="预约人"></el-input>
</el-form-item>
<el-form-item label="预约人电话" prop="appointmentPhone">
<el-input v-model="dataForm.appointmentPhone" placeholder="预约人电话"></el-input>
</el-form-item>
<el-form-item label="预约时间" prop="appointmentTime">
<el-input v-model="dataForm.appointmentTime" placeholder="预约时间"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
<!--<el-form-item label="服务人id" prop="orderRecipientId">-->
<!--<el-input v-model="dataForm.orderRecipientId" placeholder="接单人id"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="请选择服务人员" prop="orderRecipientName">
<el-select v-model="dataForm.orderRecipientId" filterable placeholder="请选择服务人员">
<el-option
v-for="item in orderRecipientIdList"
:key="item.id"
:label="item.username"
:value="item.id">
</el-option>
</el-select>
<!--<el-input v-model="dataForm.orderRecipientName" placeholder="接单人姓名"></el-input>-->
</el-form-item>
<!--<el-form-item label="服务人电话" prop="orderRecipientPhone">-->
<!--<el-input v-model="dataForm.orderRecipientPhone" placeholder="接单人电话"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="派单时间" prop="orderRecipientTime">-->
<!--<el-input v-model="dataForm.orderRecipientTime" placeholder="接单时间"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单实际金额" prop="actPrice">-->
<!--<el-input v-model="dataForm.actPrice" placeholder="订单实际金额"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="所属社区" prop="communityName">
<el-input v-model="dataForm.communityName" placeholder="所属社区名称"></el-input>
</el-form-item>
<!--<el-form-item label="所属社区id" prop="communityId">-->
<!--<el-input v-model="dataForm.communityId" placeholder="所属社区id"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="部门ID" prop="deptId">-->
<!--<el-input v-model="dataForm.deptId" placeholder="部门ID"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单发起人" prop="creatorName">-->
<!--<el-input v-model="dataForm.creatorName" placeholder="订单发起人"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="订单发起人联系电话" prop="creatorTel">-->
<!--<el-input v-model="dataForm.creatorTel" placeholder="订单发起人联系电话"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="更新者" prop="updater">-->
<!--<el-input v-model="dataForm.updater" placeholder="更新者"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="更新时间" prop="updateDate">-->
<!--<el-input v-model="dataForm.updateDate" placeholder="更新时间"></el-input>-->
<!--</el-form-item>-->
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<!--<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>-->
<el-button type="primary" @click="confirmSend()">确认派发</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
orderNum: '',
status: '',
statusName: '',
address: '',
serviceId: '',
serviceName: '',
appointmentPerson: '',
appointmentPhone: '',
appointmentTime: '',
remark: '',
orderRecipientId: '',
orderRecipientName: '',
orderRecipientTime: '',
orderRecipientPhone: '',
actPrice: '',
communityName: '',
communityId: '',
deptId: '',
creator: '',
creatorName: '',
creatorTel: '',
createDate: '',
updater: '',
updateDate: ''
},
orderRecipientIdList: [],
}
},
created () {
this.getOrderRecipientIdList()
},
computed: {
dataRule () {
return {
orderNum: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
status: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
statusName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
address: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
serviceId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
serviceName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentPerson: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentPhone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
appointmentTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
remark: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
orderRecipientPhone: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
actPrice: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
communityName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
communityId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
creatorName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
creatorTel: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updater: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updateDate: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
// 获取信息
getInfo () {
this.$http.get(`/serviceOrder/pensionorder/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
confirmSend () {
this.$http.get('/serviceOrder/pensionorder/organizationHandle',{
params:{
id: this.dataForm.id,
status: 1,
recipient_id: this.dataForm.orderRecipientId
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
},
getOrderRecipientIdList () {
this.$http.get('/serviceOrder/pensionorder/organizationStaff',{
params:{
page: "1",
limit: "100",
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.orderRecipientIdList=res.data.list
}).catch(() => {})
},
// 表单提交
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/serviceOrder/pensionorder/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
...@@ -5,50 +5,70 @@ ...@@ -5,50 +5,70 @@
<el-form-item> <el-form-item>
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input> <el-input v-model="dataForm.id" placeholder="id" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <!--<el-form-item>-->
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <!--<el-input v-model="dataForm.status" placeholder="status" clearable></el-input>-->
<!--</el-form-item>-->
<el-form-item label="订单状态" prop="status">
<el-select v-model="dataForm.status" filterable placeholder="订单状态">
<el-option label="" value=""></el-option>
<el-option label="未接单" value="0"></el-option>
<el-option label="已派发" value="1"></el-option>
<el-option label="已完成" value="2"></el-option>
<el-option label="已取消" value="3"></el-option>
<el-option label="待评价" value="4"></el-option>
<el-option label="已接单未派发" value="5"></el-option>
</el-select>
<!--<el-input v-model="dataForm.orderRecipientName" placeholder="接单人姓名"></el-input>-->
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button> <el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('serviceOrder:pensionorder:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('serviceOrder:pensionorder:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item> </el-form-item>
<!--<el-form-item>-->
<!--<el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button>-->
<!--</el-form-item>-->
<!--<el-form-item>-->
<!--<el-button v-if="$hasPermission('serviceOrder:pensionorder:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>-->
<!--</el-form-item>-->
<!--<el-form-item>-->
<!--<el-button v-if="$hasPermission('serviceOrder:pensionorder:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>-->
<!--</el-form-item>-->
</el-form> </el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="id" label="id" header-align="center" align="center"></el-table-column> <el-table-column prop="id" label="id" header-align="center" align="center"></el-table-column>
<el-table-column prop="orderNum" label="订单编号" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="orderNum" label="订单编号" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="status" label="订单状态 0未接单 ,1已接单 2已完成 3已取消" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="status" label="订单状态 0未接单 ,1已接单 2已完成 3已取消" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="statusName" label="订单状态名称" header-align="center" align="center"></el-table-column> <el-table-column prop="statusName" label="订单状态名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="address" label="详细地址" header-align="center" align="center"></el-table-column> <el-table-column prop="address" label="详细地址" header-align="center" align="center"></el-table-column>
<el-table-column prop="serviceId" label="订单所属的服务id" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="serviceId" label="订单所属的服务id" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="serviceName" label="订单所属的服务名称" header-align="center" align="center"></el-table-column> <el-table-column prop="serviceName" label="订单所属的服务名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="appointmentPerson" label="预约人" header-align="center" align="center"></el-table-column> <el-table-column prop="appointmentPerson" label="预约人" header-align="center" align="center"></el-table-column>
<el-table-column prop="appointmentPhone" label="预约人电话" header-align="center" align="center"></el-table-column> <el-table-column prop="appointmentPhone" label="预约人电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="appointmentTime" label="预约时间" header-align="center" align="center"></el-table-column> <el-table-column prop="appointmentTime" label="预约时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="remark" label="备注" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="remark" label="备注" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="orderRecipientId" label="接单人id" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="orderRecipientId" label="接单人id" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="orderRecipientName" label="接单人姓名" header-align="center" align="center"></el-table-column> <el-table-column prop="orderRecipientName" label="服务人姓名" header-align="center" align="center"></el-table-column>
<el-table-column prop="orderRecipientTime" label="接单时间" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="orderRecipientTime" label="接单时间" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="orderRecipientPhone" label="接单人电话" header-align="center" align="center"></el-table-column> <el-table-column prop="orderRecipientPhone" label="服务人电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="actPrice" label="订单实际金额" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="actPrice" label="订单实际金额" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="communityName" label="所属社区名称" header-align="center" align="center"></el-table-column> <el-table-column prop="communityName" label="所属社区名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="communityId" label="所属社区id" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="communityId" label="所属社区id" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="deptId" label="部门ID" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="deptId" label="部门ID" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="creator" label="创建者" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="creator" label="创建者" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="creatorName" label="订单发起人" header-align="center" align="center"></el-table-column> <el-table-column prop="creatorName" label="订单发起人" header-align="center" align="center"></el-table-column>
<el-table-column prop="creatorTel" label="订单发起人联系电话" header-align="center" align="center"></el-table-column> <el-table-column prop="creatorTel" label="订单发起人联系电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="createDate" label="创建时间" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="createDate" label="创建时间" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="updater" label="更新者" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="updater" label="更新者" header-align="center" align="center"></el-table-column>-->
<el-table-column prop="updateDate" label="更新时间" header-align="center" align="center"></el-table-column> <!--<el-table-column prop="updateDate" label="更新时间" header-align="center" align="center"></el-table-column>-->
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="$hasPermission('serviceOrder:pensionorder:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> <!--<el-button v-if="$hasPermission('serviceOrder:pensionorder:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>-->
<el-button v-if="$hasPermission('serviceOrder:pensionorder:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> <!--<el-button v-if="$hasPermission('serviceOrder:pensionorder:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>-->
<el-button type="text" size="small" @click="detailHandle(scope.row.id)">查看详情</el-button>
<!--<el-button v-if="scope.row.status==5 || scope.row.status== 1 " type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">查看详情</el-button>-->
<el-button v-if="scope.row.status==5 || scope.row.status== 1 " type="text" size="small" @click="cancelHandle(scope.row.id)">取消接单</el-button>
<el-button v-if="scope.row.status==0" type="text" size="small" @click="receiveHandle(scope.row.id)">接单</el-button>
<el-button v-if="scope.row.status==5 " type="text" size="small" @click="sendHandle(scope.row.id)">派单</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -63,6 +83,10 @@ ...@@ -63,6 +83,10 @@
</el-pagination> </el-pagination>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<receive v-if="receiveVisible" ref="receive" @refreshDataList="getDataList"></receive>
<send v-if="sendVisible" ref="send" @refreshDataList="getDataList"></send>
<cancel v-if="cancelVisible" ref="cancel" @refreshDataList="getDataList"></cancel>
<detail v-if="detailVisible" ref="detail" @refreshDataList="getDataList"></detail>
</div> </div>
</el-card> </el-card>
</template> </template>
...@@ -70,24 +94,68 @@ ...@@ -70,24 +94,68 @@
<script> <script>
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './pensionorder-add-or-update' import AddOrUpdate from './pensionorder-add-or-update'
import receive from './pensionorder-receive'
import send from './pensionorder-send'
import cancel from './pensionorder-cancel'
import detail from './pensionorder-detail'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data () { data () {
return { return {
receiveVisible: false,
sendVisible: false,
cancelVisible: false,
detailVisible: false,
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: '/serviceOrder/pensionorder/page', getDataListURL: '/serviceOrder/pensionorder/organization',
getDataListIsPage: true, getDataListIsPage: true,
exportURL: '/serviceOrder/pensionorder/export', exportURL: '/serviceOrder/pensionorder/export',
deleteURL: '/serviceOrder/pensionorder', deleteURL: '/serviceOrder/pensionorder',
deleteIsBatch: true deleteIsBatch: true
}, },
dataForm: { dataForm: {
id: '' id: '',
status: ''
} }
} }
}, },
components: { components: {
AddOrUpdate AddOrUpdate,
receive,
send,
cancel,
detail
},
methods: {
// 接单弹出框
receiveHandle (id) {
this.receiveVisible = true
this.$nextTick(() => {
this.$refs.receive.dataForm.id = id
this.$refs.receive.init()
})
},
sendHandle (id) {
this.sendVisible = true
this.$nextTick(() => {
this.$refs.send.dataForm.id = id
this.$refs.send.init()
})
},
detailHandle (id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.detail.dataForm.id = id
this.$refs.detail.init()
})
},
cancelHandle (id) {
this.cancelVisible = true
this.$nextTick(() => {
this.$refs.cancel.dataForm.id = id
this.$refs.cancel.init()
})
}
} }
} }
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment