Commit 3441161dbb2fa636b60a78a04f155f704a8a4bc6

Authored by youxiw2000
1 parent 92e4ef75

m

trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
... ... @@ -72,17 +72,7 @@ public class DriverTask
72 72 LogUtils.getBlock("=================== checkCredit 定时器执行 当前时间: " + simpleDateFormat.format(new Date()));
73 73  
74 74  
75   - try {
76   - checkTruckCredit();
77   - } catch (Exception e) {
78   - e.printStackTrace();
79   - }
80   -
81   - try {
82   - checkDriverCredit(); //检查驾驶员信用
83   - } catch (Exception e) {
84   - e.printStackTrace();
85   - }
  75 +
86 76 try {
87 77 checkTruckActive();
88 78 } catch (Exception e) {
... ... @@ -207,6 +197,19 @@ public class DriverTask
207 197 }
208 198  
209 199 public void checkCompanyCredit() {
  200 + try {
  201 + checkTruckCredit();
  202 + } catch (Exception e) {
  203 + e.printStackTrace();
  204 + }
  205 +
  206 + try {
  207 + checkDriverCredit(); //检查驾驶员信用
  208 + } catch (Exception e) {
  209 + e.printStackTrace();
  210 + }
  211 +
  212 +
210 213 Map map = new HashMap<>();
211 214 map.put("size",9999);
212 215 map.put("dishonestState",0);
... ...
trash-ui/src/api/three_step.js 0 → 100644
  1 + import {
  2 + listThreestep,
  3 + getThreestep,
  4 + delThreestep,
  5 + addThreestep,
  6 + updateThreestep,
  7 + exportThreestep,
  8 + getNames
  9 + } from "@/api/business/threestep";
  10 +
  11 +
  12 +
  13 + import threestepInfo from "@/views/business/threestep/threestepInfo";
  14 +
  15 + import h5Info from "@/views/h5/task/threestepInfo";
  16 +
  17 + import {
  18 + Upload
  19 + } from "element-ui";
  20 + import {
  21 + getToken
  22 + } from "@/utils/auth";
  23 +
  24 + import {
  25 + earthsitesList,
  26 + constructionsitesList,
  27 + getDict,
  28 + getArea,
  29 + mainworkcompany,
  30 + truckList,
  31 + companyList,
  32 + contractList,
  33 + getConstructionTruck,
  34 + } from "@/api/dict";
  35 +
  36 + export default {
  37 + name: "Threestep",
  38 + components: {
  39 + threestepInfo,
  40 + h5Info
  41 + },
  42 + data() {
  43 + return {
  44 + // 遮罩层
  45 + loading: true,
  46 + reUpdate : false,
  47 + info: false,
  48 + infoData: null,
  49 + businessKey:null,
  50 + picSample: false,
  51 + uploadImageDialog: false,
  52 + // 选中数组
  53 + ids: [],
  54 + // 非单个禁用
  55 + single: true,
  56 + // 非多个禁用
  57 + multiple: true,
  58 + // 显示搜索条件
  59 + showSearch: true,
  60 + // 总条数
  61 + total: 0,
  62 + // 报工自查表格数据
  63 + names:[],
  64 + threestepList: [],
  65 + fileList: [],
  66 + companyList:[],
  67 + truckList:[],
  68 + contractList:[],
  69 + // 弹出层标题
  70 + title: "",
  71 + labelName: "工地名称",
  72 + labelName2: "绑定消纳场",
  73 + upload: {
  74 + // 是否显示弹出层(用户导入)
  75 + open: false,
  76 + // 弹出层标题(用户导入)
  77 + title: "",
  78 + // 是否禁用上传
  79 + isUploading: false,
  80 + // 设置上传的请求头部
  81 + headers: {
  82 + Authorization: "Bearer " + getToken()
  83 + },
  84 + // 上传的地址
  85 + url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
  86 + },
  87 + // 是否显示弹出层
  88 + open: false,
  89 + // 查询参数
  90 + queryParams: {
  91 + pageStatus:0,//当前处于哪一个tag
  92 + pageNum: 1,
  93 + pageSize: 10,
  94 + name: null,
  95 + type: null,
  96 + place: null,
  97 + selfCheckTime: null,
  98 + objectId: null,
  99 + earthsitesId: null,
  100 + checkTime: null,
  101 + earthsitesName: null,
  102 + contract: null,
  103 + companys: null,
  104 + companyTrucks: null,
  105 + status:null,
  106 + workStartTime:null,
  107 + workEndTime:null,
  108 + },
  109 + // 表单参数
  110 + form: {
  111 + companys:null,
  112 + companyTrucks:null,
  113 +
  114 + },
  115 + picIndex: null,
  116 + // 表单校验
  117 + rules: {
  118 + name: [{
  119 + required: true,
  120 + message: '请填写完整',
  121 + trigger: 'change'
  122 + }, ],
  123 + contract: [{
  124 + required: true,
  125 + message: '请填写完整',
  126 + trigger: 'change'
  127 + }, ],
  128 + objectId: [{
  129 + required: true,
  130 + message: '请填写完整',
  131 + trigger: 'change'
  132 + }, ],
  133 + type: [{
  134 + required: true,
  135 + message: '请填写完整',
  136 + trigger: 'change'
  137 + }, ],
  138 + place: [{
  139 + required: true,
  140 + message: '请填写完整',
  141 + trigger: 'change'
  142 + }, ],
  143 + companys: [{
  144 + required: false,
  145 + message: '请填写完整',
  146 + trigger: 'change'
  147 + }, ],
  148 + companyTrucks: [{
  149 + required: false,
  150 + message: '请填写完整',
  151 + trigger: 'change'
  152 + }, ],
  153 + objectId: [{
  154 + required: true,
  155 + message: '请填写完整',
  156 + trigger: 'change'
  157 + }, ],
  158 + person: [{
  159 + required: true,
  160 + message: '请填写完整',
  161 + trigger: 'change'
  162 + }, ],
  163 + phone: [{
  164 + required: true,
  165 + message: '请填写完整',
  166 + trigger: 'change'
  167 + },
  168 + {
  169 + pattern: /^1(3|4|5|7|8|9)\d{9}$/,
  170 + message: '手机号格式错误',
  171 + trigger: 'change'
  172 + },
  173 + ]
  174 + },
  175 + SiteWorkAreaCodeType: [],
  176 + remoteData: [],
  177 + remoteQueryData: {
  178 + "page": 1,
  179 + "size": 9999,
  180 + "auditStatus":1,
  181 + "creditStatus":0,
  182 + },
  183 + areas: [],
  184 + areaCode: null,
  185 + bindData: [],
  186 + bindname:null,
  187 + info2:false,
  188 +
  189 + };
  190 + },
  191 + created() {
  192 + getArea().then(res => {
  193 + this.areas = res.result;
  194 + for(let i =0;i< this.threestepList.length;i++){
  195 + this.threestepList[i].place = this.getAreaName(this.threestepList[i].place);
  196 + }
  197 + });
  198 +
  199 + this.getList(0);
  200 +
  201 + },
  202 + methods: {
  203 + conractCheck(value){
  204 + let item
  205 + for(let i in this.contractList){
  206 + if(this.contractList[i].contractNo == value){
  207 + item = this.contractList[i];
  208 + break;
  209 + }
  210 + }
  211 +
  212 +
  213 + if(new Date(item.endTime).getTime() < new Date().getTime()){
  214 + this.form.contract = null;
  215 + this.$message("合同已过期");
  216 + return;
  217 + }
  218 + if(new Date(item.startTime).getTime() > new Date().getTime()){
  219 + this.form.contract = null;
  220 + this.$message("合同未生效");
  221 + return;
  222 + }
  223 +
  224 + if(this.form.type == 0){
  225 + this.form.name = item.constructionSiteName;
  226 + this.form.objectId = item.constructionSiteID;
  227 + this.form.earthsitesName = item.earthSiteName;
  228 + this.form.earthsitesId = item.earthSiteID;
  229 + }else{
  230 + this.form.earthsitesName = item.constructionSiteName;
  231 + this.form.earthsitesId = item.constructionSiteID;
  232 + this.form.name = item.earthSiteName;
  233 + this.form.objectId = item.earthSiteID;
  234 + }
  235 +
  236 + for(let i =0;i<this.remoteData.length ;i++){
  237 +
  238 + if(this.remoteData[i].name == this.form.name){
  239 + this.form.place = Number(this.remoteData[i].areaCode);
  240 + break;
  241 + }
  242 + }
  243 +
  244 + this.form.contractId = item.id;
  245 + this.bindname = this.form.earthsitesName;
  246 + },
  247 + checkCompany(item){
  248 +
  249 + let arr = [];
  250 +
  251 + for(var i in this.form.companyTrucks){
  252 + let truck = this.form.companyTrucks[i];
  253 + for(let j in this.truckList){
  254 + if(truck == this.truckList[j].id && item.indexOf(this.truckList[j].companyName) > -1){
  255 + arr.push(truck)
  256 + break;
  257 + }
  258 + }
  259 + }
  260 +
  261 + this.form.companyTrucks = arr;
  262 + // for(let i = 0;)
  263 +
  264 + // let arr = [];
  265 + // for(var i in this.form.companyTrucks){
  266 + // if(this.form.companys.indexOf(this.form.companyTrucks[i]) > -1){
  267 + // arr.push(this.form.companyTrucks[i]);
  268 + // }
  269 + // }
  270 +
  271 + // this.form.companyTrucks = arr;
  272 + },
  273 +
  274 + areaClear() {
  275 + this.areaCode = null;
  276 + },
  277 + selectArea(a) {
  278 + this.areaCode = a;
  279 + this.form.name = "";
  280 + },
  281 + getObjId(value) {
  282 + let item;
  283 + for(let i in this.remoteData){
  284 + if(this.remoteData[i].name == value){
  285 + item = this.remoteData[i];
  286 + break;
  287 + }
  288 + }
  289 + this.form.earthsitesName = null;
  290 + this.form.earthsitesId = null;
  291 + this.form.contract = null;
  292 + this.form.contractId = null;
  293 + this.bindname = null;
  294 +
  295 + let name = this.form.earthsitesName;
  296 + let objId = this.form.earthsitesId;
  297 +
  298 +
  299 +
  300 + this.form.objectId = item.id;
  301 + this.form.place = Number(item.areaCode);
  302 + this.filterConract();
  303 +
  304 +
  305 + for(let i in this.filterContract){
  306 + if(this.filterContract[i].constructionSiteID == objId || this.filterContract[i].earthSiteID == objId){
  307 + this.form.earthsitesName = name;
  308 + this.form.earthsitesId = objId;
  309 + break;
  310 + }
  311 + }
  312 +
  313 +
  314 +
  315 + if(this.form.type == 0){
  316 + let query = {
  317 + 'page':1,
  318 + 'size':9999,
  319 + }
  320 +
  321 + this.form.companys = null;
  322 + this.form.companyTrucks = null;
  323 + this.companyList = [];
  324 + this.truckList = [];
  325 +
  326 + mainworkcompany(item.id).then(response => {
  327 +
  328 + this.companyList.push({id:item.transportCompanyId , name: item.transportCompany});
  329 +
  330 + let query = {
  331 + 'page':1,
  332 + 'size':9999,
  333 + 'dishonestState':0,
  334 + 'valid':0
  335 + }
  336 +
  337 + let ids = [];
  338 +
  339 + ids.push(item.transportCompanyId);
  340 +
  341 + query.companyID = ids +"";
  342 + query.valid = 0;
  343 +
  344 + getConstructionTruck(item.id).then(res=>{
  345 + for(let i in res.result){
  346 + this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName});
  347 + query.companyID += "," + res.result[i].companyId;
  348 + }
  349 +
  350 + truckList(query).then(res=>{
  351 + this.truckList = res.result.list;
  352 + });
  353 + });
  354 + });
  355 + }
  356 +
  357 + },
  358 + filterConract(){
  359 + let cId;
  360 + let eId;
  361 + if(this.form.type == 0){
  362 + cId = this.form.objectId;
  363 + eId = this.form.earthsitesId;
  364 + }else{
  365 + cId = this.form.earthsitesId;
  366 + eId = this.form.objectId;
  367 + }
  368 +
  369 + this.filterContract = [];
  370 + for(let i in this.contractList){
  371 + let obj = this.contractList[i];
  372 + let canId = true;
  373 +
  374 +
  375 + //constructionSiteID //earthSiteID
  376 + if(cId && cId != obj.constructionSiteID){
  377 + continue;
  378 + }
  379 +
  380 + if(eId && eId != obj.earthSiteID){
  381 + continue;
  382 + }
  383 +
  384 + this.filterContract.push(obj);
  385 + }
  386 +
  387 +
  388 + for(let j in this.bindData){
  389 +
  390 + this.bindData[j].show = false;
  391 +
  392 + for(let i in this.filterContract){
  393 +
  394 + if(this.form.type == 0 && this.filterContract[i].earthSiteID == this.bindData[j].id){
  395 + this.bindData[j].show = true;
  396 + }
  397 +
  398 + if(this.form.type == 1 && this.filterContract[i].constructionSiteID == this.bindData[j].id){
  399 + this.bindData[j].show = true;
  400 + }
  401 +
  402 + }
  403 + }
  404 + },
  405 + getEarthsiteId(value) {
  406 +
  407 + this.form.contract = null;
  408 + this.form.contractId = null;
  409 +
  410 + let name = this.form.name;
  411 + let objId = this.form.objectId;
  412 +
  413 + this.form.name = null;
  414 + this.form.objectId = null;
  415 +
  416 +
  417 + let item;
  418 + for(let i in this.bindData){
  419 + if(this.bindData[i].name == value){
  420 + item = this.bindData[i];
  421 + break;
  422 + }
  423 + }
  424 +
  425 + this.form.earthsitesName = item.name;
  426 + this.form.earthsitesId = item.id;
  427 + this.filterConract();
  428 +
  429 + for(let i in this.filterContract){
  430 + if(this.filterContract[i].constructionSiteID == objId || this.filterContract[i].earthSiteID == objId){
  431 + this.form.name = name;
  432 + this.form.objectId = objId;
  433 + break;
  434 + }
  435 + }
  436 +
  437 +
  438 + },
  439 + downloadFile(path) {
  440 + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
  441 + },
  442 + removeImage(index, img) {
  443 + let target = "img" + index;
  444 + this.form[target].splice(this.form[target].indexOf(img), 1);
  445 + this.$forceUpdate();
  446 +
  447 + },
  448 + removeAttchItem(index, img) {
  449 + let target = "attchItem" + index;
  450 + this.form[target].splice(this.form[target].indexOf(img), 1);
  451 + this.$forceUpdate();
  452 + },
  453 +
  454 + uploadSuccess(res, file, fileList) {
  455 + if(res.code){
  456 + this.$message(res.message);
  457 + return;
  458 + }
  459 + if(this.picIndex > 90){
  460 + let target = "attchItem" + (this.picIndex-90);
  461 + if (!this.form[target]) {
  462 + this.form[target] = [];
  463 + }
  464 + this.form[target].push(res);
  465 + return;
  466 + }
  467 + let target = "img" + this.picIndex;
  468 +
  469 + if (!this.form[target]) {
  470 + this.form[target] = [];
  471 + }
  472 +
  473 + this.form[target].push(res);
  474 +
  475 + },
  476 + showFileUpload(i) {
  477 + this.uploadImageDialog = true;
  478 + this.picIndex = i;
  479 + },
  480 + beforeUpload(file) {
  481 + let isRightSize = file.size / 1024 / 1024 < 20
  482 + if (!isRightSize) {
  483 + this.$message.error('文件大小超过 20MB')
  484 + return isRightSize;
  485 + }
  486 + let isAccept = false;
  487 + if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file
  488 + .name.indexOf('.pdf') > -1) {
  489 + isAccept = true;
  490 + }
  491 + if (!isAccept) {
  492 + this.$message.error('应该选择PDF、JPG、WORD类型的文件')
  493 + return isAccept;
  494 + }
  495 +
  496 + },
  497 + handleClose() {
  498 + this.uploadImageDialog = false;
  499 + this.fileList = [];
  500 + },
  501 + selectType(value) {
  502 +
  503 + this.rules.companys[0].required = false;
  504 + this.rules.companyTrucks[0].required = false;
  505 + if (value == "0") {
  506 + this.labelName = "工地名称";
  507 + this.labelName2 = "绑定消纳场";
  508 +
  509 + } else {
  510 + this.labelName = "消纳场名称";
  511 + this.labelName2 = "绑定工地";
  512 + }
  513 +
  514 + this.form.name = null;
  515 + this.bindname = null;
  516 + constructionsitesList(this.remoteQueryData).then(res => {
  517 + if (value == 0) {
  518 + this.remoteData = res.result.list;
  519 + } else {
  520 + this.bindData = res.result.list;
  521 +
  522 + for(let i in this.bindData){
  523 + this.bindData[i].show = true;
  524 + }
  525 + }
  526 + });
  527 +
  528 + earthsitesList(this.remoteQueryData).then(res => {
  529 + if (value == 0) {
  530 + this.bindData = res.result.list;
  531 + for(let i in this.bindData){
  532 + this.bindData[i].show = true;
  533 + }
  534 + this.rules.companys[0].required = true;
  535 + this.rules.companyTrucks[0].required = true;
  536 + } else {
  537 + this.remoteData = res.result.list;
  538 + }
  539 + });
  540 + },
  541 +
  542 + getAreaName(code){
  543 + for(let i =0;i<this.areas.length;i++){
  544 + if(Number(code) == this.areas[i].code){
  545 + return this.areas[i].name;
  546 + break;
  547 + }
  548 + }
  549 + return code;
  550 + },
  551 +
  552 + /** 查询报工自查列表 */
  553 + getList(tabIdx) {
  554 + if(tabIdx == 1){
  555 + this.resetQuery();
  556 + this.queryParams.pageStatus = tabIdx;
  557 + this.queryParams.status = tabIdx;
  558 +
  559 + getNames(this.queryParams).then(res=>{
  560 +
  561 + this.names = res;
  562 + })
  563 +
  564 + }else if(tabIdx == 0){
  565 + this.resetQuery();
  566 + this.queryParams.pageStatus = tabIdx;
  567 + this.queryParams.status = null;
  568 +
  569 + getNames(this.queryParams).then(res=>{
  570 +
  571 + this.names = res;
  572 + })
  573 + }
  574 +
  575 + let query = {
  576 + "page": 1,
  577 + "size": 9999,
  578 + "auditStatus":1,
  579 + };
  580 +
  581 + contractList(query).then(res=>{
  582 + this.contractList = res.result.list;
  583 + this.filterContract = this.contractList
  584 + });
  585 +
  586 + this.loading = true;
  587 + listThreestep(this.queryParams).then(response => {
  588 + this.threestepList = response.rows;
  589 + this.total = response.total;
  590 + this.loading = false;
  591 + for(let i =0;i< this.threestepList.length;i++){
  592 + this.threestepList[i].place = this.getAreaName(this.threestepList[i].place);
  593 + }
  594 + });
  595 + },
  596 + // 取消按钮
  597 + cancel() {
  598 + this.open = false;
  599 + this.reset();
  600 + },
  601 + // 表单重置
  602 + reset() {
  603 + this.form = {
  604 + id: null,
  605 + name: null,
  606 + type: null,
  607 + place: null,
  608 + selfCheckTime: null,
  609 + objectId: null,
  610 + earthsitesId: null,
  611 + createTime: null,
  612 + checkTime: null,
  613 + earthsitesName: null,
  614 + contract: null,
  615 + companys: null,
  616 + companyTrucks: null,
  617 + img0: null,
  618 + img1: null,
  619 + img2: null,
  620 + img3: null,
  621 + img4: null,
  622 + img5: null,
  623 + img6: null,
  624 + img7: null,
  625 + img8: null,
  626 + img9: null,
  627 + img10: null,
  628 + img11: null,
  629 + img12: null,
  630 + person: null,
  631 + phone: null
  632 + };
  633 + this.resetForm("form");
  634 + this.filterConract();
  635 + },
  636 + /** 搜索按钮操作 */
  637 + handleQuery() {
  638 + this.queryParams.pageNum = 1;
  639 + this.getList();
  640 + },
  641 + /** 重置按钮操作 */
  642 + resetQuery() {
  643 + this.resetForm("queryForm");
  644 + this.queryParams.workStartTime = null;
  645 + this.queryParams.workEndTime = null;
  646 + this.handleQuery();
  647 + },
  648 + // 多选框选中数据
  649 + handleSelectionChange(selection) {
  650 + this.ids = selection.map(item => item.id)
  651 + this.single = selection.length !== 1
  652 + this.multiple = !selection.length
  653 + },
  654 + /** 新增按钮操作 */
  655 + handleAdd() {
  656 + this.reset();
  657 + this.open = true;
  658 + this.title = "报工自查";
  659 + },
  660 + /** 修改按钮操作 */
  661 + handleUpdate(row,idx) {
  662 + debugger;
  663 + this.reset();
  664 + this.businessKey = row.id +"";
  665 + if(idx == 0){
  666 + this.info = true;
  667 + }else{
  668 + this.info2 = true;
  669 + }
  670 + },
  671 + reSub(row){
  672 + this.reset();
  673 +
  674 + this.open = true;
  675 + this.title = "再次提交";
  676 + getThreestep(row.id).then(res=>{
  677 + this.form = res.data;
  678 + this.form.type = this.form.type + "";
  679 + this.form.place = Number(this.form.place);
  680 + this.bindname = res.data.earthsitesName;
  681 + if(res.data.companys){
  682 + this.form.companys = res.data.companys.split(",");
  683 + }
  684 + if(res.data.companyTrucks){
  685 + this.form.companyTrucks = res.data.companyTrucks.split(",");
  686 + }
  687 + for (let i = 0; i < 13; i++) {
  688 + if (this.form["img" + i]) {
  689 + this.form["img" + i] = this.form["img" + i].split(",");
  690 + }
  691 + }
  692 + });
  693 + },
  694 +
  695 + checkEndSuccess(){
  696 +
  697 + let year = new Date().getFullYear();
  698 + let month = (new Date().getMonth() + 1) < 10 ? "0" + (new Date().getMonth() + 1) : (new Date().getMonth() + 1);
  699 + let date = new Date().getDate() < 10 ? "0" + new Date().getDate() : new Date().getDate();
  700 + let hour = new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours();
  701 + let minute = new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes();
  702 + let second = new Date().getSeconds() < 10 ? "0" + new Date().getSeconds() : new Date().getSeconds();
  703 +
  704 +
  705 + this.form.checkEndTime = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
  706 + this.form.id = this.businessKey;
  707 + for (let i = 1; i < 4; i++) {
  708 + if (this.form["attchItem" + i]) {
  709 + this.form["attchItem" + i] = this.form["attchItem" + i] + "";
  710 + }
  711 + }
  712 + this.submitForm();
  713 + },
  714 + checkEndError(){
  715 + this.$router.push({path:"/other/caseOffline/" ,query:{businessKey:this.businessKey}});
  716 + //发起案卷
  717 + },
  718 + /** 提交按钮 */
  719 + submitForm() {
  720 +
  721 + this.$refs["form"].validate(valid => {
  722 + if (valid) {
  723 + this.loading = true;
  724 + if (this.form.id != null) {
  725 + if(this.queryParams.pageStatus==1){
  726 + updateThreestep(this.form).then(response => {
  727 + this.msgSuccess("提交成功");
  728 + this.open = false;
  729 + this.open2 = false;
  730 + this.info = false;
  731 + this.info2 =false;
  732 + this.getList();
  733 + this.loading = false;
  734 + },error=>{
  735 + this.loading = false;
  736 + this.form.companys = this.form.companys.split(",");
  737 + this.form.companyTrucks = this.form.companyTrucks.split(",");
  738 +
  739 + for (let i = 0; i < 13; i++) {
  740 + if (this.form["img" + i]) {
  741 + this.form["img" + i] = this.form["img" + i].split(",");
  742 + }
  743 + }
  744 + });
  745 + }else{
  746 + this.form.companys = this.form.companys + "";
  747 + this.form.companyTrucks = this.form.companyTrucks + "";
  748 +
  749 + for (let i = 0; i < 13; i++) {
  750 + if (this.form["img" + i]) {
  751 + this.form["img" + i] = this.form["img" + i] + "";
  752 + }
  753 + }
  754 +
  755 + addThreestep(this.form).then(response => {
  756 + this.msgSuccess("修改成功");
  757 + this.open = false;
  758 + this.open2 = false;
  759 + this.info = false;
  760 + this.info2 =false;
  761 + this.getList();
  762 + this.loading = false;
  763 + },error=>{
  764 + this.loading = false;
  765 + this.form.companys = this.form.companys.split(",");
  766 + this.form.companyTrucks = this.form.companyTrucks.split(",");
  767 +
  768 + for (let i = 0; i < 13; i++) {
  769 + if (this.form["img" + i]) {
  770 + this.form["img" + i] = this.form["img" + i].split(",");
  771 + }
  772 + }
  773 + });
  774 + }
  775 +
  776 +
  777 +
  778 + } else {
  779 + this.form.companys = this.form.companys + "";
  780 + this.form.companyTrucks = this.form.companyTrucks + "";
  781 +
  782 + for (let i = 0; i < 13; i++) {
  783 + if (this.form["img" + i]) {
  784 + this.form["img" + i] = this.form["img" + i] + "";
  785 + }
  786 + }
  787 + addThreestep(this.form).then(response => {
  788 + this.msgSuccess("新增成功");
  789 + this.open = false;
  790 + this.open2 = false;
  791 + this.getList();
  792 + },error=>{
  793 + this.loading = false;
  794 + this.form.companys = this.form.companys.split(",");
  795 + this.form.companyTrucks = this.form.companyTrucks.split(",");
  796 +
  797 + for (let i = 0; i < 13; i++) {
  798 + if (this.form["img" + i]) {
  799 + this.form["img" + i] = this.form["img" + i].split(",");
  800 + }
  801 + }
  802 + })
  803 + }
  804 + }
  805 + });
  806 + },
  807 + /** 删除按钮操作 */
  808 + handleDelete(row) {
  809 + const ids = row.id || this.ids;
  810 + this.$confirm('是否确认删除报工自查编号为"' + ids + '"的数据项?', "警告", {
  811 + confirmButtonText: "确定",
  812 + cancelButtonText: "取消",
  813 + type: "warning"
  814 + }).then(function() {
  815 + return delThreestep(ids);
  816 + }).then(() => {
  817 + this.getList();
  818 + this.msgSuccess("删除成功");
  819 + })
  820 + },
  821 + /** 导出按钮操作 */
  822 + handleExport() {
  823 + const queryParams = this.queryParams;
  824 + this.$confirm('是否确认导出所有报工数据项?', "警告", {
  825 + confirmButtonText: "确定",
  826 + cancelButtonText: "取消",
  827 + type: "warning"
  828 + }).then(function() {
  829 + return exportThreestep(queryParams);
  830 + }).then(response => {
  831 + this.download(response.message);
  832 + })
  833 + }
  834 + }
  835 + };
