index.vue 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967
  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="demandName" label="需求名称">
  32. </el-table-column>
  33. <el-table-column prop="createName" label="申请姓名">
  34. </el-table-column>
  35. <el-table-column prop="createTimeStr" label="申请时间">
  36. </el-table-column>
  37. <el-table-column prop="stsDesc" label="状态">
  38. <template slot-scope="scope">
  39. {{
  40. scope.row.taskName == "信息补填" && scope.row.stsDesc == "待办"
  41. ? "未办结"
  42. : scope.row.stsDesc
  43. }}
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="操作" width="120px" align="center">
  47. <template slot-scope="scope">
  48. <el-button
  49. size="mini"
  50. type="primary"
  51. @click="dialogCheck(1, scope.row)"
  52. >查看</el-button
  53. >
  54. <el-button
  55. size="mini"
  56. type="danger"
  57. v-if="scope.row.sts !== '4'"
  58. @click="dialogCheck(2, scope.row)"
  59. >处理</el-button
  60. >
  61. <!-- <el-button size="mini" type="danger" @click="delLine(scope.row)">删除</el-button> -->
  62. </template>
  63. </el-table-column>
  64. </el-table>
  65. <el-pagination
  66. class="pageBox"
  67. @current-change="currchange"
  68. layout="prev, pager, next"
  69. background
  70. :total="total"
  71. >
  72. </el-pagination>
  73. </div>
  74. </div>
  75. <el-dialog
  76. :title="titname"
  77. :visible.sync="dialogStatus"
  78. width="50%"
  79. :destroy-on-close="true"
  80. :modal-append-to-body="false"
  81. :close-on-click-modal="false"
  82. :before-close="closedia"
  83. :fullscreen="true"
  84. :key="number"
  85. >
  86. <div v-loading="loadinged" class="simple-dialog">
  87. <el-form :model="infolist" ref="infolist" :rules="rules">
  88. <div class="info-line">
  89. <el-form-item prop="demandName">
  90. <span>需求名称</span>
  91. <el-input
  92. v-model="infolist.demandName"
  93. placeholder="需求名称"
  94. :disabled="disableStatus"
  95. >
  96. </el-input>
  97. </el-form-item>
  98. <el-form-item>
  99. <span>需求编号</span>
  100. <el-input v-model="infolist.woNo" placeholder="需求编号" disabled>
  101. </el-input>
  102. </el-form-item>
  103. <!-- <el-form-item prop="terminal">
  104. <span>申请流程</span>
  105. <el-select clearable v-model="terminal" placeholder="申请流程" :disabled="disableStatus">
  106. <el-option v-for="items in options" :key="items.procId" :label="items.procName"
  107. :value="items.procId">
  108. </el-option>
  109. </el-select>
  110. </el-form-item> -->
  111. <el-form-item>
  112. <span>紧急程度</span>
  113. <el-select
  114. clearable
  115. v-model="infolist.urgDegree"
  116. placeholder="紧急程度"
  117. :disabled="disableStatus"
  118. >
  119. <el-option
  120. v-for="items in urgDegreeopt"
  121. :key="items.id"
  122. :label="items.name"
  123. :value="items.name"
  124. >
  125. </el-option>
  126. </el-select>
  127. </el-form-item>
  128. <el-form-item>
  129. <span>业务主题</span>
  130. <el-input
  131. v-model="infolist.busiSubject"
  132. placeholder="业务主题"
  133. :disabled="disableStatus"
  134. >
  135. </el-input>
  136. </el-form-item>
  137. <el-form-item>
  138. <span>需求类别</span>
  139. <el-select
  140. clearable
  141. v-model="infolist.demandTypeCode"
  142. placeholder="需求类别"
  143. :disabled="disableStatus"
  144. >
  145. <el-option
  146. v-for="items in demandTypeopt"
  147. :key="items.dataCode"
  148. :label="items.dataName"
  149. :value="items.dataCode"
  150. >
  151. </el-option>
  152. </el-select>
  153. </el-form-item>
  154. <el-form-item>
  155. <span>承载渠道</span>
  156. <!-- //multiple -->
  157. <el-select
  158. clearable
  159. multiple
  160. v-model="infolist.carryChannelCode"
  161. placeholder="承载渠道"
  162. :disabled="disableStatus"
  163. >
  164. <el-option
  165. v-for="items in carryChannelopt"
  166. :key="items.dataCode"
  167. :label="items.dataName"
  168. :value="items.dataCode"
  169. >
  170. </el-option>
  171. </el-select>
  172. </el-form-item>
  173. <el-form-item>
  174. <span>加载周期</span>
  175. <el-date-picker
  176. :disabled="disableStatus"
  177. v-model="busiTime"
  178. type="daterange"
  179. placeholder="加载周期"
  180. style="display: inline-flex; width: calc(100% - 120px)"
  181. >
  182. </el-date-picker>
  183. </el-form-item>
  184. </div>
  185. <el-form-item class="info-line online">
  186. <span>需求背景</span>
  187. <el-input
  188. v-model="infolist.demandBackground"
  189. placeholder="需求背景"
  190. type="textarea"
  191. :autosize="{ minRows: 3, maxRows: 10 }"
  192. :disabled="disableStatus"
  193. >
  194. </el-input>
  195. </el-form-item>
  196. <el-form-item class="info-line online">
  197. <span>需求描述</span>
  198. <el-input
  199. v-model="infolist.demandDesc"
  200. placeholder="需求描述"
  201. type="textarea"
  202. :autosize="{ minRows: 3, maxRows: 10 }"
  203. :disabled="disableStatus"
  204. >
  205. </el-input>
  206. </el-form-item>
  207. <!-- 附件展示 -->
  208. <div
  209. style="padding: 0 20px 0 120px; margin-bottom: 20px"
  210. v-if="disableStatus"
  211. >
  212. <uploadDown
  213. :datalist="datalist"
  214. :dialogStatus="uploadstatus"
  215. ></uploadDown>
  216. </div>
  217. <!-- 附件上传 -->
  218. <div v-if="!disableStatus" class="info-line online">
  219. <span style="width: 80px">附件</span>
  220. <el-upload
  221. class="info-upload"
  222. :limit="3"
  223. action=""
  224. :on-preview="handlePreview"
  225. :on-remove="handleRemove"
  226. :http-request="handleSuccess"
  227. :file-list="file"
  228. drag
  229. multiple
  230. >
  231. <div class="upload">
  232. <i class="el-icon-upload"></i>
  233. <p class="el-upload__text">
  234. 将文件拖到此处,或<em>点击上传</em>
  235. </p>
  236. </div>
  237. </el-upload>
  238. </div>
  239. <!-- 信息补填的情况 -->
  240. <el-upload
  241. v-if="vision == '信息补填'"
  242. style="float: right; margin-bottom: 20px"
  243. action=""
  244. :http-request="handleMessage"
  245. :show-file-list="false"
  246. ><el-button size="small" type="primary">导入</el-button></el-upload
  247. >
  248. <div
  249. style="margin: 20px 0; padding: 0 20px"
  250. v-if="vision == '信息补填'"
  251. >
  252. <el-table
  253. class="com-table"
  254. ref="multipleTable"
  255. :data="infodatas"
  256. tooltip-effect="dark"
  257. size="small"
  258. border
  259. style="width: 100%"
  260. >
  261. <el-table-column prop="infoName" label="需求承接支撑方">
  262. <template slot-scope="scope">
  263. <el-input
  264. v-model="scope.row.factoryName"
  265. :disabled="tableSatus === '4'"
  266. ></el-input>
  267. </template>
  268. </el-table-column>
  269. <el-table-column prop="infoName" label="涉及发生工作量">
  270. <template slot-scope="scope">
  271. <el-input
  272. v-model="scope.row.workLoad"
  273. :disabled="tableSatus === '4'"
  274. ></el-input>
  275. </template>
  276. </el-table-column>
  277. <el-table-column
  278. label="操作"
  279. width="120px"
  280. align="center"
  281. v-if="titname == '审批'"
  282. >
  283. <template slot-scope="scope">
  284. <el-button
  285. size="mini"
  286. type="primary"
  287. :disabled="tableSatus === '4'"
  288. @click="choline(1, scope)"
  289. >添加</el-button
  290. >
  291. <el-button
  292. size="mini"
  293. type="danger"
  294. :disabled="tableSatus === '4'"
  295. @click="choline(2, scope)"
  296. >删除</el-button
  297. >
  298. </template>
  299. </el-table-column>
  300. </el-table>
  301. </div>
  302. <el-form-item class="info-line online" v-if="visionsts == '2'">
  303. <span>审批说明</span>
  304. <el-input
  305. v-model="remark"
  306. placeholder="审批说明"
  307. type="textarea"
  308. :rows="3"
  309. :disabled="titname == '查看'"
  310. >
  311. </el-input>
  312. </el-form-item>
  313. <div
  314. style="margin: 20px 0px; padding: 0 20px"
  315. v-if="titname !== '添加'"
  316. >
  317. <el-table
  318. class="com-table"
  319. :data="rovaList"
  320. tooltip-effect="dark"
  321. size="small"
  322. border
  323. style="width: 100%"
  324. >
  325. <el-table-column prop="logNo" label="编号"> </el-table-column>
  326. <el-table-column prop="stepName" label="环节"> </el-table-column>
  327. <el-table-column prop="processName" label="处理人">
  328. </el-table-column>
  329. <el-table-column prop="processWorkNo" label="处理人工号">
  330. </el-table-column>
  331. <el-table-column prop="updateTimeStr" label="处理时间">
  332. </el-table-column>
  333. <el-table-column prop="remark" label="备注"> </el-table-column>
  334. </el-table>
  335. </div>
  336. </el-form>
  337. <div slot="footer" class="info-footer">
  338. <div v-if="titname === '添加' || step === '0'">
  339. <el-button type="primary" @click="handleApprove('送部门人员审核')"
  340. >送部门人员审核</el-button
  341. >
  342. <el-button type="primary" @click="handleApprove('送领导审核')"
  343. >送领导审核</el-button
  344. >
  345. <el-button @click="handleApprove('取消')">取消</el-button>
  346. </div>
  347. <div v-else>
  348. <el-button
  349. v-for="(item, index) in buttonList"
  350. :key="index"
  351. type="primary"
  352. @click="handleApprove(item)"
  353. >{{ item }}</el-button
  354. >
  355. <el-button @click="handleApprove('取消')">取消</el-button>
  356. </div>
  357. </div>
  358. </div>
  359. </el-dialog>
  360. <el-dialog
  361. title="选择审批领导"
  362. :visible.sync="checkLaeder"
  363. width="500px"
  364. :destroy-on-close="true"
  365. :modal-append-to-body="false"
  366. :close-on-click-modal="false"
  367. >
  368. <div>
  369. <el-form>
  370. <el-form-item
  371. label="审批领导"
  372. :rules="{
  373. required: true,
  374. message: '请选择审批领导',
  375. trigger: 'change',
  376. }"
  377. >
  378. <el-select v-model="leader">
  379. <el-option
  380. v-for="(item, index) in leaderList"
  381. :key="index"
  382. :label="item.label"
  383. :value="item.value"
  384. >
  385. </el-option>
  386. </el-select> </el-form-item
  387. ></el-form>
  388. </div>
  389. <div slot="footer">
  390. <el-button type="primary" size="small" @click="formSubmit(2)"
  391. >确 定</el-button
  392. >
  393. <el-button @click="checkLaeder = false" size="small">取 消</el-button>
  394. </div>
  395. </el-dialog>
  396. <el-dialog
  397. title="选择审批人"
  398. :visible.sync="checkexa"
  399. width="50%"
  400. :destroy-on-close="true"
  401. :modal-append-to-body="false"
  402. :close-on-click-modal="false"
  403. >
  404. <div>
  405. <el-form :model="infolist" ref="infolist" :rules="rules">
  406. <el-form-item prop="visiblec" class="info-line online">
  407. <span>审批人员</span>
  408. <deptTreeOnly
  409. class="tree"
  410. @treeCheck="treeCheckonly"
  411. :defaultList="defaultList"
  412. :type="depttype"
  413. :closeList="closeList"
  414. :reset-list="treeList"
  415. :only="only"
  416. ></deptTreeOnly>
  417. <div class="tree treeUser">
  418. <p v-for="(item, index) in treeList" :key="index">
  419. {{ item.label }}
  420. <i
  421. v-if="item.label"
  422. @click="deletes(item)"
  423. class="el-icon-error"
  424. ></i>
  425. </p>
  426. </div>
  427. </el-form-item>
  428. </el-form>
  429. <div slot="footer" style="text-align: right; padding-bottom: 20px">
  430. <el-button type="primary" @click="formSubmit(1)">确 定</el-button>
  431. <el-button @click="checkexa = false">取 消</el-button>
  432. </div>
  433. </div>
  434. </el-dialog>
  435. <myMessage
  436. :messTit="messTit"
  437. @closeMessage="closeMessage"
  438. :centerDialogVisible="centerDialogVisible"
  439. v-if="centerDialogVisible"
  440. ></myMessage>
  441. </fullscreen>
  442. </template>
  443. <script>
  444. import myMessage from "../../../components/myMessage.vue";
  445. import toolList from "../../../components/toolList";
  446. import myUpload from "../../../components/upload";
  447. import uploadDown from "../../../components/uploadDown.vue";
  448. import deptTreeOnly from "../performance/components/deptTreeOnly.vue";
  449. const Excel = require("exceljs");
  450. export default {
  451. components: {
  452. // mySearch,
  453. myMessage,
  454. toolList,
  455. myUpload,
  456. uploadDown,
  457. deptTreeOnly,
  458. },
  459. data() {
  460. return {
  461. rules: {
  462. demandName: [
  463. {
  464. required: true,
  465. trigger: "blur",
  466. message: "不能为空",
  467. },
  468. ],
  469. },
  470. // 操作名称
  471. operateName: "",
  472. woNo: "",
  473. fileDeletId: [],
  474. // 当前进行到的步骤计数
  475. step: "",
  476. tooltit: "线上渠道业务需求",
  477. fullscreen: false,
  478. total: 0,
  479. // pageSize: 1,
  480. tableData: [],
  481. disableStatus: true,
  482. // 查看 审批 添加 弹出层 状态
  483. page: 1,
  484. pageSize: 10,
  485. file: [], // 附件数组
  486. titname: "",
  487. dialogStatus: false,
  488. tableSatus: null,
  489. number: 0,
  490. // 按钮标识
  491. type: "",
  492. // 联系人
  493. checkLaeder: false,
  494. checkexa: false,
  495. // 审核人组件只可选一人
  496. leader: "",
  497. leaderList: [
  498. {
  499. label: "王其侠(二级经理正职)",
  500. value: "wangqixia",
  501. },
  502. {
  503. label: "张志伟(二级经理副职)",
  504. value: "zhangzhiwei",
  505. },
  506. {
  507. label: "金鑫(二级经理副职)",
  508. value: "jinxin",
  509. },
  510. {
  511. label: "于洋(二级经理副职)",
  512. value: "yuyang01",
  513. },
  514. ],
  515. // 用来控制多选里的单选
  516. only: false,
  517. // 信息回显
  518. infolist: {},
  519. // 用户信息
  520. userInfo: {},
  521. buttonList: [
  522. "送部门人员审核",
  523. "送领导审核",
  524. "送申请人编号发送",
  525. "确认编号",
  526. "确认需求",
  527. "送项目经理会签",
  528. "送电商接口人阅办",
  529. "送其他人办理",
  530. "确认上线",
  531. "已办结",
  532. "打回",
  533. ],
  534. params: {},
  535. centerDialogVisible: false,
  536. messTit: "",
  537. delid: "",
  538. loading: false,
  539. loadinged: false,
  540. fileInfo: {
  541. limit: 5,
  542. url: "/bpm/api/upload",
  543. fileList: [],
  544. },
  545. rovaList: [],
  546. vision: "",
  547. datalist: {
  548. url: "/bpm/api/download",
  549. type: 1,
  550. },
  551. uploadstatus: false,
  552. mydisable: 1,
  553. opname: "",
  554. opno: "",
  555. attList: [],
  556. options: [],
  557. terminal: "729289304205336576",
  558. // terminal: '722743473704595456',//722743473704595456省722748981018685440
  559. remark: "",
  560. visionsts: "1",
  561. visionchonly: false,
  562. ifopt: [
  563. {
  564. id: 1,
  565. name: "是",
  566. },
  567. {
  568. id: 0,
  569. name: "否",
  570. },
  571. ],
  572. infodatas: [],
  573. busiTime: [],
  574. urgDegreeopt: [
  575. {
  576. id: 1,
  577. name: "正常",
  578. },
  579. {
  580. id: 2,
  581. name: "紧急",
  582. },
  583. {
  584. id: 3,
  585. name: "非常紧急",
  586. },
  587. ],
  588. demandTypeopt: [],
  589. carryChannelopt: [],
  590. treeList: [],
  591. treeListonly: {},
  592. defaultList: [],
  593. closeList: false,
  594. depttype: 0,
  595. fileInfoin: {
  596. type: "btn",
  597. typename: "导入",
  598. btntype: "primary",
  599. limit: 1,
  600. url: "/market/cChannelDemand/demandCarryImport",
  601. fileList: [],
  602. },
  603. tempSave: false,
  604. };
  605. },
  606. watch: {
  607. "datalist.attList"() {
  608. this.number++;
  609. },
  610. // tempSave(value) {
  611. // if (value) {
  612. // // 监听编辑状态,每20秒请求一次,注意函数不加()
  613. // this.timer = window.setInterval(this.temp, 20000);
  614. // } else {
  615. // // 停止监听
  616. // clearInterval(this.timer);
  617. // }
  618. // },
  619. },
  620. methods: {
  621. // 新的处理方法
  622. handlePreview(file) {
  623. console.log(file, "Preview");
  624. },
  625. handleRemove(file) {
  626. if (file.id) {
  627. this.fileDeletId.push(file.id);
  628. }
  629. this.file = this.file.filter((el) => el.uid !== file.uid);
  630. },
  631. handleSuccess({ file }) {
  632. this.file.push(file);
  633. },
  634. handleMessage({ file }) {
  635. const workbook = new Excel.Workbook();
  636. // workbook.xlsx.readFile(file.path) // use path
  637. const Array = [];
  638. workbook.xlsx.load(file).then(async () => {
  639. const worksheet = await workbook.getWorksheet(1);
  640. worksheet.eachRow(({ values }) => {
  641. let obj = {
  642. factoryName: values[1],
  643. workLoad: values[2],
  644. };
  645. Array.push(obj);
  646. });
  647. if (
  648. this.infodatas.length === 1 &&
  649. !this.infodatas[0].factoryName &&
  650. !this.infodatas[0].workLoad
  651. ) {
  652. this.infodatas = Array;
  653. } else {
  654. this.infodatas.push(...Array);
  655. }
  656. });
  657. },
  658. handleApprove(type) {
  659. if (type === "取消") {
  660. // this.dialogStatus = false;
  661. // this.disableStatus = false;
  662. // this.only = false;
  663. // this.number++;
  664. // this.infolist = {};
  665. this.closedia();
  666. return;
  667. }
  668. this.$refs.infolist.validate((val) => {
  669. if (val) {
  670. switch (type) {
  671. case "送部门人员审核":
  672. this.operateName = "送部门人员审核";
  673. this.checkexa = true;
  674. this.type = "0";
  675. console.log("送部门人员审核");
  676. break;
  677. case "送领导审核":
  678. this.operateName = "送领导审核";
  679. this.type = "1";
  680. this.checkLaeder = true;
  681. console.log("送领导审核");
  682. break;
  683. case "送起草人编号发送":
  684. this.handleSendNo();
  685. break;
  686. case "确认编号":
  687. this.handleComfirmNo();
  688. break;
  689. case "打回":
  690. this.handleBackRecord();
  691. break;
  692. case "确认需求":
  693. this.checkexa = true;
  694. this.type = "0";
  695. this.operateName = "确认需求";
  696. break;
  697. case "送项目经理会签":
  698. this.checkexa = true;
  699. this.type = "0";
  700. this.operateName = "送项目经理会签";
  701. break;
  702. case "送电商接口人阅办":
  703. this.operateName = "送电商接口人阅办";
  704. this.handleDeliverReadOfficeOrOtherDo("1");
  705. break;
  706. case "送其他人办理":
  707. this.checkexa = true;
  708. this.only = true;
  709. this.operateName = "送其他人办理";
  710. break;
  711. case "确认上线":
  712. this.operateName = "确认上线";
  713. this.handleConfirmOnline("1");
  714. break;
  715. case "已办结":
  716. this.operateName = "已办结";
  717. this.handleConfirmOnline("2");
  718. break;
  719. case "保存":
  720. this.operateName = "保存";
  721. this.handleConfirmOnline("3");
  722. break;
  723. }
  724. }
  725. });
  726. },
  727. // 确认上线/已办结
  728. handleConfirmOnline(type) {
  729. let flag = 1;
  730. const factoryName = [];
  731. const workLoad = [];
  732. this.infodatas.forEach((el) => {
  733. // 判断条件
  734. if (el.factoryName && el.workLoad) {
  735. flag = flag * 1;
  736. factoryName.push(el.factoryName);
  737. workLoad.push(el.workLoad);
  738. } else {
  739. flag = flag * 0;
  740. }
  741. });
  742. if (flag) {
  743. let reqdata = {
  744. operateName: this.operateName,
  745. type,
  746. support: factoryName,
  747. workload: workLoad,
  748. woNo: this.woNo + "",
  749. };
  750. this.$http({
  751. url: "/market/mkOnlineChannel/confirmOnline",
  752. method: "post",
  753. headers: {
  754. "Content-Type": "application/json",
  755. },
  756. data: reqdata,
  757. }).then(({ data: { desc } }) => {
  758. console.log(desc);
  759. if (desc === "操作成功") {
  760. this.$message.success("操作成功");
  761. this.dialogStatus = false;
  762. this.handleInit();
  763. this.closedia();
  764. } else {
  765. this.$message.error("操作失败");
  766. }
  767. });
  768. } else {
  769. this.$message.error("请输入必要的信息");
  770. }
  771. },
  772. // 送电商接口人阅办或送其他人办理
  773. handleDeliverReadOfficeOrOtherDo(type) {
  774. console.log(this.operateName, type);
  775. let receiveId = [];
  776. let receiveName = [];
  777. // console.log(this.treeList);
  778. this.treeList.forEach((item) => {
  779. receiveId.push(item.loginNoStr);
  780. receiveName.push(item.label);
  781. });
  782. let reqdata = {
  783. operateName: this.operateName,
  784. type,
  785. reviewOpinion: this.operateName + "," + this.remark,
  786. woId: this.woNo + "",
  787. };
  788. if (type === "2") {
  789. reqdata = {
  790. ...reqdata,
  791. receiveId: receiveId.join(","),
  792. receiveName: receiveName.join(","),
  793. };
  794. }
  795. console.log(reqdata);
  796. this.$http({
  797. url: "/market/mkOnlineChannel/deliverReadOfficeOrOtherDo",
  798. method: "post",
  799. headers: {
  800. "Content-Type": "application/json",
  801. },
  802. data: reqdata,
  803. }).then(({ data: { desc } }) => {
  804. console.log(desc);
  805. if (desc === "操作成功") {
  806. this.$message.success("操作成功");
  807. this.checkexa = false;
  808. this.dialogStatus = false;
  809. this.handleInit();
  810. this.closedia();
  811. } else {
  812. this.$message.error("操作失败");
  813. }
  814. });
  815. },
  816. // 电商接口人阅办---送项目经理会签
  817. handleCountersigned() {
  818. let receiveId = [];
  819. let receiveName = [];
  820. console.log(this.treeList);
  821. this.treeList.forEach((item) => {
  822. receiveId.push(item.loginNoStr);
  823. receiveName.push(item.label);
  824. });
  825. let reqdata = {
  826. operateName: this.operateName,
  827. receiveId: receiveId.join(","),
  828. receiveName: receiveName.join(","),
  829. reviewOpinion: this.operateName + "," + this.remark,
  830. woNo: this.woNo + "",
  831. };
  832. console.log(reqdata);
  833. this.$http({
  834. url: "/market/mkOnlineChannel/countersigned",
  835. method: "post",
  836. headers: {
  837. "Content-Type": "application/json",
  838. },
  839. data: reqdata,
  840. }).then(({ data: { desc } }) => {
  841. console.log(desc);
  842. if (desc === "操作成功") {
  843. this.$message.success("操作成功");
  844. this.checkexa = false;
  845. this.dialogStatus = false;
  846. this.handleInit();
  847. this.closedia();
  848. } else {
  849. this.$message.error("操作失败");
  850. }
  851. });
  852. },
  853. // 确认需求
  854. handleNeedyComfirm() {
  855. let receiveId = [];
  856. let receiveName = [];
  857. // console.log(this.treeList);
  858. this.treeList.forEach((item) => {
  859. receiveId.push(item.loginNoStr);
  860. receiveName.push(item.label);
  861. });
  862. let reqdata = {
  863. operateName: this.operateName,
  864. receiveId: receiveId.join(","),
  865. receiveName: receiveName.join(","),
  866. reviewOpinion: this.operateName + "," + this.remark,
  867. woNo: this.woNo + "",
  868. };
  869. console.log(reqdata);
  870. this.$http({
  871. url: "/market/mkOnlineChannel/confirmDemand",
  872. method: "post",
  873. headers: {
  874. "Content-Type": "application/json",
  875. },
  876. data: reqdata,
  877. }).then(({ data: { desc } }) => {
  878. console.log(desc);
  879. if (desc === "操作成功") {
  880. this.$message.success("操作成功");
  881. this.checkexa = false;
  882. this.dialogStatus = false;
  883. this.handleInit();
  884. this.closedia();
  885. } else {
  886. this.$message.error("操作失败");
  887. }
  888. });
  889. },
  890. // 打回方法
  891. handleBackRecord() {
  892. this.$http({
  893. url: "/market/mkOnlineChannel/backRecord",
  894. method: "get",
  895. headers: {
  896. "Content-Type": "application/json",
  897. },
  898. params: {
  899. woNo: this.woNo,
  900. remark: this.remark,
  901. },
  902. }).then(({ data: { desc } }) => {
  903. console.log(desc);
  904. if (desc === "操作成功") {
  905. this.$message.success("操作成功");
  906. this.dialogStatus = false;
  907. this.handleInit();
  908. this.closedia();
  909. } else {
  910. this.$message.error("操作失败");
  911. }
  912. });
  913. },
  914. // 表单提交
  915. formSubmit(type) {
  916. if (type === 1) {
  917. if (!this.treeList.length) {
  918. this.$message.error("请选择审核人员");
  919. return;
  920. }
  921. } else {
  922. if (!this.leader) {
  923. this.$message.error("请选择审核领导");
  924. return;
  925. }
  926. }
  927. let request = 0;
  928. let formData = new FormData();
  929. let origin_params = {};
  930. if (this.infolist.woNo) {
  931. origin_params = {
  932. // 需求编号
  933. woNo: this.infolist.woNo,
  934. createId: this.infolist.createId,
  935. createName: this.infolist.createName,
  936. id: this.infolist.id,
  937. delFileId: this.fileDeletId.join(","),
  938. };
  939. }
  940. let params = {
  941. ...origin_params,
  942. // 需求名称
  943. demandName: this.infolist.demandName,
  944. // 紧急程度
  945. urgDegree: this.infolist.urgDegree,
  946. // 业务主题
  947. busiSubject: this.infolist.busiSubject,
  948. // 需求类别
  949. demandTypeCode: this.infolist.busiSubject,
  950. //承载渠道
  951. carryChannelCode: this.infolist.carryChannelCode.join(","),
  952. // 加载周期 起止
  953. busiStartTime: this.busiTime[0]
  954. ? this.$formatDate(this.busiTime[0], "YYYY-MM-DD HH:mm:ss")
  955. : "",
  956. busiEndTime: this.busiTime[1]
  957. ? this.$formatDate(this.busiTime[1], "YYYY-MM-DD HH:mm:ss")
  958. : "",
  959. // 需求背景
  960. demandBackground: this.infolist.demandBackground,
  961. // 需求描述
  962. demandDesc: this.infolist.demandDesc,
  963. // 审批说明
  964. remark: this.remark,
  965. // 审核人员
  966. loginNameList: this.treeList.length
  967. ? this.treeList.map((el) => {
  968. return el.label;
  969. })
  970. : [this.leader],
  971. loginNoList: this.treeList.length
  972. ? this.treeList.map((el) => {
  973. return el.loginNoStr;
  974. })
  975. : [this.leader],
  976. type: this.type,
  977. // fileList: this.file,
  978. };
  979. // 处理其他参数
  980. for (let key in params) {
  981. formData.append(key, params[key]);
  982. }
  983. // 这是处理文件的参数
  984. if (this.file.length) {
  985. this.file.forEach((el, index) => {
  986. if (el.constructor.name === "File") {
  987. formData.append(`file${index + 1}`, el);
  988. }
  989. });
  990. }
  991. if (this.operateName === "确认需求") {
  992. this.handleNeedyComfirm();
  993. return;
  994. }
  995. if (this.operateName === "送项目经理会签") {
  996. this.handleCountersigned();
  997. return;
  998. }
  999. if (this.operateName === "送其他人办理") {
  1000. this.handleDeliverReadOfficeOrOtherDo("2");
  1001. return;
  1002. }
  1003. request = 1;
  1004. if (request) {
  1005. this.$http({
  1006. url: "/market/mkOnlineChannel/saveOrUpdate",
  1007. method: "post",
  1008. headers: {
  1009. "Content-Type": "multipart/form-data",
  1010. },
  1011. data: formData,
  1012. }).then(({ data }) => {
  1013. if (data && data.desc === "操作成功") {
  1014. this.$message({
  1015. type: "success",
  1016. message: data.desc,
  1017. });
  1018. this.closedia();
  1019. this.handleInit();
  1020. }
  1021. });
  1022. }
  1023. },
  1024. // 送起草人编号发送
  1025. handleSendNo() {
  1026. this.$http({
  1027. url: "/market/mkOnlineChannel/createDemandNo",
  1028. method: "get",
  1029. headers: {
  1030. "Content-Type": "application/json",
  1031. },
  1032. params: {
  1033. woNo: this.woNo,
  1034. },
  1035. }).then(({ data: { desc } }) => {
  1036. console.log(desc);
  1037. if (desc === "操作成功") {
  1038. this.$message.success("操作成功");
  1039. this.handleInit();
  1040. this.closedia();
  1041. } else {
  1042. this.$message.error("操作失败");
  1043. }
  1044. });
  1045. },
  1046. // 确认编号
  1047. handleComfirmNo() {
  1048. this.$http({
  1049. url: "/market/mkOnlineChannel/confirmNumber",
  1050. method: "post",
  1051. headers: {
  1052. "Content-Type": "application/json",
  1053. },
  1054. data: { woNo: this.woNo + "" },
  1055. }).then(({ data: { desc } }) => {
  1056. console.log(desc);
  1057. if (desc === "操作成功") {
  1058. this.$message.success("操作成功");
  1059. this.handleInit();
  1060. this.closedia();
  1061. } else {
  1062. this.$message.error("操作失败");
  1063. }
  1064. });
  1065. },
  1066. // 初始化列表接口
  1067. handleInit() {
  1068. this.$http({
  1069. url: "/market/mkOnlineChannel/queryPage",
  1070. method: "post",
  1071. headers: {
  1072. "Content-Type": "application/json",
  1073. },
  1074. data: {
  1075. page: this.page,
  1076. pageSize: this.pageSize,
  1077. },
  1078. }).then(
  1079. ({
  1080. data: {
  1081. body: { data },
  1082. },
  1083. }) => {
  1084. this.tableData = data;
  1085. }
  1086. );
  1087. },
  1088. // 查看详情接口封装
  1089. queryDetails(id) {
  1090. this.$http({
  1091. url: "/market/mkOnlineChannel/getMkOnlineChannelById",
  1092. method: "post",
  1093. headers: {
  1094. "Content-Type": "application/json",
  1095. },
  1096. data: id,
  1097. }).then(
  1098. ({
  1099. data: {
  1100. body: { button, mkOnlineChannel },
  1101. },
  1102. }) => {
  1103. this.buttonList = button;
  1104. this.infolist = {
  1105. ...mkOnlineChannel,
  1106. carryChannelCode: mkOnlineChannel.carryChannelCode.split(","),
  1107. };
  1108. this.busiTime = [
  1109. mkOnlineChannel.busiStartTime,
  1110. mkOnlineChannel.busiEndTime,
  1111. ];
  1112. this.rovaList = mkOnlineChannel.logList;
  1113. this.datalist = {
  1114. ...this.datalist,
  1115. attList: mkOnlineChannel.attList,
  1116. };
  1117. this.file = [
  1118. ...mkOnlineChannel.attList.map((el) => ({
  1119. ...el,
  1120. name: el.fileName,
  1121. })),
  1122. ];
  1123. //表单编号
  1124. this.woNo = mkOnlineChannel.woNo;
  1125. // 步骤
  1126. this.step = mkOnlineChannel.step;
  1127. // 最后一步是否办结
  1128. this.tableSatus = mkOnlineChannel.sts;
  1129. this.dialogStatus = true;
  1130. if (this.titname === "添加") {
  1131. // 审批说明
  1132. this.visionsts = "";
  1133. this.disableStatus = false;
  1134. } else {
  1135. if (this.titname === "查看") {
  1136. this.disableStatus = true;
  1137. this.visionsts = "";
  1138. // 数组回显
  1139. this.infodatas = mkOnlineChannel.logList;
  1140. } else {
  1141. // 这里就是审批
  1142. if (this.step === "0") {
  1143. this.disableStatus = false;
  1144. this.visionsts = "";
  1145. return;
  1146. }
  1147. this.disableStatus = true;
  1148. this.dialogStatus = true;
  1149. if (this.step === "7") {
  1150. this.vision = "信息补填";
  1151. this.visionsts = "";
  1152. this.infodatas = mkOnlineChannel.workloadAndsupport.length
  1153. ? mkOnlineChannel.workloadAndsupport.map((el) => ({
  1154. factoryName: el.support,
  1155. workLoad: el.workload,
  1156. }))
  1157. : [
  1158. {
  1159. factoryName: "",
  1160. workLoad: "",
  1161. },
  1162. ];
  1163. } else {
  1164. // 数组回显
  1165. this.infodatas = mkOnlineChannel.logList;
  1166. this.visionsts = "2";
  1167. }
  1168. }
  1169. }
  1170. }
  1171. );
  1172. },
  1173. // 老方法
  1174. temp() {
  1175. if (JSON.stringify(this.infolist) == "{}") {
  1176. return;
  1177. }
  1178. let params = {};
  1179. params.infolist = this.infolist;
  1180. params.fileList = [];
  1181. params.attList = [];
  1182. this.attList.forEach((item) => {
  1183. let file = {
  1184. id: item.fileCode,
  1185. fileCode: item.fileCode,
  1186. fileName: item.fileName,
  1187. name: item.fileName,
  1188. };
  1189. params.fileList.push(file);
  1190. params.attList.push(file);
  1191. });
  1192. this.$http({
  1193. url: "/market/bpmTemp/temp",
  1194. method: "post",
  1195. headers: {
  1196. "Content-Type": "application/json",
  1197. },
  1198. data: {
  1199. bpmType: "1",
  1200. content: JSON.stringify(params),
  1201. },
  1202. }).then((res) => {
  1203. //console.log(res)
  1204. });
  1205. },
  1206. deletes(v) {
  1207. // this.treeListonly = {};
  1208. this.treeList = this.treeList.filter(
  1209. (el) => el.loginNoStr !== v.loginNoStr
  1210. );
  1211. this.closeList = !this.closeList;
  1212. },
  1213. treeCheckonly(v) {
  1214. this.treeList = v;
  1215. // this.treeListonly = v;
  1216. },
  1217. choline(v, n) {
  1218. if (v == 1) {
  1219. this.infodatas.push({});
  1220. } else {
  1221. this.infodatas.splice(n.$index, 1);
  1222. }
  1223. },
  1224. closedia() {
  1225. // dialog回显信息
  1226. this.infolist = {};
  1227. // 图片
  1228. this.attList = [];
  1229. this.file = [];
  1230. // 审核人
  1231. this.treeList = [];
  1232. // 时间
  1233. this.busiTime = [];
  1234. // 领导人
  1235. this.checkLaeder = false;
  1236. // 审核领导
  1237. this.leader = "";
  1238. this.remark = "";
  1239. // 审批状态的图片
  1240. delete this.datalist.attList;
  1241. this.fileInfo.fileList = [];
  1242. // 弹出层
  1243. this.dialogStatus = false;
  1244. // 审核人
  1245. this.checkexa = false;
  1246. // 审核人单选是否开启
  1247. this.only = false;
  1248. },
  1249. //获取列表
  1250. getList(v, n) {
  1251. this.pageSize = n;
  1252. let _this = this;
  1253. this.loading = true;
  1254. v.procName = "业务需求申请(地市公司),业务需求申请(省公司)";
  1255. this.$http({
  1256. url: "/bpm/api/queryToDoAndFinishTaskList",
  1257. method: "post",
  1258. headers: {
  1259. "Content-Type": "application/json",
  1260. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  1261. },
  1262. data: v,
  1263. }).then((res) => {
  1264. this.tableData = res.data.data;
  1265. this.total = res.data.totalRecord;
  1266. this.loading = false;
  1267. });
  1268. },
  1269. // 分页
  1270. currchange(v) {
  1271. this.pageSize = v;
  1272. this.getList(this.params, this.pageSize);
  1273. },
  1274. //申请 // 打开弹出层
  1275. dialogCheck(type, data) {
  1276. // let infolist = Object.assign({}, n);
  1277. this.vision = "";
  1278. this.visionsts = "";
  1279. if (type === 1) {
  1280. this.titname = "查看";
  1281. this.visionsts = "2";
  1282. this.queryDetails(data.woNo);
  1283. } else if (type === 2) {
  1284. this.titname = "审批";
  1285. this.visionsts = "2";
  1286. this.queryDetails(data.woNo);
  1287. } else if (type === 3) {
  1288. this.titname = "添加";
  1289. this.dialogStatus = true;
  1290. this.visionchonly = false;
  1291. this.disableStatus = false;
  1292. // this.$http({
  1293. // url: "/market/bpmTemp/query",
  1294. // method: "post",
  1295. // headers: { "Content-Type": "application/json" },
  1296. // data: { bpmType: "1" },
  1297. // }).then((res) => {
  1298. // if (res.data) {
  1299. // let content = JSON.parse(res.data.content);
  1300. // this.infolist = content.infolist;
  1301. // this.attList = content.attList;
  1302. // this.fileInfo.fileList = content.fileList;
  1303. // }
  1304. // // this.tempSave = true;
  1305. // });
  1306. // return;
  1307. }
  1308. // this.$http({
  1309. // url: "/bpm/api/taskInit",
  1310. // method: "post",
  1311. // headers: {
  1312. // "Content-Type": "application/json",
  1313. // },
  1314. // data: {
  1315. // woNo: n.woNo,
  1316. // },
  1317. // }).then((res) => {
  1318. // // this.infolist = Object.assign({}, res.data);
  1319. // this.terminal = infolist.procId;
  1320. // this.opname = res.data.opName;
  1321. // this.opno = res.data.opNo;
  1322. // this.infolist = JSON.parse(res.data.params.terminalRes);
  1323. // res.data.params.fillList
  1324. // ? (this.infodatas = JSON.parse(res.data.params.fillList))
  1325. // : "";
  1326. // this.infolist.procId = infolist.procId;
  1327. // this.infolist.procVersion = infolist.procVersion;
  1328. // this.remark = infolist.remark;
  1329. // this.infolist.stepId = infolist.stepId;
  1330. // this.infolist.taskId = infolist.taskId;
  1331. // this.infolist.taskName = infolist.taskName;
  1332. // this.infolist.opName = infolist.opName;
  1333. // this.infolist.opNo = infolist.opNo;
  1334. // this.infolist.opTime = infolist.opTime;
  1335. // this.infolist.woNo = infolist.woNo;
  1336. // this.busiTime = [];
  1337. // this.busiTime[0] = this.infolist.busiStartTime;
  1338. // this.busiTime[1] = this.infolist.busiEndTime;
  1339. // this.visionchonly = false;
  1340. // if (
  1341. // res.data.taskList[res.data.taskList.length - 1].taskName == "流程发起"
  1342. // ) {
  1343. // this.vision = "流程发起";
  1344. // if (this.titname == "审批") {
  1345. // this.disableStatus = false;
  1346. // }
  1347. // this.visionchonly = true;
  1348. // } else if (
  1349. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1350. // "科室主任初审"
  1351. // ) {
  1352. // this.vision = "科室主任初审";
  1353. // this.visionsts = "2";
  1354. // this.visionchonly = true;
  1355. // } else if (
  1356. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1357. // "部门副主任复审"
  1358. // ) {
  1359. // this.vision = "部门副主任复审";
  1360. // this.visionsts = "2";
  1361. // this.visionchonly = true;
  1362. // } else if (
  1363. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1364. // "主管副总终审" ||
  1365. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1366. // "部门副主任终审"
  1367. // ) {
  1368. // this.vision = "主管副总终审";
  1369. // this.visionsts = "2";
  1370. // this.visionchonly = true;
  1371. // } else if (
  1372. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1373. // "需求预评估"
  1374. // ) {
  1375. // this.vision = "需求预评估";
  1376. // this.visionsts = "2";
  1377. // this.visionchonly = true;
  1378. // } else if (
  1379. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1380. // "需求预评估初审"
  1381. // ) {
  1382. // this.vision = "需求预评估初审";
  1383. // this.visionsts = "2";
  1384. // this.visionchonly = true;
  1385. // } else if (
  1386. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1387. // "需求预评估复审"
  1388. // ) {
  1389. // this.vision = "需求预评估复审";
  1390. // this.visionsts = "2";
  1391. // this.visionchonly = true;
  1392. // } else if (
  1393. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1394. // "渠道经理会签"
  1395. // ) {
  1396. // this.vision = "渠道经理会签";
  1397. // this.visionsts = "2";
  1398. // this.visionchonly = true;
  1399. // } else if (
  1400. // res.data.taskList[res.data.taskList.length - 1].taskName == "需求确认"
  1401. // ) {
  1402. // this.vision = "需求确认";
  1403. // this.visionsts = "3";
  1404. // this.visionchonly = true;
  1405. // } else if (
  1406. // res.data.taskList[res.data.taskList.length - 1].taskName == "上线管理"
  1407. // ) {
  1408. // this.vision = "上线管理";
  1409. // this.visionsts = "3";
  1410. // this.visionchonly = true;
  1411. // } else if (
  1412. // res.data.taskList[res.data.taskList.length - 1].taskName == "上线验证"
  1413. // ) {
  1414. // this.vision = "上线验证";
  1415. // this.visionsts = "3";
  1416. // this.visionchonly = true;
  1417. // } else if (
  1418. // res.data.taskList[res.data.taskList.length - 1].taskName == "信息补填"
  1419. // ) {
  1420. // this.vision = "信息补填";
  1421. // this.visionsts = "4";
  1422. // }
  1423. // this.datalist.attList = JSON.parse(res.data.params.attList);
  1424. // this.attList = [];
  1425. // this.fileInfo.fileList = [];
  1426. // this.datalist.attList.forEach((item) => {
  1427. // item.id = item.attchFileId;
  1428. // this.fileInfo.fileList.push({
  1429. // name: item.fileName,
  1430. // url: "",
  1431. // id: item.id,
  1432. // attchFileId: item.attchFileId,
  1433. // fileName: item.fileName,
  1434. // });
  1435. // this.attList.push({
  1436. // name: item.fileName,
  1437. // url: "",
  1438. // id: item.id,
  1439. // attchFileId: item.attchFileId,
  1440. // fileName: item.fileName,
  1441. // });
  1442. // });
  1443. // this.rovaList = res.data.taskList;
  1444. // this.uploadstatus = true;
  1445. // });
  1446. },
  1447. //审批
  1448. dialogCli(v) {
  1449. this.dialogStatus = false;
  1450. if (v === 3) {
  1451. this.infolist = {};
  1452. this.attList = [];
  1453. this.fileInfo.fileList = [];
  1454. this.checkexa = false;
  1455. this.tempSave = false;
  1456. return;
  1457. }
  1458. let _this = this;
  1459. this.infolist.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  1460. if (v === 1) {
  1461. let params = {
  1462. dealType: "1",
  1463. dealTypeDesc: "打回",
  1464. procId: this.infolist.procId,
  1465. procVersion: this.infolist.procVersion,
  1466. remark: this.remark,
  1467. stepId: this.infolist.stepId,
  1468. taskId: this.infolist.taskId,
  1469. taskName: this.infolist.taskName,
  1470. opName: this.infolist.opName,
  1471. opNo: this.opno,
  1472. opTime: this.infolist.opTime,
  1473. params: {
  1474. procExeCondiVal: "不同意",
  1475. terminalRes: JSON.stringify(this.infolist),
  1476. assigneeNo: this.opno,
  1477. assigneeName: this.opname,
  1478. },
  1479. woNo: this.infolist.woNo,
  1480. };
  1481. this.submitInfo("/bpm/api/submitTask", params);
  1482. } else if (v === 2) {
  1483. let param = {
  1484. dealType: "0",
  1485. dealTypeDesc: "提交",
  1486. procId: this.infolist.procId,
  1487. procVersion: this.infolist.procVersion,
  1488. remark: this.remark,
  1489. stepId: this.infolist.stepId,
  1490. taskId: this.infolist.taskId,
  1491. taskName: this.infolist.taskName,
  1492. opName: this.infolist.opName,
  1493. opNo: this.opno,
  1494. opTime: this.infolist.opTime,
  1495. params: {
  1496. woType: this.infolist.woType,
  1497. terminalRes: JSON.stringify(this.infolist),
  1498. },
  1499. woNo: this.infolist.woNo,
  1500. };
  1501. if (this.visionchonly) {
  1502. param.params.assigneeNo = this.treeListonly.leaderAuditNo;
  1503. param.params.assigneeName = this.treeListonly.leaderAuditName;
  1504. }
  1505. // if(this.vision == '科室主任初审'||this.vision == '部门副主任复审'){
  1506. // this.$http({
  1507. // url: "/sysmgr/csysuserinfo/queryUserListByLoginNoAndDuty",
  1508. // method: "post",
  1509. // headers: {
  1510. // "Content-Type": "application/json",
  1511. // "page": '{"pageNo":"' + 1 + '","pageSize":"100"}'
  1512. // },
  1513. // data: {"duty":"7,12"},
  1514. // }).then((res) => {
  1515. // if(res.data.length == 0){
  1516. // this.$message({
  1517. // message: '暂无领导审批,发起失败!',
  1518. // type: 'error'
  1519. // });
  1520. // return
  1521. // }else{
  1522. // param.params.assigneeNo=res.data[0].loginNoStr;
  1523. // param.params.assigneeName=res.data[0].loginNameStr;
  1524. // _this.submitInfo("/bpm/api/submitTask", param);
  1525. // return
  1526. // }
  1527. // });
  1528. // }else if(this.vision == '渠道经理会签'||this.vision == '上线管理'){
  1529. // param.params.assigneeNo= this.opno;
  1530. // param.params.assigneeName= this.opname;
  1531. // this.submitInfo("/bpm/api/submitTask", param);
  1532. // }
  1533. if (this.vision == "信息补填") {
  1534. param.params.fillList = JSON.stringify(this.infodatas);
  1535. this.submitInfo("/bpm/api/submitTask", param);
  1536. } else {
  1537. if (this.vision == "流程发起") {
  1538. let attList = [];
  1539. for (let i = 0; i < this.attList.length; i++) {
  1540. attList.push({
  1541. id: this.attList[i].id,
  1542. fileCode: this.attList[i].fileCode,
  1543. fileName: this.attList[i].fileName,
  1544. opName: this.attList[i].opName,
  1545. opNo: this.attList[i].opNo,
  1546. opTime: this.attList[i].opTime,
  1547. woNo: this.infolist.woNo,
  1548. attchFileId: this.attList[i].attchFileId,
  1549. });
  1550. }
  1551. param.params.attList = JSON.stringify(attList);
  1552. this.$http({
  1553. url: "/market/bpmTemp/del",
  1554. method: "post",
  1555. headers: {
  1556. "Content-Type": "application/json",
  1557. },
  1558. data: {
  1559. bpmType: "1",
  1560. },
  1561. }).then((res) => {
  1562. //console.log(res)
  1563. });
  1564. }
  1565. this.submitInfo("/bpm/api/submitTask", param);
  1566. }
  1567. }
  1568. this.checkexa = false;
  1569. },
  1570. //添加
  1571. dialogCliadd(v) {
  1572. let _this = this;
  1573. let info = {};
  1574. info.params = {};
  1575. info.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  1576. info.opNo = this.userInfo.loginNo;
  1577. info.opName = this.userInfo.loginName;
  1578. info.woTitle = this.infolist.demandName;
  1579. info.params.terminalRes = this.infolist;
  1580. info.params.terminalRes.busiStartTime = this.busiTime[0]
  1581. ? _this.$formatDate(this.busiTime[0], "YYYY-MM-DD")
  1582. : "";
  1583. info.params.terminalRes.busiEndTime = this.busiTime[1]
  1584. ? _this.$formatDate(this.busiTime[1], "YYYY-MM-DD")
  1585. : "";
  1586. info.procId = this.terminal;
  1587. info.params.assigneeNo = this.treeListonly.leaderAuditNo;
  1588. info.params.assigneeName = this.treeListonly.leaderAuditName;
  1589. for (let i = 0; i < this.options.length; i++) {
  1590. if (this.terminal == this.options[i].procId) {
  1591. info.procName = this.options[i].procName;
  1592. info.procVersion = this.options[i].procVersion;
  1593. }
  1594. }
  1595. let attList = [];
  1596. for (let i = 0; i < this.attList.length; i++) {
  1597. attList.push({
  1598. id: this.attList[i].id,
  1599. fileCode: this.attList[i].fileCode,
  1600. fileName: this.attList[i].fileName,
  1601. opName: this.attList[i].opName,
  1602. opNo: this.attList[i].opNo,
  1603. opTime: this.attList[i].opTime,
  1604. woNo: this.infolist.woNo,
  1605. attchFileId: this.attList[i].attchFileId,
  1606. });
  1607. }
  1608. let fillList = [{}, {}];
  1609. info.params.fillList = JSON.stringify(fillList);
  1610. info.params.attList = JSON.stringify(attList);
  1611. info.params.terminalRes = JSON.stringify(info.params.terminalRes);
  1612. this.checkexa = false;
  1613. this.visionchonly = false;
  1614. this.submitInfo("/bpm/api/startProc", info);
  1615. },
  1616. submitInfo(u, v) {
  1617. let _this = this;
  1618. this.$refs.infolist.validate((valid) => {
  1619. if (valid) {
  1620. this.$http({
  1621. url: u,
  1622. method: "post",
  1623. headers: {
  1624. "Content-Type": "application/json",
  1625. },
  1626. data: v,
  1627. }).then((res) => {
  1628. if (res.data.result === 1) {
  1629. _this.$message({
  1630. message: res.data.desc,
  1631. type: "error",
  1632. });
  1633. } else {
  1634. _this.$message({
  1635. message: "成功",
  1636. type: "success",
  1637. });
  1638. _this.closedia();
  1639. _this.infolist = {};
  1640. _this.attList = [];
  1641. _this.fileInfo.fileList = [];
  1642. _this.getList(this.params, this.pageSize);
  1643. }
  1644. });
  1645. }
  1646. });
  1647. },
  1648. getStanding() {
  1649. this.$router.push({
  1650. path: "/ywStanding",
  1651. });
  1652. this.setabList("线上业务需求台账", "/ywStanding");
  1653. },
  1654. setabList(n, p) {
  1655. let params = {
  1656. children: "",
  1657. name: n,
  1658. rountPath: p,
  1659. target: "_self",
  1660. };
  1661. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  1662. if (this.$store.state.tabList[i].name === params.name) {
  1663. this.$store.state.tabList[i] = params;
  1664. }
  1665. }
  1666. let set = new Set([...this.$store.state.tabList, params]);
  1667. set.add(params);
  1668. this.$store.commit("setDefaultActive", params.rountPath);
  1669. this.$store.commit("setTabList", Array.from(set));
  1670. },
  1671. //流程
  1672. getTermianl() {
  1673. this.$http({
  1674. url: "/bpm/api/queryBpmProcList",
  1675. method: "post",
  1676. headers: {
  1677. "Content-Type": "application/json",
  1678. page: '{"pageNo":"' + 1 + '","pageSize":"100"}',
  1679. },
  1680. data: {},
  1681. }).then((res) => {
  1682. this.options = res.data.data;
  1683. });
  1684. },
  1685. closeMessage(v) {
  1686. this.centerDialogVisible = false;
  1687. let _this = this;
  1688. if (v === 1) {
  1689. _this
  1690. .$http({
  1691. url: "/bpm/api/deleteBpmPrePlugin",
  1692. method: "post",
  1693. headers: {
  1694. "Content-Type": "application/json",
  1695. },
  1696. data: {
  1697. id: this.delid,
  1698. },
  1699. })
  1700. .then((res) => {
  1701. if (res.data.result === 1) {
  1702. _this.$message({
  1703. message: res.data.desc,
  1704. type: "error",
  1705. });
  1706. } else {
  1707. _this.$message({
  1708. message: "删除成功",
  1709. type: "success",
  1710. });
  1711. _this.getList(this.params, this.pageSize);
  1712. }
  1713. });
  1714. }
  1715. },
  1716. //删除
  1717. delLine(v) {
  1718. this.centerDialogVisible = true;
  1719. this.messTit = "即将删除此条数据, 是否删除?";
  1720. this.delid = v.id;
  1721. },
  1722. //文件返回值
  1723. uploadBack(v) {
  1724. this.attList = v;
  1725. },
  1726. uploadBackin(v) {
  1727. console.log(v, "v");
  1728. let x = [];
  1729. for (let i = 1; i < v.data.body.length; i++) {
  1730. x.push({
  1731. factoryName: v.data.body[i].factoryName,
  1732. workLoad: v.data.body[i].workLoad,
  1733. });
  1734. }
  1735. this.infodatas = x;
  1736. },
  1737. //功能栏
  1738. iconCli(v) {
  1739. if (v === 1) {
  1740. this.handleInit();
  1741. }
  1742. if (v === 2) {
  1743. this.fullscreen = !this.fullscreen;
  1744. }
  1745. },
  1746. getUser() {
  1747. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  1748. },
  1749. // 字典
  1750. // 需求类别 demandType
  1751. // 承载渠道 demandChnl
  1752. getsaleChnl() {
  1753. this.$http({
  1754. url: "/market/cfgDataDict/queryList",
  1755. method: "post",
  1756. headers: {
  1757. "Content-Type": "application/json",
  1758. },
  1759. data: {
  1760. dictCode: "demandType",
  1761. },
  1762. }).then((res) => {
  1763. this.demandTypeopt = res.data;
  1764. });
  1765. this.$http({
  1766. url: "/market/cfgDataDict/queryList",
  1767. method: "post",
  1768. headers: {
  1769. "Content-Type": "application/json",
  1770. },
  1771. data: {
  1772. dictCode: "demandChnl",
  1773. },
  1774. }).then((res) => {
  1775. this.carryChannelopt = res.data;
  1776. });
  1777. },
  1778. },
  1779. mounted() {
  1780. // 调用初始化接口
  1781. this.handleInit();
  1782. // this.getList({}, 1);
  1783. this.getUser();
  1784. this.getTermianl();
  1785. this.getsaleChnl();
  1786. },
  1787. created() {},
  1788. };
  1789. </script>
  1790. <style scoped lang="scss">
  1791. .onetab {
  1792. margin-bottom: 20px;
  1793. padding: 0 20px;
  1794. }
  1795. .simple-dialog {
  1796. position: relative;
  1797. min-height: 90vh;
  1798. }
  1799. .info {
  1800. &-footer {
  1801. display: flex;
  1802. margin-top: 50px;
  1803. justify-content: flex-end;
  1804. margin-bottom: 50px;
  1805. }
  1806. &-upload {
  1807. width: 500px !important;
  1808. position: relative;
  1809. }
  1810. }
  1811. .titbox {
  1812. div {
  1813. float: right;
  1814. i {
  1815. font-size: 22px;
  1816. margin-left: 20px;
  1817. cursor: pointer;
  1818. }
  1819. }
  1820. }
  1821. .upload {
  1822. position: relative;
  1823. left: calc(50% - 229px / 2);
  1824. top: -4px;
  1825. display: flex !important;
  1826. flex-direction: column;
  1827. }
  1828. .tabbox {
  1829. margin-top: 15px;
  1830. }
  1831. .pageBox {
  1832. text-align: right;
  1833. margin-top: 10px;
  1834. }
  1835. .info-line {
  1836. width: 100%;
  1837. display: block;
  1838. padding-left: 20px;
  1839. div {
  1840. width: 50%;
  1841. display: inline-block;
  1842. }
  1843. span {
  1844. width: 100px;
  1845. display: inline-block;
  1846. text-align: left;
  1847. i {
  1848. color: red;
  1849. display: inline-block;
  1850. padding-right: 5px;
  1851. }
  1852. }
  1853. .el-select,
  1854. .el-input {
  1855. width: calc(100% - 120px);
  1856. }
  1857. }
  1858. .online {
  1859. width: 100%;
  1860. .el-select {
  1861. width: calc(100% - 100px);
  1862. }
  1863. span {
  1864. vertical-align: top;
  1865. }
  1866. .el-textarea {
  1867. width: calc(100% - 120px);
  1868. }
  1869. .tree {
  1870. width: calc(50% - 60px);
  1871. display: inline-block;
  1872. margin-right: 20px;
  1873. height: 300px;
  1874. overflow-y: scroll;
  1875. .el-icon-error {
  1876. float: right;
  1877. font-size: 20px;
  1878. margin-top: 9px;
  1879. cursor: pointer;
  1880. }
  1881. }
  1882. .treeUser {
  1883. margin: 0;
  1884. border: 1px solid #ddd;
  1885. p {
  1886. background: #f4f4f4;
  1887. padding: 0 20px;
  1888. border-bottom: 1px solid #fff;
  1889. }
  1890. }
  1891. .treeUserb {
  1892. width: calc(100% - 100px);
  1893. border: 1px solid #ddd;
  1894. background: #f4f4f4;
  1895. border-radius: 3px;
  1896. height: auto;
  1897. overflow: hidden;
  1898. p {
  1899. display: inline-block;
  1900. padding: 0 20px;
  1901. // margin-bottom: 5px;
  1902. }
  1903. }
  1904. }
  1905. .adv-type {
  1906. margin-top: 20px;
  1907. display: flex;
  1908. justify-content: space-between;
  1909. flex-wrap: wrap;
  1910. // border: 1px solid #ddd;
  1911. border-radius: 5px;
  1912. padding: 20px;
  1913. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  1914. div {
  1915. width: 33%;
  1916. text-align: center;
  1917. height: 80px;
  1918. overflow: hidden;
  1919. min-width: 100px;
  1920. cursor: pointer;
  1921. padding-top: 10px;
  1922. margin: 10px 0;
  1923. }
  1924. div:hover {
  1925. background: #cfe8fc;
  1926. border-radius: 5px;
  1927. }
  1928. span {
  1929. width: 100%;
  1930. display: inline-block;
  1931. height: 40px;
  1932. // line-height: 40px;
  1933. i {
  1934. color: #0074d9;
  1935. font-size: 36px;
  1936. }
  1937. }
  1938. }
  1939. </style>