efcef46573e2f6d058af97d05d59941cc0a6b4ea.svn-base 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. <template>
  2. <el-container v-loading="isLoading">
  3. <el-main style="position: relative">
  4. <el-tabs v-model="activeName" @tab-click="handleClick" class="tabs_wrapper">
  5. <el-tab-pane v-for="(item,index) in tabList" :label="item.label" :name="item.type" :lazy="true">
  6. <el-form :inline="true" size="mini" label-width="84px" class="demo-form-inline report_filter_select">
  7. <el-form-item label="选择年度">
  8. <el-select v-model="addForm.year" @change="changeYear" style="width: 120px;">
  9. <el-option :label="item.pnm" :value="item.id" :key="index"
  10. v-for="(item,index) in yearList"></el-option>
  11. </el-select>
  12. </el-form-item>
  13. <el-form-item label="选择批次">
  14. <el-select v-model="addForm.batch" @change="changeBatch" style="width: 120px;">
  15. <el-option :label="item.pnm" :value="item.id" :key="index" v-for="(item,index) in pcList"></el-option>
  16. </el-select>
  17. </el-form-item>
  18. <el-form-item label="督查组">
  19. <el-select v-model="addForm.group" @change="changeGroup" style="width: 120px;">
  20. <el-option :label="item.pnm" :value="item.id" :key="index"
  21. v-for="(item,index) in groupList"></el-option>
  22. </el-select>
  23. </el-form-item>
  24. <el-form-item label="区/县">
  25. <el-select v-model="addForm.area" @change="changeArea" clearable style="width: 120px;">
  26. <el-option :label="item.pnm" :value="item.adCode" :key="index"
  27. v-for="(item,index) in areaList"></el-option>
  28. </el-select>
  29. </el-form-item>
  30. <el-form-item label="项目名称">
  31. <el-select v-model="addForm.rgstrId" @clear="remove" @change="changeProject" clearable placeholder="请选择"
  32. style="width: 120px;">
  33. <el-option
  34. v-for="item in projectList"
  35. :key="item.id"
  36. :label="item.pnm"
  37. :value="item.id">
  38. </el-option>
  39. </el-select>
  40. </el-form-item>
  41. <el-form-item label="专业">
  42. <el-select v-model="addForm.pblmChType" placeholder="请选择" clearable style="width: 120px;">
  43. <el-option
  44. v-for="item in professionList"
  45. :key="item.value"
  46. :label="item.label"
  47. :value="item.value">
  48. </el-option>
  49. </el-select>
  50. </el-form-item>
  51. </el-form>
  52. <component :is="item.value" :currentNodeId="addForm.rgstrId" :objId="objId" :stepId='item.nowId'
  53. :year="addForm.year" :batch="addForm.batch"
  54. :type="addForm.pblmChType" :groupId="addForm.group" :areaId="addForm.area" :flag="flag"
  55. :backStatus="backStatus" :isShowaddrollback="isShowaddrollback" :isEdit="editable"
  56. :curprvId='curprvId' :curnextId="curnextId" :isRevision="item.isRevision" :isShowRc="item.isShowRc" :label="item.label"
  57. @sendSubmitStatus="sendSubmitStatus" ref="mychild"></component>
  58. </el-tab-pane>
  59. </el-tabs>
  60. <div class="report_btn_group">
  61. <!-- <el-button type="success">生成阶段稿</el-button> -->
  62. <!-- <el-button v-if="activeName != '1'" type="warning" @click="backProfession">驳回</el-button>-->
  63. <!-- <el-button type="success" @click="stageSubmit">{{curStage}}</el-button> -->
  64. <!--经办人可见-->
  65. <!--浙江驳回按钮隐藏-->
  66. <el-button v-if="hasPriv1('pers_hand') && isShowaddrollback && isShowPriv" type="warning" @click="showDialogCallBack">驳回
  67. </el-button>
  68. <el-button v-if="hasPriv1('pers_hand') && isShowaddrollback && !isStopStep && examineStatus && isShowPriv" type="success"
  69. @click="stageSubmit1">
  70. {{curStage}}
  71. </el-button>
  72. <!--审定人驳回后显示-->
  73. <el-button v-if="hasPriv1('pers_hand') && isShowaddrollback && isExamine && sendExamineStatus && isShowPriv" type="danger"
  74. @click="sendExamine">提交审定
  75. </el-button>
  76. <!--审定人可见-->
  77. <el-button v-if="hasPriv1('pers_examine') && isShowaddrollback && isExamine && stageStatus=='0' && isShowPriv" type="danger"
  78. @click="examine">审定
  79. </el-button>
  80. <!--经办人||审定人-->
  81. <el-button v-if="isExamine && isShowPriv" type="primary" @click="examRecord">审定意见</el-button>
  82. <el-button type="primary" @click="showDailyRecord">流程日志</el-button>
  83. </div>
  84. <el-dialog
  85. title="操作日志"
  86. :visible.sync="dailyRecordVisible"
  87. v-if="dailyRecordVisible"
  88. width="80%">
  89. <daily-record :rgstrId="addForm.rgstrId" :professionType="addForm.pblmChType"></daily-record>
  90. </el-dialog>
  91. <el-dialog
  92. title="当前工程阶段审定"
  93. :visible.sync="examVisible"
  94. v-if="examVisible"
  95. @close="dialogClose"
  96. width="80%">
  97. <examine-add :rgstrId="addForm.rgstrId" :planProcessId='planProcessId'
  98. :planProcessName='planProcessName' @dialogClose="dialogClose"></examine-add>
  99. </el-dialog>
  100. <el-dialog
  101. title="当前工程阶段审定意见"
  102. :visible.sync="examRecordVisible"
  103. v-if="examRecordVisible"
  104. @close="dialogClose"
  105. width="80%">
  106. <exam-record-show :rgstrId="addForm.rgstrId" :planProcessId='planProcessId'
  107. :planProcessName='planProcessName'></exam-record-show>
  108. </el-dialog>
  109. <el-dialog
  110. title="驳回说明"
  111. :visible.sync="callbackNoteVisible"
  112. v-if="callbackNoteVisible"
  113. @close="callBackDialogClose"
  114. width="30%">
  115. <span style="display: flex;align-items: center;"><span style="width: 80px;display: block">说明:</span><el-input type="textarea" v-model="callBackNote"></el-input></span>
  116. <span slot="footer" class="dialog-footer">
  117. <el-button @click="callbackNoteVisible = false">取 消</el-button>
  118. <el-button type="primary" @click="backProfession">确 定</el-button>
  119. </span>
  120. </el-dialog>
  121. </el-main>
  122. </el-container>
  123. </template>
  124. <script>
  125. import changeAdvice from './resultDiscuss1'
  126. import resultDiscuss from './resultDiscuss1'
  127. import centerModify from './resultDiscuss1'
  128. import bureauModify from './resultDiscuss1'
  129. import lastModify from './resultDiscuss1'
  130. import dailyRecord from '../dialogCom/dailyRecord';
  131. import examineAdd from '../dialogCom/examineAdd';
  132. import examRecordShow from '../dialogCom/examRecordShow';
  133. import request from "@util/gw_ajax_request"
  134. import {backProfessionApi} from "@api/InspectionReport.js";
  135. export default {
  136. name:"result2",
  137. data() {
  138. return {
  139. isLoading:false,
  140. activeName: '',
  141. tabList: [],
  142. operation: [],
  143. arr: ['changeAdvice',
  144. 'resultDiscuss',
  145. 'centerModify',
  146. 'bureauModify',
  147. 'lastModify',
  148. 'changeAdvice1',
  149. 'resultDiscuss2',
  150. 'centerModify3',
  151. 'bureauModify4',
  152. 'lastModify5',
  153. 'changeAdvice6',
  154. 'resultDiscuss7',
  155. 'centerModify8',
  156. 'bureauModify9',
  157. 'lastModify10',
  158. 'changeAdvice11',
  159. 'resultDiscuss12',
  160. 'centerModify13',
  161. 'bureauModify14',
  162. 'lastModify15'],
  163. curStage: '提交到下一阶段',
  164. addForm: {
  165. year: '',
  166. batch: '',
  167. group: '',
  168. area: '',
  169. rgstrId: '',
  170. pblmChType: "1",
  171. persId: localStorage.getItem("userid")
  172. },
  173. yearList: [],
  174. pcList: [],
  175. groupList: [],
  176. areaList: [],
  177. projectList: [],
  178. professionList: [
  179. {label: '前期与设计', value: '1'},
  180. {label: '建设管理', value: '2'},
  181. {label: '计划下达与执行', value: '3'},
  182. {label: '资金使用与管理', value: '4'},
  183. {label: '工程质量', value: '5'},
  184. {label: '工程安全', value: '6'}
  185. ],
  186. flag: '1',
  187. objId: '',
  188. editable: true,
  189. backStatus: false, //回退状态
  190. dailyRecordVisible: false, //操作日志弹窗
  191. stepId: '',
  192. subjectList: [],
  193. curprvId: '0',
  194. curnextId: '',
  195. isShowaddrollback: false,//当前阶段是否是工程所处阶段
  196. isShowPriv: false,//当前阶段是否是工程所处阶段
  197. isStopStep: false,
  198. examRecordVisible: false,//审定意见
  199. examVisible: false,//审定
  200. planProcessId: "",
  201. planProcessName: "",
  202. isExamine: false,
  203. stageStatus: "",
  204. zjstates: false,
  205. examineStatus: false,//审定通过后提交下一阶段按钮显隐
  206. sendExamineStatus: false,//经办人提交审定按钮显隐
  207. callbackNoteVisible:false,//驳回弹框说明
  208. callBackNote:""//驳回说明
  209. }
  210. },
  211. components: {
  212. changeAdvice: resolve => {
  213. require(['./resultDiscuss1'], resolve)
  214. },
  215. resultDiscuss: resolve => {
  216. require(['./resultDiscuss1'], resolve)
  217. },
  218. centerModify: resolve => {
  219. require(['./resultDiscuss1'], resolve)
  220. },
  221. bureauModify: resolve => {
  222. require(['./resultDiscuss1'], resolve)
  223. },
  224. lastModify: resolve => {
  225. require(['./resultDiscuss1'], resolve)
  226. },
  227. dailyRecord,
  228. changeAdvice1: resolve => {
  229. require(['./resultDiscuss1'], resolve)
  230. },
  231. resultDiscuss2: resolve => {
  232. require(['./resultDiscuss1'], resolve)
  233. },
  234. centerModify3: resolve => {
  235. require(['./resultDiscuss1'], resolve)
  236. },
  237. bureauModify4: resolve => {
  238. require(['./resultDiscuss1'], resolve)
  239. },
  240. lastModify5: resolve => {
  241. require(['./resultDiscuss1'], resolve)
  242. },
  243. changeAdvice6: resolve => {
  244. require(['./resultDiscuss1'], resolve)
  245. },
  246. resultDiscuss7: resolve => {
  247. require(['./resultDiscuss1'], resolve)
  248. },
  249. centerModify8: resolve => {
  250. require(['./resultDiscuss1'], resolve)
  251. },
  252. bureauModify9: resolve => {
  253. require(['./resultDiscuss1'], resolve)
  254. },
  255. lastModify10: resolve => {
  256. require(['./resultDiscuss1'], resolve)
  257. },
  258. changeAdvice11: resolve => {
  259. require(['./resultDiscuss1'], resolve)
  260. },
  261. resultDiscuss1: resolve => {
  262. require(['./resultDiscuss1'], resolve)
  263. },
  264. centerModify13: resolve => {
  265. require(['./resultDiscuss1'], resolve)
  266. },
  267. bureauModify14: resolve => {
  268. require(['./resultDiscuss1'], resolve)
  269. },
  270. lastModify15: resolve => {
  271. require(['./resultDiscuss1'], resolve)
  272. },
  273. examineAdd,
  274. examRecordShow
  275. },
  276. watch: {
  277. 'addForm.rgstrId': {
  278. deep: true,
  279. handler(n, o) {
  280. if (!n && this.addForm.pblmChType) {
  281. this.addForm.rgstrId = o
  282. }
  283. }
  284. }
  285. },
  286. //监听属性 类似于data概念
  287. computed: {
  288. persId() {
  289. return localStorage.getItem("userid")
  290. ? localStorage.getItem("userid")
  291. : "1098101939614724096";
  292. },
  293. currentRlcode(){
  294. return localStorage.getItem("currentRlcode");
  295. }
  296. },
  297. mounted() {
  298. this.$nextTick(() => {
  299. this.getTreeData();
  300. })
  301. },
  302. methods: {
  303. remove() {
  304. if (this.addForm.pblmChType) {
  305. this.$message.warning('请先清空专业名称')
  306. return false;
  307. }
  308. },
  309. async getYearPc() {
  310. await request.post(`/tac/insp/year/list`, {}).then(res => {
  311. if (res.success) {
  312. this.$nextTick(() => {
  313. this.yearList = res.data;
  314. })
  315. }
  316. })
  317. request.post(`/tac/insp/batch/list`, {}).then(res => {
  318. if (res.success) {
  319. this.pcList = res.data;
  320. }
  321. })
  322. },
  323. //稽查流程
  324. getJiprocess() {
  325. var _self = this;
  326. request.post(`/tac/province/plan/process/list`, {}).then(res => {
  327. if (res.success && res.data) {
  328. var tabArr = [];
  329. var opArr = [];
  330. res.data.forEach((ele, index) => {
  331. let obj = {
  332. label: ele['nowStep'],
  333. value: index < 20 ? _self.arr[index] : _self.arr[0],
  334. type: (index + 1) + '',
  335. nowId: ele['nowId'],
  336. isRevision: ele['isRevision'],
  337. isShowRc:false
  338. }
  339. if(this.currentRlcode.indexOf("330000000000")>-1){
  340. if(index==(res.data.length-2)){
  341. obj.isShowRc = true;
  342. }
  343. }else if(ele.nextId=="1" && ele.nextStep=="结束"){
  344. obj.isShowRc = true;
  345. }
  346. tabArr.push(obj);
  347. opArr.push((index + 1)+'');
  348. })
  349. if(this.hasPriv1('rexpert') && this.hasPriv1('cexpert') && this.hasPriv1('supervise')){
  350. this.tabList = tabArr;
  351. this.operation = opArr;
  352. _self.isShowPriv = true;
  353. }else if(!this.hasPriv1('rexpert') && !this.hasPriv1('cexpert') && !this.hasPriv1('supervise')){
  354. this.tabList = [];
  355. this.operation = [];
  356. _self.isShowPriv = false;
  357. }else{
  358. if(this.hasPriv1('rexpert') && !this.hasPriv1('cexpert') && !this.hasPriv1('supervise')){
  359. this.tabList = tabArr.slice(tabArr.length-1,tabArr.length)
  360. this.operation = [];
  361. _self.isShowPriv = false;
  362. }
  363. if(this.hasPriv1('cexpert') && !this.hasPriv1('rexpert') && !this.hasPriv1('supervise')){
  364. this.tabList = tabArr.slice(0,tabArr.length-1)
  365. this.operation = opArr.slice(0,opArr.length-1);
  366. _self.isShowPriv = true;
  367. }
  368. if(this.hasPriv1('supervise') && !this.hasPriv1('rexpert') && !this.hasPriv1('cexpert')){
  369. this.tabList = tabArr
  370. this.operation = opArr.slice(opArr.length-2,opArr.length);
  371. _self.isShowPriv = false;
  372. }
  373. if(this.hasPriv1('rexpert') && this.hasPriv1('cexpert') && !this.hasPriv1('supervise')){
  374. this.tabList = tabArr
  375. this.operation = opArr.slice(0,opArr.length-1);
  376. _self.isShowPriv = true;
  377. }
  378. if(this.hasPriv1('rexpert') && this.hasPriv1('supervise') && !this.hasPriv1('cexpert')){
  379. this.tabList = tabArr
  380. this.operation = opArr.slice(opArr.length-2,opArr.length);
  381. _self.isShowPriv = false;
  382. }
  383. if(this.hasPriv1('supervise') && this.hasPriv1('cexpert') && !this.hasPriv1('rexpert')){
  384. this.tabList = tabArr
  385. this.operation = opArr;
  386. _self.isShowPriv = true;
  387. }
  388. }
  389. _self.activeName = _self.tabList[0].type;
  390. _self.subjectList = res.data
  391. console.log(_self.tabList, 'this.tabList')
  392. _self.planProcessName = _self.subjectList[0]['nowStep'];
  393. _self.planProcessId = _self.subjectList[0]['nowId'];
  394. this.hideOrShow();
  395. this.initTabAll();
  396. this.isLoading = false;
  397. }else{
  398. this.$message.warning("获取阶段信息为空");
  399. }
  400. }).catch((err) => {
  401. this.$message.error(err)
  402. });
  403. },
  404. //获取左侧树数据
  405. getTreeData() {
  406. let _self = this;
  407. this.isLoading = true;
  408. request.post(`/tac/insp/year/batch/obj/getObjTreeListV2`, {
  409. "persId": _self.persId
  410. }).then(res => {
  411. let treeDataLists
  412. treeDataLists = res.data.children;
  413. if(treeDataLists){
  414. this.yearList = treeDataLists;
  415. this.pcList = this.yearList[0].children;
  416. this.groupList = this.pcList[0].children;
  417. this.areaList = this.groupList[0].children;
  418. this.projectList = this.areaList[0].children;
  419. // 赋予默认值
  420. this.addForm.year = this.yearList[0].id
  421. this.addForm.batch = this.pcList[0].id
  422. this.addForm.group = this.groupList[0].id
  423. this.addForm.area = this.areaList[0].adCode
  424. this.addForm.rgstrId = this.projectList[0].id
  425. this.objId = this.projectList[0].objId
  426. this.getJiprocess();
  427. }else{
  428. this.$message.warning("获取查询条件信息失败");
  429. }
  430. }).catch((err) => {
  431. this.$message.error(err)
  432. });
  433. },
  434. changeYear(val) {
  435. this.addForm.batch = ''
  436. this.addForm.rgstrId = ''
  437. this.addForm.group = ''
  438. this.addForm.area = ''
  439. this.yearList.forEach(ele => {
  440. if (val == ele.id) {
  441. this.pcList = ele.children
  442. }
  443. })
  444. },
  445. changeBatch(val) {
  446. this.addForm.rgstrId = ''
  447. this.addForm.group = ''
  448. this.addForm.area = ''
  449. this.pcList.forEach(ele => {
  450. if (val == ele.id) {
  451. this.groupList = ele.children
  452. this.addForm.group = this.groupList[0].id
  453. this.areaList = this.groupList[0].children
  454. this.addForm.area = this.areaList[0].adCode
  455. this.projectList = this.areaList[0].children
  456. this.addForm.rgstrId = this.projectList[0].id
  457. }
  458. })
  459. },
  460. changeGroup(val) {
  461. this.addForm.area = ''
  462. this.addForm.rgstrId = ''
  463. this.groupList.forEach(ele => {
  464. if (val == ele.id) {
  465. this.areaList = ele.children
  466. }
  467. })
  468. },
  469. changeArea(val) {
  470. this.addForm.rgstrId = ''
  471. this.areaList.forEach(ele => {
  472. if (val == ele.adCode) {
  473. this.projectList = ele.children
  474. }
  475. })
  476. },
  477. changeProject(val) {
  478. this.projectList.forEach(ele => {
  479. if (val == ele.id) {
  480. this.objId = ele.objId
  481. this.hideOrShow();
  482. this.initTabAll();
  483. }
  484. })
  485. },
  486. handleClick(data) {
  487. console.log(data);
  488. this.flag = data.name;
  489. this.planProcessName = this.subjectList[parseInt(this.flag) - 1]['nowStep'];
  490. this.planProcessId = this.subjectList[parseInt(this.flag) - 1]['nowId'];
  491. this.hideOrShow();
  492. this.curprvId = this.subjectList[parseInt(this.flag) - 1]['prvId'];
  493. this.curnextId = this.subjectList[parseInt(this.flag) - 1]['nextId'];
  494. this.isShowPriv = false
  495. if(this.operation.indexOf(data.name)>-1){
  496. this.isShowPriv = true
  497. }
  498. this.initTabAll();
  499. // if(this.flag == '1'){
  500. // // this.curStage = '提交到交换意见阶段'
  501. // }else if(this.flag == '2'){
  502. // // this.curStage = '提交到送审阶段'
  503. // }else if(this.flag == '3'){
  504. // // this.curStage = '提交到符合性审查阶段'
  505. // }else if(this.flag == '4'){
  506. // // this.curStage = '提交到稽查办审批阶段'
  507. // }else if(this.flag == '5'){
  508. // this.curStage = '提交'
  509. // }
  510. },
  511. initTabAll(){
  512. if(this.$refs.mychild && this.$refs.mychild.length>0){
  513. for(var i = 0;i<this.$refs.mychild.length;i++){
  514. this.$refs.mychild[i].getProblemList();
  515. }
  516. }
  517. },
  518. stageSubmit1() {
  519. var _self = this;
  520. if (this.addForm.rgstrId) {
  521. if (this.activeName == this.tabList.length) {
  522. this.$message.success('当前阶段为最终阶段,无法提交')
  523. } else {
  524. this.$confirm(`注意:提交后将不能更改!确定内容已修改完成,并将成果“${this.curStage}”吗?`, '提示', {
  525. confirmButtonText: '确定',
  526. cancelButtonText: '取消',
  527. type: 'warning'
  528. }).then(() => {
  529. request.get(`/tac/province/pblm/info/planProcess/${this.addForm.rgstrId}/${this.subjectList[parseInt(this.activeName) - 1]['nextId']}`,{params:{pblmChType:this.addForm.pblmChType}}).then(res => {
  530. if (res.success) {
  531. _self.hideOrShow();
  532. _self.initTabAll();
  533. _self.editable = false
  534. _self.$message.success('提交成功')
  535. } else {
  536. _self.$message.error(res.message)
  537. }
  538. })
  539. }).catch((err) => {
  540. this.$message.error("取消提交")
  541. });
  542. }
  543. } else {
  544. this.$message.warning('项目名称不能为空')
  545. }
  546. },
  547. stageSubmit() {
  548. if (this.addForm.rgstrId) {
  549. let url
  550. if (this.flag == '7') {
  551. url = `/tac/pawp/rgstr/siju/${this.addForm.rgstrId}/8`
  552. } else {
  553. url = `/tac/pawp/rgstr/chengguo/submit/${this.addForm.rgstrId}/${Number(this.flag) + 1}`
  554. }
  555. this.$confirm(`注意:提交后将不能更改!确定内容已修改完成,并将成果“${this.curStage}”吗?`, '提示', {
  556. confirmButtonText: '确定',
  557. cancelButtonText: '取消',
  558. type: 'warning'
  559. }).then(() => {
  560. request.get(url).then(res => {
  561. if (res.success) {
  562. this.editable = false
  563. this.$message.success('提交成功')
  564. } else {
  565. this.$message.error(res.message)
  566. }
  567. })
  568. }).catch(() => {
  569. });
  570. } else {
  571. this.$message.warning("项目名称不能为空");
  572. }
  573. },
  574. showDialogCallBack(){
  575. this.callBackNote = "";
  576. this.callbackNoteVisible = true;
  577. },
  578. // 助理退回工作底稿
  579. backProfession() {
  580. var _self = this;
  581. let prvId = this.subjectList[parseInt(this.activeName) - 1]['prvId']
  582. if(parseInt(this.activeName)==1){
  583. if (!this.addForm.pblmChType) {
  584. this.$message.warning('请选择专业')
  585. return
  586. }
  587. if (this.addForm.pblmChType && this.addForm.rgstrId) {
  588. request.get(`/tac/province/pblm/info/rollback/${this.addForm.rgstrId}/${prvId}/${this.addForm.pblmChType}`,{params:{note:this.callBackNote,pblmChType:this.addForm.pblmChType}}).then(res => {
  589. if (res.success) {
  590. _self.hideOrShow();
  591. _self.callbackNoteVisible = false;
  592. _self.initTabAll();
  593. _self.$message.success('回退成功');
  594. } else {
  595. this.$message.warning(res.message)
  596. }
  597. }).catch(err => {
  598. _self.$message.warning(err)
  599. })
  600. } else {
  601. this.$message.warning("项目名称和专业不能为空");
  602. }
  603. }else{
  604. request.get(`/tac/province/pblm/info/rollback/allType/${this.addForm.rgstrId}/${prvId}`,{params:{note:this.callBackNote,pblmChType:this.addForm.pblmChType}}).then(res => {
  605. if (res.success) {
  606. _self.hideOrShow();
  607. _self.callbackNoteVisible = false;
  608. _self.initTabAll();
  609. _self.$message.success('回退成功');
  610. } else {
  611. this.$message.warning(res.message)
  612. }
  613. }).catch(err => {
  614. _self.$message.warning(err)
  615. })
  616. }
  617. },
  618. //项目阶段是当前选中阶段则显示提交、驳回按钮
  619. hideOrShow() {
  620. var _self = this;
  621. let currentOrgId = localStorage.getItem("currentOrgId")
  622. if (currentOrgId == '036') {
  623. //浙江将驳回按钮隐藏
  624. _self.zjstates = false;
  625. } else {
  626. _self.zjstates = true;
  627. }
  628. if (this.addForm.rgstrId && _self.planProcessId) {
  629. request.get(`/tac/province/pblm/info/taskProcess/${_self.addForm.rgstrId}/${_self.planProcessId}`).then(res => {
  630. if (res.success && res.data) {
  631. //阶段是否为工程提交的当前阶段
  632. if (res.data.nowId && res.data.nowId == _self.subjectList[parseInt(_self.activeName) - 1]['nowId']) {
  633. _self.isShowaddrollback = true;
  634. } else {
  635. _self.isShowaddrollback = false;
  636. }
  637. //阶段是否需要审定,审定状态
  638. if (res.data.isExamine && res.data.isExamine == '1') {
  639. _self.isExamine = true;
  640. //需要审定阶段,必须通过审定人审定后才能显示提交到下一阶段按钮
  641. if (res.data.stageStatus && res.data.stageStatus == '1') {
  642. _self.examineStatus = true;
  643. } else {
  644. _self.examineStatus = false;
  645. }
  646. //需要审定阶段,经办人提交审定按钮显隐
  647. if (res.data.stageStatus == null ||
  648. res.data.stageStatus == '' ||
  649. res.data.stageStatus == '2') {
  650. _self.sendExamineStatus = true;
  651. } else {
  652. _self.sendExamineStatus = false;
  653. }
  654. } else {
  655. _self.examineStatus = true;
  656. _self.isExamine = false;
  657. }
  658. //审定状态
  659. _self.stageStatus = res.data.stageStatus;
  660. //是否为最后阶段,最后阶段不显示提交到下一阶段
  661. if (1 == _self.subjectList[parseInt(_self.activeName) - 1]['nextId']) {
  662. _self.isStopStep = true
  663. } else {
  664. _self.isStopStep = false
  665. }
  666. } else {
  667. _self.isShowaddrollback = false;
  668. }
  669. })
  670. }
  671. },
  672. sendSubmitStatus(val) {
  673. this.editable = val
  674. },
  675. // 展示操作日志
  676. showDailyRecord() {
  677. if (!this.addForm.pblmChType) {
  678. this.$message.warning('请选择专业')
  679. return
  680. }
  681. this.dailyRecordVisible = true
  682. },
  683. //当前工程阶段审定
  684. examine() {
  685. if (!this.addForm.rgstrId) {
  686. this.$message.warning('请选择工程')
  687. return
  688. }
  689. this.examVisible = true
  690. },
  691. sendExamine() {
  692. if (!this.addForm.rgstrId) {
  693. this.$message.warning('请选择工程')
  694. return
  695. }
  696. var _self = this;
  697. if (this.addForm.rgstrId && this.planProcessId) {
  698. let data = {
  699. rgstrId: this.addForm.rgstrId,
  700. planProcessId: this.planProcessId,
  701. stageStatus: '0'
  702. }
  703. request.post(`/tac/province/examine/add`, data).then(res => {
  704. if (res.success) {
  705. this.hideOrShow();
  706. this.initTabAll();
  707. _self.$message.success('提交成功')
  708. } else {
  709. _self.$message.error(res.message)
  710. }
  711. }).catch((err) => {
  712. this.$message.error(err)
  713. });
  714. } else {
  715. this.$message.warning('项目名称以及阶段不能为空')
  716. }
  717. },
  718. //当前工程阶段审定意见
  719. examRecord() {
  720. if (!this.addForm.rgstrId) {
  721. this.$message.warning('请选择工程')
  722. return
  723. }
  724. this.examRecordVisible = true
  725. },
  726. dialogClose() {
  727. this.examRecordVisible = false;
  728. this.examVisible = false;
  729. this.hideOrShow();
  730. this.initTabAll();
  731. },
  732. callBackDialogClose() {
  733. this.callbackNoteVisible = false;
  734. },
  735. hasPriv1(item) {
  736. return this.ownPriv(item)
  737. },
  738. }
  739. }
  740. </script>
  741. <style lang="scss">
  742. .tabs_wrapper .el-tabs__item, .report_filter_select .el-form-item__label {
  743. font-size: 16px;
  744. color: #333;
  745. }
  746. .report_btn_group {
  747. position: absolute;
  748. top: 20px;
  749. right: 10px;
  750. }
  751. </style>