Shannon_mu 3 лет назад
Родитель
Сommit
efb3ec729c

+ 1 - 1
operationSupport/public/index.html

@@ -14,7 +14,7 @@
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
   <link rel="icon" href="<%= BASE_URL %>favicon.ico" type="image/x-icon" />
-  <link rel="stylesheet" href="//at.alicdn.com/t/font_2251662_mafxfh566lg.css">
+  <link rel="stylesheet" href="//at.alicdn.com/t/font_2251662_6zkesvj5bwe.css">
   <title>智慧社区管理平台</title>
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">

+ 13 - 0
operationSupport/src/router/index.js

@@ -162,6 +162,19 @@ const zRoute = [
         meta: { title: '流程管理' },
         name: "flowManagement",
     },
+
+    {
+        path: '/workOrdersManagement',
+        component: () => import(/* webpackChunkName: "404" */ '@views/operationManagement/workOrders/index.vue'),
+        meta: { title: '工单管理' },
+        name: "workOrdersManagement",
+    },
+    {
+        path: '/workOrdersRecords',
+        component: () => import(/* webpackChunkName: "404" */ '@views/operationManagement/workOrders/records.vue'),
+        meta: { title: '工单记录' },
+        name: "workOrdersRecords",
+    }
 ]
 
 const quietRoute = [

+ 167 - 0
operationSupport/src/views/operationManagement/workOrders/index.vue

@@ -0,0 +1,167 @@
+<template>
+    <div class="main">
+        <div class="search">
+            <el-input placeholder="请输入地址/报修人" class="search-input" clearable v-model="mixins_query.name"></el-input>
+            <el-select v-model="mixins_query.communityId" placeholder="选择社区" clearable>
+                <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
+            </el-select>
+            <el-select class="width90" placeholder="请选择工单类型" v-model="mixins_query.orderType" clearable>
+                <el-option label="业主报修" :value="1"></el-option>
+                <el-option label="内部报修" :value="2"></el-option>
+            </el-select>
+            <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
+
+            <div class="search-icon">
+                <el-tooltip class="item" effect="light" placement="bottom" content="新增">
+                    <i class="zoniot_font zoniot-icon-tianjia2" @click="addOrEdit('add')"></i>
+                </el-tooltip>
+            </div>
+        </div>
+        <zz-table
+            :cols="cols"
+            :settings="{ showIndex: true, stripe: true }"
+            :loading="mixins_onQuery"
+            :data="mixins_list"
+            :pageset="mixins_pageset"
+            @page-change="pageChange"
+        >
+            <template slot="repairFile" slot-scope="scope">
+                <div class="imgVdio"><img :src="scope.row.repairFile" alt="" /></div>
+            </template>
+            <template slot-scope="scope" slot="opt">
+                <div class="opt">
+                    <el-tooltip effect="light" placement="bottom" content="派单">
+                        <i class="zoniot_font zoniot-icon-paidan" @click="dispatchTask(scope.row)"></i>
+                    </el-tooltip>
+                    <el-tooltip effect="light" placement="bottom" content="关闭">
+                        <i class="zoniot_font zoniot-icon-guanbi2 redText" @click="closeTask(scope.row)"></i>
+                    </el-tooltip>
+                </div>
+            </template>
+        </zz-table>
+    </div>
+</template>
+
+<script>
+import list from '@utils/list.js';
+export default {
+    mixins: [list],
+    name: 'workOrdersManagement',
+    data() {
+        let _this = this;
+        return {
+            communityArr: [],
+            cols: [
+                {
+                    label: '所属社区',
+                    prop: 'communityName'
+                },
+                {
+                    label: '地址',
+                    prop: 'address'
+                },
+                {
+                    label: '工单类型',
+                    prop: 'orderType',
+                    format(val) {
+                        if (val == 1) {
+                            return '业主报修';
+                        } else if (val == 2) {
+                            return '内部报修';
+                        }
+                        return '--';
+                    }
+                },
+                {
+                    label: '报修人',
+                    prop: 'repairName'
+                },
+                {
+                    label: '手机号',
+                    prop: 'repairPhone'
+                },
+                {
+                    label: '内容描述',
+                    prop: 'repairContent'
+                },
+                {
+                    label: '图片/视频',
+                    prop: 'repairFile',
+                    slot: 'repairFile'
+                },
+                {
+                    label: '报修时间',
+                    prop: 'createDate'
+                },
+                {
+                    label: '操作',
+                    prop: 'id',
+                    slot: 'opt'
+                }
+            ],
+            mixins_post: 'get'
+        };
+    },
+    created() {
+        this.getorgTree();
+        this.mixins_dataUrl = '/sc-community-web/workOrder/page';
+        this.mixins_query = {};
+        this.mixins_search();
+    },
+    mounted() {},
+    methods: {
+        getorgTree() {
+            this.$http
+                .get('/sc-community/assets/community/list')
+                .then((data) => {
+                    this.communityArr = data.data;
+                    this.$store.commit('setAreaSelect', data.data);
+                })
+
+                .catch(function () {});
+        },
+        dispatchTask(row) {
+            console.log(row);
+        },
+        closeTask(data = {}) {
+            new Promise((resolve) => {
+                let title = '关闭工单';
+                this.$store.dispatch('addPopup', {
+                    url: '/operationManagement/workOrders/stepPage/closeTsk.vue',
+                    width: '500px',
+                    height: '100px',
+                    props: {
+                        data,
+                        callback: resolve
+                    },
+                    notip: true,
+                    title: title
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        },
+        addOrEdit() {
+            new Promise((resolve) => {
+                let title = '添加工单';
+                this.$store.dispatch('addPopup', {
+                    url: '/operationManagement/workOrders/stepPage/add.vue',
+                    width: '500px',
+                    height: '500px',
+                    props: {
+                        callback: resolve
+                    },
+                    title: title
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        }
+    }
+};
+</script>
+<style scoped lang='scss'>
+.imgVdio img {
+    width: 64px;
+}
+</style>

+ 189 - 0
operationSupport/src/views/operationManagement/workOrders/records.vue

@@ -0,0 +1,189 @@
+<template>
+    <div class="main">
+        <div class="search">
+            <el-input placeholder="请输入地址/报修人" class="search-input" clearable v-model="mixins_query.name"></el-input>
+            <el-select v-model="mixins_query.communityId" placeholder="选择社区" clearable>
+                <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
+            </el-select>
+            <el-select class="width90" placeholder="请选择工单状态" v-model="mixins_query.orderType" clearable>
+                <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-select>
+            <el-date-picker
+                v-model="times"
+                value-format="yyyy-MM-dd"
+                type="daterange"
+                range-separator="至"
+                start-placeholder="报修开始日期"
+                end-placeholder="报修结束日期"
+                @change="effectiveDateToggle"
+            ></el-date-picker>
+            <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
+        </div>
+        <zz-table
+            :cols="cols"
+            :settings="{ showIndex: true, stripe: true }"
+            :loading="mixins_onQuery"
+            :data="mixins_list"
+            :pageset="mixins_pageset"
+            @page-change="pageChange"
+        >
+            <template slot-scope="scope" slot="opt">
+                <div class="opt">
+                    <el-tooltip effect="light" placement="bottom" content="详情">
+                        <i class="zoniot_font zoniot-icon-xiangqing" @click="dispatchTask(scope.row)"></i>
+                    </el-tooltip>
+                </div>
+            </template>
+        </zz-table>
+    </div>
+</template>
+
+<script>
+import list from '@utils/list.js';
+export default {
+    mixins: [list],
+    name: 'workOrdersManagement',
+    data() {
+        let _this = this;
+        return {
+            communityArr: [],
+            cols: [
+                {
+                    label: '所属社区',
+                    prop: 'communityName'
+                },
+                {
+                    label: '地址',
+                    prop: 'address'
+                },
+                {
+                    label: '工单类型',
+                    prop: 'orderType',
+                    format(val) {
+                        if (val == 1) {
+                            return '业主报修';
+                        } else if (val == 2) {
+                            return '内部报修';
+                        }
+                        return '--';
+                    }
+                },
+                {
+                    label: '报修人',
+                    prop: 'repairName'
+                },
+                {
+                    label: '手机号',
+                    prop: 'repairPhone'
+                },
+                {
+                    label: '报修时间',
+                    prop: 'createDate'
+                },
+                {
+                    label: '紧急程度',
+                    prop: 'urgencyDegree'
+                },
+                {
+                    label: '维修人员',
+                    prop: 'handleName'
+                },
+                {
+                    label: '状态',
+                    prop: 'orderStatus',
+                    format(val) {
+                        if (val == 1) {
+                            return '处理中';
+                        } else if (val == 2) {
+                            return '已完成';
+                        } else if (val == 3) {
+                            return '已完成(超时)';
+                        } else if (val == 4) {
+                            return '已关闭';
+                        }
+                        return '--';
+                    }
+                },
+                {
+                    label: '操作',
+                    prop: 'id',
+                    slot: 'opt'
+                }
+            ],
+            mixins_post: 'get'
+        };
+    },
+    created() {
+        this.getorgTree();
+        this.mixins_dataUrl = '/sc-community-web/workOrder/page';
+        this.mixins_query = {};
+        this.mixins_search();
+    },
+    mounted() {},
+    methods: {
+        effectiveDateToggle(va) {
+            let arr = va;
+            if (!arr) {
+                arr = ['', ''];
+            }
+            this.mixins_query.startDate = arr[0];
+            this.mixins_query.endDate = arr[1];
+        },
+        getorgTree() {
+            this.$http
+                .get('/sc-community/assets/community/list')
+                .then((data) => {
+                    this.communityArr = data.data;
+                    this.$store.commit('setAreaSelect', data.data);
+                })
+
+                .catch(function () {});
+        },
+        dispatchTask(row) {
+            console.log(row);
+        },
+        closeTask(data = {}) {
+            new Promise((resolve) => {
+                let title = '关闭工单';
+                this.$store.dispatch('addPopup', {
+                    url: '/operationManagement/workOrders/stepPage/closeTsk.vue',
+                    width: '500px',
+                    height: '100px',
+                    props: {
+                        data,
+                        callback: resolve
+                    },
+                    notip: true,
+                    title: title
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        },
+        addOrEdit() {
+            new Promise((resolve) => {
+                let title = '添加工单';
+                this.$store.dispatch('addPopup', {
+                    url: '/operationManagement/workOrders/stepPage/add.vue',
+                    width: '500px',
+                    height: '500px',
+                    props: {
+                        callback: resolve
+                    },
+                    title: title
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        }
+    }
+};
+</script>
+<style scoped lang='scss'>
+.imgVdio img {
+    width: 64px;
+}
+</style>

+ 178 - 0
operationSupport/src/views/operationManagement/workOrders/stepPage/add.vue

@@ -0,0 +1,178 @@
+<template>
+    <zz-form :cols="formCols" :data="formData" :rules="formRules" labelWidth="90" ref="form">
+        <template slot="communityId">
+            <el-select class="width65" v-model="formData.communityId" clearable>
+                <el-option
+                    :label="item.communityName"
+                    :value="item.id"
+                    v-for="item in $store.getters['getAreaSelect']"
+                    :key="item.id"
+                ></el-option>
+            </el-select>
+        </template>
+        <template slot="orderType">
+            <el-select class="width65" v-model="formData.orderType" clearable>
+                <el-option label="业主报修" :value="1"></el-option>
+                <el-option label="内部报修" :value="2"></el-option>
+            </el-select>
+        </template>
+        <template slot="repairFile">
+            <el-upload
+                :headers="token"
+                ref="uploaduserlogo"
+                class="mini-upload"
+                limit="3"
+                list-type="picture-card"
+                action="/sc-community/upload/uploadFile"
+                :on-success="uploadsuccess"
+                :before-upload="beforeAvatarUpload"
+                :auto-upload="true"
+                name="file"
+            >
+                <i slot="default" class="el-icon-plus"></i>
+            </el-upload>
+        </template>
+    </zz-form>
+</template>
+<script >
+export default {
+    props: ['params'],
+    data() {
+        return {
+            token: {
+                [localStorage.getItem('UMIS_token') && 'Authorization']: 'Bearer ' + localStorage.getItem('UMIS_token')
+            },
+            formData: {
+                communityId: '',
+                orderType: '',
+                address: '',
+                repairName: '',
+                repairPhone: '',
+                repairContent: ''
+            },
+            formRules: {
+                communityId: [this.$valid.selectRequired('社区')],
+                orderType: [this.$valid.selectRequired('工单类型')],
+                address: this.$valid.custome({
+                    validator(rule, value, cb) {
+                        const rl = rule;
+                        let regExp = /^.{1,20}$/;
+                        if (!value) {
+                            rl.message = '请输入地址';
+                            cb(new Error());
+                        } else if (!regExp.test(value)) {
+                            rl.message = '不能超过20个字';
+                            cb(new Error());
+                        } else {
+                            cb();
+                        }
+                    }
+                }),
+                repairName: this.$valid.custome({
+                    validator(rule, value, cb) {
+                        const rl = rule;
+                        let regExp = /^.{1,20}$/;
+                        if (!value) {
+                            rl.message = '请输入报修人';
+                            cb(new Error());
+                        } else if (!regExp.test(value)) {
+                            rl.message = '不能超过20个字';
+                            cb(new Error());
+                        } else {
+                            cb();
+                        }
+                    }
+                }),
+                repairPhone: [this.$valid.inputRequired('电话')],
+                repairContent: [this.$valid.inputRequired('报修内容')]
+            },
+            formCols: [
+                [
+                    {
+                        label: '所属社区',
+                        prop: 'communityId',
+                        slot: 'communityId'
+                    },
+                    {
+                        label: '工单类型',
+                        prop: 'orderType',
+                        slot: 'orderType'
+                    },
+                    {
+                        label: '地址',
+                        prop: 'address',
+                        input: true
+                    },
+                    {
+                        label: '报修人',
+                        prop: 'repairName',
+                        input: true
+                    },
+                    {
+                        label: '电话',
+                        prop: 'repairPhone',
+                        input: true
+                    },
+                    {
+                        label: ' 报修内容',
+                        prop: 'repairContent',
+                        maxlength: '200',
+                        rows: 4,
+                        textarea: true
+                    },
+                    {
+                        label: ' 图片/视频',
+                        prop: 'repairFile',
+                        slot: 'repairFile'
+                    }
+                ]
+            ],
+            token: {
+                [localStorage.getItem('SC_token') && 'Authorization']: 'Bearer ' + localStorage.getItem('SC_token')
+            },
+        };
+    },
+
+    methods: {
+        submit() {
+            new Promise((resolve) => {
+                this.$refs.form.validate(resolve);
+            }).then(() => {
+                var loading = this.$loading();
+                let url = '/sc-community/workOrder/add';
+                this.$http
+                    .post(url, this.formData)
+                    .then(({ status, msg }) => {
+                        if (status == 0) {
+                            this.$message.success(msg);
+                            this.params.callback();
+                            this.$emit('close');
+                        } else {
+                            this.$message.error(msg);
+                        }
+                        loading.close();
+                    })
+                    .catch(() => {
+                        loading.close();
+                    });
+            });
+        },
+        uploadsuccess(response, file, fileList) {
+            this.$refs.uploaduserlogo.clearFiles();
+            if (0 === response.status) {
+                this.formData.repairFile = response.data;
+            }
+        },
+        beforeAvatarUpload(file) {
+            // const isJPG = file.type === 'image/jpeg';
+            // const isLt2M = file.size / 1024 / 1024 < 2;
+            // if (!isLt2M) {
+            //     this.$message.error('上传头像图片大小不能超过 2MB!');
+            // }
+            // return isJPG && isLt2M;
+        }
+    },
+    created() {
+    }
+};
+</script>

+ 57 - 0
operationSupport/src/views/operationManagement/workOrders/stepPage/closeTsk.vue

@@ -0,0 +1,57 @@
+<template>
+    <zz-form :cols="formCols" :data="formData" :rules="formRules" labelWidth="90" ref="form"> </zz-form>
+</template>
+<script >
+export default {
+    props: ['params'],
+    data() {
+        return {
+            formData: {
+                cause: '',
+                orderId: ''
+            },
+            formRules: {
+                cause: [this.$valid.inputRequired('关闭原因')]
+            },
+            formCols: [
+                [
+                    {
+                        label: '关闭原因',
+                        prop: 'cause',
+                        input: true
+                    }
+                ]
+            ]
+        };
+    },
+
+    methods: {
+        submit() {
+            new Promise((resolve) => {
+                this.$refs.form.validate(resolve);
+            }).then(() => {
+                var loading = this.$loading();
+                let url = '/sc-community/workOrder/close';
+                this.$http
+                    .post(url, this.formData)
+                    .then(({ status, msg }) => {
+                        if (status == 0) {
+                            this.$message.success(msg);
+                            this.params.callback();
+                            this.$emit('close');
+                        } else {
+                            this.$message.error(msg);
+                        }
+                        loading.close();
+                    })
+                    .catch(() => {
+                        loading.close();
+                    });
+            });
+        }
+    },
+    created() {
+        this.formData.orderId = JSON.parse(JSON.stringify(this.params.data)).id;
+    }
+};
+</script>

+ 4 - 9
operationSupport/src/views/payService/chargeSetting/index.vue

@@ -10,13 +10,7 @@
                     v-trim
                     v-model.trim="mixins_query.chargeName"
                 ></el-input>
-                <el-button
-                    class="search-btn"
-                    type="primary"
-                    @click="mixins_search()"
-                    icon="el-icon-search"
-                    >搜索</el-button
-                >
+                <el-button class="search-btn" type="primary" @click="mixins_search()" icon="el-icon-search">搜索</el-button>
                 <div class="search-icon">
                     <el-tooltip class="item" effect="light" placement="bottom" content="设置收费项">
                         <i class="zoniot_font zoniot-icon-shoufeishezhi" @click="addOrEdit('add')"></i>
@@ -33,8 +27,9 @@
             >
                 <template slot-scope="scope" slot="chargeMode">
                     <span v-if="scope.row.chargeMode === 1">固定收费 </span>
-                    <span v-if="scope.row.chargeMode === 2">{{ scope.row.chargeType === 1 ? '价格*面积收费 ' : '单价*用量' }}</span>
+                    <span v-if="scope.row.chargeMode === 2">价格*面积收费</span>
                     <span v-if="scope.row.chargeMode === 3">阶梯计费 </span>
+                    <span v-if="scope.row.chargeMode === 4">单价*用量</span>
                 </template>
                 <template slot-scope="scope" slot="chargePrice">
                     <template v-if="scope.row.chargePriceLadder !== 'null' || scope.row.chargePriceLadder !== null">
@@ -68,7 +63,7 @@ import list from '@/js/list.js';
 
 export default {
     mixins: [list],
-    name:"chargeSetting",
+    name: 'chargeSetting',
     data() {
         return {
             currentId: '',