| | |
| | | export function updateById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywPatrolLine/updateById', data) |
| | | } |
| | | export function updateStatusById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywPatrolLine/updateStatusById', data) |
| | | } |
| | | |
| | | // 详情 |
| | | export function detailById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywPatrolLine/${id}`) |
| | |
| | | export function getDetail (data) { |
| | | return request.post(`/visitsAdmin/cloudService/business/ywPatrolTaskRecord/page`, data) |
| | | } |
| | | export function cancelById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywPatrolTask/taskCancel`, { |
| | | params: {id} |
| | | }) |
| | | } |
| | | |
| | | // 批量删除 |
| | | export function deleteByIdInBatch (ids) { |
| | |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywRoom/delete/${id}`) |
| | | } |
| | | export function detailById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywRoom/${id}`) |
| | | } |
| | | |
| | | // 批量删除 |
| | | export function deleteByIdInBatch (ids) { |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <GlobalWindow width="800px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="线路名称" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请输入线路名称" v-trim /> |
| | |
| | | <div class="title">巡检点</div> |
| | | <el-button type="primary" @click="openModal">添加巡检点</el-button> |
| | | </div> |
| | | <el-table v-loading="isWorking.search" :data="list" stripe> |
| | | <el-table :data="list" stripe> |
| | | <el-table-column prop="code" label="巡检点编码" min-width="100px"></el-table-column> |
| | | <el-table-column prop="pointName" label="巡检点名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="扫码打卡" min-width="100px"> |
| | | <template v-slot="scope"> |
| | | <el-switch v-model="scope.row.needScancode" @change="changeStatus" active-value="0" |
| | | inactive-value="1"></el-switch> |
| | | <el-switch v-model="scope.row.needScancode" :disabled="true" @change="changeStatus" :active-value="0" |
| | | :inactive-value="1"></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="排序码" min-width="100px"> |
| | |
| | | |
| | | </el-form> |
| | | <!-- --> |
| | | <el-dialog title="添加巡检点" :close-on-click-modal="false" append-to-body :visible.sync="isShowModal" width="500px"> |
| | | <el-select class="w400" v-model="selPoint" clearable multiple filterable> |
| | | <el-dialog title="添加巡检点" :close-on-click-modal="false" append-to-body :visible.sync="isShowModal" width="780px"> |
| | | <!-- <el-select class="w400" v-model="selPoint" clearable multiple filterable> |
| | | <el-option v-for="item in pointList" :value="item.id" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-select> --> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="80px" inline> |
| | | <el-form-item label="巡检点" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请输入巡检点名称/编码" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="巡检区域"> |
| | | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="请选择巡检区域" clearable |
| | | :options="areaList" :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList' |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <el-button type="primary" @click="initData">搜索</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </el-form> |
| | | |
| | | <el-table @selection-change="handleSelectionChange" v-loading="isWorking.search" :data="pointList" stripe> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column prop="code" label="巡检点编码" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="巡检点名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="deviceName" label="巡检点名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="areaName" label="巡检点名称" min-width="100px"></el-table-column> |
| | | </el-table> |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="pagination"> |
| | | </pagination> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="isShowModal = false">取 消</el-button> |
| | | <el-button type="primary" @click="subModal">确 定</el-button> |
| | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { getFetchList } from '@/api/Inspection/ywPatrolPoint' |
| | | import { create,detailById } from '@/api/Inspection/ywPatrolLine' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { fetchList as getFetchList } from '@/api/Inspection/ywPatrolPoint' |
| | | import { create,updateById, detailById } from '@/api/Inspection/ywPatrolLine' |
| | | import { Message } from 'element-ui' |
| | | import { fetchList } from '@/api/business/category' |
| | | export default { |
| | | name: 'OperaYwPatrolLineWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | components: { GlobalWindow, Pagination }, |
| | | data() { |
| | | return { |
| | | // 表单数据 |
| | |
| | | name: '', |
| | | }, |
| | | selPoint: [], |
| | | |
| | | pointList: [], |
| | | selList: [], |
| | | areaList: [], |
| | | searchForm: { |
| | | name: '', |
| | | areaId: '', |
| | | areaIds: [] |
| | | }, |
| | | pagination: { |
| | | pageSize: 10, |
| | | page: 1, |
| | | total: 0 |
| | | }, |
| | | |
| | | list: [], |
| | | isWorking: false, |
| | | isShowModal: false, |
| | | // 验证规则 |
| | | rules: { |
| | | name: [{ required: true, message: '请输入' }], |
| | | selPoint: [{ type: 'array', required: true, message: '请输入' }], |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | confirm() { |
| | | const { form, list } = this |
| | | if (list.length == 0) return Message.warning('请先选择巡检点') |
| | | form.linePointList = list |
| | | create({ ...form }).then(res => { |
| | | Message.success('保存成功') |
| | | this.$emit('success') |
| | | this.close() |
| | | |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | if (list.length == 0) return Message.warning('请先选择巡检点') |
| | | form.linePointList = list |
| | | this.isWorking = true |
| | | let fn = form.id ? updateById : create |
| | | fn({ ...form }).then(res => { |
| | | Message.success('保存成功') |
| | | this.isWorking = false |
| | | this.close() |
| | | }, () => { |
| | | this.isWorking = false |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | getDetail(row) { |
| | | detailById(row.id).then(res => { |
| | |
| | | this.list = res.linePointList || [] |
| | | }) |
| | | }, |
| | | getProject() { |
| | | fetchList({ |
| | | model: { type: 4 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.areaList = res.records || [] |
| | | }) |
| | | }, |
| | | initData() { |
| | | this.list = [] |
| | | |
| | | getFetchList({}).then(res => { |
| | | this.pointList = res || [] |
| | | const { searchForm, pagination } = this |
| | | getFetchList({ |
| | | page: pagination.page, |
| | | capacity: pagination.pageSize, |
| | | model: { ...searchForm } |
| | | }).then(res => { |
| | | this.pointList = res.records || [] |
| | | this.pagination.total = res.total |
| | | }) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selList = val |
| | | }, |
| | | reset() { |
| | | this.searchForm = { |
| | | name: '', |
| | | areaId: '', |
| | | areaIds: [] |
| | | } |
| | | this.initData() |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.pagination.pageSize = val |
| | | this.initData() |
| | | }, |
| | | handlePageChange(val) { |
| | | this.pagination.page = val |
| | | this.initData() |
| | | }, |
| | | handleDel(row) { |
| | | this.list.splice(row.$index, 1) |
| | |
| | | }, |
| | | openModal() { |
| | | this.selPoint = this.list.map(i => i.id) |
| | | this.getProject() |
| | | this.isShowModal = true |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 1) { |
| | | } else if (e && e.length == 2) { |
| | | this.$set(this.searchForm, 'areaId', e[1]) |
| | | } else { |
| | | } |
| | | this.initData() |
| | | }, |
| | | subModal() { |
| | | const { selPoint, pointList, list } = this |
| | | if (selPoint.length == 0) return Message.warning('请先选择巡检点') |
| | | let arr = [] |
| | | // 取出选中列表 |
| | | pointList.forEach(item => { |
| | | selPoint.forEach(item2 => { |
| | | if (item.id === item2) { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | }) |
| | | // 同list去重 |
| | | list.forEach(item => { |
| | | arr.forEach((item2, i) => { |
| | | if (item.id === item2.id) { |
| | | arr.splice(i, 1) |
| | | } |
| | | }) |
| | | }) |
| | | // 添加 |
| | | arr.forEach(i => { |
| | | this.list.push({ |
| | | needScancode: '1', |
| | | pointName: i.name, |
| | | pointId: i.id, |
| | | code: i.code |
| | | }) |
| | | this.list = this.selList.map(item => { |
| | | return { |
| | | needScancode: 0, |
| | | pointName: item.name, |
| | | pointId: item.id, |
| | | code: item.code |
| | | } |
| | | }) |
| | | this.isShowModal = false |
| | | }, |
| | |
| | | <el-input type="textarea" :rows="4" v-model="form.content" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="上传图片" prop="imgurl"> |
| | | <UploadAvatarImage :file="{ 'imgurlfull': form.fileFullUrl, 'imgurl': form.fileurl }" |
| | | <UploadAvatarImage :file="{ 'imgurlfull': form.fileFullUrl, 'imgurl': form.fileUrl }" |
| | | :uploadData="{ folder: 'ywPatrol/' }" @uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" |
| | | @uploadBegin="isUploading = true" /> |
| | | </el-form-item> |
| | |
| | | this.title = title |
| | | this.visible = true |
| | | this.initData() |
| | | if (row == null) { |
| | | this.$nextTick(() => { |
| | | this.form = { |
| | | name: '', |
| | | code: '', |
| | | content: '', |
| | | imgurl: '', |
| | | areaId: 0, |
| | | areaIds: [], |
| | | addr: '' |
| | | } |
| | | this.$refs.form.resetFields() |
| | | |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | fetchList({ |
| | | model: { type: 4 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | }) |
| | | return |
| | | } |
| | | if (row && row.id) { |
| | | this.getDetail(row) |
| | | } |
| | |
| | | getDetail(row) { |
| | | detail(row.id).then(res => { |
| | | this.form = { ...res } |
| | | // this.$set(this.form, 'areaId', res.areaId) |
| | | // console.log('res', res) |
| | | // console.log('res', this.form) |
| | | |
| | | }) |
| | | }, |
| | | initData() { |
| | | fetchList({ |
| | | model: { type: 4 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | setTimeout(() => { |
| | | const areaId = this.form.areaId |
| | | if (res.longitude && res.latitude) { |
| | | this.$set(this.form, 'lnglat', res.longitude + ',' + res.latitude) |
| | | } |
| | | fetchList({ |
| | | model: { type: 4 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(ress => { |
| | | this.cateList = ress.records || [] |
| | | const areaId = res.areaId |
| | | if (areaId) { |
| | | this.cateList.forEach(item => { |
| | | if (item.childCategoryList) { |
| | | item.childCategoryList.forEach(item2 => { |
| | | if (item2.id == areaId) { |
| | | this.$set(this.form, 'areaIds', [item.id, item2.id]) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, 1300) |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | initData() { |
| | | getDeiceList({ |
| | | model: {}, |
| | | capacity: 1000, |
| | |
| | | } |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.form.fileurl = file.imgurl |
| | | this.form.fileFullUrl = file.imgurlfull |
| | | this.$set(this.form, 'fileUrl', file.imgurl) |
| | | this.$set(this.form, 'fileFullUrl', file.imgurlfull) |
| | | }, |
| | | } |
| | | } |
| | |
| | | :options="areaList" :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList', |
| | | checkStrictly: true |
| | | children: 'childCategoryList' |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywpatrolline:exportExcel']" |
| | | @click="exportExcel">导出</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <ul class="toolbar" v-permissions="['business:ywpatrolpoint:create', 'business:ywpatrolpoint:delete']"> |
| | | <li><el-button type="primary" @click="editClick()" icon="el-icon-plus" |
| | | v-permissions="['business:ywpatrolpoint:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywpatrolpoint:delete']">删除</el-button></li> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywpatrolpoint:delete']">删除</el-button></li> --> |
| | | </ul> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <!-- <el-table-column type="selection" width="55"></el-table-column> --> |
| | | <el-table-column prop="code" label="巡检点编码" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="巡检点名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="deviceName" label="关联设备" min-width="100px"></el-table-column> |
| | |
| | | return { |
| | | // 搜索 |
| | | searchForm: { |
| | | id: '', |
| | | creator: '', |
| | | createDate: '', |
| | | editor: '', |
| | | editDate: '', |
| | | isdeleted: '', |
| | | name: '', |
| | | remark: '', |
| | | status: '', |
| | | sortnum: '', |
| | | imgurl: '', |
| | | areaId: '', |
| | | addr: '' |
| | | areaIds: [] |
| | | }, |
| | | areaList: [] |
| | | } |
| | |
| | | this.getProject() |
| | | }, |
| | | methods: { |
| | | reset() { |
| | | this.searchForm = { |
| | | name: '', |
| | | areaId: '', |
| | | areaIds: [] |
| | | } |
| | | this.search() |
| | | }, |
| | | getProject() { |
| | | fetchList({ |
| | | model: {type: 4}, |
| | | model: { type: 4 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 1) { |
| | | this.$set(this.searchForm, 'catePId', e[0]) |
| | | this.$set(this.searchForm, 'cateId', '') |
| | | } else if (e && e.length == 2) { |
| | | this.$set(this.searchForm, 'catePId', e[0]) |
| | | this.$set(this.searchForm, 'cateId', e[1]) |
| | | this.$set(this.searchForm, 'areaId', e[1]) |
| | | } else { |
| | | this.$set(this.searchForm, 'catePId', '') |
| | | this.$set(this.searchForm, 'cateId', '') |
| | | |
| | | } |
| | | this.search() |
| | | }, |
| | |
| | | <el-table-column prop="lineAmount" label="巡检点数量" min-width="100px"></el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="100px"> |
| | | <template v-slot="scope"> |
| | | <el-switch v-model="scope.row.status" @change="changeStatus" active-value="0" inactive-value="1"> |
| | | <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaYwPatrolLineWindow from './components/OperaYwPatrolLineWindow' |
| | | import { updateStatusById } from '@/api/Inspection/ywPatrolLine' |
| | | import { Message } from 'element-ui' |
| | | export default { |
| | | name: 'YwPatrolLine', |
| | | extends: BaseTable, |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | changeStatus() { |
| | | |
| | | changeStatus(row) { |
| | | updateStatusById({ |
| | | id: row.id, |
| | | status: row.status |
| | | }).then(res => { |
| | | Message.success('更新成功') |
| | | this.search() |
| | | }, () => { |
| | | this.search() |
| | | }) |
| | | }, |
| | | editClick(row) { |
| | | if (row && row.id) { |
| | |
| | | <TableLayout :permissions="['business:ywpatrolscheme:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="计划标题" prop="title"> |
| | | <el-input v-model="searchForm.title" placeholder="请输入标题" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="计划名称" prop="title"> |
| | | <el-input v-model="searchForm.title" placeholder="请输入计划名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="计划日期" prop="selDate"> |
| | | <el-date-picker type="daterange" v-model="searchForm.selDate" clearable value-format="yyyy-MM-dd" |
| | |
| | | <ul class="toolbar" v-permissions="['business:ywpatrolscheme:create', 'business:ywpatrolscheme:delete']"> |
| | | <li><el-button type="primary" @click="editClick()" icon="el-icon-plus" |
| | | v-permissions="['business:ywpatrolscheme:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywpatrolscheme:delete']">删除</el-button></li> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywpatrolscheme:delete']">删除</el-button></li> --> |
| | | </ul> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleDetail(row)">查看详情</el-button> |
| | | <el-button type="text" @click="cancelById(row)" v-permissions="['business:ywpatroltask:delete']">取消</el-button> |
| | | <el-button v-if="row.status == 0" type="text" class="red" @click="cancelById(row)" v-permissions="['business:ywpatroltask:delete']">取消</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import TaskDetail from './components/taskDetail' |
| | | import { cancelById } from '@/api/Inspection/ywPatrolTask' |
| | | import { Message } from 'element-ui' |
| | | export default { |
| | | name: 'YwPatrolTask', |
| | | extends: BaseTable, |
| | |
| | | this.$refs.TaskDetailRef.id = row.id |
| | | this.$refs.TaskDetailRef.getDetail() |
| | | }, |
| | | cancelById() { |
| | | |
| | | cancelById(row) { |
| | | this.$confirm('确定取消当前任务, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | cancelById(row.id).then(res => { |
| | | Message.success('取消成功') |
| | | this.search() |
| | | }) |
| | | }) |
| | | // |
| | | }, |
| | | } |
| | | } |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywcustomer:exportExcel']" |
| | | @click="exportExcel">导出</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <el-table-column prop="memberName" label="联系人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="memberPhone" label="联系电话" min-width="100px"></el-table-column> |
| | | <!-- <el-table-column prop="idcardNo" label="身份证号" min-width="100px"></el-table-column> --> |
| | | <el-table-column prop="creditCard" label="统一信用代码" min-width="100px"></el-table-column> |
| | | <el-table-column prop="" label="统一信用代码" min-width="100px"> |
| | | <template v-slot="{row}"> |
| | | <span>{{ row.creditCard || '-' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="validity" label="营业期限" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{ row.validity == '2099-12-31' ? '长期' : row.validity }}</span> |
| | | <span>{{ row.validity == '2099-12-31' ? '长期' : row.validity ? row.validity : '-' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="默认发票类型" min-width="100px"> |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" width="900px" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <GlobalWindow :title="title" width="800px" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <div class="list"> |
| | | <div class="title">基础信息</div> |
| | | <el-form-item label="客户" prop="name"> |
| | | <el-form-item label="客户名称" prop="name"> |
| | | <div class="df"> |
| | | <el-input v-model="form.name" placeholder="请输入客户" v-trim /> |
| | | <el-checkbox v-model="form.type" class="ml10" true-label="0" false-label="1">个人</el-checkbox> |
| | | <el-checkbox v-model="form.type" class="ml10" :true-label="0" :false-label="1">个人</el-checkbox> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="行业分类" prop="industryId"> |
| | | <el-select v-model="form.industryId" clearable filterable> |
| | | <el-option v-for="item in cateList" :value="item.id" :label="item.name" /> |
| | | <div key="21" class="df_center mt10"><el-button type="primary" plain class="w200" |
| | | @click="openTrade">添加</el-button> |
| | | </div> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="客户编号" prop="code"> |
| | | <el-input v-model="form.code" placeholder="请输入" v-trim /> |
| | | </el-form-item> |
| | | <div class="title">默认联系人</div> |
| | | <el-form-item label="姓名" prop="member.name"> |
| | | <el-input v-model="form.member.name" placeholder="请输入" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="手机号" prop="member.phone"> |
| | | <el-input v-model="form.member.phone" placeholder="请输入手机号" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="身份"> |
| | | <el-select v-model="form.member.highCheckor" filterable> |
| | | <el-option :value="0" label="老板/超级管理员" /> |
| | | <el-option :value="1" label="人事/管理员" /> |
| | | <el-option :value="2" label="员工/普通员工" /> |
| | | <template v-if="!form.id"> |
| | | <div class="title">默认联系人</div> |
| | | <el-form-item label="姓名" prop="member.name"> |
| | | <el-input v-model="form.member.name" placeholder="请输入" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="手机号" prop="member.phone"> |
| | | <el-input v-model="form.member.phone" placeholder="请输入手机号" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="身份"> |
| | | <el-select v-model="form.member.highCheckor" filterable> |
| | | <el-option :value="0" label="老板/超级管理员" /> |
| | | <el-option :value="1" label="人事/管理员" /> |
| | | <el-option :value="2" label="员工/普通员工" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="证件类型"> |
| | | <el-select v-model="form.member.idcardType" filterable> |
| | | <el-option :value="0" label="身份证" /> |
| | | <el-option :value="1" label="港澳证件" /> |
| | | <el-option :value="2" label="护照" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="证件号码" prop="member.idcardNo"> |
| | | <el-input v-model="form.member.idcardNo" placeholder="请输入" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="邮箱" prop="email"> |
| | | <el-input v-model="form.member.email" placeholder="请输入邮箱" v-trim /> |
| | | </el-form-item> |
| | | </template> |
| | | <el-form-item v-else label="默认联系人" prop="memberId"> |
| | | <el-select v-model="form.memberId" clearable filterable> |
| | | <el-option v-for="item in clientList" :value="item.id" :label="item.name" /> |
| | | <div key="11" class="df_center mt10"><el-button type="primary" plain class="w200" |
| | | @click="openClient">添加</el-button> |
| | | </div> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="证件类型"> |
| | | <el-select v-model="form.member.idcardType" filterable> |
| | | <el-option :value="0" label="身份证" /> |
| | | <el-option :value="1" label="港澳证件" /> |
| | | <el-option :value="2" label="护照" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="证件号码" prop="member.idcardNo"> |
| | | <el-input v-model="form.member.idcardNo" placeholder="请输入" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="邮箱" prop="email"> |
| | | <el-input v-model="form.member.email" placeholder="请输入邮箱" v-trim /> |
| | | </el-form-item> |
| | | |
| | | <div class="title">账户信息</div> |
| | | <el-form-item label="开户银行" prop="accountBank"> |
| | | <el-input v-model="form.accountBank" placeholder="请输入开户银行" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="账号" prop="accountNo"> |
| | | <el-input v-model="form.accountNo" placeholder="请输入账号" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="电话" prop="accountPhone"> |
| | | <el-input v-model="form.accountPhone" placeholder="请输入账户电话" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="统一信用代码" prop="creditCard"> |
| | | <el-input v-model="form.creditCard" placeholder="请输入统一信用代码" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="默认发票类型" prop="fpType"> |
| | | <el-select v-model="form.fpType" clearable filterable> |
| | | <el-option :value="0" label="增值税普通发票" /> |
| | | <el-option :value="1" label="增值税专用发票" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="注册地址" prop="accountAddr"> |
| | | <el-input v-model="form.accountAddr" placeholder="请输入账号注册地址" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="营业期限"> |
| | | <div class="df"> |
| | | <el-date-picker type="date" v-model="form.validity" value-format="yyyy-MM-dd" placeholder="请选择" /> |
| | | <el-checkbox v-model="form.selLangTime" @change="changeValid" class="ml10">长期</el-checkbox> |
| | | </div> |
| | | </el-form-item> |
| | | <template v-if="form.type == 1"> |
| | | <div class="title">账户信息</div> |
| | | <el-form-item label="开户银行" prop="accountBank"> |
| | | <el-input v-model="form.accountBank" placeholder="请输入开户银行" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="账号" prop="accountNo"> |
| | | <el-input v-model="form.accountNo" placeholder="请输入账号" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="电话" prop="accountPhone"> |
| | | <el-input v-model="form.accountPhone" placeholder="请输入账户电话" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="统一信用代码" prop="creditCard"> |
| | | <el-input v-model="form.creditCard" placeholder="请输入统一信用代码" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="默认发票类型" prop="fpType"> |
| | | <el-select v-model="form.fpType" clearable filterable> |
| | | <el-option :value="0" label="增值税普通发票" /> |
| | | <el-option :value="1" label="增值税专用发票" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="注册地址" prop="accountAddr"> |
| | | <el-input v-model="form.accountAddr" placeholder="请输入账号注册地址" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="营业期限"> |
| | | <div class="df"> |
| | | <el-date-picker type="date" v-model="form.validity" value-format="yyyy-MM-dd" placeholder="请选择" /> |
| | | <el-checkbox v-model="form.selLangTime" @change="changeValid" class="ml10">长期</el-checkbox> |
| | | </div> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | </div> |
| | | </el-form> |
| | | <!-- --> |
| | | <OperaCategoryWindow ref="OperaCategoryWindowRef" @success="initData" /> |
| | | <StaffEdit ref="StaffEditRef" @success="getClient" /> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | |
| | | import { fetchCateList } from '@/api/business/category' |
| | | import { rules } from './config' |
| | | import { detailById } from '@/api/client/ywCustomer' |
| | | import { fetchList } from '@/api/client/staff' |
| | | import OperaCategoryWindow from './OperaCategoryWindow.vue' |
| | | import StaffEdit from './staffEdit.vue' |
| | | export default { |
| | | name: 'OperaYwCustomerWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | components: { GlobalWindow, OperaCategoryWindow, StaffEdit }, |
| | | data() { |
| | | return { |
| | | // 表单数据 |
| | |
| | | isdeleted: '', |
| | | remark: '', |
| | | industryId: '', |
| | | type: '1', |
| | | type: 1, |
| | | name: '', |
| | | phone: '', |
| | | idcardNo: '', |
| | |
| | | code: '', |
| | | status: '', |
| | | memberName: '', |
| | | |
| | | |
| | | lastLoginDate: '', |
| | | loginNum: '', |
| | | userId: '', |
| | | |
| | | memberId: '', |
| | | |
| | | accountBank: '', |
| | | accountNo: '', |
| | | accountPhone: '', |
| | |
| | | accountAddr: '', |
| | | // identityType: '0', |
| | | email: '', |
| | | memberId: '', |
| | | member: { |
| | | name: "", |
| | | phone: "", |
| | |
| | | email: '', |
| | | } |
| | | }, |
| | | title: '新增客户', |
| | | isShowTrade: false, |
| | | |
| | | clientList: [], |
| | | cateList: [], |
| | | // 验证规则 |
| | | rules |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | openTrade() { |
| | | this.$refs.OperaCategoryWindowRef.open('新增行业') |
| | | }, |
| | | openClient() { |
| | | this.$refs.StaffEditRef.open('新建人员') |
| | | setTimeout(() => { |
| | | this.$refs.StaffEditRef.form.customerId = this.form.id |
| | | console.log('--', this.$refs.StaffEditRef.form); |
| | | |
| | | // this.$update |
| | | }, 1200) |
| | | this.$refs.StaffEditRef.customerId = this.form.id |
| | | }, |
| | | initData() { |
| | | fetchCateList({ type: 6 }).then(res => { |
| | | this.cateList = res |
| | | }) |
| | | }, |
| | | open (title, target) { |
| | | open(title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.initData() |
| | |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form.validity = '' |
| | | this.form.id = '' |
| | | this.form.member = { |
| | | name: "", |
| | | phone: "", |
| | | highCheckor: 0, |
| | | idcardType: 0, |
| | | idcardNo: '', |
| | | email: '', |
| | | } |
| | | }) |
| | | this.form.type = 1 |
| | | return |
| | | } |
| | | // 编辑 |
| | | this.$nextTick(() => { |
| | | if(title == '编辑客户'){ |
| | | if (title == '编辑客户') { |
| | | this.getClient() |
| | | detailById(target.id).then(res => { |
| | | this.form = res |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getClient() { |
| | | fetchList({ |
| | | capacity: 9999, |
| | | page: 1, |
| | | model: {} |
| | | }).then(res => { |
| | | this.clientList = res.records |
| | | }) |
| | | }, |
| | | changeValid(e) { |
| | | this.$set(this.form, 'validity', e ? '2099-12-31' : '') |
| | | }, |
| | |
| | | export const rules = { |
| | | name: [{ required: true, message: '请输入' }], |
| | | memberId: [{ required: true, message: '请选择',trigger: 'change' }], |
| | | 'member.name': [{ required: true, message: '请输入' }], |
| | | 'member.phone': [{ required: true, message: '请输入' }], |
| | | } |
| | |
| | | <el-form :model="form" ref="form" label-position="top" :rules="rules"> |
| | | <div class="list"> |
| | | <el-form-item label="客户名称" prop="customerId"> |
| | | <el-select v-model="form.customerId" clearable filterable> |
| | | <el-select v-model="form.customerId" :disabled="form.id || customerId != ''" clearable filterable> |
| | | <el-option v-for="item in clientList" :value="item.id" :label="item.name" /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | idcardNo: '', |
| | | email: '', |
| | | }, |
| | | customerId: '', |
| | | clientList: [], |
| | | // 验证规则 |
| | | rules: staffRules |
| | |
| | | open(title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.customerId = '' |
| | | console.log(this.customerId); |
| | | console.log(this.form.id); |
| | | |
| | | this.initData() |
| | | // 新建 |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form = { |
| | | id: null, |
| | | customerId: '', |
| | | creator: '', |
| | | createDate: '', |
| | | editor: '', |
| | | editDate: '', |
| | | isdeleted: '', |
| | | birthday: '', |
| | | industryId: '', |
| | | type: '1', |
| | | idcardDecode: '', |
| | | sex: '', |
| | | status: '', |
| | | memberName: '', |
| | | |
| | | lastLoginDate: '', |
| | | loginNum: '', |
| | | userId: '', |
| | | |
| | | accountBank: '', |
| | | accountNo: '', |
| | | accountPhone: '', |
| | | creditCard: '', |
| | | fpType: '', |
| | | accountAddr: '', |
| | | // identityType: '0', |
| | | name: "", |
| | | phone: "", |
| | | highCheckor: 0, |
| | | idcardType: 0, |
| | | idcardNo: '', |
| | | email: '', |
| | | } |
| | | }) |
| | | // this.$refs.form.resetFields() |
| | | return |
| | | } |
| | | // 编辑 |
| | |
| | | <el-form-item label="设备型号" prop=""> |
| | | <el-input v-model="param.modelNo" placeholder="请输入" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="设备分类" prop=""> |
| | | <el-form-item label="设备分类" prop="cateId"> |
| | | <el-cascader v-model="param.cateIds" @change="changeSel" placeholder="请选择设备分类" clearable :options="cateList" |
| | | :props="{ |
| | | label: 'name', |
| | |
| | | cateList: [], |
| | | rules: { |
| | | name: [{ required: true, message: '请输入' }], |
| | | code: [{ required: true, message: '请输入' }] |
| | | code: [{ required: true, message: '请输入' }], |
| | | cateId: [{ required: true, message: '请选择' }], |
| | | }, |
| | | staffList: [] |
| | | |
| | |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" |
| | | v-permissions="['business:category:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" |
| | | <el-button type="text" @click="handleDel(row)" icon="el-icon-delete" |
| | | v-permissions="['business:category:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | let message = `确认删除该记录吗?` |
| | | this.$dialog.deleteConfirm(message) |
| | | .then(() => { |
| | | this.isWorking.delete = true |
| | | deleteById(row.id) |
| | | .then(() => { |
| | | this.$tip.apiSuccess('删除成功') |
| | |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywbuilding:exportExcel']" |
| | | @click="exportExcel">导出</el-button> |
| | | <!-- <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywbuilding:exportExcel']" |
| | | @click="exportExcel">导出</el-button> --> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <ul class="toolbar" v-permissions="['business:ywbuilding:create', 'business:ywbuilding:delete']"> |
| | | <li><el-button type="primary" @click="editClick()" icon="el-icon-plus" |
| | | v-permissions="['business:ywbuilding:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywbuilding:delete']">删除</el-button></li> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywbuilding:delete']">删除</el-button></li> --> |
| | | </ul> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | |
| | | <el-table-column prop="area" label="建筑面积(m²)" min-width="80px"></el-table-column> |
| | | <el-table-column prop="cqArea" label="管理面积(m²)" min-width="80px"></el-table-column> |
| | | <el-table-column prop="roomNum" label="房间总数(间)" min-width="80px"></el-table-column> |
| | | <el-table-column prop="roomeRentNum" label="可招商房源数量(间)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="roomRentNum" label="可招商房源数量(间)" min-width="100px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:ywbuilding:update', 'business:ywbuilding:delete'])" |
| | | label="操作" min-width="120" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | |
| | | }, |
| | | editClick(row) { |
| | | if (row && row.id) { |
| | | this.$refs.operaYwBuildingWindow.open('编辑楼宇') |
| | | this.$refs.operaYwBuildingWindow.open('编辑楼宇', row) |
| | | } else { |
| | | this.$refs.operaYwBuildingWindow.open('新建楼宇') |
| | | } |
| | | this.$refs.operaYwBuildingWindow.getProject() |
| | | }, |
| | | editFloor(row) { |
| | | this.$refs.FloorLevelRef.id = row.id |
| | |
| | | <template> |
| | | <GlobalWindow width="900px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <GlobalWindow width="720px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="所属项目" prop="projectId" clearable placeholder="请选择项目"> |
| | | <el-select v-model="form.projectId" filterable clearable> |
| | |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { getProjectList } from '@/api/project/ywProject' |
| | | import { detailById } from '@/api/project/ywBuilding' |
| | | export default { |
| | | name: 'OperaYwBuildingWindow', |
| | | extends: BaseOpera, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, target,type) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.getProject() |
| | | // 新建组织 |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | this.form.type=type |
| | | }) |
| | | return |
| | | } |
| | | // 编辑 |
| | | this.$nextTick(() => { |
| | | console.log('----'); |
| | | |
| | | this.getDetail(target.id) |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | detailById(id).then(res => { |
| | | this.form = res |
| | | }) |
| | | }, |
| | | getProject() { |
| | | getProjectList({}).then(res => { |
| | | this.projectList = res || [] |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <GlobalWindow width="600px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | |
| | | <el-form-item label="项目名称" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请输入名称" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="所属地区" prop="addr"> |
| | | <el-form-item label="所属地区" prop="areaId"> |
| | | <el-cascader v-model="form.areaIdT" :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | |
| | | return { |
| | | // 表单数据 |
| | | form: { |
| | | id: null, |
| | | id: '', |
| | | creator: '', |
| | | createDate: '', |
| | | editor: '', |
| | |
| | | this.title = title |
| | | this.visible = true |
| | | this.initData() |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.form = { |
| | | id: '', |
| | | creator: '', |
| | | createDate: '', |
| | | editor: '', |
| | | editDate: '', |
| | | isdeleted: '', |
| | | name: '', |
| | | remark: '', |
| | | status: '', |
| | | sortnum: '', |
| | | imgurl: '', |
| | | areaIdT: '', |
| | | cityId: '', |
| | | areaId: '', |
| | | provinceId: '', |
| | | addr: '' |
| | | } |
| | | this.$refs.form.resetFields() |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | |
| | | <template> |
| | | <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <GlobalWindow width="720px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="所属项目" prop="projectId"> |
| | | <el-select v-model="form.projectId" @change="changeProject" placeholder="请选择项目" clearable> |
| | |
| | | import { getProjectList } from '@/api/project/ywProject' |
| | | import { getBuildList } from '@/api/project/ywBuilding' |
| | | import { getFloorList } from '@/api/project/yeFloor' |
| | | import { detailById } from '@/api/project/ywRoom' |
| | | export default { |
| | | name: 'OperaYwRoomWindow', |
| | | extends: BaseOpera, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | open(title, target, type) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.getProject() |
| | | // 新建组织 |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | this.form.type = type |
| | | }) |
| | | return |
| | | } |
| | | // 编辑 |
| | | this.$nextTick(() => { |
| | | this.getDetail(target.id) |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | detailById(id).then(res => { |
| | | this.form = res || {} |
| | | if (res.projectId) { |
| | | getBuildList({ projectId: res.projectId }).then(res => { |
| | | this.buildList = res || [] |
| | | }) |
| | | } |
| | | if (res.buildingId) { |
| | | getFloorList({ buildingId: res.buildingId }).then(res => { |
| | | this.floorList = res || [] |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getProject() { |
| | | getProjectList({}).then(res => { |
| | | this.projectList = res || [] |
| | |
| | | }, |
| | | changeProject(e) { |
| | | this.form.buildingId = '' |
| | | getBuildList({projectId: e}).then(res => { |
| | | getBuildList({ projectId: e }).then(res => { |
| | | this.buildList = res || [] |
| | | }) |
| | | }, |
| | | changeBuild(e) { |
| | | this.form.floor = '' |
| | | getFloorList({buildingId: e}).then(res => { |
| | | getFloorList({ buildingId: e }).then(res => { |
| | | this.floorList = res || [] |
| | | }) |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getList(buildingId) { |
| | | getList(page) { |
| | | const { pagination, id } = this |
| | | // this.buildingId = |
| | | let capacity = pagination.pageSize |
| | | let page = pagination.page |
| | | fetchList({ capacity, page, model: { buildingId: id } }).then(res => { |
| | | let paget = page || pagination.page |
| | | fetchList({ capacity, page: paget, model: { buildingId: id } }).then(res => { |
| | | this.list = res.records |
| | | this.pagination.total = res.total |
| | | }) |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | projectList: [], |
| | | buildList: [], |
| | | |
| | | filters: {} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | changeProject(e) { |
| | | this.searchForm.buildingId = '' |
| | | getBuildList({ id: e }).then(res => { |
| | | getBuildList({ projectId: e }).then(res => { |
| | | this.buildList = res || [] |
| | | }) |
| | | }, |
| | | editClick(row) { |
| | | if (row && row.id) { |
| | | this.$refs.operaYwRoomWindow.open('编辑房间') |
| | | this.$refs.operaYwRoomWindow.open('编辑房间', row) |
| | | } else { |
| | | this.$refs.operaYwRoomWindow.open('新建房间') |
| | | } |
| | | this.$refs.operaYwRoomWindow.getProject() |
| | | }, |
| | | } |
| | | } |
| | |
| | | <TableLayout :permissions="['business:ywproject:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | |
| | | |
| | | <el-form-item label="项目名称" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请输入项目名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywproject:exportExcel']" @click="exportExcel">导出</el-button> |
| | | <!-- <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywproject:exportExcel']" @click="exportExcel">导出</el-button> --> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:ywproject:create', 'business:ywproject:delete']"> |
| | | <li><el-button type="primary" @click="handleEdit()" icon="el-icon-plus" v-permissions="['business:ywproject:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:ywproject:delete']">删除</el-button></li> |
| | | <li><el-button type="primary" @click="handleEdit()" icon="el-icon-plus" |
| | | v-permissions="['business:ywproject:create']">新建</el-button></li> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:ywproject:delete']">删除</el-button></li> --> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="项目名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="" label="管理面积(m)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="area" label="管理面积(m)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="roomNum" label="总房源数量(间)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="roomeRentNum" label="可招商房源数量(间)" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:ywproject:update', 'business:ywproject:delete'])" |
| | | label="操作" |
| | | min-width="80" |
| | | fixed="right" |
| | | > |
| | | <el-table-column prop="roomRentNum" label="可招商房源数量(间)" min-width="100px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:ywproject:update', 'business:ywproject:delete'])" |
| | | label="操作" min-width="80" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" v-permissions="['business:ywproject:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:ywproject:delete']">删除</el-button> |
| | | <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" |
| | | v-permissions="['business:ywproject:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" |
| | | v-permissions="['business:ywproject:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- 新建/修改 --> |
| | | <OperaYwProjectWindow ref="operaYwProjectWindow" @success="handlePageChange"/> |
| | | <OperaYwProjectWindow ref="operaYwProjectWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | name: 'YwProject', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaYwProjectWindow }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | // 搜索 |
| | | searchForm: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | created() { |
| | | this.config({ |
| | | module: '运维项目信息表', |
| | | api: '/project/ywProject', |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | handleEdit(row){ |
| | | if(row && row.id){ |
| | | handleEdit(row) { |
| | | if (row && row.id) { |
| | | this.$refs.operaYwProjectWindow.open('编辑项目', row) |
| | | }else{ |
| | | } else { |
| | | this.$refs.operaYwProjectWindow.open('新建项目') |
| | | // this.$refs.operaYwProjectWindow.open('新建项目') |
| | | } |
| | |
| | | <el-option v-for="item in roomList" :label="item.roomNum" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="分类" prop="cateId"> |
| | | <el-cascader v-model="form.areaIds" @change="changeSel" placeholder="请选择巡检区域" clearable :options="cateList" |
| | | <el-form-item label="工单分类" prop="cateId"> |
| | | <el-cascader v-model="form.areaIds" @change="changeSel" placeholder="请选择分类" clearable :options="cateList" |
| | | :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | |
| | | buildingId: [{ required: true, message: '请选择' }], |
| | | floorId: [{ required: true, message: '请选择' }], |
| | | roomId: [{ required: true, message: '请选择' }], |
| | | cateId: [{ required: true, message: '请选择' }], |
| | | } |
| | |
| | | <template> |
| | | <GlobalWindow width="900px" title="工单详情" :visible.sync="visible" :confirm-working="isWorking" @close="close" |
| | | <GlobalWindow width="920px" title="工单详情" :visible.sync="visible" :confirm-working="isWorking" @close="close" |
| | | @confirm="confirm"> |
| | | <div class="main"> |
| | | <div class="title"> |
| | |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">对应位置</div> |
| | | <div class="val">{{ info.buildingName }} / {{ info.roomNum || info.floorName }}</div> |
| | | <div class="val">{{ info.projectName }}/{{ info.buildingName }} / {{ info.roomNum || info.floorName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">工单类别</div> |
| | | <div class="la">工单分类</div> |
| | | <div class="val">{{ info.categoryName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">上报人</div> |
| | | <div class="val">{{ info.creatorName }}</div> |
| | | <div class="val">{{ info.creatorName }}{{ info.creatorCompany ? "-" + info.creatorCompany : '' }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">上报人电话</div> |
| | | <div class="val">{{ info.creatorPhone }}</div> |
| | | <div class="val">{{ info.creatorPhone || info.creatorMobile }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">上报时间</div> |
| | | <div class="val">{{ info.createDate }}</div> |
| | | </div> |
| | | <div class="item max"> |
| | | <div class="item max" v-if="info.areaType == 0"> |
| | | <div class="la">上门时间</div> |
| | | <div class="val">{{ info.getDate }}</div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="side"> |
| | | <div class="title">工单流转记录员</div> |
| | | <div class="title">工单流转记录</div> |
| | | <div class="flow_list"> |
| | | <div class="item" v-for="item,i in info.logList"> |
| | | <div class="icon"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="title">工单处理</div> |
| | | <div class="title">{{ info.dealStatus == 0 || info.dealStatus == 1 ? '工单处理' : '处理结果' }}</div> |
| | | <el-form :model="param" ref="form" :rules="rules"> |
| | | <template v-if="info.dealStatus == 0 || info.dealStatus == null"> |
| | | <el-form-item label="处理方式" prop="dealType"> |
| | |
| | | <el-radio v-model="param.dealType" :label="0">指派</el-radio> |
| | | <el-radio v-model="param.dealType" :label="1">直接回复</el-radio> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | <el-form-item v-if="param.dealType == 0" label="指派给" prop="dealUserId"> |
| | | <el-select v-model="param.dealUserId" clearable filterable class="w400"> |
| | | <el-option v-for="item in staffList" :label="item.realname" :value="item.id"></el-option> |
| | |
| | | <el-date-picker type="datetime" class="w400" v-model="param.getDate" format="yyyy-MM-dd HH:mm" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="回复内容" prop="dealInfo"> |
| | | <el-form-item label="处理说明" prop="dealInfo"> |
| | | <el-input type="textarea" class="w400" :rows="4" v-model="param.dealInfo" placeholder="请填写说明"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="现场图片"> |
| | | <div class="file_list"> |
| | | <el-upload class="avatar-uploader" :data="uploadData" multiple :limit="6" :auto-upload="true" |
| | | <el-upload class="avatar-uploader" :data="uploadData" :auto-upload="true" |
| | | :action="uploadImgUrl" :show-file-list="false" :on-success="uploadAvatarSuccess" :on-error="uploadError" |
| | | :before-upload="beforeUpload"> |
| | | <div class="upload_wrap"> |
| | |
| | | <template v-if="info.dealStatus == 2"> |
| | | <div class="list"> |
| | | <div class="item item2"> |
| | | <div class="la">处理时间:</div> |
| | | <div class="val">{{ info.getDate }}</div> |
| | | <div class="la">{{ info.dispatchUserId ? '处理人' : '回复人' }}:</div> |
| | | <div class="val">{{ info.dealUserName }}{{ info.dealUserCompany ? '-' + info.dealUserCompany : '' }}</div> |
| | | </div> |
| | | <div class="item item2"> |
| | | <div class="la">处理备注:</div> |
| | | <div class="la">{{ info.dispatchUserId ? '处理时间' : '回复时间' }}:</div> |
| | | <div class="val">{{ info.dealDate || info.getDate }}</div> |
| | | </div> |
| | | <div class="item item2"> |
| | | <div class="la">{{ info.dispatchUserId ? '处理说明' : '回复内容' }}:</div> |
| | | <div class="val">{{ info.dealInfo }}</div> |
| | | </div> |
| | | <div class="item item2"> |
| | | <div v-if="info.dealFileList != null && info.dealFileList.length" class="item item2"> |
| | | <div class="la">现场照片:</div> |
| | | <div class="value" v-if="info.dealFileList == null || !info.dealFileList.length">无</div> |
| | | <div class="value" v-if="info.dealFileList != null && info.dealFileList.length"> |
| | |
| | | .main_content{ |
| | | display: flex; |
| | | .side{ |
| | | width: 240px; |
| | | width: 370px; |
| | | .title{ |
| | | font-size: 14px; |
| | | } |
| | |
| | | <el-option v-for="item in buildList" :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="cateId" label="物品类别"> |
| | | <el-form-item prop="cateId" label="工单分类"> |
| | | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="请选择巡检区域" clearable |
| | | :options="cateList" :props="{ |
| | | label: 'name', |
| | |
| | | |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywworkorder:exportExcel']" |
| | | @click="exportExcel">导出</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | <ul class="toolbar" v-permissions="['business:ywworkorder:create', 'business:ywworkorder:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaYwWorkorderWindow.open('新建工单')" icon="el-icon-plus" |
| | | v-permissions="['business:ywworkorder:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:ywworkorder:delete']">删除</el-button></li> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywworkorder:exportExcel']" |
| | | @click="exportExcel" plain>导出</el-button> |
| | | </ul> |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe> |
| | | <el-table-column prop="areaType" label="位置类型" min-width="80px"> |
| | |
| | | <el-table-column prop="creatorName" label="上报人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="上报时间" min-width="100px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="处理人" min-width="100px"></el-table-column> |
| | | <el-table-column label="处理结果" min-width="100px"> |
| | | <el-table-column label="工单状态" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.dealStatus == 0">待指派</span> |
| | | <span v-if="row.dealStatus == 1">已指派</span> |
| | |
| | | export default { |
| | | name: 'YwWorkorder', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination,Detail, OperaYwWorkorderWindow }, |
| | | components: { TableLayout, Pagination, Detail, OperaYwWorkorderWindow }, |
| | | data() { |
| | | return { |
| | | // 搜索 |
| | |
| | | this.$refs.DetailRef.visible = true |
| | | this.$refs.DetailRef.id = row.id |
| | | this.$refs.DetailRef.getDetail() |
| | | |
| | | |
| | | }) |
| | | }, |
| | | initData() { |