... ...
trash-ui/src/api/truck_active.js 0 → 100644
  1 +import { listTruckActivate, getTruckActivate, delTruckActivate, addTruckActivate, updateTruckActivate, exportTruckActivate } from "@/api/business/truckActivate";
  2 +
  3 + import {
  4 + todayDataList,
  5 + } from "@/api/business/threestep";
  6 +
  7 +
  8 +import {
  9 + truckList,
  10 + companyList,
  11 +} from "@/api/dict";
  12 +
  13 +export default {
  14 + name: "TruckActivate",
  15 + data() {
  16 + return {
  17 + // 遮罩层
  18 + loading: true,
  19 + // 选中数组
  20 + ids: [],
  21 + // 非单个禁用
  22 + single: true,
  23 + // 非多个禁用
  24 + multiple: true,
  25 + // 显示搜索条件
  26 + showSearch: true,
  27 + // 总条数
  28 + total: 0,
  29 + // 车辆激活表格数据
  30 + truckActivateList: [],
  31 + // 弹出层标题
  32 + title: "",
  33 + // 是否显示弹出层
  34 + open: false,
  35 + companyList:[],
  36 + // 查询参数
  37 + queryParams: {
  38 + pageNum: 1,
  39 + pageSize: 10,
  40 + company: null,
  41 + licensePlate: null,
  42 + time: null,
  43 + construction: null,
  44 + status: null,
  45 + earthsite: null,
  46 + objectId: null,
  47 + createType: null,
  48 + activateTime: null,
  49 + activateDate:null,
  50 + },
  51 + // 表单参数
  52 + form: {},
  53 + // 表单校验
  54 + rules: {
  55 + construction: [{
  56 + required: true,
  57 + message: '请填写完整',
  58 + trigger: 'change'
  59 + }, ],
  60 +
  61 + company: [{
  62 + required: true,
  63 + message: '请填写完整',
  64 + trigger: 'change'
  65 + }, ],
  66 +
  67 +
  68 + licensePlate: [{
  69 + required: true,
  70 + message: '请填写完整',
  71 + trigger: 'change'
  72 + }, ],
  73 + },
  74 + constList:[],
  75 + truckList:[],
  76 +
  77 + construction : null,
  78 + truck : null,
  79 + company:null,
  80 + openActivateTime:false,
  81 + isLoading:false,
  82 + };
  83 + },
  84 + created() {
  85 + this.getList(0);
  86 + },
  87 + methods: {
  88 + /** 查询车辆激活列表 */
  89 + getList(index) {
  90 + if(index == 0){
  91 + this.queryParams.status = "0";
  92 + this.openActivateTime = false;
  93 + this.queryParams.activateDate = null;
  94 + }
  95 + if(index == 1){
  96 + this.openActivateTime = true;
  97 + this.queryParams.status = "1";
  98 + }
  99 + this.loading = true;
  100 + listTruckActivate(this.queryParams).then(response => {
  101 + this.truckActivateList = response.rows;
  102 + this.total = response.total;
  103 + this.loading = false;
  104 + });
  105 +
  106 + let data = {
  107 + type : 0,
  108 + status:1,
  109 + }
  110 +
  111 + todayDataList(data).then(res=>{
  112 + this.constList = res;
  113 + });
  114 +
  115 + },
  116 + getCompany(value){
  117 + let obj;
  118 +
  119 + for(let i in this.constList){
  120 + if(this.constList[i].name == value){
  121 + this.construction = this.constList[i];
  122 + obj = this.construction;
  123 + }
  124 + }
  125 +
  126 +
  127 + this.companyList = [];
  128 + this.truckList = [];
  129 +
  130 + constructionById(obj.objectId).then(res=>{
  131 +
  132 +
  133 + this.companyList.push({id:res.result.transportCompanyId , name: res.result.transportCompany});
  134 +
  135 + mainworkcompany(obj.objectId).then(response => {
  136 +
  137 + let query = {
  138 + 'page':1,
  139 + 'size':9999,
  140 + 'dishonestState':0
  141 + }
  142 +
  143 + let ids = [];
  144 +
  145 + ids.push(res.result.transportCompanyId);
  146 +
  147 + query.companyID = ids + "";
  148 + query.valid = 0;
  149 +
  150 + getConstructionTruck(obj.objectId).then(res=>{
  151 + for(let i in res.result){
  152 +
  153 + this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName});
  154 + query.companyID += "," + res.result[i].companyId;
  155 + }
  156 +
  157 + truckList(query).then(res=>{
  158 + this.truckList = res.result.list;
  159 + });
  160 + });
  161 + });
  162 +
  163 +
  164 + })
  165 +
  166 +
  167 + },
  168 + getTruck(truck){
  169 + this.truck = truck;
  170 + },
  171 + // 取消按钮
  172 + cancel() {
  173 + this.open = false;
  174 + this.reset();
  175 + },
  176 + // 表单重置
  177 + reset() {
  178 + this.form = {
  179 + id: null,
  180 + company: null,
  181 + licensePlate: null,
  182 + time: null,
  183 + construction: null,
  184 + status: 0,
  185 + earthsite: null,
  186 + objectId: null,
  187 + createBy: null,
  188 + createType: null,
  189 + activateTime: null,
  190 + createTime: null
  191 + };
  192 + this.resetForm("form");
  193 + },
  194 + /** 搜索按钮操作 */
  195 + handleQuery() {
  196 + this.queryParams.pageNum = 1;
  197 + this.getList();
  198 + },
  199 + /** 重置按钮操作 */
  200 + resetQuery() {
  201 + this.resetForm("queryForm");
  202 + this.handleQuery();
  203 + },
  204 + // 多选框选中数据
  205 + handleSelectionChange(selection) {
  206 + this.ids = selection.map(item => item.id)
  207 + this.single = selection.length!==1
  208 + this.multiple = !selection.length
  209 + },
  210 + /** 新增按钮操作 */
  211 + handleAdd() {
  212 + this.reset();
  213 + this.open = true;
  214 + this.title = "添加车辆激活";
  215 + },
  216 + /** 修改按钮操作 */
  217 + handleUpdate(row) {
  218 + this.reset();
  219 + this.form.id = row.id;
  220 + updateTruckActivate(this.form).then(response => {
  221 + this.msgSuccess("修改成功");
  222 + this.open = false;
  223 + this.getList();
  224 + });
  225 +
  226 + },
  227 + /** 提交按钮 */
  228 + submitForm() {
  229 + this.$refs["form"].validate(valid => {
  230 + if (valid) {
  231 +
  232 + for(var i in this.form.licensePlate){
  233 + for(let j in this.truckList){
  234 + if(this.form.licensePlate[i] == this.truckList[j].id){
  235 +
  236 + let data = {
  237 + objectId:this.form.licensePlate[i],
  238 + licensePlate:this.truckList[j].licenseplateNo,
  239 + construction:this.construction.name,
  240 + earthsite : this.construction.earthsitesName,
  241 + status : 0,
  242 + company:this.form.company,
  243 + }
  244 +
  245 +
  246 + addTruckActivate(data).then(response => {
  247 + this.msgSuccess("新增成功");
  248 + this.open = false;
  249 + this.getList();
  250 + });
  251 +
  252 +
  253 + }
  254 + }
  255 + }
  256 +
  257 +
  258 +
  259 +
  260 + }
  261 + });
  262 + },
  263 + /** 删除按钮操作 */
  264 + handleDelete(row) {
  265 + const ids = row.id || this.ids;
  266 + this.$confirm('是否确认删除车辆激活编号为"' + ids + '"的数据项?', "警告", {
  267 + confirmButtonText: "确定",
  268 + cancelButtonText: "取消",
  269 + type: "warning"
  270 + }).then(function() {
  271 + return delTruckActivate(ids);
  272 + }).then(() => {
  273 + this.getList();
  274 + this.msgSuccess("删除成功");
  275 + })
  276 + },
  277 + /** 导出按钮操作 */
  278 + handleExport() {
  279 + const queryParams = this.queryParams;
  280 + this.$confirm('是否确认导出所有车辆激活数据项?', "警告", {
  281 + confirmButtonText: "确定",
  282 + cancelButtonText: "取消",
  283 + type: "warning"
  284 + }).then(function() {
  285 + return exportTruckActivate(queryParams);
  286 + }).then(response => {
  287 + this.download(response.message);
  288 + })
  289 + }
  290 + }
  291 +};
