123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638 |
- <template>
- <fullscreen :fullscreen.sync="fullscreen" class="container">
- <div class="container-box">
- <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
- <div class="search">
- <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
- </div>
- <div class="tabbox">
- <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
- tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
- <el-table-column prop="woTitle" label="工单标题">
- </el-table-column>
- <el-table-column prop="sendNo" label="派发工号">
- </el-table-column>
- <el-table-column prop="sendName" label="派发姓名">
- <template slot-scope="scope">
- <span>{{$desensitization(scope.row.sendName,1)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="sendTime" label="派发时间" width="140">
- </el-table-column>
- <!-- <el-table-column prop="auditName" label="审核人">
- <template slot-scope="scope">
- <span>{{$desensitization(scope.row.auditName,1)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="auditTime" label="审核时间" width="140">
- </el-table-column> -->
- <el-table-column prop="stsDesc" label="状态">
- </el-table-column>
- <el-table-column label="操作" width="180px" align="center">
- <template slot-scope="scope">
- <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
- <el-button v-if="scope.row.sts == 2 && scope.row.auditNo == userInfo.loginNoStr" size="mini" type="primary"
- @click="dialogCheck(3,scope.row)">回复</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
- :total="total">
- </el-pagination>
- </div>
- </div>
- <el-dialog title="工单任务" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
- :modal-append-to-body="false" :close-on-click-modal="false" :fullscreen="true">
- <div class="dialog-l">
- <el-tabs tab-position="left" v-model="activeName">
- <el-tab-pane v-for="item in routerList" :key="item.label" :name="item.label" :label="item.name">
- </el-tab-pane>
- </el-tabs>
- </div>
- <div v-loading="loadinged" class="dialog-r">
- <el-form :model="infolist" ref="infolist" :rules="rules"
- style="height: calc(100vh - 180px);overflow-y: scroll;">
- <div class="info-line">
- <el-form-item>
- <span>任务标题</span>
- <el-input v-model="infolist.woTitle" placeholder="标题" :disabled='disableStatus'></el-input>
- </el-form-item>
- </div>
- <el-form-item class="info-line online" v-if="activeName != '3'">
- <span>接收人员</span>
- <deptTreeOnly class="tree" @treeCheck="treeCheckonly" :defaultList="defaultList"
- :type="depttype"></deptTreeOnly>
- <div class="tree treeUser">
- <p>{{treeListonly.leaderAuditName}}</p>
- </div>
- </el-form-item>
- <el-form-item class="info-line online">
- <span>工单备注</span>
- <el-input v-model="infolist.dealRemark" placeholder="工单备注" type="textarea" :rows="3">
- </el-input>
- </el-form-item>
- <div style="padding-left: 80px" v-if="activeName == '3'">
- <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
- </myUpload>
- </div>
- </el-form>
- <div slot="footer" class="dialog-footer myfooter">
- <el-button type="primary" @click="dialogCli(2)">确 定</el-button>
- <el-button @click="dialogCli(1)">取 消</el-button>
- </div>
- </div>
- </el-dialog>
- <el-dialog title="查看工单" :visible.sync="dialogInfo" width="70%" :close-on-press-escape="false" :show-close="true"
- :destroy-on-close="true" :modal-append-to-body="false" :close-on-click-modal="false" :fullscreen="true">
- <div style="height: calc(100vh - 180px);overflow-y: scroll;">
- <orderCheck :historySts="historySts" :infolist="infolist" :datalist="datalist" :backlist="backlist" :dialogInfo="dialogInfo"></orderCheck>
- </div>
- <div class="dialog-footer myfooter">
- <el-button @click="dialoginfoCli(1)" type="primary">轨 迹</el-button>
- <el-button @click="dialoginfoCli(2)" type="primary" v-if="infolist.sts == '2' && infolist.auditNo == userInfo.loginNoStr">回 复</el-button>
- <el-button @click="dialoginfoCli(3)">取 消</el-button>
- </div>
- </el-dialog>
- </fullscreen>
- </template>
- <script>
- import mySearch from "../../../components/search.vue";
- import myUpload from '../../../components/upload'
- import uploadDown from '../../../components/uploadDown'
- import toolList from '../../../components/toolList'
- import deptTree from "../../../components/deptTreeUser.vue"
- import deptTreeOnly from "../../../components/deptTreeOnly.vue"
- import orderCheck from "./orderCheck.vue"
- export default {
- components: {
- mySearch,
- myUpload,
- uploadDown,
- toolList,
- deptTree,
- deptTreeOnly,
- orderCheck
- },
- data() {
- const terminalTypeName = (rule, value, callback) => {
- if (!this.infolist.tit) {
- callback(new Error('不能为空'))
- } else {
- callback()
- }
- }
- const brandName = (rule, value, callback) => {
- if (!this.infolist.num) {
- callback(new Error('不能为空'))
- } else {
- if (this.infolist.num > 10) {
- this.infolist.num = 10;
- }
- callback()
- }
- }
- const modelType = (rule, value, callback) => {
- if (!this.infolist.time) {
- callback(new Error('不能为空'))
- } else {
- callback()
- }
- }
- return {
- rules: {
- terminalTypeName: [{
- required: true,
- trigger: 'blur',
- validator: terminalTypeName
- }],
- brandName: [{
- required: true,
- trigger: 'blur',
- validator: brandName
- }],
- modelType: [{
- required: true,
- trigger: 'blur',
- validator: modelType
- }],
- },
- tooltit: '工单回复',
- searchList: [{
- type: 'input',
- tit: '工单标题',
- value: '',
- width: '32%',
- },
- {
- type: 'date',
- tit: '开始时间',
- value: '',
- width: '32%',
- },
- {
- type: 'date',
- tit: '结束时间',
- value: '',
- width: '32%',
- },
- ],
- fullscreen: false,
- total: 0,
- pageSize: 1,
- tableData: [{}],
- dialogStatus: false,
- disableStatus: false,
- titname: '终端',
- infolist: {},
- typeOptions: [{
- dataCode: 1,
- dataName: 111,
- }],
- userInfo: {},
- params: {},
- infoApply: [],
- fileInfo: {
- limit: 10,
- url: '/market/cwo/revertUpload',
- fileList: []
- },
- datalist: {
- url: '/sysmgr/noticeatt/downfile',
- type: 1
- },
- backlist: {
- url: '/sysmgr/noticeatt/downfile',
- type: 1
- },
- datalistback: {
- url: '/sysmgr/noticeatt/downfile',
- type: 2
- },
- uploadstatus: false,
- visiblec: [],
- attList: [],
- btnctrlStatus: true,
- typelist: [],
- loading: false,
- loadinged: false,
- treeList: [],
- treeListonly: [],
- defaultList: [],
- depttype: 0,
- transfer: false,
- activeName: '3',
- routerList: [{
- name: '其他人办理',
- label: '1'
- }, {
- name: '领导审批',
- label: '2'
- }, {
- name: '办理结束',
- label: '3'
- }, ],
- dialogInfo:false,
- historySts:false,
- }
- },
- methods: {
- treeCheck(v) {
- this.treeList = v;
- },
- treeCheckonly(v) {
- this.treeListonly = v;
- },
- //搜索数据
- searchInfo(v) {
- this.params = {};
- v[0] ? this.params.woTitle = v[0] : '';
- v[1] ? this.params.sendTimeFrom = this.$formatDate(v[1], "YYYY-MM-DD") : '';
- v[2] ? this.params.sendTimeTo = this.$formatDate(v[2], "YYYY-MM-DD") : '';
- // v[3] ? this.params.modelType = v[3] : '';
- this.getList(this.params, this.pageSize);
- },
- //获取列表
- getList(v, n) {
- this.pageSize = n;
- let _this = this;
- this.tableData = [];
- this.loading = true;
- this.$http({
- url: "/market/cwo/queryListByTraceDeal",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- "page": '{"pageNo":"' + n + '","pageSize":"10"}'
- },
- data: v,
- }).then((res) => {
- this.tableData = res.data.data;
- this.total = res.data.totalRecord;
- this.loading = false;
- });
- },
- // 分页
- currchange(v) {
- this.pageSize = v;
- this.getList(this.params, this.pageSize);
- },
- //申请
- overcheck(v) {
- let _this = this;
- this.$http({
- url: "/market/cwo/closeWoInfo",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- woNo: v.woNo
- },
- }).then((res) => {
- _this.$message({
- message: '成功',
- type: 'success'
- });
- _this.getList({}, _this.pageSize);
- });
- },
- dialogCheck(v, n) {
- this.defaultList = [];
- if (v == 1) {
- this.titname = '查看';
- } else if (v == 3) {
- this.titname = '回复';
- this.dialogStatus = true;
- this.disableStatus = false;
- }
- this.$http({
- url: "/market/cwo/queryInfo",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- woNo: n.woNo,
- id: n.id,
- },
- }).then((res) => {
- this.uploadstatus = true;
- this.infolist = res.data;
- this.infolist.sendName = this.$desensitization(res.data.sendName, 1);
- this.infolist.auditName = this.$desensitization(res.data.auditName, 1);
- this.visiblec = [];
- this.treeList = res.data.deptList;
- this.datalist.attList = res.data.attList;
- this.backlist.attList = res.data.revertAttList;
- this.infolist.attList = res.data.attList;
- if (v == 1) {
- this.dialogInfo = true;
- }
- this.attList = [];
- this.fileInfo.fileList = [];
- // if (res.data.revertAttList) {
- // res.data.revertAttList.forEach(item => {
- // this.fileInfo.fileList.push({
- // name: item.fileName,
- // url: '',
- // id: item.id,
- // fileName: item.fileName,
- // fileCode: item.fileCode,
- // });
- // this.attList.push({
- // name: item.fileName,
- // url: '',
- // id: item.id,
- // fileName: item.fileName,
- // fileCode: item.fileCode,
- // });
- // })
- // }
- this.depttype = 1;
- });
- },
- //添加
- dialogCli(v) {
- if (v === 1) {
- this.infolist = {};
- this.dialogStatus = false;
- this.defaultList = [];
- this.depttype = 0;
- return
- } else if (v === 2) {
- let params = {
- woNo: this.infolist.woNo,
- woTitle: this.infolist.woTitle,
- dealRemark: this.infolist.dealRemark,
- revertAttList: [],
- }
- if(this.activeName == '1'){
- params.sts = "2";
- params.stsDesc = "待处理";
- params.auditName = this.treeListonly.leaderAuditName;
- params.auditNo = this.treeListonly.leaderAuditNo;
- if(!this.treeListonly.leaderAuditName){
- this.$message({
- message: '请选择接单人!',
- type: 'error'
- });
- return
- }
- }else if(this.activeName == '2'){
- params.sts = "0";
- params.stsDesc = "待审核";
- params.leaderAuditName = this.treeListonly.leaderAuditName;
- params.leaderAuditNo = this.treeListonly.leaderAuditNo;
- if(!this.treeListonly.leaderAuditName){
- this.$message({
- message: '请选择接单人!',
- type: 'error'
- });
- return
- }
- }else if(this.activeName == '3'){
- params.sts = "1";
- params.stsDesc = "已处理";
- }
- let attList = [];
- for (let i = 0; i < this.attList.length; i++) {
- attList.push({
- id: this.attList[i].id,
- fileCode: this.attList[i].fileCode,
- fileName: this.attList[i].fileName,
- opName: this.attList[i].opName,
- opNo: this.attList[i].opNo,
- opTime: this.attList[i].opTime,
- type: this.attList[i].type,
- noticeId: this.infolist.noticeId
- });
- }
- params.revertAttList = attList;
- params.stepSts = this.activeName;
- if (this.infolist.type == 1) {
- params.msgType = this.infolist.msgType;
- params.msgTypeName = this.infolist.msgTypeName;
- params.msgInfo = this.infolist.dealTypeDesc;
- params.msgTital = this.infolist.woTitle;
- this.submitInfo("/market/cwo/recRptInfo", params);
- } else {
- this.submitInfo("/market/cwo/recWoInfo", params);
- }
- }
- },
- submitInfo(u, v) {
- let _this = this;
- this.$refs.infolist.validate(valid => {
- if (valid) {
- this.loadinged = true;
- this.$http({
- url: u,
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: v,
- }).then((res) => {
- this.loadinged = false;
- if (res.data.result === 1) {
- _this.$message({
- message: res.data.desc,
- type: 'error'
- });
- } else {
- _this.$message({
- message: '成功',
- type: 'success'
- });
- _this.infolist = {};
- _this.dialogStatus = false;
- _this.getList({}, _this.pageSize);
- _this.defaultList = [];
- _this.depttype = 0;
- }
- })
- }
- })
- },
- dialoginfoCli(v) {
- if (v == 1) {
- this.historySts = !this.historySts;
- } else if (v == 2) {
- this.dialogInfo = false;
- this.dialogStatus = true;
- this.historySts = false;
- this.titname = '修改';
- } else if (v == 3) {
- this.dialogInfo = false;
- this.historySts = false;
- this.infolist = {};
- }
- },
- //文件返回值
- uploadBack(v) {
- this.attList = v;
- },
- //功能栏
- iconCli(v) {
- if (v === 1) {
- this.getList(this.params, this.pageSize);
- }
- if (v === 2) {
- this.fullscreen = !this.fullscreen
- }
- },
- getUser() {
- this.userInfo = JSON.parse(window.sessionStorage.userInfo);
- },
- getType() {
- this.$http({
- url: "/market/qatype/queryPage",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- "page": '{"pageNo":"' + 1 + '","pageSize":"100"}'
- },
- data: {},
- }).then((res) => {
- this.typelist = res.data.data;
- });
- },
- changemsgType() {
- for (let i = 0; i < this.typelist.length; i++) {
- if (this.infolist.msgType === this.typelist[i].id) {
- this.infolist.msgTypeName = this.typelist[i].msgType;
- }
- }
- },
- },
- mounted() {
- this.getList({}, 1);
- this.getUser();
- this.getType();
- if (this.$route.query.id) {
- let params = {
- woNo: this.$route.query.id + ''
- }
- this.dialogCheck(this.$route.query.type, params);
- }
- },
- created() {
- }
- }
- </script>
- <style scoped lang="scss">
- .onetab {
- margin-bottom: 20px;
- padding: 0 20px;
- }
- .titbox {
- div {
- float: right;
- i {
- font-size: 22px;
- margin-left: 20px;
- cursor: pointer;
- }
- }
- }
- .tabbox {
- margin-top: 15px;
- }
- .pageBox {
- text-align: right;
- margin-top: 10px;
- }
- .info-line {
- width: 100%;
- display: block;
- padding-left: 20px;
- div {
- width: 50%;
- display: inline-block;
- }
- span {
- width: 80px;
- display: inline-block;
- text-align: left;
- i {
- color: red;
- display: inline-block;
- padding-right: 5px;
- }
- }
- .el-select,
- .el-input {
- width: calc(100% - 100px);
- }
- }
- .online {
- width: 100%;
- .el-select {
- width: calc(100% - 100px);
- }
- span {
- vertical-align: top;
- }
- .el-textarea {
- width: calc(100% - 100px);
- }
- .tree {
- width: calc(50% - 60px);
- display: inline-block;
- margin-right: 20px;
- height: 300px;
- overflow-y: scroll;
- }
- .treeUser {
- margin: 0;
- border: 1px solid #ddd;
- p {
- background: #f4f4f4;
- padding: 0 20px;
- margin-bottom: 5px;
- }
- }
- .treeUserb {
- width: calc(100% - 100px);
- border: 1px solid #ddd;
- background: #f4f4f4;
- border-radius: 3px;
- height: auto;
- overflow: hidden;
- p {
- display: inline-block;
- padding: 0 20px;
- margin-bottom: 5px;
- }
- }
- }
- </style>
|