index.vue 57 KB

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