0 292 \ No newline at end of file
... ...
trash-ui/src/layout/index.vue
1 1 <template>
  2 + <div :class="classObj" class="app-wrapper">
  3 + <sidebar class="sidebar-container" />
  4 + <div :class="{hasTagsView:needTagsView}" class="main-container">
  5 + <tags-view v-if="needTagsView" />
2 6 <app-main />
  7 +
  8 + </div>
  9 + </div>
3 10 </template>
4 11  
5 12 <script>
... ...
trash-ui/src/layout/index66.vue renamed to trash-ui/src/layout/index6.vue
1 1 <template>
2   - <div :class="classObj" class="app-wrapper">
3   - <sidebar class="sidebar-container" />
4   - <div :class="{hasTagsView:needTagsView}" class="main-container">
5   - <tags-view v-if="needTagsView" />
6 2 <app-main />
7   -
8   - </div>
9   - </div>
10 3 </template>
11 4  
12 5 <script>
... ...
trash-ui/src/views/activiti/task/index.vue
... ... @@ -433,8 +433,6 @@ export default {
433 433 // 弹出层标题
434 434 title: "",
435 435 // 是否显示弹出层
436   - open: false,
437   - open2: false,
438 436 picSample: false,
439 437 taskName: null,
440 438 // 查询参数
... ... @@ -474,11 +472,14 @@ export default {
474 472 // 上传的地址
475 473 url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
476 474 },
  475 + controlId: null,
  476 + users: [],
  477 + options: [],
  478 + usersName: [],
  479 + deptName:null,
  480 + supervisionData: null,
477 481 uploadImageDialog: false,
478   - conferenceOpen: false,
479   - construct: false,
480 482 idInfo: null,
481   - leaveApplicationOpen: false,
482 483 signData: null,
483 484 areas: [],
484 485 roles: [],
... ... @@ -491,13 +492,12 @@ export default {
491 492 caseOffline: false,
492 493 violationCaseFile: false,
493 494 violationCaseFile1: false,
494   - controlId: null,
495   - users: [],
496   - options: [],
497   - usersName: [],
498   - deptName:null,
499   - supervisionData: null,
500 495 supervisionOpen:false,
  496 + open: false,
  497 + open2: false,
  498 + conferenceOpen: false,
  499 + construct: false,
  500 + leaveApplicationOpen: false,
501 501 };
502 502 },
503 503 created() {
... ... @@ -568,13 +568,19 @@ export default {
568 568  
569 569 // 取消按钮
570 570 cancel() {
571   - this.open = false;
572   - this.open2 = false;
573   - this.leaveApplicationOpen = false;
574   - this.conferenceOpen = false;
575   - this.construct = false;
576   - this.logisticsInfoOpen = false;
577   - this.handleAffairsInfoOpen = false;
  571 + this.earthsites=false;
  572 + this.contract=false;
  573 + this.logisticsInfoOpen=false;
  574 + this.handleAffairsInfoOpen=false;
  575 + this.caseOffline=false;
  576 + this.violationCaseFile=false;
  577 + this.violationCaseFile1=false;
  578 + this.supervisionOpen=false;
  579 + this.open=false;
  580 + this.open2=false;
  581 + this.conferenceOpen=false;
  582 + this.construct=false;
  583 + this.leaveApplicationOpen=false;
578 584 this.reset();
579 585 },
580 586 // 表单重置
... ...
trash-ui/src/views/activiti/taskhistory/end.vue
1 1 <template>
2   - <div class="app-container">
3   -
4   - <taskCard :task="task" v-for="task in taskList" @sendToParent="showTask"/>
5   -
6   - <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
7   -
8   - <!-- 审批对话框 -->
9   - <el-dialog :title="title" :visible.sync="open" v-if="open" width="500px" append-to-body>
10   -
11   - <div slot="footer" class="dialog-footer">
12   - <el-button type="danger" @click="submitForm(form.formData[0].controlId ,1)">驳回</el-button>
13   - <el-button type="primary" @click="submitForm(form.formData[0].controlId ,0)">通过</el-button>
14   - </div>
15   - </el-dialog>
16   -
17   -
18   - <el-dialog :title="title" :visible.sync="open2" width="800px" append-to-body>
19   - <threestepInfo :businessKey="businessKey" v-if="open2"/>
20   -
21   - </el-dialog>
22   - <el-dialog :title="title" :visible.sync="construct" width="800px" append-to-body>
23   - <constructsiteInfo :businessKey="businessKey" :signData="signData" v-if="construct" />
24   - </el-dialog>
25   - <!-- 会议管理 -->
26   - <el-dialog :title="title" :visible.sync="conferenceOpen" width="850px" append-to-body>
27   - <conferenceInfo :idInfo="idInfo" v-if="conferenceOpen"/>
28   - </el-dialog>
29   -
30   - <!-- 请假申请 -->
31   - <el-dialog :title="title" :visible.sync="leaveApplicationOpen" width="500px" append-to-body>
32   - <leaveApplicationInfo :idInfo="idInfo" v-if="leaveApplicationOpen"/>
33   - </el-dialog>
34   -
35   -
36   - <el-dialog :title="title" :visible.sync="earthsites" width="800px" append-to-body>
37   - <earthsitesInfo :businessKey="businessKey" v-if="earthsites" />
38   - </el-dialog>
39   -
40   - <el-dialog :title="title" :visible.sync="contract" width="800px" append-to-body>
41   - <contractInfo :businessKey="businessKey" v-if="contract" />
42   - </el-dialog>
43   -
44   -
45   -
46   - <!-- 后勤管理 -->
47   - <el-dialog :title="title" :visible.sync="logisticsInfoOpen" width="500px" append-to-body
48   - :close-on-click-modal="false">
49   - <logisticsInfo :idInfo="idInfo" v-if="logisticsInfoOpen"/>
50   - </el-dialog>
51   -
52   - <!-- 办文办事 -->
53   - <el-dialog :title="title" :visible.sync="handleAffairsInfoOpen" width="600px" append-to-body
54   - :close-on-click-modal="false">
55   - <handleInfo ref="handleAffairsInfoRef" :idInfo="idInfo" v-if="handleAffairsInfoOpen" :depts="depts"
56   - :businessKey="definitionKey"
57   - :controlId="controlId"/>
58   - </el-dialog>
59   -
60   - <!-- 线下案卷交办 -->
61   - <el-dialog :title="title" :visible.sync="caseOffline" width="600px" append-to-body :close-on-click-modal="false">
62   - <caseOfflineInfo :businessKey="businessKey" v-if="caseOffline"/>
63   - </el-dialog>
64   -
65   - <!-- 平台违规信息 -->
66   - <el-dialog :title="title" :visible.sync="violationCaseFile" width="850px" append-to-body :close-on-click-modal="false">
67   - <violationCaseFileInfo :idInfo="businessKey" v-if="violationCaseFile"/>
68   - </el-dialog>
69   -
70   - <!-- 违规预警信息 -->
71   - <el-dialog :title="title" :visible.sync="violationCaseFile1" width="850px" append-to-body :close-on-click-modal="false">
72   - <violationWarningInformationInfo :idInfo="businessKey" v-if="violationCaseFile1"/>
73   - </el-dialog>
74   -
75   - </div>
  2 + <history :type="1"/>
76 3 </template>
77 4  
78   -
79   -<style>
80   - @import '../../../assets/css/task.css'
81   -</style>
82   -
83 5 <script>
84   - import {
85   - listEndTask,
86   - formDataShow
87   - } from "@/api/activiti/taskhistory";
88   -
89   - import { getSignByObjId, addSign, updateSign } from "@/api/sign/sign";
90   - import taskCard from "@/views/activiti/task/taskCard";
91   - import earthSitesForm from "@/views/workflow/earthSitesForm";
92   - import threestepInfo from "@/views/business/threestep/threestepInfo";
93   - import constructsiteInfo from "@/views/activiti/task/constructsiteInfo";
94   - import conferenceInfo from "@/views/office/conference/conferenceInfo";
95   - import leaveApplicationInfo from "@/views/office/leaveApplication/leaveApplicationInfo";
96   - import earthsitesInfo from "@/views/activiti/task/earthsitesInfo";
97   - import contractInfo from "@/views/activiti/task/contractInfo";
98   - import logisticsInfo from "@/views/office/logistics/logisticsInfo";
99   - import handleInfo from "@/views/office/handle/handleInfo";
100   - import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
101   - import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
102   - import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo";
103   -
104   -
105   - export default {
106   - name: "taskHistory",
107   - components: {
108   - taskCard,
109   - threestepInfo,
110   - earthSitesForm,
111   - leaveApplicationInfo,
112   - conferenceInfo,
113   - constructsiteInfo
114   - },
115   - data() {
116   - return {
117   - id: '',
118   - definitionKey: '',
119   - businessKey: '',
120   - // 遮罩层
121   - loading: true,
122   - // 选中数组
123   - ids: [],
124   - // 非单个禁用
125   - single: true,
126   - // 非多个禁用
127   - multiple: true,
128   - // 显示搜索条件
129   - showSearch: true,
130   - // 总条数
131   - total: 0,
132   - // 请假表格数据
133   - taskList: [],
134   - // 弹出层标题
135   - title: "",
136   - // 是否显示弹出层
137   - open: false,
138   - // 查询参数
139   - queryParams: {
140   - pageNum: 1,
141   - pageSize: 10,
142   - },
143   -
144   - open2:false,
145   - // 表单参数
146   - form: {
147   - formData: []
148   - },
149   - needShow:false,
150   - // 表单校验
151   - rules: {},
152   -
153   - uploadImageDialog: false,
154   - conferenceOpen: false,
155   - construct:false,
156   - idInfo:null,
157   - leaveApplicationOpen:false,
158   - signData:null,
159   - earthsites:false,
160   - contract:false,
161   - };
162   - },
163   - created() {
164   - this.getList();
165   - },
166   - methods: {
167   - /** 查询请假列表 */
168   - getList() {
169   - this.loading = true;
170   - listEndTask(this.queryParams).then(response => {
171   - this.taskList = response.rows;
172   - this.total = response.total;
173   - this.loading = false;
174   - });
175   - },
176   -
177   - // 取消按钮
178   - cancel() {
179   - this.open = false;
180   - this.reset();
181   - },
182   - // 表单重置
183   - reset() {
184   - this.definitionKey = '',
185   - this.businessKey = '',
186   - this.form = {
187   - formData: [],
188   - };
189   - this.resetForm("form");
190   - },
191   - showTask(row) {
192   -
193   - this.needShow = false;
194   - this.reset();
195   - this.definitionKey = row.definitionKey;
196   - this.businessKey = row.businessKey;
197   - this.id = row.id;
198   -
199   - this.title = "详情";
200   -
201   - if(this.definitionKey == "conference"){
202   - this.idInfo = row.businessKey.substring(row.businessKey.indexOf(":")+1);
203   - this.conferenceOpen = true;
204   - return;
205   - }
206   - if(this.definitionKey == "workflow_leave"){
207   - this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":")+1);
208   - this.leaveApplicationOpen = true;
209   - return;
210   - }
211   -
212   - if(this.definitionKey == "workflow_constructsite"){
213   - getSignByObjId(this.businessKey.split(":")[1]).then(res=>{
214   - this.signData = res;
215   - this.construct = true;
216   - });
217   - return;
218   - }
219   - if(this.definitionKey == "workflow_earthsites"){
220   - this.earthsites = true;
221   - return;
222   - }
223   - if(this.definitionKey == "workflow_conract"){
224   - this.contract = true;
225   - return;
226   - }
227   -
228   -
229   - if(this.definitionKey == "workflow_threestep"){
230   - this.open2 = true;
231   - return;
232   - }
233   -
234   - if (this.definitionKey == "logistics") {
235   - this.idInfo = row.businessKey.substring(row.businessKey.lastIndexOf(":") + 1);
236   - this.logisticsInfoOpen = true;
237   - return;
238   - }
239   - if (this.definitionKey == "handleAffairs" || this.definitionKey == "gongwenchuli" || this.definitionKey == "yuelan" || this.definitionKey=="yuelanxuexi") {
240   - this.controlId = this.form.formData[0].controlId;
241   - this.idInfo = row.businessKey.split(":")[1];
242   - this.handleAffairsInfoOpen = true;
243   - return;
244   - }
245   - if(this.definitionKey == "workflow_caseoffline"){
246   - this.caseOffline = true;
247   - return;
248   - }
249   -
250   - if(this.definitionKey == "workflow_casefile"){
251   - this.violationCaseFile = true;
252   - return;
253   - }
254 6  
255   - if(this.definitionKey == "violation_warning"){
256   - this.violationCaseFile1 = true;
257   - return;
258   - }
  7 +import history from "@/views/activiti/taskhistory/index";
259 8  
  9 + export default {
  10 + name: "historyend",
  11 + components: {
  12 + history
  13 + },
  14 + }
260 15  
261   - },
262   - }
263   - };
264 16 </script>
... ...
trash-ui/src/views/activiti/taskhistory/index.vue
... ... @@ -69,15 +69,18 @@
69 69 <el-dialog :title="title" :visible.sync="violationCaseFile1" width="850px" append-to-body :close-on-click-modal="false">
70 70 <violationWarningInformationInfo :idInfo="businessKey" v-if="violationCaseFile1"/>
71 71 </el-dialog>
  72 +
  73 + <el-dialog :title="title" :visible.sync="supervisionOpen" width="700px" append-to-body :close-on-click-modal="false">
  74 + <supervisionInfo :infoData="supervisionData"/>
  75 + </el-dialog>
