index.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
  5. <div style="overflow: hidden">
  6. <el-button
  7. style="float: right; margin-top: 10px"
  8. type="primary"
  9. @click="dialogCheck(3)"
  10. >添加</el-button
  11. >
  12. <el-button
  13. style="float: right; margin-top: 10px; margin-right: 20px"
  14. type="primary"
  15. @click="getStanding"
  16. >台账</el-button
  17. >
  18. </div>
  19. <div class="tabbox">
  20. <el-table
  21. height="calc(100% - 40px)"
  22. class="com-table"
  23. ref="multipleTable"
  24. :data="tableData"
  25. tooltip-effect="dark"
  26. size="small"
  27. border
  28. style="width: 100%"
  29. v-loading="loading"
  30. >
  31. <el-table-column prop="woTitle" label="业务名称"> </el-table-column>
  32. <el-table-column prop="opName" label="申请姓名"> </el-table-column>
  33. <el-table-column prop="createTime" label="申请时间">
  34. </el-table-column>
  35. <el-table-column prop="stsDesc" label="状态">
  36. <template slot-scope="scope">
  37. {{
  38. scope.row.taskName == "信息补填" && scope.row.stsDesc == "待办"
  39. ? "未办结"
  40. : scope.row.stsDesc
  41. }}
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="操作" width="120px" align="center">
  45. <template slot-scope="scope">
  46. <el-button
  47. size="mini"
  48. type="primary"
  49. @click="dialogCheck(1, scope.row)"
  50. >查看</el-button
  51. >
  52. <el-button
  53. size="mini"
  54. type="danger"
  55. v-if="scope.row.sts != 1"
  56. @click="dialogCheck(2, scope.row)"
  57. >处理</el-button
  58. >
  59. <!-- <el-button size="mini" type="danger" @click="delLine(scope.row)">删除</el-button> -->
  60. </template>
  61. </el-table-column>
  62. </el-table>
  63. <el-pagination
  64. class="pageBox"
  65. @current-change="currchange"
  66. layout="prev, pager, next"
  67. background
  68. :total="total"
  69. >
  70. </el-pagination>
  71. </div>
  72. </div>
  73. <el-dialog
  74. :title="titname"
  75. :visible.sync="dialogStatus"
  76. width="50%"
  77. :destroy-on-close="true"
  78. :modal-append-to-body="false"
  79. :close-on-click-modal="false"
  80. :before-close="closedia"
  81. :fullscreen="true"
  82. >
  83. <div v-loading="loadinged">
  84. <el-form
  85. :model="infolist"
  86. ref="infolist"
  87. :rules="rules"
  88. style="height: calc(100vh - 180px)"
  89. >
  90. <div class="info-line">
  91. <el-form-item prop="demandName">
  92. <span>需求名称</span>
  93. <el-input
  94. v-model="infolist.demandName"
  95. placeholder="需求名称"
  96. :disabled="disableStatus"
  97. >
  98. </el-input>
  99. </el-form-item>
  100. <el-form-item>
  101. <span>需求编号</span>
  102. <el-input
  103. v-model="infolist.demandNo"
  104. placeholder="需求编号"
  105. disabled
  106. >
  107. </el-input>
  108. </el-form-item>
  109. <!-- <el-form-item prop="terminal">
  110. <span>申请流程</span>
  111. <el-select clearable v-model="terminal" placeholder="申请流程" :disabled="disableStatus">
  112. <el-option v-for="items in options" :key="items.procId" :label="items.procName"
  113. :value="items.procId">
  114. </el-option>
  115. </el-select>
  116. </el-form-item> -->
  117. <el-form-item>
  118. <span>紧急程度</span>
  119. <el-select
  120. clearable
  121. v-model="infolist.urgDegree"
  122. placeholder="紧急程度"
  123. :disabled="disableStatus"
  124. >
  125. <el-option
  126. v-for="items in urgDegreeopt"
  127. :key="items.id"
  128. :label="items.name"
  129. :value="items.name"
  130. >
  131. </el-option>
  132. </el-select>
  133. </el-form-item>
  134. <el-form-item>
  135. <span>业务主题</span>
  136. <el-input
  137. v-model="infolist.busiSubject"
  138. placeholder="业务主题"
  139. :disabled="disableStatus"
  140. >
  141. </el-input>
  142. </el-form-item>
  143. <el-form-item>
  144. <span>需求类别</span>
  145. <el-select
  146. clearable
  147. v-model="infolist.demandTypeCode"
  148. placeholder="需求类别"
  149. :disabled="disableStatus"
  150. >
  151. <el-option
  152. v-for="items in demandTypeopt"
  153. :key="items.dataCode"
  154. :label="items.dataName"
  155. :value="items.dataCode"
  156. >
  157. </el-option>
  158. </el-select>
  159. </el-form-item>
  160. <el-form-item>
  161. <span>承载渠道</span>
  162. <!-- //multiple -->
  163. <el-select
  164. clearable
  165. multiple
  166. v-model="infolist.carryChannelCode"
  167. placeholder="承载渠道"
  168. :disabled="disableStatus"
  169. >
  170. <el-option
  171. v-for="items in carryChannelopt"
  172. :key="items.dataCode"
  173. :label="items.dataName"
  174. :value="items.dataCode"
  175. >
  176. </el-option>
  177. </el-select>
  178. </el-form-item>
  179. <el-form-item>
  180. <span>加载周期</span>
  181. <el-date-picker
  182. :disabled="disableStatus"
  183. v-model="busiTime"
  184. type="daterange"
  185. placeholder="加载周期"
  186. style="display: inline-flex; width: calc(100% - 120px)"
  187. >
  188. </el-date-picker>
  189. </el-form-item>
  190. </div>
  191. <el-form-item class="info-line online">
  192. <span>需求背景</span>
  193. <el-input
  194. v-model="infolist.demandBackground"
  195. placeholder="需求背景"
  196. type="textarea"
  197. :autosize="{ minRows: 3, maxRows: 10 }"
  198. :disabled="disableStatus"
  199. >
  200. </el-input>
  201. </el-form-item>
  202. <el-form-item class="info-line online">
  203. <span>需求描述</span>
  204. <el-input
  205. v-model="infolist.demandDesc"
  206. placeholder="需求描述"
  207. type="textarea"
  208. :autosize="{ minRows: 3, maxRows: 10 }"
  209. :disabled="disableStatus"
  210. >
  211. </el-input>
  212. </el-form-item>
  213. <div
  214. style="padding: 0 20px 0 120px; margin-bottom: 20px"
  215. v-if="disableStatus"
  216. >
  217. <uploadDown
  218. :datalist="datalist"
  219. :dialogStatus="uploadstatus"
  220. ></uploadDown>
  221. </div>
  222. <div v-if="!disableStatus" class="info-line online">
  223. <span style="width: 80px">附件</span>
  224. <myUpload
  225. @uploadBack="uploadBack"
  226. :fileInfo="fileInfo"
  227. :fileList="fileInfo.fileList"
  228. style="width: calc(100% - 80px)"
  229. >
  230. </myUpload>
  231. </div>
  232. <myUpload
  233. v-if="vision == '信息补填'"
  234. style="float: right; margin-bottom: 20px"
  235. @uploadBack="uploadBackin"
  236. :fileInfo="fileInfoin"
  237. :fileList="fileInfoin.fileList"
  238. ></myUpload>
  239. <div
  240. style="margin: 20px 0; padding: 0 20px"
  241. v-if="vision == '信息补填'"
  242. >
  243. <el-table
  244. class="com-table"
  245. ref="multipleTable"
  246. :data="infodatas"
  247. tooltip-effect="dark"
  248. size="small"
  249. border
  250. style="width: 100%"
  251. >
  252. <el-table-column prop="infoName" label="需求承接支撑方">
  253. <template slot-scope="scope">
  254. <el-input
  255. v-model="scope.row.factoryName"
  256. :disabled="titname != '审批'"
  257. ></el-input>
  258. </template>
  259. </el-table-column>
  260. <el-table-column prop="infoName" label="涉及发生工作量">
  261. <template slot-scope="scope">
  262. <el-input
  263. v-model="scope.row.workLoad"
  264. :disabled="titname != '审批'"
  265. ></el-input>
  266. </template>
  267. </el-table-column>
  268. <el-table-column
  269. label="操作"
  270. width="120px"
  271. align="center"
  272. v-if="titname == '审批'"
  273. >
  274. <template slot-scope="scope">
  275. <el-button
  276. size="mini"
  277. type="primary"
  278. @click="choline(1, scope)"
  279. >添加</el-button
  280. >
  281. <el-button
  282. size="mini"
  283. type="danger"
  284. @click="choline(2, scope)"
  285. >删除</el-button
  286. >
  287. </template>
  288. </el-table-column>
  289. </el-table>
  290. </div>
  291. <el-form-item class="info-line online" v-if="visionsts == '2'">
  292. <span>审批说明</span>
  293. <el-input
  294. v-model="remark"
  295. placeholder="审批说明"
  296. type="textarea"
  297. :rows="3"
  298. :disabled="titname == '查看'"
  299. >
  300. </el-input>
  301. </el-form-item>
  302. <div
  303. style="margin-bottom: 20px; padding: 0 20px"
  304. v-if="titname != '添加'"
  305. >
  306. <el-table
  307. class="com-table"
  308. :data="rovaList"
  309. tooltip-effect="dark"
  310. size="small"
  311. border
  312. style="width: 100%"
  313. >
  314. <el-table-column prop="taskId" label="编号"> </el-table-column>
  315. <el-table-column prop="taskName" label="环节"> </el-table-column>
  316. <el-table-column prop="assigneeName" label="处理人">
  317. </el-table-column>
  318. <el-table-column prop="assigneeNo" label="处理人工号">
  319. </el-table-column>
  320. <el-table-column prop="opTime" label="处理时间">
  321. </el-table-column>
  322. <el-table-column prop="remark" label="备注"> </el-table-column>
  323. </el-table>
  324. </div>
  325. </el-form>
  326. <div slot="footer" class="dialog-footer myfooter">
  327. <el-button
  328. v-if="titname != '查看' && vision == '流程发起'"
  329. type="primary"
  330. @click="checkexa = true"
  331. >确 定
  332. </el-button>
  333. <el-button
  334. v-if="titname != '查看' && visionsts == '3'"
  335. type="primary"
  336. @click="checkexa = true"
  337. >确 定
  338. </el-button>
  339. <el-button
  340. v-if="titname != '查看' && visionsts == '4'"
  341. type="primary"
  342. @click="dialogCli(2)"
  343. >确 定
  344. </el-button>
  345. <el-button
  346. v-if="titname != '查看' && visionsts == '2'"
  347. type="primary"
  348. @click="checkexa = true"
  349. >通 过
  350. </el-button>
  351. <el-button
  352. v-if="titname != '查看' && visionsts == '2'"
  353. type="primary"
  354. @click="dialogCli(1)"
  355. >打 回
  356. </el-button>
  357. <el-button v-if="titname == '添加'" type="primary" @click="temp"
  358. >保 存</el-button
  359. >
  360. <el-button
  361. v-if="titname == '添加'"
  362. type="primary"
  363. @click="checkexa = true"
  364. >确 定</el-button
  365. >
  366. <el-button v-if="titname == '查看'" @click="dialogCli(3)"
  367. >确 定</el-button
  368. >
  369. <el-button @click="dialogCli(3)">取 消</el-button>
  370. </div>
  371. </div>
  372. </el-dialog>
  373. <el-dialog
  374. title="选择审批人"
  375. :visible.sync="checkexa"
  376. width="50%"
  377. :destroy-on-close="true"
  378. :modal-append-to-body="false"
  379. :close-on-click-modal="false"
  380. >
  381. <div>
  382. <el-form :model="infolist" ref="infolist" :rules="rules">
  383. <el-form-item prop="visiblec" class="info-line online">
  384. <span>审批人员</span>
  385. <deptTreeOnly
  386. class="tree"
  387. @treeCheck="treeCheckonly"
  388. :defaultList="defaultList"
  389. :type="depttype"
  390. :closeList="closeList"
  391. :reset-list="treeList"
  392. ></deptTreeOnly>
  393. <div class="tree treeUser">
  394. <p v-for="(item, index) in treeList" :key="index">
  395. {{ item.label }}
  396. <i
  397. v-if="item.label"
  398. @click="deletes(item)"
  399. class="el-icon-error"
  400. ></i>
  401. </p>
  402. </div>
  403. </el-form-item>
  404. </el-form>
  405. <div slot="footer" style="text-align: right; padding-bottom: 20px">
  406. <el-button type="primary" @click="dialogCliadd" v-if="!visionchonly"
  407. >确 定</el-button
  408. >
  409. <el-button type="primary" @click="dialogCli(2)" v-if="visionchonly"
  410. >确 定</el-button
  411. >
  412. <el-button @click="checkexa = false">取 消</el-button>
  413. </div>
  414. </div>
  415. </el-dialog>
  416. <myMessage
  417. :messTit="messTit"
  418. @closeMessage="closeMessage"
  419. :centerDialogVisible="centerDialogVisible"
  420. v-if="centerDialogVisible"
  421. ></myMessage>
  422. </fullscreen>
  423. </template>
  424. <script>
  425. import myMessage from "../../../components/myMessage.vue";
  426. import toolList from "../../../components/toolList";
  427. import myUpload from "../../../components/upload";
  428. import uploadDown from "../../../components/uploadDown.vue";
  429. import deptTreeOnly from "../performance/components/deptTreeOnly.vue";
  430. export default {
  431. components: {
  432. // mySearch,
  433. myMessage,
  434. toolList,
  435. myUpload,
  436. uploadDown,
  437. deptTreeOnly,
  438. },
  439. data() {
  440. const demandName = (rule, value, callback) => {
  441. if (!this.infolist.demandName) {
  442. callback(new Error("不能为空"));
  443. } else {
  444. callback();
  445. }
  446. };
  447. const terminal = (rule, value, callback) => {
  448. if (!this.terminal) {
  449. callback(new Error("不能为空"));
  450. } else {
  451. callback();
  452. }
  453. };
  454. return {
  455. rules: {
  456. demandName: [
  457. {
  458. required: true,
  459. trigger: "blur",
  460. validator: demandName,
  461. },
  462. ],
  463. terminal: [
  464. {
  465. required: true,
  466. trigger: "change",
  467. validator: terminal,
  468. },
  469. ],
  470. },
  471. tooltit: "线上渠道业务需求",
  472. fullscreen: false,
  473. total: 0,
  474. pageSize: 1,
  475. tableData: [{}],
  476. dialogStatus: false,
  477. disableStatus: false,
  478. titname: "",
  479. infolist: {},
  480. userInfo: {},
  481. params: {},
  482. centerDialogVisible: false,
  483. messTit: "",
  484. delid: "",
  485. loading: false,
  486. loadinged: false,
  487. fileInfo: {
  488. limit: 5,
  489. url: "/bpm/api/upload",
  490. fileList: [],
  491. },
  492. rovaList: [],
  493. vision: "",
  494. datalist: {
  495. url: "/bpm/api/download",
  496. type: 1,
  497. },
  498. uploadstatus: false,
  499. mydisable: 1,
  500. opname: "",
  501. opno: "",
  502. attList: [],
  503. options: [],
  504. terminal: "729289304205336576",
  505. // terminal: '722743473704595456',//722743473704595456省722748981018685440
  506. remark: "",
  507. visionsts: "1",
  508. visionchonly: false,
  509. ifopt: [
  510. {
  511. id: 1,
  512. name: "是",
  513. },
  514. {
  515. id: 0,
  516. name: "否",
  517. },
  518. ],
  519. infodatas: [{}, {}],
  520. busiTime: [],
  521. urgDegreeopt: [
  522. {
  523. id: 1,
  524. name: "正常",
  525. },
  526. {
  527. id: 2,
  528. name: "紧急",
  529. },
  530. {
  531. id: 3,
  532. name: "非常紧急",
  533. },
  534. ],
  535. demandTypeopt: [],
  536. carryChannelopt: [],
  537. checkexa: false,
  538. treeList: [],
  539. treeListonly: {},
  540. defaultList: [],
  541. closeList: false,
  542. depttype: 0,
  543. fileInfoin: {
  544. type: "btn",
  545. typename: "导入",
  546. btntype: "primary",
  547. limit: 1,
  548. url: "/market/cChannelDemand/demandCarryImport",
  549. fileList: [],
  550. },
  551. tempSave: false,
  552. };
  553. },
  554. watch: {
  555. tempSave(value) {
  556. if (value) {
  557. // 监听编辑状态,每20秒请求一次,注意函数不加()
  558. this.timer = window.setInterval(this.temp, 20000);
  559. } else {
  560. // 停止监听
  561. clearInterval(this.timer);
  562. }
  563. },
  564. },
  565. methods: {
  566. temp() {
  567. if (JSON.stringify(this.infolist) == "{}") {
  568. return;
  569. }
  570. let params = {};
  571. params.infolist = this.infolist;
  572. params.fileList = [];
  573. params.attList = [];
  574. this.attList.forEach((item) => {
  575. let file = {
  576. id: item.fileCode,
  577. fileCode: item.fileCode,
  578. fileName: item.fileName,
  579. name: item.fileName,
  580. };
  581. params.fileList.push(file);
  582. params.attList.push(file);
  583. });
  584. this.$http({
  585. url: "/market/bpmTemp/temp",
  586. method: "post",
  587. headers: {
  588. "Content-Type": "application/json",
  589. },
  590. data: {
  591. bpmType: "1",
  592. content: JSON.stringify(params),
  593. },
  594. }).then((res) => {
  595. //console.log(res)
  596. });
  597. },
  598. deletes(v) {
  599. // this.treeListonly = {};
  600. this.treeList = this.treeList.filter((el) => el.loginNoStr !== v.loginNoStr);
  601. this.closeList = !this.closeList;
  602. },
  603. treeCheckonly(v) {
  604. this.treeList = v;
  605. // this.treeListonly = v;
  606. },
  607. choline(v, n) {
  608. if (v == 1) {
  609. this.infodatas.push({});
  610. } else {
  611. this.infodatas.splice(n.$index, 1);
  612. }
  613. },
  614. closedia() {
  615. this.infolist = {};
  616. this.attList = [];
  617. this.fileInfo.fileList = [];
  618. this.dialogStatus = false;
  619. this.checkexa = false;
  620. },
  621. //获取列表
  622. getList(v, n) {
  623. this.pageSize = n;
  624. let _this = this;
  625. this.loading = true;
  626. v.procName = "业务需求申请(地市公司),业务需求申请(省公司)";
  627. this.$http({
  628. url: "/bpm/api/queryToDoAndFinishTaskList",
  629. method: "post",
  630. headers: {
  631. "Content-Type": "application/json",
  632. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  633. },
  634. data: v,
  635. }).then((res) => {
  636. this.tableData = res.data.data;
  637. this.total = res.data.totalRecord;
  638. this.loading = false;
  639. });
  640. },
  641. // 分页
  642. currchange(v) {
  643. this.pageSize = v;
  644. this.getList(this.params, this.pageSize);
  645. },
  646. //申请
  647. dialogCheck(v, n) {
  648. this.dialogStatus = true;
  649. let infolist = Object.assign({}, n);
  650. this.vision = "";
  651. this.visionsts = "";
  652. this.infodatas = [{}, {}];
  653. if (v === 1) {
  654. this.titname = "查看";
  655. this.disableStatus = true;
  656. } else if (v === 2) {
  657. this.titname = "审批";
  658. this.disableStatus = true;
  659. } else if (v === 3) {
  660. this.$http({
  661. url: "/market/bpmTemp/query",
  662. method: "post",
  663. headers: { "Content-Type": "application/json" },
  664. data: { bpmType: "1" },
  665. }).then((res) => {
  666. if (res.data) {
  667. let content = JSON.parse(res.data.content);
  668. this.infolist = content.infolist;
  669. this.attList = content.attList;
  670. this.fileInfo.fileList = content.fileList;
  671. }
  672. this.tempSave = true;
  673. this.titname = "添加";
  674. this.visionchonly = false;
  675. this.disableStatus = false;
  676. });
  677. return;
  678. }
  679. this.$http({
  680. url: "/bpm/api/taskInit",
  681. method: "post",
  682. headers: {
  683. "Content-Type": "application/json",
  684. },
  685. data: {
  686. woNo: n.woNo,
  687. },
  688. }).then((res) => {
  689. // this.infolist = Object.assign({}, res.data);
  690. this.terminal = infolist.procId;
  691. this.opname = res.data.opName;
  692. this.opno = res.data.opNo;
  693. this.infolist = JSON.parse(res.data.params.terminalRes);
  694. res.data.params.fillList
  695. ? (this.infodatas = JSON.parse(res.data.params.fillList))
  696. : "";
  697. this.infolist.procId = infolist.procId;
  698. this.infolist.procVersion = infolist.procVersion;
  699. this.remark = infolist.remark;
  700. this.infolist.stepId = infolist.stepId;
  701. this.infolist.taskId = infolist.taskId;
  702. this.infolist.taskName = infolist.taskName;
  703. this.infolist.opName = infolist.opName;
  704. this.infolist.opNo = infolist.opNo;
  705. this.infolist.opTime = infolist.opTime;
  706. this.infolist.woNo = infolist.woNo;
  707. this.busiTime = [];
  708. this.busiTime[0] = this.infolist.busiStartTime;
  709. this.busiTime[1] = this.infolist.busiEndTime;
  710. this.visionchonly = false;
  711. if (
  712. res.data.taskList[res.data.taskList.length - 1].taskName == "流程发起"
  713. ) {
  714. this.vision = "流程发起";
  715. if (this.titname == "审批") {
  716. this.disableStatus = false;
  717. }
  718. this.visionchonly = true;
  719. } else if (
  720. res.data.taskList[res.data.taskList.length - 1].taskName ==
  721. "科室主任初审"
  722. ) {
  723. this.vision = "科室主任初审";
  724. this.visionsts = "2";
  725. this.visionchonly = true;
  726. } else if (
  727. res.data.taskList[res.data.taskList.length - 1].taskName ==
  728. "部门副主任复审"
  729. ) {
  730. this.vision = "部门副主任复审";
  731. this.visionsts = "2";
  732. this.visionchonly = true;
  733. } else if (
  734. res.data.taskList[res.data.taskList.length - 1].taskName ==
  735. "主管副总终审" ||
  736. res.data.taskList[res.data.taskList.length - 1].taskName ==
  737. "部门副主任终审"
  738. ) {
  739. this.vision = "主管副总终审";
  740. this.visionsts = "2";
  741. this.visionchonly = true;
  742. } else if (
  743. res.data.taskList[res.data.taskList.length - 1].taskName ==
  744. "需求预评估"
  745. ) {
  746. this.vision = "需求预评估";
  747. this.visionsts = "2";
  748. this.visionchonly = true;
  749. } else if (
  750. res.data.taskList[res.data.taskList.length - 1].taskName ==
  751. "需求预评估初审"
  752. ) {
  753. this.vision = "需求预评估初审";
  754. this.visionsts = "2";
  755. this.visionchonly = true;
  756. } else if (
  757. res.data.taskList[res.data.taskList.length - 1].taskName ==
  758. "需求预评估复审"
  759. ) {
  760. this.vision = "需求预评估复审";
  761. this.visionsts = "2";
  762. this.visionchonly = true;
  763. } else if (
  764. res.data.taskList[res.data.taskList.length - 1].taskName ==
  765. "渠道经理会签"
  766. ) {
  767. this.vision = "渠道经理会签";
  768. this.visionsts = "2";
  769. this.visionchonly = true;
  770. } else if (
  771. res.data.taskList[res.data.taskList.length - 1].taskName == "需求确认"
  772. ) {
  773. this.vision = "需求确认";
  774. this.visionsts = "3";
  775. this.visionchonly = true;
  776. } else if (
  777. res.data.taskList[res.data.taskList.length - 1].taskName == "上线管理"
  778. ) {
  779. this.vision = "上线管理";
  780. this.visionsts = "3";
  781. this.visionchonly = true;
  782. } else if (
  783. res.data.taskList[res.data.taskList.length - 1].taskName == "上线验证"
  784. ) {
  785. this.vision = "上线验证";
  786. this.visionsts = "3";
  787. this.visionchonly = true;
  788. } else if (
  789. res.data.taskList[res.data.taskList.length - 1].taskName == "信息补填"
  790. ) {
  791. this.vision = "信息补填";
  792. this.visionsts = "4";
  793. }
  794. this.datalist.attList = JSON.parse(res.data.params.attList);
  795. this.attList = [];
  796. this.fileInfo.fileList = [];
  797. this.datalist.attList.forEach((item) => {
  798. item.id = item.attchFileId;
  799. this.fileInfo.fileList.push({
  800. name: item.fileName,
  801. url: "",
  802. id: item.id,
  803. attchFileId: item.attchFileId,
  804. fileName: item.fileName,
  805. });
  806. this.attList.push({
  807. name: item.fileName,
  808. url: "",
  809. id: item.id,
  810. attchFileId: item.attchFileId,
  811. fileName: item.fileName,
  812. });
  813. });
  814. this.rovaList = res.data.taskList;
  815. this.uploadstatus = true;
  816. });
  817. },
  818. //审批
  819. dialogCli(v) {
  820. this.dialogStatus = false;
  821. if (v === 3) {
  822. this.infolist = {};
  823. this.attList = [];
  824. this.fileInfo.fileList = [];
  825. this.checkexa = false;
  826. this.tempSave = false;
  827. return;
  828. }
  829. let _this = this;
  830. this.infolist.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  831. if (v === 1) {
  832. let params = {
  833. dealType: "1",
  834. dealTypeDesc: "打回",
  835. procId: this.infolist.procId,
  836. procVersion: this.infolist.procVersion,
  837. remark: this.remark,
  838. stepId: this.infolist.stepId,
  839. taskId: this.infolist.taskId,
  840. taskName: this.infolist.taskName,
  841. opName: this.infolist.opName,
  842. opNo: this.opno,
  843. opTime: this.infolist.opTime,
  844. params: {
  845. procExeCondiVal: "不同意",
  846. terminalRes: JSON.stringify(this.infolist),
  847. assigneeNo: this.opno,
  848. assigneeName: this.opname,
  849. },
  850. woNo: this.infolist.woNo,
  851. };
  852. this.submitInfo("/bpm/api/submitTask", params);
  853. } else if (v === 2) {
  854. let param = {
  855. dealType: "0",
  856. dealTypeDesc: "提交",
  857. procId: this.infolist.procId,
  858. procVersion: this.infolist.procVersion,
  859. remark: this.remark,
  860. stepId: this.infolist.stepId,
  861. taskId: this.infolist.taskId,
  862. taskName: this.infolist.taskName,
  863. opName: this.infolist.opName,
  864. opNo: this.opno,
  865. opTime: this.infolist.opTime,
  866. params: {
  867. woType: this.infolist.woType,
  868. terminalRes: JSON.stringify(this.infolist),
  869. },
  870. woNo: this.infolist.woNo,
  871. };
  872. if (this.visionchonly) {
  873. param.params.assigneeNo = this.treeListonly.leaderAuditNo;
  874. param.params.assigneeName = this.treeListonly.leaderAuditName;
  875. }
  876. // if(this.vision == '科室主任初审'||this.vision == '部门副主任复审'){
  877. // this.$http({
  878. // url: "/sysmgr/csysuserinfo/queryUserListByLoginNoAndDuty",
  879. // method: "post",
  880. // headers: {
  881. // "Content-Type": "application/json",
  882. // "page": '{"pageNo":"' + 1 + '","pageSize":"100"}'
  883. // },
  884. // data: {"duty":"7,12"},
  885. // }).then((res) => {
  886. // if(res.data.length == 0){
  887. // this.$message({
  888. // message: '暂无领导审批,发起失败!',
  889. // type: 'error'
  890. // });
  891. // return
  892. // }else{
  893. // param.params.assigneeNo=res.data[0].loginNoStr;
  894. // param.params.assigneeName=res.data[0].loginNameStr;
  895. // _this.submitInfo("/bpm/api/submitTask", param);
  896. // return
  897. // }
  898. // });
  899. // }else if(this.vision == '渠道经理会签'||this.vision == '上线管理'){
  900. // param.params.assigneeNo= this.opno;
  901. // param.params.assigneeName= this.opname;
  902. // this.submitInfo("/bpm/api/submitTask", param);
  903. // }
  904. if (this.vision == "信息补填") {
  905. param.params.fillList = JSON.stringify(this.infodatas);
  906. this.submitInfo("/bpm/api/submitTask", param);
  907. } else {
  908. if (this.vision == "流程发起") {
  909. let attList = [];
  910. for (let i = 0; i < this.attList.length; i++) {
  911. attList.push({
  912. id: this.attList[i].id,
  913. fileCode: this.attList[i].fileCode,
  914. fileName: this.attList[i].fileName,
  915. opName: this.attList[i].opName,
  916. opNo: this.attList[i].opNo,
  917. opTime: this.attList[i].opTime,
  918. woNo: this.infolist.woNo,
  919. attchFileId: this.attList[i].attchFileId,
  920. });
  921. }
  922. param.params.attList = JSON.stringify(attList);
  923. this.$http({
  924. url: "/market/bpmTemp/del",
  925. method: "post",
  926. headers: {
  927. "Content-Type": "application/json",
  928. },
  929. data: {
  930. bpmType: "1",
  931. },
  932. }).then((res) => {
  933. //console.log(res)
  934. });
  935. }
  936. this.submitInfo("/bpm/api/submitTask", param);
  937. }
  938. }
  939. this.checkexa = false;
  940. },
  941. //添加
  942. dialogCliadd(v) {
  943. let _this = this;
  944. let info = {};
  945. info.params = {};
  946. info.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  947. info.opNo = this.userInfo.loginNo;
  948. info.opName = this.userInfo.loginName;
  949. info.woTitle = this.infolist.demandName;
  950. info.params.terminalRes = this.infolist;
  951. info.params.terminalRes.busiStartTime = this.busiTime[0]
  952. ? _this.$formatDate(this.busiTime[0], "YYYY-MM-DD")
  953. : "";
  954. info.params.terminalRes.busiEndTime = this.busiTime[1]
  955. ? _this.$formatDate(this.busiTime[1], "YYYY-MM-DD")
  956. : "";
  957. info.procId = this.terminal;
  958. info.params.assigneeNo = this.treeListonly.leaderAuditNo;
  959. info.params.assigneeName = this.treeListonly.leaderAuditName;
  960. for (let i = 0; i < this.options.length; i++) {
  961. if (this.terminal == this.options[i].procId) {
  962. info.procName = this.options[i].procName;
  963. info.procVersion = this.options[i].procVersion;
  964. }
  965. }
  966. let attList = [];
  967. for (let i = 0; i < this.attList.length; i++) {
  968. attList.push({
  969. id: this.attList[i].id,
  970. fileCode: this.attList[i].fileCode,
  971. fileName: this.attList[i].fileName,
  972. opName: this.attList[i].opName,
  973. opNo: this.attList[i].opNo,
  974. opTime: this.attList[i].opTime,
  975. woNo: this.infolist.woNo,
  976. attchFileId: this.attList[i].attchFileId,
  977. });
  978. }
  979. let fillList = [{}, {}];
  980. info.params.fillList = JSON.stringify(fillList);
  981. info.params.attList = JSON.stringify(attList);
  982. info.params.terminalRes = JSON.stringify(info.params.terminalRes);
  983. this.checkexa = false;
  984. this.visionchonly = false;
  985. this.submitInfo("/bpm/api/startProc", info);
  986. },
  987. submitInfo(u, v) {
  988. let _this = this;
  989. this.$refs.infolist.validate((valid) => {
  990. if (valid) {
  991. this.$http({
  992. url: u,
  993. method: "post",
  994. headers: {
  995. "Content-Type": "application/json",
  996. },
  997. data: v,
  998. }).then((res) => {
  999. if (res.data.result === 1) {
  1000. _this.$message({
  1001. message: res.data.desc,
  1002. type: "error",
  1003. });
  1004. } else {
  1005. _this.$message({
  1006. message: "成功",
  1007. type: "success",
  1008. });
  1009. _this.closedia();
  1010. _this.infolist = {};
  1011. _this.attList = [];
  1012. _this.fileInfo.fileList = [];
  1013. _this.getList(this.params, this.pageSize);
  1014. }
  1015. });
  1016. }
  1017. });
  1018. },
  1019. getStanding() {
  1020. this.$router.push({
  1021. path: "/ywStanding",
  1022. });
  1023. this.setabList("线上业务需求台账", "/ywStanding");
  1024. },
  1025. setabList(n, p) {
  1026. let params = {
  1027. children: "",
  1028. name: n,
  1029. rountPath: p,
  1030. target: "_self",
  1031. };
  1032. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  1033. if (this.$store.state.tabList[i].name === params.name) {
  1034. this.$store.state.tabList[i] = params;
  1035. }
  1036. }
  1037. let set = new Set([...this.$store.state.tabList, params]);
  1038. set.add(params);
  1039. this.$store.commit("setDefaultActive", params.rountPath);
  1040. this.$store.commit("setTabList", Array.from(set));
  1041. },
  1042. //流程
  1043. getTermianl() {
  1044. this.$http({
  1045. url: "/bpm/api/queryBpmProcList",
  1046. method: "post",
  1047. headers: {
  1048. "Content-Type": "application/json",
  1049. page: '{"pageNo":"' + 1 + '","pageSize":"100"}',
  1050. },
  1051. data: {},
  1052. }).then((res) => {
  1053. this.options = res.data.data;
  1054. });
  1055. },
  1056. closeMessage(v) {
  1057. this.centerDialogVisible = false;
  1058. let _this = this;
  1059. if (v === 1) {
  1060. _this
  1061. .$http({
  1062. url: "/bpm/api/deleteBpmPrePlugin",
  1063. method: "post",
  1064. headers: {
  1065. "Content-Type": "application/json",
  1066. },
  1067. data: {
  1068. id: this.delid,
  1069. },
  1070. })
  1071. .then((res) => {
  1072. if (res.data.result === 1) {
  1073. _this.$message({
  1074. message: res.data.desc,
  1075. type: "error",
  1076. });
  1077. } else {
  1078. _this.$message({
  1079. message: "删除成功",
  1080. type: "success",
  1081. });
  1082. _this.getList(this.params, this.pageSize);
  1083. }
  1084. });
  1085. }
  1086. },
  1087. //删除
  1088. delLine(v) {
  1089. this.centerDialogVisible = true;
  1090. this.messTit = "即将删除此条数据, 是否删除?";
  1091. this.delid = v.id;
  1092. },
  1093. //文件返回值
  1094. uploadBack(v) {
  1095. this.attList = v;
  1096. },
  1097. uploadBackin(v) {
  1098. let x = [];
  1099. for (let i = 1; i < v.data.body.length; i++) {
  1100. x.push({
  1101. factoryName: v.data.body[i].factoryName,
  1102. workLoad: v.data.body[i].workLoad,
  1103. });
  1104. }
  1105. this.infodatas = x;
  1106. },
  1107. //功能栏
  1108. iconCli(v) {
  1109. if (v === 1) {
  1110. this.getList(this.params, this.pageSize);
  1111. }
  1112. if (v === 2) {
  1113. this.fullscreen = !this.fullscreen;
  1114. }
  1115. },
  1116. getUser() {
  1117. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  1118. },
  1119. // 字典
  1120. // 需求类别 demandType
  1121. // 承载渠道 demandChnl
  1122. getsaleChnl() {
  1123. this.$http({
  1124. url: "/market/cfgDataDict/queryList",
  1125. method: "post",
  1126. headers: {
  1127. "Content-Type": "application/json",
  1128. },
  1129. data: {
  1130. dictCode: "demandType",
  1131. },
  1132. }).then((res) => {
  1133. this.demandTypeopt = res.data;
  1134. });
  1135. this.$http({
  1136. url: "/market/cfgDataDict/queryList",
  1137. method: "post",
  1138. headers: {
  1139. "Content-Type": "application/json",
  1140. },
  1141. data: {
  1142. dictCode: "demandChnl",
  1143. },
  1144. }).then((res) => {
  1145. this.carryChannelopt = res.data;
  1146. });
  1147. },
  1148. },
  1149. mounted() {
  1150. this.getList({}, 1);
  1151. this.getUser();
  1152. this.getTermianl();
  1153. this.getsaleChnl();
  1154. },
  1155. created() {},
  1156. };
  1157. </script>
  1158. <style scoped lang="scss">
  1159. .onetab {
  1160. margin-bottom: 20px;
  1161. padding: 0 20px;
  1162. }
  1163. .titbox {
  1164. div {
  1165. float: right;
  1166. i {
  1167. font-size: 22px;
  1168. margin-left: 20px;
  1169. cursor: pointer;
  1170. }
  1171. }
  1172. }
  1173. .tabbox {
  1174. margin-top: 15px;
  1175. }
  1176. .pageBox {
  1177. text-align: right;
  1178. margin-top: 10px;
  1179. }
  1180. .info-line {
  1181. width: 100%;
  1182. display: block;
  1183. padding-left: 20px;
  1184. div {
  1185. width: 50%;
  1186. display: inline-block;
  1187. }
  1188. span {
  1189. width: 100px;
  1190. display: inline-block;
  1191. text-align: left;
  1192. i {
  1193. color: red;
  1194. display: inline-block;
  1195. padding-right: 5px;
  1196. }
  1197. }
  1198. .el-select,
  1199. .el-input {
  1200. width: calc(100% - 120px);
  1201. }
  1202. }
  1203. .online {
  1204. width: 100%;
  1205. .el-select {
  1206. width: calc(100% - 100px);
  1207. }
  1208. span {
  1209. vertical-align: top;
  1210. }
  1211. .el-textarea {
  1212. width: calc(100% - 120px);
  1213. }
  1214. .tree {
  1215. width: calc(50% - 60px);
  1216. display: inline-block;
  1217. margin-right: 20px;
  1218. height: 300px;
  1219. overflow-y: scroll;
  1220. .el-icon-error {
  1221. float: right;
  1222. font-size: 20px;
  1223. margin-top: 9px;
  1224. cursor: pointer;
  1225. }
  1226. }
  1227. .treeUser {
  1228. margin: 0;
  1229. border: 1px solid #ddd;
  1230. p {
  1231. background: #f4f4f4;
  1232. padding: 0 20px;
  1233. margin-bottom: 5px;
  1234. }
  1235. }
  1236. .treeUserb {
  1237. width: calc(100% - 100px);
  1238. border: 1px solid #ddd;
  1239. background: #f4f4f4;
  1240. border-radius: 3px;
  1241. height: auto;
  1242. overflow: hidden;
  1243. p {
  1244. display: inline-block;
  1245. padding: 0 20px;
  1246. margin-bottom: 5px;
  1247. }
  1248. }
  1249. }
  1250. .adv-type {
  1251. margin-top: 20px;
  1252. display: flex;
  1253. justify-content: space-between;
  1254. flex-wrap: wrap;
  1255. // border: 1px solid #ddd;
  1256. border-radius: 5px;
  1257. padding: 20px;
  1258. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  1259. div {
  1260. width: 33%;
  1261. text-align: center;
  1262. height: 80px;
  1263. overflow: hidden;
  1264. min-width: 100px;
  1265. cursor: pointer;
  1266. padding-top: 10px;
  1267. margin: 10px 0;
  1268. }
  1269. div:hover {
  1270. background: #cfe8fc;
  1271. border-radius: 5px;
  1272. }
  1273. span {
  1274. width: 100%;
  1275. display: inline-block;
  1276. height: 40px;
  1277. // line-height: 40px;
  1278. i {
  1279. color: #0074d9;
  1280. font-size: 36px;
  1281. }
  1282. }
  1283. }
  1284. </style>