+ {{item.objectName}}
+
+
+ v-model="formData.principalContact">
@@ -128,14 +136,6 @@
placeholder="请输入备注,不超过500字"
v-model="formData.remark">
-
-
-
@@ -185,11 +185,10 @@ export default {
}
return {
- formType: 'add', //表单操作类型 add新增,edit编辑,detail详情,feedback反馈
+
btnDisable: false,
- unitId: '',
keyWords: '',
formData: {
unitName: '',
@@ -212,7 +211,7 @@ export default {
disabledDate: startDisabledDate
},
- categrayArray: [],
+
projectList: [],
}
@@ -220,75 +219,27 @@ export default {
components: {},
mounted () {
if (this.serviceRecordId) {//详情
-
+ this.loadInfo()
}
- this.initMap()
+ // this.initMap()
console.log('mounted')
},
- activated () {
- console.log('activated')
- },
-
- methods: {
-
- async initForm (type, unitId) {
- this.startLoading()
- this.$refs.ref_form.resetFields();
-
- //获取服务事项
- await this.loadService()
- this.formType = type
- if (unitId) {
- this.unitId = unitId
- this.formData.id = unitId
- await this.loadFormData()
- } else {
- map.setCenter(new TMap.LatLng(36.0722275, 120.38945519))
- this.setMarker(36.0722275, 120.38945519)
- }
-
- this.endLoading()
-
- },
-
- //获取服务事项下拉框
- async loadService () {
- const url = "/heart/serviceitem/dict-list"
- let params = {
- type: 'usable'
- // parentCategoryCode: '1010'
- }
- const { data, code, msg } = await requestPost(url, params)
-
- if (code === 0) {
- this.serviceList = data
-
- } else {
- this.$message.error(msg)
- }
+ methods: {
- },
//加载组织
- async loadFormData () {
- const url = '/heart/icpartyunit/detail'
- // const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/detail'
- let params = {
- id: this.unitId
- }
+ async loadInfo () {
+ const url = `/heart/icServiceProject/service/detail/${this.serviceRecordId}`
+ // const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/detail' + this.serviceRecordId
+ let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
- if (!data.serviceMatterList || !Array.isArray(data.serviceMatterList)) {
- data.serviceMatterList = []
- }
-
this.formData = { ...data }
- map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
- this.setMarker(this.formData.latitude, this.formData.longitude)
+ this.formData.serviceRecordId = this.serviceRecordId
} else {
this.$message.error(msg)
}
@@ -307,16 +258,16 @@ export default {
app.util.validateRule(messageObj)
this.btnDisable = false
} else {
- this.addUnit()
+ this.editFuwu()
}
})
},
- async addUnit () {
+ async editFuwu () {
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码
- if (regPhone.test(this.formData.contactMobile) === false) {
+ if (regPhone.test(this.formData.principalContact) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
@@ -325,11 +276,9 @@ export default {
return false;
}
- let url = '/heart/icpartyunit/save'
- // let url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/save"
- // if (this.formType === 'edit') {
- // this.formData.id = this.unitId
- // }
+ let url = '/heart/icServiceProject/service/update'
+ // let url = "http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/update"
+
const { data, code, msg } = await requestPost(url, this.formData)
@@ -339,8 +288,8 @@ export default {
message: '操作成功'
})
this.resetData()
- this.$emit('dialogOk')
- this.btnDisable = false
+
+ this.$emit('handleOk')
} else {
this.btnDisable = false
this.$message.error(msg)
@@ -467,19 +416,17 @@ export default {
resetData () {
- this.unitId = ''
- this.keyWords = ''
this.formData = {
- unitName: '',
- serviceMatterList: [],
- type: '',
- contact: '',
- contactMobile: '',
- memberCount: 0,
- remark: '', //备注【最大500字】
- address: '', //详细地址
- longitude: '', //经度
- latitude: '' //纬度
+ serviceCategoryKey: '',//服务分类id
+ serviceProjectId: '',//服务项目id
+ serviceOrgId: '',//服务组织id
+ serviceScope: [],//
+ principalName: '',//经办人(责任人)姓名
+ principalContact: '',//经办人联系方式
+ serviceTimeStart: '',//服务起始时间yyyy-MM-dd
+ serviceTimeEnd: '',//服务截止时间yyyy-MM-dd
+ remark: '',//
+
}
},
// 开启加载动画
@@ -502,44 +449,39 @@ export default {
dataRule () {
return {
- unitName: [
- { required: true, message: '单位名称不能为空', trigger: 'blur' },
+ serviceCategoryKey: [
+ { required: true, message: '服务类别不能为空', trigger: 'blur' },
],
- type: [
- { required: true, message: '分类不能为空', trigger: 'blur' }
+ serviceProjectId: [
+ { required: true, message: '服务项目不能为空', trigger: 'blur' }
],
- contact: [
- { required: true, message: '联系人不能为空', trigger: 'blur' }
- ],
- contactMobile: [
- { required: true, message: '联系电话不能为空', trigger: 'blur' }
+ serviceOrgId: [
+ { required: true, message: '服务组织不能为空', trigger: 'blur' }
],
- memberCount: [
- { required: true, message: '在职党员数不能为空', trigger: 'blur' }
+ serviceTimeStart: [
+ { required: true, message: '服务时间不能为空', trigger: 'blur' }
],
- address: [
- { required: true, message: '详细地址不能为空', trigger: 'blur' }
+ serviceScope: [
+ { required: true, message: '服务范围不能为空', trigger: 'blur' }
],
- longitude: [
- { required: true, message: '坐标不能为空', trigger: 'blur' }
- ]
+
}
},
-
},
props: {
serviceRecordId: {
type: String,
- required: ''
+ required: true
},
- formType: {
+ formType: {//表单操作类型 add新增,edit编辑,detail详情,feedback反馈
type: String,
- required: ''
+ required: true
},
categrayArray: {
type: Array,
+ required: true,
default () {
return []
}
@@ -547,18 +489,8 @@ export default {
}
}
-
+
diff --git a/src/views/modules/communityService/fuwujilu/fuwuList.vue b/src/views/modules/communityService/fuwujilu/fuwuList.vue
index c96b532f..156e75a5 100644
--- a/src/views/modules/communityService/fuwujilu/fuwuList.vue
+++ b/src/views/modules/communityService/fuwujilu/fuwuList.vue
@@ -9,8 +9,8 @@
-
+
@@ -59,7 +59,7 @@
class="item_width_2 data-tag"
size="small"
type="date"
- value-format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd"
placeholder="结束时间">
@@ -133,6 +133,7 @@
@@ -143,17 +144,17 @@
:show-overflow-tooltip="true">
-
-
@@ -167,7 +168,7 @@
label="服务状态"
:show-overflow-tooltip="true">
- {{scope.row.serviceStatus==='in_service'?'服务':'已完成'}}
+ {{scope.row.serviceStatus==='in_service'?'进行中':'已完成'}}
@@ -181,7 +182,7 @@
+ width="180">
编辑
反馈
@@ -235,10 +236,12 @@
:categrayArray="categrayArray"
:statusArray="statusArray"
:satisfyArray="satisfyArray"
+ :serviceRecordId="serviceRecordId"
@handleOk="handleOk"
@handleClose="handleClose">
-
+ :serviceRecordId="serviceRecordId"
+ :categrayArray="categrayArray"
+ @handleOk="handleOk"
+ @handleClose="handleClose"
+ :formType="formType">
@@ -317,7 +324,7 @@ export default {
],
formData: {
- serviceCategoryId: '',//服务类别id
+ serviceCategoryKey: '',//服务类别id
serviceProjectName: '',//项目名称
serviceOrgName: '',//服务组织名称
serviceTimeStart: '',//服务开始时间yyyy-MM-dd
@@ -355,13 +362,13 @@ export default {
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
- // "formData.serviceTimeEnd": function (val) {
- // if (val && val != '') {
- // let arrayTemp = val.split(' ')
- // this.formData.serviceTimeEnd = arrayTemp[0]
- // }
+ "formData.serviceTimeEnd": function (val) {
+ if (val && val != '') {
+ let arrayTemp = val.split(' ')
+ this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59'
+ }
- // },
+ },
},
mounted () {
console.log(this.$store.state)
@@ -415,10 +422,10 @@ export default {
},
//加载组织数据
- async handleDispose (row) {
+ async handleFeedback (row) {
this.serviceRecordId = row.serviceRecordId
this.addDiaTitle = '服务反馈'
- this.formType = 'dispose'
+ this.formType = 'feedback'
this.showAdd = true;
},
@@ -427,24 +434,48 @@ export default {
this.serviceRecordId = ""
this.formType = ''
- this.showAdd = false;
- this.getTableData()
+ this.showAdd = false
+ this.showDetail = false
+
},
handleOk () {
this.handleClose()
this.pageNo = 1
+ this.getTableData()
},
- handleEditSuccess () {
- this.handleClose();
- this.getTableData();
- },
async handleDel (row) {
+
this.serviceRecordId = row.serviceRecordId
- const url = "/heart/icServiceProject/service/cancel/" + row.serviceRecordId;
+
+ this.$confirm("确认取消服务?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ this.cancelFuwu()
+ })
+ .catch(err => {
+ if (err == "cancel") {
+ // this.$message({
+ // type: "info",
+ // message: "已取消删除"
+ // });
+ }
+
+ });
+
+
+
+ },
+
+ async cancelFuwu () {
+
+ const url = `/heart/icServiceProject/service/cancel/${this.serviceRecordId}`;
const { data, code, msg } = await requestPost(url, {});
@@ -458,8 +489,8 @@ export default {
},
async getTableData () {
- // const url = "/heart/icServiceProject/service/recordList";
- const url = "http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/recordList";
+ const url = "/heart/icServiceProject/service/recordList";
+ // const url = "http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/recordList";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
@@ -541,14 +572,13 @@ export default {
resetSearch () {
this.formData = {
- gridId: '',
- serviceCategoryId: '',
+ serviceCategoryKey: '',
serviceProjectName: '',
serviceOrgName: '',
- mobile: '',
serviceTimeStart: '',
serviceTimeEnd: '',
serviceStatus: '',
+ satisfaction: ''
}