72 76 </div>
73 77 </template>
74 78  
75   -<style>
76   - @import '../../../assets/css/task.css'
77   -</style>
  79 +
78 80  
79 81 <script>
80 82 import {
  83 + listEndTask,
81 84 listTask,
82 85 formDataShow
83 86 } from "@/api/activiti/taskhistory";
... ... @@ -96,18 +99,31 @@
96 99 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
97 100 import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
98 101 import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo";
  102 + import supervisionInfo from "../task/SupervisionInfo";
99 103  
100 104  
101 105  
102 106 export default {
103 107 name: "taskHistory",
  108 + props: {
  109 + type: {
  110 + type: Number
  111 + }
  112 + },
104 113 components: {
105 114 taskCard,
106   - leaveHistoryForm,
107 115 threestepInfo,
108   - leaveApplicationInfo,
109 116 conferenceInfo,
  117 + leaveApplicationInfo,
  118 + logisticsInfo,
  119 + handleInfo,
110 120 constructsiteInfo,
  121 + earthsitesInfo,
  122 + contractInfo,
  123 + caseOfflineInfo,
  124 + violationCaseFileInfo,
  125 + violationWarningInformationInfo,
  126 + supervisionInfo
111 127 },
112 128 data() {
113 129 return {
... ... @@ -163,16 +179,38 @@
163 179 /** 查询请假列表 */
164 180 getList() {
165 181 this.loading = true;
166   - listTask(this.queryParams).then(response => {
167   - this.taskList = response.rows;
168   - this.total = response.total;
169   - this.loading = false;
170   - });
  182 + if(this.type == 1){
  183 + listEndTask(this.queryParams).then(response => {
  184 + this.taskList = response.rows;
  185 + this.total = response.total;
  186 + this.loading = false;
  187 + });
  188 + }else{
  189 + listTask(this.queryParams).then(response => {
  190 + this.taskList = response.rows;
  191 + this.total = response.total;
  192 + this.loading = false;
  193 + });
  194 + }
171 195 },
172 196  
173 197 // 取消按钮
174 198 cancel() {
175 199 this.open = false;
  200 +
  201 + this.earthsites=false;
  202 + this.contract=false;
  203 + this.logisticsInfoOpen=false;
  204 + this.handleAffairsInfoOpen=false;
  205 + this.caseOffline=false;
  206 + this.violationCaseFile=false;
  207 + this.violationCaseFile1=false;
  208 + this.supervisionOpen=false;
  209 + this.open=false;
  210 + this.open2=false;
  211 + this.conferenceOpen=false;
  212 + this.construct=false;
  213 + this.leaveApplicationOpen=false;
176 214 this.reset();
177 215 },
178 216 // 表单重置
... ... @@ -253,6 +291,21 @@
253 291 return;
254 292 }
255 293  
  294 + if(this.definitionKey.indexOf("supervision")>-1){
  295 + const params = {
  296 + id: row.businessKey.split(":")[1],
  297 + }
  298 + getSupervision(params).then(res=>{
  299 + if(res.result==null){
  300 + this.$message.error("获取纪检督察详情失败!请重试")
  301 + return;
  302 + }
  303 + this.supervisionData = res.result;
  304 + this.supervisionOpen = true;
  305 + })
  306 + return;
  307 + }
  308 +
256 309  
257 310 },
258 311 /** 提交按钮 */
... ... @@ -266,3 +319,7 @@
266 319 }
267 320 };
268 321 </script>
  322 +
  323 +<style>
  324 + @import '../../../assets/css/task.css'
  325 +</style>
... ...
trash-ui/src/views/business/threestep/index.vue
... ... @@ -331,806 +331,5 @@
331 331  
332 332 </template>
333 333  
334   -<script>
335   - import {
336   - listThreestep,
337   - getThreestep,
338   - delThreestep,
339   - addThreestep,
340   - updateThreestep,
341   - exportThreestep,
342   - getNames
343   - } from "@/api/business/threestep";
344 334  
345   - import threestepInfo from "@/views/business/threestep/threestepInfo";
346   -
347   - import {
348   - Upload
349   - } from "element-ui";
350   - import {
351   - getToken
352   - } from "@/utils/auth";
353   -
354   - import {
355   - earthsitesList,
356   - constructionsitesList,
357   - getDict,
358   - getArea,
359   - mainworkcompany,
360   - truckList,
361   - companyList,
362   - contractList,
363   - getConstructionTruck,
364   - } from "@/api/dict";
365   -
366   - export default {
367   - name: "Threestep",
368   - components: {
369   - threestepInfo
370   - },
371   - data() {
372   - return {
373   - // 遮罩层
374   - loading: true,
375   - reUpdate : false,
376   - info: false,
377   - infoData: null,
378   - businessKey:null,
379   - picSample: false,
380   - uploadImageDialog: false,
381   - // 选中数组
382   - ids: [],
383   - // 非单个禁用
384   - single: true,
385   - // 非多个禁用
386   - multiple: true,
387   - // 显示搜索条件
388   - showSearch: true,
389   - // 总条数
390   - total: 0,
391   - // 报工自查表格数据
392   - names:[],
393   - threestepList: [],
394   - fileList: [],
395   - companyList:[],
396   - truckList:[],
397   - contractList:[],
398   - // 弹出层标题
399   - title: "",
400   - labelName: "工地名称",
401   - labelName2: "绑定消纳场",
402   - upload: {
403   - // 是否显示弹出层(用户导入)
404   - open: false,
405   - // 弹出层标题(用户导入)
406   - title: "",
407   - // 是否禁用上传
408   - isUploading: false,
409   - // 设置上传的请求头部
410   - headers: {
411   - Authorization: "Bearer " + getToken()
412   - },
413   - // 上传的地址
414   - url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
415   - },
416   - // 是否显示弹出层
417   - open: false,
418   - // 查询参数
419   - queryParams: {
420   - pageStatus:0,//当前处于哪一个tag
421   - pageNum: 1,
422   - pageSize: 10,
423   - name: null,
424   - type: null,
425   - place: null,
426   - selfCheckTime: null,
427   - objectId: null,
428   - earthsitesId: null,
429   - checkTime: null,
430   - earthsitesName: null,
431   - contract: null,
432   - companys: null,
433   - companyTrucks: null,
434   - status:null,
435   - workStartTime:null,
436   - workEndTime:null,
437   - },
438   - // 表单参数
439   - form: {
440   - companys:null,
441   - companyTrucks:null,
442   -
443   - },
444   - picIndex: null,
445   - // 表单校验
446   - rules: {
447   - name: [{
448   - required: true,
449   - message: '请填写完整',
450   - trigger: 'change'
451   - }, ],
452   - contract: [{
453   - required: true,
454   - message: '请填写完整',
455   - trigger: 'change'
456   - }, ],
457   - objectId: [{
458   - required: true,
459   - message: '请填写完整',
460   - trigger: 'change'
461   - }, ],
462   - type: [{
463   - required: true,
464   - message: '请填写完整',
465   - trigger: 'change'
466   - }, ],
467   - place: [{
468   - required: true,
469   - message: '请填写完整',
470   - trigger: 'change'
471   - }, ],
472   - companys: [{
473   - required: false,
474   - message: '请填写完整',
475   - trigger: 'change'
476   - }, ],
477   - companyTrucks: [{
478   - required: false,
479   - message: '请填写完整',
480   - trigger: 'change'
481   - }, ],
482   - objectId: [{
483   - required: true,
484   - message: '请填写完整',
485   - trigger: 'change'
486   - }, ],
487   - person: [{
488   - required: true,
489   - message: '请填写完整',
490   - trigger: 'change'
491   - }, ],
492   - phone: [{
493   - required: true,
494   - message: '请填写完整',
495   - trigger: 'change'
496   - },
497   - {
498   - pattern: /^1(3|4|5|7|8|9)\d{9}$/,
499   - message: '手机号格式错误',
500   - trigger: 'change'
501   - },
502   - ]
503   - },
504   - SiteWorkAreaCodeType: [],
505   - remoteData: [],
506   - remoteQueryData: {
507   - "page": 1,
508   - "size": 9999,
509   - "auditStatus":1,
510   - "creditStatus":0,
511   - },
512   - areas: [],
513   - areaCode: null,
514   - bindData: [],
515   - bindname:null,
516   - info2:false,
517   -
518   - };
519   - },
520   - created() {
521   - getArea().then(res => {
522   - this.areas = res.result;
523   - for(let i =0;i< this.threestepList.length;i++){
524   - this.threestepList[i].place = this.getAreaName(this.threestepList[i].place);
525   - }
526   - });
527   -
528   - this.getList(0);
529   -
530   - },
531   - methods: {
532   - conractCheck(value){
533   - let item
534   - for(let i in this.contractList){
535   - if(this.contractList[i].contractNo == value){
536   - item = this.contractList[i];
537   - break;
538   - }
539   - }
540   -
541   -
542   - if(new Date(item.endTime).getTime() < new Date().getTime()){
543   - this.form.contract = null;
544   - this.$message("合同已过期");
545   - return;
546   - }
547   - if(new Date(item.startTime).getTime() > new Date().getTime()){
548   - this.form.contract = null;
549   - this.$message("合同未生效");
550   - return;
551   - }
552   -
553   - if(this.form.type == 0){
554   - this.form.name = item.constructionSiteName;
555   - this.form.objectId = item.constructionSiteID;
556   - this.form.earthsitesName = item.earthSiteName;
557   - this.form.earthsitesId = item.earthSiteID;
558   - }else{
559   - this.form.earthsitesName = item.constructionSiteName;
560   - this.form.earthsitesId = item.constructionSiteID;
561   - this.form.name = item.earthSiteName;
562   - this.form.objectId = item.earthSiteID;
563   - }
564   -
565   - for(let i =0;i<this.remoteData.length ;i++){
566   -
567   - if(this.remoteData[i].name == this.form.name){
568   - this.form.place = Number(this.remoteData[i].areaCode);
569   - break;
570   - }
571   - }
572   -
573   - this.form.contractId = item.id;
574   - this.bindname = this.form.earthsitesName;
575   - },
576   - checkCompany(item){
577   -
578   - let arr = [];
579   -
580   - for(var i in this.form.companyTrucks){
581   - let truck = this.form.companyTrucks[i];
582   - for(let j in this.truckList){
583   - if(truck == this.truckList[j].id && item.indexOf(this.truckList[j].companyName) > -1){
584   - arr.push(truck)
585   - break;
586   - }
587   - }
588   - }
589   -
590   - this.form.companyTrucks = arr;
591   - // for(let i = 0;)
592   -
593   - // let arr = [];
594   - // for(var i in this.form.companyTrucks){
595   - // if(this.form.companys.indexOf(this.form.companyTrucks[i]) > -1){
596   - // arr.push(this.form.companyTrucks[i]);
597   - // }
598   - // }
599   -
600   - // this.form.companyTrucks = arr;
601   - },
602   -
603   - areaClear() {
604   - this.areaCode = null;
605   - },
606   - selectArea(a) {
607   - this.areaCode = a;
608   - this.form.name = "";
609   - },
610   - getObjId(value) {
611   - let item;
612   - for(let i in this.remoteData){
613   - if(this.remoteData[i].name == value){
614   - item = this.remoteData[i];
615   - break;
616   - }
617   - }
618   - this.form.earthsitesName = null;
619   - this.form.earthsitesId = null;
620   - this.form.contract = null;
621   - this.form.contractId = null;
622   - this.bindname = null;
623   -
624   -
625   -
626   - this.form.objectId = item.id;
627   - this.form.place = Number(item.areaCode);
628   - this.filterConract();
629   -
630   - if(this.form.type == 0){
631   - let query = {
632   - 'page':1,
633   - 'size':9999,
634   - }
635   -
636   - this.companyList = [];
637   - this.truckList = [];
638   -
639   - mainworkcompany(item.id).then(response => {
640   -
641   - this.companyList.push({id:item.transportCompanyId , name: item.transportCompany});
642   -
643   - let query = {
644   - 'page':1,
645   - 'size':9999,
646   - 'dishonestState':0,
647   - 'valid':0
648   - }
649   -
650   - let ids = [];
651   -
652   - ids.push(item.transportCompanyId);
653   -
654   - query.companyID = ids +"";
655   - query.valid = 0;
656   -
657   - getConstructionTruck(item.id).then(res=>{
658   - for(let i in res.result){
659   - this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName});
660   - query.companyID += "," + res.result[i].companyId;
661   - }
662   -
663   - truckList(query).then(res=>{
664   - this.truckList = res.result.list;
665   - });
666   - });
667   - });
668   - }
669   -
670   - },
671   - filterConract(){
672   - let cId;
673   - let eId;
674   - if(this.form.type == 0){
675   - cId = this.form.objectId;
676   - eId = this.form.earthsitesId;
677   - }else{
678   - cId = this.form.earthsitesId;
679   - eId = this.form.objectId;
680   - }
681   -
682   - this.filterContract = [];
683   - for(let i in this.contractList){
684   - let obj = this.contractList[i];
685   - let canId = true;
686   -
687   -
688   - //constructionSiteID //earthSiteID
689   - if(cId && cId != obj.constructionSiteID){
690   - continue;
691   - }
692   -
693   - if(eId && eId != obj.earthSiteID){
694   - continue;
695   - }
696   -
697   - this.filterContract.push(obj);
698   - }
699   -
700   -
701   - for(let j in this.bindData){
702   -
703   - this.bindData[j].show = false;
704   -
705   - for(let i in this.filterContract){
706   -
707   - if(this.form.type == 0 && this.filterContract[i].earthSiteID == this.bindData[j].id){
708   - this.bindData[j].show = true;
709   - }
710   -
711   - if(this.form.type == 1 && this.filterContract[i].constructionSiteID == this.bindData[j].id){
712   - this.bindData[j].show = true;
713   - }
714   -
715   - }
716   - }
717   - },
718   - getEarthsiteId(value) {
719   -
720   - this.form.name = null;
721   - this.form.objectId = null;
722   - this.form.contract = null;
723   - this.form.contractId = null;
724   - this.name = null;
725   -
726   -
727   - let item;
728   - for(let i in this.bindData){
729   - if(this.bindDate[i].name == value){
730   - item = this.bindDate[i];
731   - break;
732   - }
733   - }
734   -
735   -
736   - this.form.earthsitesName = item.name;
737   - this.form.earthsitesId = item.id;
738   - this.filterConract();
739   - },
740   - downloadFile(path) {
741   - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
742   - },
743   - removeImage(index, img) {
744   - let target = "img" + index;
745   - this.form[target].splice(this.form[target].indexOf(img), 1);
746   - this.$forceUpdate();
747   -
748   - },
749   - removeAttchItem(index, img) {
750   - let target = "attchItem" + index;
751   - this.form[target].splice(this.form[target].indexOf(img), 1);
752   - this.$forceUpdate();
753   - },
754   -
755   - uploadSuccess(res, file, fileList) {
756   - if(res.code){
757   - this.$message(res.message);
758   - return;
759   - }
760   - if(this.picIndex > 90){
761   - let target = "attchItem" + (this.picIndex-90);
762   - if (!this.form[target]) {
763   - this.form[target] = [];
764   - }
765   - this.form[target].push(res);
766   - return;
767   - }
768   - let target = "img" + this.picIndex;
769   -
770   - if (!this.form[target]) {
771   - this.form[target] = [];
772   - }
773   -
774   - this.form[target].push(res);
775   -
776   - },
777   - showFileUpload(i) {
778   - this.uploadImageDialog = true;
779   - this.picIndex = i;
780   - },
781   - beforeUpload(file) {
782   - let isRightSize = file.size / 1024 / 1024 < 20
783   - if (!isRightSize) {
784   - this.$message.error('文件大小超过 20MB')
785   - return isRightSize;
786   - }
787   - let isAccept = false;
788   - if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file
789   - .name.indexOf('.pdf') > -1) {
790   - isAccept = true;
791   - }
792   - if (!isAccept) {
793   - this.$message.error('应该选择PDF、JPG、WORD类型的文件')
794   - return isAccept;
795   - }
796   -
797   - },
798   - handleClose() {
799   - this.uploadImageDialog = false;
800   - this.fileList = [];
801   - },
802   - selectType(value) {
803   -
804   - this.rules.companys[0].required = false;
805   - this.rules.companyTrucks[0].required = false;
806   - if (value == "0") {
807   - this.labelName = "工地名称";
808   - this.labelName2 = "绑定消纳场";
809   -
810   - } else {
811   - this.labelName = "消纳场名称";
812   - this.labelName2 = "绑定工地";
813   - }
814   -
815   - this.form.name = null;
816   - this.bindname = null;
817   - constructionsitesList(this.remoteQueryData).then(res => {
818   - if (value == 0) {
819   - this.remoteData = res.result.list;
820   - } else {
821   - this.bindData = res.result.list;
822   -
823   - for(let i in this.bindData){
824   - this.bindData[i].show = true;
825   - }
826   - }
827   - });
828   -
829   - earthsitesList(this.remoteQueryData).then(res => {
830   - if (value == 0) {
831   - this.bindData = res.result.list;
832   - for(let i in this.bindData){
833   - this.bindData[i].show = true;
834   - }
835   - this.rules.companys[0].required = true;
836   - this.rules.companyTrucks[0].required = true;
837   - } else {
838   - this.remoteData = res.result.list;
839   - }
840   - });
841   - },
842   -
843   - getAreaName(code){
844   - for(let i =0;i<this.areas.length;i++){
845   - if(Number(code) == this.areas[i].code){
846   - return this.areas[i].name;
847   - break;
848   - }
849   - }
850   - return code;
851   - },
852   -
853   - /** 查询报工自查列表 */
854   - getList(tabIdx) {
855   - if(tabIdx == 1){
856   - this.resetQuery();
857   - this.queryParams.pageStatus = tabIdx;
858   - this.queryParams.status = tabIdx;
859   -
860   - getNames(this.queryParams).then(res=>{
861   -
862   - this.names = res;
863   - })
864   -
865   - }else if(tabIdx == 0){
866   - this.resetQuery();
867   - this.queryParams.pageStatus = tabIdx;
868   - this.queryParams.status = null;
869   -
870   - getNames(this.queryParams).then(res=>{
871   -
872   - this.names = res;
873   - })
874   - }
875   -
876   - let query = {
877   - "page": 1,
878   - "size": 9999,
879   - "auditStatus":1,
880   - };
881   -
882   - contractList(query).then(res=>{
883   - this.contractList = res.result.list;
884   - this.filterContract = this.contractList
885   - });
886   -
887   - this.loading = true;
888   - listThreestep(this.queryParams).then(response => {
889   - this.threestepList = response.rows;
890   - this.total = response.total;
891   - this.loading = false;
892   - for(let i =0;i< this.threestepList.length;i++){
893   - this.threestepList[i].place = this.getAreaName(this.threestepList[i].place);
894   - }
895   - });
896   - },
897   - // 取消按钮
898   - cancel() {
899   - this.open = false;
900   - this.reset();
901   - },
902   - // 表单重置
903   - reset() {
904   - this.form = {
905   - id: null,
906   - name: null,
907   - type: null,
908   - place: null,
909   - selfCheckTime: null,
910   - objectId: null,
911   - earthsitesId: null,
912   - createTime: null,
913   - checkTime: null,
914   - earthsitesName: null,
915   - contract: null,
916   - companys: null,
917   - companyTrucks: null,
918   - img0: null,
919   - img1: null,
920   - img2: null,
921   - img3: null,
922   - img4: null,
923   - img5: null,
924   - img6: null,
925   - img7: null,
926   - img8: null,
927   - img9: null,
928   - img10: null,
929   - img11: null,
930   - img12: null,
931   - person: null,
932   - phone: null
933   - };
934   - this.resetForm("form");
935   - this.filterConract();
936   - },
937   - /** 搜索按钮操作 */
938   - handleQuery() {
939   - this.queryParams.pageNum = 1;
940   - this.getList();
941   - },
942   - /** 重置按钮操作 */
943   - resetQuery() {
944   - this.resetForm("queryForm");
945   - this.queryParams.workStartTime = null;
946   - this.queryParams.workEndTime = null;
947   - this.handleQuery();
948   - },
949   - // 多选框选中数据
950   - handleSelectionChange(selection) {
951   - this.ids = selection.map(item => item.id)
952   - this.single = selection.length !== 1
953   - this.multiple = !selection.length
954   - },
955   - /** 新增按钮操作 */
956   - handleAdd() {
957   - this.reset();
958   - this.open = true;
959   - this.title = "报工自查";
960   - },
961   - /** 修改按钮操作 */
962   - handleUpdate(row,idx) {
963   - this.reset();
964   - this.businessKey = row.id +"";
965   - if(idx == 0){
966   - this.info = true;
967   - }else{
968   - this.info2 = true;
969   - }
970   - },
971   - reSub(row){
972   - this.reset();
973   -
974   - this.open = true;
975   - this.title = "再次提交";
976   - getThreestep(row.id).then(res=>{
977   - this.form = res.data;
978   - this.form.type = this.form.type + "";
979   - this.form.place = Number(this.form.place);
980   - this.bindname = res.data.earthsitesName;
981   - if(res.data.companys){
982   - this.form.companys = res.data.companys.split(",");
983   - }
984   - if(res.data.companyTrucks){
985   - this.form.companyTrucks = res.data.companyTrucks.split(",");
986   - }
987   - for (let i = 0; i < 13; i++) {
988   - if (this.form["img" + i]) {
989   - this.form["img" + i] = this.form["img" + i].split(",");
990   - }
991   - }
992   - });
993   - },
994   -
995   - checkEndSuccess(){
996   -
997   - let year = new Date().getFullYear();
998   - let month = (new Date().getMonth() + 1) < 10 ? "0" + (new Date().getMonth() + 1) : (new Date().getMonth() + 1);
999   - let date = new Date().getDate() < 10 ? "0" + new Date().getDate() : new Date().getDate();
1000   - let hour = new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours();
1001   - let minute = new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes();
1002   - let second = new Date().getSeconds() < 10 ? "0" + new Date().getSeconds() : new Date().getSeconds();
1003   -
1004   -
1005   - this.form.checkEndTime = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
1006   - this.form.id = this.businessKey;
1007   - for (let i = 1; i < 4; i++) {
1008   - if (this.form["attchItem" + i]) {
1009   - this.form["attchItem" + i] = this.form["attchItem" + i] + "";
1010   - }
1011   - }
1012   - this.submitForm();
1013   - },
1014   - checkEndError(){
1015   - this.$router.push({path:"/other/caseOffline/" ,query:{businessKey:this.businessKey}});
1016   - //发起案卷
1017   - },
1018   - /** 提交按钮 */
1019   - submitForm() {
1020   -
1021   - this.$refs["form"].validate(valid => {
1022   - if (valid) {
1023   - this.loading = true;
1024   - if (this.form.id != null) {
1025   - if(this.queryParams.pageStatus==1){
1026   - updateThreestep(this.form).then(response => {
1027   - this.msgSuccess("提交成功");
1028   - this.open = false;
1029   - this.open2 = false;
1030   - this.info = false;
1031   - this.info2 =false;
1032   - this.getList();
1033   - this.loading = false;
1034   - },error=>{
1035   - this.loading = false;
1036   - this.form.companys = this.form.companys.split(",");
1037   - this.form.companyTrucks = this.form.companyTrucks.split(",");
1038   -
1039   - for (let i = 0; i < 13; i++) {
1040   - if (this.form["img" + i]) {
1041   - this.form["img" + i] = this.form["img" + i].split(",");
1042   - }
1043   - }
1044   - });
1045   - }else{
1046   - this.form.companys = this.form.companys + "";
1047   - this.form.companyTrucks = this.form.companyTrucks + "";
1048   -
1049   - for (let i = 0; i < 13; i++) {
1050   - if (this.form["img" + i]) {
1051   - this.form["img" + i] = this.form["img" + i] + "";
1052   - }
1053   - }
1054   -
1055   - addThreestep(this.form).then(response => {
1056   - this.msgSuccess("修改成功");
1057   - this.open = false;
1058   - this.open2 = false;
1059   - this.info = false;
1060   - this.info2 =false;
1061   - this.getList();
1062   - this.loading = false;
1063   - },error=>{
1064   - this.loading = false;
1065   - this.form.companys = this.form.companys.split(",");
1066   - this.form.companyTrucks = this.form.companyTrucks.split(",");
1067   -
1068   - for (let i = 0; i < 13; i++) {
1069   - if (this.form["img" + i]) {
1070   - this.form["img" + i] = this.form["img" + i].split(",");
1071   - }
1072   - }
1073   - });
1074   - }
1075   -
1076   -
1077   -
1078   - } else {
1079   - this.form.companys = this.form.companys + "";
1080   - this.form.companyTrucks = this.form.companyTrucks + "";
1081   -
1082   - for (let i = 0; i < 13; i++) {
1083   - if (this.form["img" + i]) {
1084   - this.form["img" + i] = this.form["img" + i] + "";
1085   - }
1086   - }
1087   - addThreestep(this.form).then(response => {
1088   - this.msgSuccess("新增成功");
1089   - this.open = false;
1090   - this.open2 = false;
1091   - this.getList();
1092   - },error=>{
1093   - this.loading = false;
1094   - this.form.companys = this.form.companys.split(",");
1095   - this.form.companyTrucks = this.form.companyTrucks.split(",");
1096   -
1097   - for (let i = 0; i < 13; i++) {
1098   - if (this.form["img" + i]) {
1099   - this.form["img" + i] = this.form["img" + i].split(",");
1100   - }
1101   - }
1102   - })
1103   - }
1104   - }
1105   - });
1106   - },
1107   - /** 删除按钮操作 */
1108   - handleDelete(row) {
1109   - const ids = row.id || this.ids;
1110   - this.$confirm('是否确认删除报工自查编号为"' + ids + '"的数据项?', "警告", {
1111   - confirmButtonText: "确定",
1112   - cancelButtonText: "取消",
1113   - type: "warning"
1114   - }).then(function() {
1115   - return delThreestep(ids);
1116   - }).then(() => {
1117   - this.getList();
1118   - this.msgSuccess("删除成功");
1119   - })
1120   - },
1121   - /** 导出按钮操作 */
1122   - handleExport() {
1123   - const queryParams = this.queryParams;
1124   - this.$confirm('是否确认导出所有报工数据项?', "警告", {
1125   - confirmButtonText: "确定",
1126   - cancelButtonText: "取消",
1127   - type: "warning"
1128   - }).then(function() {
1129   - return exportThreestep(queryParams);
1130   - }).then(response => {
1131   - this.download(response.message);
1132   - })
1133   - }
1134   - }
1135   - };
1136   -</script>
  335 +<script src="../../../api/three_step.js" />
... ...
trash-ui/src/views/business/truckActivate/index.vue
... ... @@ -121,300 +121,4 @@
121 121 </div>
122 122 </template>
123 123  
124   -<script>
125   -import { listTruckActivate, getTruckActivate, delTruckActivate, addTruckActivate, updateTruckActivate, exportTruckActivate } from "@/api/business/truckActivate";
126   -
127   -
128   -
129   -
130   - import {
131   - todayDataList,
132   - } from "@/api/business/threestep";
133   -
134   -import {
135   - mainworkcompany,
136   - getConstructionTruck,
137   - constructionById,
138   - truckList
139   -} from "@/api/dict";
140   -
141   -export default {
142   - name: "TruckActivate",
143   - data() {
144   - return {
145   - // 遮罩层
146   - loading: true,
147   - // 选中数组
148   - ids: [],
149   - // 非单个禁用
150   - single: true,
151   - // 非多个禁用
152   - multiple: true,
153   - // 显示搜索条件
154   - showSearch: true,
155   - // 总条数
156   - total: 0,
157   - // 车辆激活表格数据
158   - truckActivateList: [],
159   - // 弹出层标题
160   - title: "",
161   - // 是否显示弹出层
162   - open: false,
163   - companyList:[],
164   - // 查询参数
165   - queryParams: {
166   - pageNum: 1,
167   - pageSize: 10,
168   - company: null,
169   - licensePlate: null,
170   - time: null,
171   - construction: null,
172   - status: null,
173   - earthsite: null,
174   - objectId: null,
175   - createType: null,
176   - activateTime: null,
177   - activateDate:null,
178   - },
179   - // 表单参数
180   - form: {},
181   - // 表单校验
182   - rules: {
183   - construction: [{
184   - required: true,
185   - message: '请填写完整',
186   - trigger: 'change'
187   - }, ],
188   -
189   - company: [{
190   - required: true,
191   - message: '请填写完整',
192   - trigger: 'change'
193   - }, ],
194   -
195   -
196   - licensePlate: [{
197   - required: true,
198   - message: '请填写完整',
199   - trigger: 'change'
200   - }, ],
201   - },
202   - constList:[],
203   - truckList:[],
204   -
205   - construction : null,
206   - truck : null,
207   - company:null,
208   - openActivateTime:false,
209   - isLoading:false,
210   - };
211   - },
212   - created() {
213   - this.getList(0);
214   - },
215   - methods: {
216   - /** 查询车辆激活列表 */
217   - getList(index) {
218   - if(index == 0){
219   - this.queryParams.status = "0";
220   - this.openActivateTime = false;
221   - this.queryParams.activateDate = null;
222   - }
223   - if(index == 1){
224   - this.openActivateTime = true;
225   - this.queryParams.status = "1";
226   - }
227   - this.loading = true;
228   - listTruckActivate(this.queryParams).then(response => {
229   - this.truckActivateList = response.rows;
230   - this.total = response.total;
231   - this.loading = false;
232   - });
233   -
234   - let data = {
235   - type : 0,
236   - status:1,
237   - }
238   -
239   - todayDataList(data).then(res=>{
240   - this.constList = res;
241   - });
242   -
243   - },
244   - getCompany(value){
245   - let obj;
246   -
247   - for(let i in this.constList){
248   - if(this.constList[i].name == value){
249   - this.construction = this.constList[i];
250   - obj = this.construction;
251   - }
252   - }
253   -
254   -
255   - this.companyList = [];
256   - this.truckList = [];
257   -
258   - constructionById(obj.objectId).then(res=>{
259   -
260   -
261   - this.companyList.push({id:res.result.transportCompanyId , name: res.result.transportCompany});
262   -
263   - mainworkcompany(obj.objectId).then(response => {
264   -
265   - let query = {
266   - 'page':1,
267   - 'size':9999,
268   - 'dishonestState':0
269   - }
270   -
271   - let ids = [];
272   -
273   - ids.push(res.result.transportCompanyId);
274   -
275   - query.companyID = ids + "";
276   - query.valid = 0;
277   -
278   - getConstructionTruck(obj.objectId).then(res=>{
279   - for(let i in res.result){
280   -
281   - this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName});
282   - query.companyID += "," + res.result[i].companyId;
283   - }
284   -
285   - truckList(query).then(res=>{
286   - this.truckList = res.result.list;
287   - });
288   - });
289   - });
290   -
291   -
292   - })
293   -
294   -
295   - },
296   - getTruck(truck){
297   - this.truck = truck;
298   - },
299   - // 取消按钮
300   - cancel() {
301   - this.open = false;
302   - this.reset();
303   - },
304   - // 表单重置
305   - reset() {
306   - this.form = {
307   - id: null,
308   - company: null,
309   - licensePlate: null,
310   - time: null,
311   - construction: null,
312   - status: 0,
313   - earthsite: null,
314   - objectId: null,
315   - createBy: null,
316   - createType: null,
317   - activateTime: null,
318   - createTime: null
319   - };
320   - this.resetForm("form");
321   - },
322   - /** 搜索按钮操作 */
323   - handleQuery() {
324   - this.queryParams.pageNum = 1;
325   - this.getList();
326   - },
327   - /** 重置按钮操作 */
328   - resetQuery() {
329   - this.resetForm("queryForm");
330   - this.handleQuery();
331   - },
332   - // 多选框选中数据
333   - handleSelectionChange(selection) {
334   - this.ids = selection.map(item => item.id)
335   - this.single = selection.length!==1
336   - this.multiple = !selection.length
337   - },
338   - /** 新增按钮操作 */
339   - handleAdd() {
340   - this.reset();
341   - this.open = true;
342   - this.title = "添加车辆激活";
343   - },
344   - /** 修改按钮操作 */
345   - handleUpdate(row) {
346   - this.reset();
347   - this.form.id = row.id;
348   - updateTruckActivate(this.form).then(response => {
349   - this.msgSuccess("修改成功");
350   - this.open = false;
351   - this.getList();
352   - });
353   -
354   - },
355   - /** 提交按钮 */
356   - submitForm() {
357   - this.$refs["form"].validate(valid => {
358   - if (valid) {
359   -
360   - for(var i in this.form.licensePlate){
361   - for(let j in this.truckList){
362   - if(this.form.licensePlate[i] == this.truckList[j].id){
363   -
364   - let data = {
365   - objectId:this.form.licensePlate[i],
366   - licensePlate:this.truckList[j].licenseplateNo,
367   - construction:this.construction.name,
368   - earthsite : this.construction.earthsitesName,
369   - status : 0,
370   - company:this.form.company,
371   - }
372   -
373   -
374   - addTruckActivate(data).then(response => {
375   - this.msgSuccess("新增成功");
376   - this.open = false;
377   - this.getList();
378   - });
379   -
380   -
381   - }
382   - }
383   - }
384   -
385   -
386   -
387   -
388   - }
389   - });
390   - },
391   - /** 删除按钮操作 */
392   - handleDelete(row) {
393   - const ids = row.id || this.ids;
394   - this.$confirm('是否确认删除车辆激活编号为"' + ids + '"的数据项?', "警告", {
395   - confirmButtonText: "确定",
396   - cancelButtonText: "取消",
397   - type: "warning"
398   - }).then(function() {
399   - return delTruckActivate(ids);
400   - }).then(() => {
401   - this.getList();
402   - this.msgSuccess("删除成功");
403   - })
404   - },
405   - /** 导出按钮操作 */
406   - handleExport() {
407   - const queryParams = this.queryParams;
408   - this.$confirm('是否确认导出所有车辆激活数据项?', "警告", {
409   - confirmButtonText: "确定",
410   - cancelButtonText: "取消",
411   - type: "warning"
412   - }).then(function() {
413   - return exportTruckActivate(queryParams);
414   - }).then(response => {
415   - this.download(response.message);
416   - })
417   - }
418   - }
419   -};
420   -</script>
  124 +<script src="../../../api/truck_active.js" />
... ...
trash-ui/src/views/h5/taskhistory/index.vue
... ... @@ -195,17 +195,19 @@
195 195  
196 196 // 取消按钮
197 197 cancel() {
198   - this.open = false;
199   - this.leaveApplicationOpen = false;
200   - this.conferenceOpen = false;
201   - this.construct = false;
202   - this.logisticsInfoOpen = false;
203   - this.handleAffairsInfoOpen = false;
204 198 this.earthsites=false;
205 199 this.contract=false;
  200 + this.logisticsInfoOpen=false;
  201 + this.handleAffairsInfoOpen=false;
206 202 this.caseOffline=false;
207 203 this.violationCaseFile=false;
208 204 this.violationCaseFile1=false;
  205 + this.supervisionOpen=false;
  206 + this.open=false;
  207 + this.open2=false;
  208 + this.conferenceOpen=false;
  209 + this.construct=false;
  210 + this.leaveApplicationOpen=false;
209 211 this.reset();
210 212 },
211 213 // 表单重置
... ...
trash-ui/src/views/h5/threestep/index.vue
... ... @@ -67,12 +67,10 @@
67 67 </el-col>
68 68 </el-row>
69 69  
70   - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)" v-hasPermi="['business:threestep:edit']" v-if="queryParams.pageStatus==1 && item.status==1">抽查
71   - </el-button>
  70 + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item,0)" v-hasPermi="['business:threestep:edit']" v-if="queryParams.pageStatus==1 && item.status==1 && item.checkEndTime == null">抽查</el-button>
  71 + <el-button size="mini" type="text" icon="el-icon-edit" @click="reSub(item)" v-hasPermi="['business:threestep:add']" v-if="item.status==2">被驳回</el-button>
72 72  
73   - <el-button size="mini" type="text" icon="el-icon-edit" @click="reSub(item)" v-hasPermi="['business:threestep:add']" v-if="item.status==2">被驳回</el-button>
74   -
75   - <el-button size="mini" type="text" @click="handleUpdate(item)" v-hasPermi="['business:threestep:edit']">查看详情</el-button>
  73 + <el-button size="mini" type="text" @click="handleUpdate(item,1)" v-hasPermi="['business:threestep:edit']">查看详情</el-button>
76 74  
77 75 </el-card>
78 76  
... ... @@ -96,30 +94,29 @@
96 94 </el-select>
97 95 </el-form-item>
98 96 <el-form-item :label="labelName" prop="name" v-if="form.type!=null">
99   - <el-select v-model="form.name" filterable reserve-keyword>
100   - <el-option @click.native="getObjId(item)" v-for="item in remoteData" :label="item.name"
  97 + <el-select v-model="form.name" filterable reserve-keyword @change="getObjId">
  98 + <el-option v-for="item in remoteData" :label="item.name"
101 99 :value="item.name" :key="item.id" v-if="!form.place || item.areaCode == form.place">
102 100 </el-option>
103 101 </el-select>
104 102 </el-form-item>
105 103  
106 104 <el-form-item :label="labelName2" prop="place" v-if="form.type!=null">
107   - <el-select v-model="bindname" filterable reserve-keyword >
108   - <el-option @click.native="getEarthsiteId(item)"
109   - v-if="item.show"
110   - v-for="item in bindData"
111   - :label="item.name"
112   - :value="item.name"
113   - :key="item.id">
114   - </el-option>
115   - </el-select>
  105 + <el-select v-model="bindname" filterable reserve-keyword @change="getEarthsiteId">
  106 + <el-option v-if="item.show"
  107 + v-for="item in bindData"
  108 + :label="item.name"
  109 + :value="item.name"
  110 + :key="item.id">
  111 + </el-option>
  112 + </el-select>
116 113 </el-form-item>
117 114  
118 115 <el-form-item label="消纳合同" prop="contract" v-if="form.type!=null">
119   - <el-select v-model="form.contract" filterable reserve-keyword>
120   - <el-option @click.native="conractCheck(item)" v-for="item in filterContract" :label="item.contractNo" :value="item.contractNo" :key="item.id">
121   - </el-option>
122   - </el-select>
  116 + <el-select v-model="form.contract" filterable reserve-keyword @change="conractCheck">
  117 + <el-option v-for="item in filterContract" :label="item.contractNo" :value="item.contractNo" :key="item.id">
  118 + </el-option>
  119 + </el-select>
123 120 </el-form-item>
124 121  
125 122 <el-form-item label="运输企业" prop="companys" v-if="form.type==0">
... ... @@ -242,7 +239,7 @@
242 239  
243 240  
244 241 <el-dialog title="查看详情" width="400px" append-to-body :visible.sync="info" >
245   - <threestepInfo :businessKey="businessKey" v-if="info"/>
  242 + <h5Info :businessKey="businessKey" v-if="info"/>
246 243  
247 244 <el-form ref="form" :model="form" :rules="rules" label-width="100px" v-if="this.queryParams.pageStatus==1">
248 245 <el-form-item label="补充说明">
... ... @@ -268,6 +265,8 @@
268 265 </el-row>
269 266 </el-form>
270 267  
  268 +
  269 +
271 270 <div slot="footer" class="dialog-footer">
272 271 <el-button type="primary" @click="checkEndSuccess()" v-if="this.queryParams.pageStatus==1">抽查通过</el-button>
273 272 <el-button type="danger" @click="checkEndError()" v-if="this.queryParams.pageStatus==1">异常</el-button>
... ... @@ -275,6 +274,11 @@
275 274 </div>
276 275 </el-dialog>
277 276  
  277 + <el-dialog title="查看详情" width="400px" append-to-body :visible.sync="info2" >
  278 + <h5Info :businessKey="businessKey" v-if="info2"/>
  279 +
  280 + </el-dialog>
  281 +
278 282 <el-dialog title="附件" :visible.sync="uploadImageDialog" append-to-body :beforeClose="handleClose" width="330px">
279 283 <el-upload multiple :headers="upload.headers" :action="upload.url" :file-list="fileList"
280 284 :on-success="uploadSuccess" :before-upload="beforeUpload">
... ... @@ -294,830 +298,9 @@
294 298 </template>
295 299  
296 300 <script>
297   - import {
298   - listThreestep,
299   - getThreestep,
300   - delThreestep,
301   - addThreestep,
302   - updateThreestep,
303   - exportThreestep,
304   - getNames
305   - } from "@/api/business/threestep";
306   -
307   - import threestepInfo from "@/views/h5/task/threestepInfo";
308   -
309   - import {
310   - Upload
311   - } from "element-ui";
312   - import {
313   - getToken
314   - } from "@/utils/auth";
315   -
316   - import {
317   - earthsitesList,
318   - constructionsitesList,
319   - getDict,
320   - getArea,
321   - mainworkcompany,
322   - truckList,
323   - companyList,
324   - contractList,
325   - getConstructionTruck,
326   - } from "@/api/dict";
327   -
328   -
329   - import pagination from '../Pagination';
330   -
331   - export default {
332   - name: "Threestep",
333   - components: {
334   - threestepInfo,
335   - pagination
336   - },
337   - data() {
338   - return {
339   - // 遮罩层
340   - loading: true,
341   - reUpdate : false,
342   - info: false,
343   - infoData: null,
344   - businessKey:null,
345   - picSample: false,
346   - uploadImageDialog: false,
347   - // 选中数组
348   - ids: [],
349   - // 非单个禁用
350   - single: true,
351   - // 非多个禁用
352   - multiple: true,
353   - // 显示搜索条件
354   - showSearch: true,
355   - // 总条数
356   - total: 0,
357   - // 报工自查表格数据
358   - names:[],
359   - threestepList: [],
360   - fileList: [],
361   - companyList:[],
362   - truckList:[],
363   - contractList:[],
364   - // 弹出层标题
365   - title: "",
366   - labelName: "工地名称",
367   - labelName2: "绑定消纳场",
368   - upload: {
369   - // 是否显示弹出层(用户导入)
370   - open: false,
371   - // 弹出层标题(用户导入)
372   - title: "",
373   - // 是否禁用上传
374   - isUploading: false,
375   - // 设置上传的请求头部
376   - headers: {
377   - Authorization: "Bearer " + getToken()
378   - },
379   - // 上传的地址
380   - url: process.env.VUE_APP_BASE_API + "/business/threestep/upload",
381   - },
382   - // 是否显示弹出层
383   - open: false,
384   - // 查询参数
385   - queryParams: {
386   - pageStatus:0,//当前处于哪一个tag
387   - pageNum: 1,
388   - pageSize: 10,
389   - name: null,
390   - type: null,
391   - place: null,
392   - selfCheckTime: null,
393   - objectId: null,
394   - earthsitesId: null,
395   - checkTime: null,
396   - earthsitesName: null,
397   - contract: null,
398   - companys: null,
399   - companyTrucks: null,
400   - status:null,
401   - workStartTime:null,
402   - workEndTime:null,
403   - },
404   - // 表单参数
405   - form: {
406   - companys:null,
407   - companyTrucks:null,
408   -
409   - },
410   - picIndex: null,
411   - // 表单校验
412   - rules: {
413   - name: [{
414   - required: true,
415   - message: '请填写完整',
416   - trigger: 'change'
417   - }, ],
418   - contract: [{
419   - required: true,
420   - message: '请填写完整',
421   - trigger: 'change'
422   - }, ],
423   - objectId: [{
424   - required: true,
425   - message: '请填写完整',
426   - trigger: 'change'
427   - }, ],
428   - type: [{
429   - required: true,
430   - message: '请填写完整',
431   - trigger: 'change'
432   - }, ],
433   - place: [{
434   - required: true,
435   - message: '请填写完整',
436   - trigger: 'change'
437   - }, ],
438   - companys: [{
439   - required: false,
440   - message: '请填写完整',
441   - trigger: 'change'
442   - }, ],
443   - companyTrucks: [{
444   - required: false,
445   - message: '请填写完整',
446   - trigger: 'change'
447   - }, ],
448   - objectId: [{
449   - required: true,
450   - message: '请填写完整',
451   - trigger: 'change'
452   - }, ],
453   - person: [{
454   - required: true,
455   - message: '请填写完整',
456   - trigger: 'change'
457   - }, ],
458   - phone: [{
459   - required: true,
460   - message: '请填写完整',
461   - trigger: 'change'
462   - },
463   - {
464   - pattern: /^1(3|4|5|7|8|9)\d{9}$/,
465   - message: '手机号格式错误',
466   - trigger: 'change'
467   - },
468   - ]
469   - },
470   - SiteWorkAreaCodeType: [],
471   - remoteData: [],
472   - remoteQueryData: {
473   - "page": 1,
474   - "size": 9999,
475   - "auditStatus":1,
476   - "creditStatus":0,
477   - },
478   - areas: [],
479   - areaCode: null,
480   - bindData: [],
481   - bindname:null,
482   -
483   - };
484   - },
485   - created() {
486   -
487   - if(window.location.search){
488   - let arr = window.location.search.split("&");
489   - this.queryParams.pageStatus = arr[0].split("=")[1];
490   - }
491   -
492   -
493   -
494   - getArea().then(res => {
495   - this.areas = res.result;
496   - for(let i =0;i< this.threestepList.length;i++){
497   - this.threestepList[i].place = this.getAreaName(this.threestepList[i].place);
498   - }
499   - });
500   -
501   - let query = {
502   - 'page':1,
503   - 'size':9999,
504   - }
505   -
506   - companyList(query).then(response => {
507   -
508   - let companys = response.result.list;
509   - this.companyList = companys;
510   - let ids = [];
511   -
512   - for(let i = 0 ;i<companys.length;i++){
513   - ids.push(companys[i].id);
514   - }
515   - query.companyID = ids + "";
516   - query.valid = 0;
517   -
518   - truckList(query).then(res=>{
519   - this.truckList = res.result.list;
520   - });
521   - });
522   -
523   - if(this.queryParams.pageStatus ==0){
524   -
525   - this.getList(0);
526   - }else{
527   -
528   - this.getList(1);
529   - }
530   -
531   - },
532   - methods: {
533   - conractCheck(item){
534   - if(new Date(item.endTime).getTime() < new Date().getTime()){
535   - this.form.contract = null;
536   - this.$message("合同已过期");
537   - return;
538   - }
539   - if(new Date(item.startTime).getTime() > new Date().getTime()){
540   - this.form.contract = null;
541   - this.$message("合同未生效");
542   - return;
543   - }
544   -
545   - if(this.form.type == 0){
546   - this.form.name = item.constructionSiteName;
547   - this.form.objectId = item.constructionSiteID;
548   - this.form.earthsitesName = item.earthSiteName;
549   - this.form.earthsitesId = item.earthSiteID;
550   - }else{
551   - this.form.earthsitesName = item.constructionSiteName;
552   - this.form.earthsitesId = item.constructionSiteID;
553   - this.form.name = item.earthSiteName;
554   - this.form.objectId = item.earthSiteID;
555   - }
556   -
557   - for(let i =0;i<this.remoteData.length ;i++){
558   -
559   - if(this.remoteData[i].name == this.form.name){
560   - this.form.place = Number(this.remoteData[i].areaCode);
561   - break;
562   - }
563   - }
564   -
565   - this.form.contractId = item.id;
566   - this.bindname = this.form.earthsitesName;
567   - },
568   - checkCompany(item){
569   -
570   - let arr = [];
571   -
572   - for(var i in this.form.companyTrucks){
573   - let truck = this.form.companyTrucks[i];
574   - for(let j in this.truckList){
575   - if(truck == this.truckList[j].id && item.indexOf(this.truckList[j].companyName) > -1){
576   - arr.push(truck)
577   - break;
578   - }
579   - }
580   - }
581   -
582   - this.form.companyTrucks = arr;
583   - // for(let i = 0;)
584   -
585   - // let arr = [];
586   - // for(var i in this.form.companyTrucks){
587   - // if(this.form.companys.indexOf(this.form.companyTrucks[i]) > -1){
588   - // arr.push(this.form.companyTrucks[i]);
589   - // }
590   - // }
591   -
592   - // this.form.companyTrucks = arr;
593   - },
594   -
595   - areaClear() {
596   - this.areaCode = null;
597   - },
598   - selectArea(a) {
599   - this.areaCode = a;
600   - this.form.name = "";
601   - },
602   - getObjId(item) {
603   - this.form.objectId = item.id;
604   - this.form.place = Number(item.areaCode);
605   - this.filterConract();
606   -
607   - if(this.form.type == 0){
608   - let query = {
609   - 'page':1,
610   - 'size':9999,
611   - }
612   -
613   -
614   -
615   - // mainworkcompany(item.id).then(response => {
616   -
617   - // let companys = response.result.list;
618   - // this.companyList = companys;
619   - // let ids = [];
620   -
621   - // for(let i = 0 ;i<companys.length;i++){
622   - // ids.push(companys[i].id);
623   - // }
624   -
625   - // let query = {
626   - // 'page':1,
627   - // 'size':9999,
628   - // 'creditStatus':0
629   - // }
630   -
631   - // query.companyID = ids + "";
632   - // query.valid = 0;
633   -
634   - // getConstructionTruck(item.id).then(res=>{
635   - // for(let i in res.result){
636   -
637   - // this.companyList.push({id:res.result[i].companyId , name: res.result[i].companyName});
638   -
639   - // ids.push(res.result[i].companyId);
640   -
641   - // truckList(query).then(res=>{
642   - // this.truckList = res.result.list;
643   - // });
644   -
645   - // }
646   - // });
647   -
648   -
649   - // });
650   -
651   -
652   - }
653   -
654   - },
655   - filterConract(){
656   - let cId;
657   - let eId;
658   - if(this.form.type == 0){
659   - cId = this.form.objectId;
660   - eId = this.form.earthsitesId;
661   - }else{
662   - cId = this.form.earthsitesId;
663   - eId = this.form.objectId;
664   - }
665   - this.filterContract = [];
666   - for(let i in this.contractList){
667 301  
668   - let obj = this.contractList[i];
669   - let canId = true;
  302 +import pagination from '../Pagination';
670 303  
671   - if(!cId && !eId){
672   - this.filterContract = this.contractList;
673   - return;
674   - }
675   -
676   - //constructionSiteID //earthSiteID
677   - if(cId && cId != obj.constructionSiteID){
678   - continue;
679   - }
680   -
681   - if(eId && eId != obj.earthSiteID){
682   - continue;
683   - }
684   -
685   - this.filterContract.push(obj);
686   - }
687   -
688   -
689   - for(let j in this.bindData){
690   -
691   - this.bindData[j].show = false;
692   -
693   - for(let i in this.filterContract){
694   -
695   - if(this.form.type == 0 && this.filterContract[i].earthSiteID == this.bindData[j].id){
696   - this.bindData[j].show = true;
697   - }
698   -
699   - if(this.form.type == 1 && this.filterContract[i].constructionSiteID == this.bindData[j].id){
700   - this.bindData[j].show = true;
701   - }
702   -
703   - }
704   - }
705   - },
706   - getEarthsiteId(item) {
707   - this.form.earthsitesName = item.name;
708   - this.form.earthsitesId = item.id;
709   - this.filterConract();
710   - },
711   - downloadFile(path) {
712   - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
713   - },
714   - removeImage(index, img) {
715   - let target = "img" + index;
716   - this.form[target].splice(this.form[target].indexOf(img), 1);
717   - this.$forceUpdate();
718   -
719   - },
720   - removeAttchItem(index, img) {
721   - let target = "attchItem" + index;
722   - this.form[target].splice(this.form[target].indexOf(img), 1);
723   - this.$forceUpdate();
724   - },
725   -
726   - uploadSuccess(res, file, fileList) {
727   - if(res.code){
728   - this.$message(res.message);
729   - return;
730   - }
731   - if(this.picIndex > 90){
732   - let target = "attchItem" + (this.picIndex-90);
733   - if (!this.form[target]) {
734   - this.form[target] = [];
735   - }
736   - this.form[target].push(res);
737   - return;
738   - }
739   - let target = "img" + this.picIndex;
740   -
741   - if (!this.form[target]) {
742   - this.form[target] = [];
743   - }
744   -
745   - this.form[target].push(res);
746   -
747   - },
748   - showFileUpload(i) {
749   - this.uploadImageDialog = true;
750   - this.picIndex = i;
751   - },
752   - beforeUpload(file) {
753   - let isRightSize = file.size / 1024 / 1024 < 20
754   - if (!isRightSize) {
755   - this.$message.error('文件大小超过 20MB')
756   - return isRightSize;
757   - }
758   - let isAccept = false;
759   - if (file.name.indexOf('.docx') > -1 || file.name.indexOf(".jpg") > -1 || file.name.indexOf('.doc') > -1 || file
760   - .name.indexOf('.pdf') > -1) {
761   - isAccept = true;
762   - }
763   - if (!isAccept) {
764   - this.$message.error('应该选择PDF、JPG、WORD类型的文件')
765   - return isAccept;
766   - }
767   -
768   - },
769   - handleClose() {
770   - this.uploadImageDialog = false;
771   - this.fileList = [];
772   - },
773   - selectType(value) {
774   -
775   - this.rules.companys[0].required = false;
776   - this.rules.companyTrucks[0].required = false;
777   - if (value == "0") {
778   - this.labelName = "工地名称";
779   - this.labelName2 = "绑定消纳场";
780   -
781   - } else {
782   - this.labelName = "消纳场名称";
783   - this.labelName2 = "绑定工地";
784   - }
785   -
786   - this.form.name = null;
787   - this.bindname = null;
788   - constructionsitesList(this.remoteQueryData).then(res => {
789   - if (value == 0) {
790   - this.remoteData = res.result.list;
791   - } else {
792   - this.bindData = res.result.list;
793   -
794   - for(let i in this.bindData){
795   - this.bindData[i].show = true;
796   - }
797   - }
798   - });
799   -
800   - earthsitesList(this.remoteQueryData).then(res => {
801   - if (value == 0) {
802   - this.bindData = res.result.list;
803   - for(let i in this.bindData){
804   - this.bindData[i].show = true;
805   - }
806   - this.rules.companys[0].required = true;
807   - this.rules.companyTrucks[0].required = true;
808   - } else {
809   - this.remoteData = res.result.list;
810   - }
811   - });
812   -
813   -
814   - },
815   -
816   - getAreaName(code){
817   - for(let i =0;i<this.areas.length;i++){
818   - if(Number(code) == this.areas[i].code){
819   - return this.areas[i].name;
820   - break;
821   - }
822   - }
823   - return code;
824   - },
825   -
826   - /** 查询报工自查列表 */
827   - getList(tabIdx) {
828   - if(tabIdx == 1){
829   - this.resetQuery();
830   - this.queryParams.pageStatus = tabIdx;
831   - this.queryParams.status = tabIdx;
832   -
833   - getNames(this.queryParams).then(res=>{
834   -
835   - this.names = res;
836   - })
837   -
838   - }else if(tabIdx == 0){
839   - this.resetQuery();
840   - this.queryParams.pageStatus = tabIdx;
841   - this.queryParams.status = null;
842   -
843   - getNames(this.queryParams).then(res=>{
844   -
845   - this.names = res;
846   - })
847   - }
848   -
849   - let query = {
850   - "page": 1,
851   - "size": 9999,
852   - "auditStatus":1,
853   - };
854   -
855   - contractList(query).then(res=>{
856   - this.contractList = res.result.list;
857   - this.filterContract = this.contractList
858   - });
859   -
860   - this.loading = true;
861   - listThreestep(this.queryParams).then(response => {
862   - this.threestepList = response.rows;
863   - this.total = response.total;
864   - this.loading = false;
865   - for(let i =0;i< this.threestepList.length;i++){
866   - this.threestepList[i].place = this.getAreaName(this.threestepList[i].place);
867   - }
868   - });
869   -
870   -
871   - companyList(query).then(response => {
872   -
873   - let companys = response.result.list;
874   - this.companyList = companys;
875   - let ids = [];
876   -
877   - for(let i = 0 ;i<companys.length;i++){
878   - ids.push(companys[i].id);
879   - }
880   - query.companyID = ids + "";
881   - query.valid = 0;
882   -
883   - truckList(query).then(res=>{
884   - this.truckList = res.result.list;
885   - });
886   - });
887   -
888   -
889   - },
890   - // 取消按钮
891   - cancel() {
892   - this.open = false;
893   - this.reset();
894   - },
895   - // 表单重置
896   - reset() {
897   - this.form = {
898   - id: null,
899   - name: null,
900   - type: null,
901   - place: null,
902   - selfCheckTime: null,
903   - objectId: null,
904   - earthsitesId: null,
905   - createTime: null,
906   - checkTime: null,
907   - earthsitesName: null,
908   - contract: null,
909   - companys: null,
910   - companyTrucks: null,
911   - img0: null,
912   - img1: null,
913   - img2: null,
914   - img3: null,
915   - img4: null,
916   - img5: null,
917   - img6: null,
918   - img7: null,
919   - img8: null,
920   - img9: null,
921   - img10: null,
922   - img11: null,
923   - img12: null,
924   - person: null,
925   - phone: null
926   - };
927   - this.resetForm("form");
928   - this.filterConract();
929   - },
930   - /** 搜索按钮操作 */
931   - handleQuery() {
932   - this.queryParams.pageNum = 1;
933   - this.getList();
934   - },
935   - /** 重置按钮操作 */
936   - resetQuery() {
937   - this.resetForm("queryForm");
938   - this.queryParams.workStartTime = null;
939   - this.queryParams.workEndTime = null;
940   - this.handleQuery();
941   - },
942   - // 多选框选中数据
943   - handleSelectionChange(selection) {
944   - this.ids = selection.map(item => item.id)
945   - this.single = selection.length !== 1
946   - this.multiple = !selection.length
947   - },
948   - /** 新增按钮操作 */
949   - handleAdd() {
950   - this.reset();
951   - this.open = true;
952   - this.title = "报工自查";
953   - },
954   - /** 修改按钮操作 */
955   - handleUpdate(row) {
956   - this.reset();
957   - this.businessKey = row.id +"";
958   - this.info = true;
959   - },
960   - reSub(row){
961   - this.reset();
962   -
963   - this.open = true;
964   - this.title = "再次提交";
965   - getThreestep(row.id).then(res=>{
966   - this.form = res.data;
967   - this.form.type = this.form.type + "";
968   - this.form.place = Number(this.form.place);
969   - this.bindname = res.data.earthsitesName;
970   - if(res.data.companys){
971   - this.form.companys = res.data.companys.split(",");
972   - }
973   - if(res.data.companyTrucks){
974   - this.form.companyTrucks = res.data.companyTrucks.split(",");
975   - }
976   - for (let i = 0; i < 13; i++) {
977   - if (this.form["img" + i]) {
978   - this.form["img" + i] = this.form["img" + i].split(",");
979   - }
980   - }
981   - });
982   - },
983   -
984   - checkEndSuccess(){
985   -
986   - let year = new Date().getFullYear();
987   - let month = (new Date().getMonth() + 1) < 10 ? "0" + (new Date().getMonth() + 1) : (new Date().getMonth() + 1);
988   - let date = new Date().getDate() < 10 ? "0" + new Date().getDate() : new Date().getDate();
989   - let hour = new Date().getHours() < 10 ? "0" + new Date().getHours() : new Date().getHours();
990   - let minute = new Date().getMinutes() < 10 ? "0" + new Date().getMinutes() : new Date().getMinutes();
991   - let second = new Date().getSeconds() < 10 ? "0" + new Date().getSeconds() : new Date().getSeconds();
992   -
993   -
994   - this.form.checkEndTime = year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
995   - this.form.id = this.businessKey;
996   - for (let i = 1; i < 4; i++) {
997   - if (this.form["attchItem" + i]) {
998   - this.form["attchItem" + i] = this.form["attchItem" + i] + "";
999   - }
1000   - }
1001   - this.submitForm();
1002   - },
1003   - checkEndError(){
1004   - this.$router.push({path:"/other/caseOffline/" ,query:{businessKey:this.businessKey}});
1005   - //发起案卷
1006   - },
1007   - /** 提交按钮 */
1008   - submitForm() {
1009   -
1010   - this.$refs["form"].validate(valid => {
1011   - if (valid) {
1012   - this.loading = true;
1013   - if (this.form.id != null) {
1014   - if(this.queryParams.pageStatus==1){
1015   - updateThreestep(this.form).then(response => {
1016   - this.msgSuccess("提交成功");
1017   - this.open = false;
1018   - this.open2 = false;
1019   - this.info = false;
1020   - this.getList();
1021   - this.loading = false;
1022   - },error=>{
1023   - this.loading = false;
1024   - this.form.companys = this.form.companys.split(",");
1025   - this.form.companyTrucks = this.form.companyTrucks.split(",");
1026   -
1027   - for (let i = 0; i < 13; i++) {
1028   - if (this.form["img" + i]) {
1029   - this.form["img" + i] = this.form["img" + i].split(",");
1030   - }
1031   - }
1032   - });
1033   - }else{
1034   - this.form.companys = this.form.companys + "";
1035   - this.form.companyTrucks = this.form.companyTrucks + "";
1036   -
1037   - for (let i = 0; i < 13; i++) {
1038   - if (this.form["img" + i]) {
1039   - this.form["img" + i] = this.form["img" + i] + "";
1040   - }
1041   - }
1042   -
1043   - addThreestep(this.form).then(response => {
1044   - this.msgSuccess("修改成功");
1045   - this.open = false;
1046   - this.open2 = false;
1047   - this.info = false;
1048   - this.getList();
1049   - this.loading = false;
1050   - },error=>{
1051   - this.loading = false;
1052   - this.form.companys = this.form.companys.split(",");
1053   - this.form.companyTrucks = this.form.companyTrucks.split(",");
1054   -
1055   - for (let i = 0; i < 13; i++) {
1056   - if (this.form["img" + i]) {
1057   - this.form["img" + i] = this.form["img" + i].split(",");
1058   - }
1059   - }
1060   - });
1061   - }
1062   -
1063   -
1064   -
1065   - } else {
1066   - this.form.companys = this.form.companys + "";
1067   - this.form.companyTrucks = this.form.companyTrucks + "";
1068   -
1069   - for (let i = 0; i < 13; i++) {
1070   - if (this.form["img" + i]) {
1071   - this.form["img" + i] = this.form["img" + i] + "";
1072   - }
1073   - }
1074   - addThreestep(this.form).then(response => {
1075   - this.msgSuccess("新增成功");
1076   - this.open = false;
1077   - this.open2 = false;
1078   - this.getList();
1079   - },error=>{
1080   - this.loading = false;
1081   - this.form.companys = this.form.companys.split(",");
1082   - this.form.companyTrucks = this.form.companyTrucks.split(",");
1083   -
1084   - for (let i = 0; i < 13; i++) {
1085   - if (this.form["img" + i]) {
1086   - this.form["img" + i] = this.form["img" + i].split(",");
1087   - }
1088   - }
1089   - })
1090   - }
1091   - }
1092   - });
1093   - },
1094   - /** 删除按钮操作 */
1095   - handleDelete(row) {
1096   - const ids = row.id || this.ids;
1097   - this.$confirm('是否确认删除报工自查编号为"' + ids + '"的数据项?', "警告", {
1098   - confirmButtonText: "确定",
1099   - cancelButtonText: "取消",
1100   - type: "warning"
1101   - }).then(function() {
1102   - return delThreestep(ids);
1103   - }).then(() => {
1104   - this.getList();
1105   - this.msgSuccess("删除成功");
1106   - })
1107   - },
1108   - /** 导出按钮操作 */
1109   - handleExport() {
1110   - const queryParams = this.queryParams;
1111   - this.$confirm('是否确认导出所有报工数据项?', "警告", {
1112   - confirmButtonText: "确定",
1113   - cancelButtonText: "取消",
1114   - type: "warning"
1115   - }).then(function() {
1116   - return exportThreestep(queryParams);
1117   - }).then(response => {
1118   - this.download(response.message);
1119   - })
1120   - }
1121   - }
1122   - };
1123 304 </script>
  305 +
  306 +<script src="../../../api/three_step.js" />
... ...
trash-ui/src/views/h5/truckActivate/index.vue
... ... @@ -135,260 +135,9 @@
135 135 </template>
136 136  
137 137 <script>
138   -import { listTruckActivate, getTruckActivate, delTruckActivate, addTruckActivate, updateTruckActivate, exportTruckActivate } from "@/api/business/truckActivate";
139   -
140   - import {
141   - todayDataList,
142   - } from "@/api/business/threestep";
143 138  
144 139 import pagination from '../Pagination';
145   -
146   -import {
147   - truckList,
148   - companyList,
149   -} from "@/api/dict";
150   -
151   -export default {
152   - name: "TruckActivate",
153   - components: {pagination},
154   - data() {
155   - return {
156   - // 遮罩层
157   - loading: true,
158   - // 选中数组
159   - ids: [],
160   - // 非单个禁用
161   - single: true,
162   - // 非多个禁用
163   - multiple: true,
164   - // 显示搜索条件
165   - showSearch: true,
166   - // 总条数
167   - total: 0,
168   - // 车辆激活表格数据
169   - truckActivateList: [],
170   - // 弹出层标题
171   - title: "",
172   - // 是否显示弹出层
173   - open: false,
174   - companyList:[],
175   - // 查询参数
176   - queryParams: {
177   - pageNum: 1,
178   - pageSize: 10,
179   - company: null,
180   - licensePlate: null,
181   - time: null,
182   - construction: null,
183   - status: null,
184   - earthsite: null,
185   - objectId: null,
186   - createType: null,
187   - activateTime: null,
188   - },
189   - // 表单参数
190   - form: {},
191   - // 表单校验
192   - rules: {
193   - construction: [{
194   - required: true,
195   - message: '请填写完整',
196   - trigger: 'change'
197   - }, ],
198   -
199   - company: [{
200   - required: true,
201   - message: '请填写完整',
202   - trigger: 'change'
203   - }, ],
204   -
205   -
206   - licensePlate: [{
207   - required: true,
208   - message: '请填写完整',
209   - trigger: 'change'
210   - }, ],
211   - },
212   - constList:[],
213   - constCompany:[],
214   - companyTruckList:[],
215   -
216   - construction : null,
217   - truck : null,
218   - company:null,
219   - };
220   - },
221   - created() {
222   - this.getList(0);
223   - },
224   - methods: {
225   - /** 查询车辆激活列表 */
226   - getList(index) {
227   - if(index == 0){
228   - this.queryParams.status = 0;
229   - }
230   - if(index == 1){
231   - this.queryParams.status = 1;
232   - }
233   - this.loading = true;
234   - listTruckActivate(this.queryParams).then(response => {
235   - this.truckActivateList = response.rows;
236   - this.total = response.total;
237   - this.loading = false;
238   - });
239   -
240   - let query = {
241   - 'page':1,
242   - 'size':9999,
243   - 'creditStatus':0
244   - }
245   - companyList(query).then(response => {
246   - this.companyList = response.result.list;
247   - });
248   -
249 140  
250   - let data = {
251   - type : 0,
252   - status:1,
253   - }
254   -
255   - todayDataList(data).then(res=>{
256   - this.constList = res;
257   - });
258   -
259   - },
260   - getCompany(obj){
261   - if(obj.companys){
262   - this.constCompany = obj.companys.split(",");
263   - }
264   - this.form.company = null;
265   - this.construction = obj;
266   - },
267   -
268   - getTruckListByCompanyName(name){
269   - this.form.licensePlate = null;
270   - for(let i in this.companyList){
271   - if(this.companyList[i].name == name){
272   - this.company = this.companyList[i];
273   - let remoteQuery = {
274   - page:1,
275   - size:9999,
276   - companyID:this.companyList[i].id,
277   - valid:0,
278   - dishonestState:0,
279   - }
280   - truckList(remoteQuery).then(res=>{
281   - this.companyTruckList = res.result.list;
282   - });
283   -
284   - break;
285   - }
286   - }
287   - },
288   - getTruck(truck){
289   - this.truck = truck;
290   - },
291   - // 取消按钮
292   - cancel() {
293   - this.open = false;
294   - this.reset();
295   - },
296   - // 表单重置
297   - reset() {
298   - this.form = {
299   - id: null,
300   - company: null,
301   - licensePlate: null,
302   - time: null,
303   - construction: null,
304   - status: 0,
305   - earthsite: null,
306   - objectId: null,
307   - createBy: null,
308   - createType: null,
309   - activateTime: null,
310   - createTime: null
311   - };
312   - this.resetForm("form");
313   - },
314   - /** 搜索按钮操作 */
315   - handleQuery() {
316   - this.queryParams.pageNum = 1;
317   - this.getList();
318   - },
319   - /** 重置按钮操作 */
320   - resetQuery() {
321   - this.resetForm("queryForm");
322   - this.handleQuery();
323   - },
324   - // 多选框选中数据
325   - handleSelectionChange(selection) {
326   - this.ids = selection.map(item => item.id)
327   - this.single = selection.length!==1
328   - this.multiple = !selection.length
329   - },
330   - /** 新增按钮操作 */
331   - handleAdd() {
332   - this.reset();
333   - this.open = true;
334   - this.title = "添加车辆激活";
335   - },
336   - /** 修改按钮操作 */
337   - handleUpdate(row) {
338   - this.reset();
339   - this.form.id = row.id;
340   - updateTruckActivate(this.form).then(response => {
341   - this.msgSuccess("修改成功");
342   - this.open = false;
343   - this.getList();
344   - });
345   -
346   - },
347   - /** 提交按钮 */
348   - submitForm() {
349   - this.$refs["form"].validate(valid => {
350   - if (valid) {
351   - this.form.objectId = this.truck.id;
352   - this.form.company = this.company.name;
353   - this.form.earthsite = this.construction.earthsitesName;
354   - this.form.status = 0;
355   - this.form.activateTime = new Date();
356   -
357   - addTruckActivate(this.form).then(response => {
358   - this.msgSuccess("新增成功");
359   - this.open = false;
360   - this.getList();
361   - });
362   - }
363   - });
364   - },
365   - /** 删除按钮操作 */
366   - handleDelete(row) {
367   - const ids = row.id || this.ids;
368   - this.$confirm('是否确认删除车辆激活编号为"' + ids + '"的数据项?', "警告", {
369   - confirmButtonText: "确定",
370   - cancelButtonText: "取消",
371   - type: "warning"
372   - }).then(function() {
373   - return delTruckActivate(ids);
374   - }).then(() => {
375   - this.getList();
376   - this.msgSuccess("删除成功");
377   - })
378   - },
379   - /** 导出按钮操作 */
380   - handleExport() {
381   - const queryParams = this.queryParams;
382   - this.$confirm('是否确认导出所有车辆激活数据项?', "警告", {
383   - confirmButtonText: "确定",
384   - cancelButtonText: "取消",
385   - type: "warning"
386   - }).then(function() {
387   - return exportTruckActivate(queryParams);
388   - }).then(response => {
389   - this.download(response.message);
390   - })
391   - }
392   - }
393   -};
394 141 </script>
  142 +
  143 +<script src="../../../api/truck_active.js" />
... ...