index.vue 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938
  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 != 1"
  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-bottom: 20px; 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. // 当前进行到的步骤计数
  474. step: "",
  475. tooltit: "线上渠道业务需求",
  476. fullscreen: false,
  477. total: 0,
  478. // pageSize: 1,
  479. tableData: [],
  480. disableStatus: true,
  481. // 查看 审批 添加 弹出层 状态
  482. page: 1,
  483. pageSize: 10,
  484. file: [], // 附件数组
  485. titname: "",
  486. dialogStatus: false,
  487. tableSatus: null,
  488. number: 0,
  489. // 按钮标识
  490. type: "",
  491. // 联系人
  492. checkLaeder: false,
  493. checkexa: false,
  494. // 审核人组件只可选一人
  495. leader: "",
  496. leaderList: [
  497. {
  498. label: "王其侠(二级经理正职)",
  499. value: "wangqixia",
  500. },
  501. {
  502. label: "张志伟(二级经理副职)",
  503. value: "zhangzhiwei",
  504. },
  505. {
  506. label: "金鑫(二级经理副职)",
  507. value: "jinxin",
  508. },
  509. {
  510. label: "于洋(二级经理副职)",
  511. value: "yuyang01",
  512. },
  513. ],
  514. // 用来控制多选里的单选
  515. only: false,
  516. // 信息回显
  517. infolist: {},
  518. // 用户信息
  519. userInfo: {},
  520. buttonList: [
  521. "送部门人员审核",
  522. "送领导审核",
  523. "送申请人编号发送",
  524. "确认编号",
  525. "确认需求",
  526. "送项目经理会签",
  527. "送电商接口人阅办",
  528. "送其他人办理",
  529. "确认上线",
  530. "已办结",
  531. "打回",
  532. ],
  533. params: {},
  534. centerDialogVisible: false,
  535. messTit: "",
  536. delid: "",
  537. loading: false,
  538. loadinged: false,
  539. fileInfo: {
  540. limit: 5,
  541. url: "/bpm/api/upload",
  542. fileList: [],
  543. },
  544. rovaList: [],
  545. vision: "",
  546. datalist: {
  547. url: "/bpm/api/download",
  548. type: 1,
  549. },
  550. uploadstatus: false,
  551. mydisable: 1,
  552. opname: "",
  553. opno: "",
  554. attList: [],
  555. options: [],
  556. terminal: "729289304205336576",
  557. // terminal: '722743473704595456',//722743473704595456省722748981018685440
  558. remark: "",
  559. visionsts: "1",
  560. visionchonly: false,
  561. ifopt: [
  562. {
  563. id: 1,
  564. name: "是",
  565. },
  566. {
  567. id: 0,
  568. name: "否",
  569. },
  570. ],
  571. infodatas: [],
  572. busiTime: [],
  573. urgDegreeopt: [
  574. {
  575. id: 1,
  576. name: "正常",
  577. },
  578. {
  579. id: 2,
  580. name: "紧急",
  581. },
  582. {
  583. id: 3,
  584. name: "非常紧急",
  585. },
  586. ],
  587. demandTypeopt: [],
  588. carryChannelopt: [],
  589. treeList: [],
  590. treeListonly: {},
  591. defaultList: [],
  592. closeList: false,
  593. depttype: 0,
  594. fileInfoin: {
  595. type: "btn",
  596. typename: "导入",
  597. btntype: "primary",
  598. limit: 1,
  599. url: "/market/cChannelDemand/demandCarryImport",
  600. fileList: [],
  601. },
  602. tempSave: false,
  603. };
  604. },
  605. watch: {
  606. "datalist.attList"() {
  607. this.number++;
  608. },
  609. // tempSave(value) {
  610. // if (value) {
  611. // // 监听编辑状态,每20秒请求一次,注意函数不加()
  612. // this.timer = window.setInterval(this.temp, 20000);
  613. // } else {
  614. // // 停止监听
  615. // clearInterval(this.timer);
  616. // }
  617. // },
  618. },
  619. methods: {
  620. // 新的处理方法
  621. handlePreview(file) {
  622. console.log(file, "Preview");
  623. },
  624. handleRemove(file) {
  625. this.file = this.file.filter((el) => el.uid !== file.uid);
  626. },
  627. handleSuccess({ file }) {
  628. this.file.push(file);
  629. },
  630. handleMessage({ file }) {
  631. const workbook = new Excel.Workbook();
  632. // workbook.xlsx.readFile(file.path) // use path
  633. const Array = [];
  634. workbook.xlsx.load(file).then(async () => {
  635. const worksheet = await workbook.getWorksheet(1);
  636. worksheet.eachRow(({ values }) => {
  637. let obj = {
  638. factoryName: values[1],
  639. workLoad: values[2],
  640. };
  641. Array.push(obj);
  642. });
  643. if (
  644. this.infodatas.length === 1 &&
  645. !this.infodatas[0].factoryName &&
  646. !this.infodatas[0].workLoad
  647. ) {
  648. this.infodatas = Array;
  649. } else {
  650. this.infodatas.push(...Array);
  651. }
  652. });
  653. },
  654. handleApprove(type) {
  655. if (type === "取消") {
  656. this.dialogStatus = false;
  657. this.disableStatus = false;
  658. this.only = false;
  659. this.number++;
  660. this.infolist = {};
  661. return;
  662. }
  663. this.$refs.infolist.validate((val) => {
  664. if (val) {
  665. switch (type) {
  666. case "送部门人员审核":
  667. this.checkexa = true;
  668. this.type = "0";
  669. console.log("送部门人员审核");
  670. break;
  671. case "送领导审核":
  672. this.type = "1";
  673. // this.formSubmit()
  674. this.checkLaeder = true;
  675. console.log("送领导审核");
  676. break;
  677. case "送起草人编号发送":
  678. this.handleSendNo();
  679. break;
  680. case "确认编号":
  681. this.handleComfirmNo();
  682. break;
  683. case "打回":
  684. this.handleBackRecord();
  685. break;
  686. case "确认需求":
  687. this.checkexa = true;
  688. this.type = "0";
  689. this.operateName = "确认需求";
  690. break;
  691. case "送项目经理会签":
  692. this.checkexa = true;
  693. this.type = "0";
  694. this.operateName = "送项目经理会签";
  695. break;
  696. case "送电商接口人阅办":
  697. this.operateName = "送电商接口人阅办";
  698. this.handleDeliverReadOfficeOrOtherDo("1");
  699. break;
  700. case "送其他人办理":
  701. this.checkexa = true;
  702. this.only = true;
  703. this.operateName = "送其他人办理";
  704. break;
  705. case "确认上线":
  706. this.operateName = "确认上线";
  707. this.handleConfirmOnline("1");
  708. break;
  709. case "已办结":
  710. this.operateName = "已办结";
  711. this.handleConfirmOnline("2");
  712. break;
  713. case "保存":
  714. this.operateName = "保存";
  715. this.handleConfirmOnline("3");
  716. break;
  717. }
  718. }
  719. });
  720. },
  721. // 确认上线/已办结
  722. handleConfirmOnline(type) {
  723. let flag = 1;
  724. const factoryName = [];
  725. const workLoad = [];
  726. this.infodatas.forEach((el) => {
  727. // 判断条件
  728. if (el.factoryName && el.workLoad) {
  729. flag = flag * 1;
  730. factoryName.push(el.factoryName);
  731. workLoad.push(el.workLoad);
  732. } else {
  733. flag = flag * 0;
  734. }
  735. });
  736. if (flag) {
  737. let reqdata = {
  738. operateName: this.operateName,
  739. type,
  740. support: factoryName,
  741. workload: workLoad,
  742. woNo: this.woNo + "",
  743. };
  744. this.$http({
  745. url: "/market/mkOnlineChannel/confirmOnline",
  746. method: "post",
  747. headers: {
  748. "Content-Type": "application/json",
  749. },
  750. data: reqdata,
  751. }).then(({ data: { desc } }) => {
  752. console.log(desc);
  753. if (desc === "操作成功") {
  754. this.$message.success("操作成功");
  755. this.dialogStatus = false;
  756. this.handleInit();
  757. } else {
  758. this.$message.error("操作失败");
  759. }
  760. });
  761. } else {
  762. this.$message.error("请输入必要的信息");
  763. }
  764. },
  765. // 送电商接口人阅办或送其他人办理
  766. handleDeliverReadOfficeOrOtherDo(type) {
  767. console.log(this.operateName, type);
  768. let receiveId = [];
  769. let receiveName = [];
  770. // console.log(this.treeList);
  771. this.treeList.forEach((item) => {
  772. receiveId.push(item.loginNoStr);
  773. receiveName.push(item.label);
  774. });
  775. let reqdata = {
  776. operateName: this.operateName,
  777. type,
  778. reviewOpinion: this.operateName + "," + this.remark,
  779. woId: this.woNo + "",
  780. };
  781. if (type === "2") {
  782. reqdata = {
  783. ...reqdata,
  784. receiveId: receiveId.join(","),
  785. receiveName: receiveName.join(","),
  786. };
  787. }
  788. console.log(reqdata);
  789. this.$http({
  790. url: "/market/mkOnlineChannel/deliverReadOfficeOrOtherDo",
  791. method: "post",
  792. headers: {
  793. "Content-Type": "application/json",
  794. },
  795. data: reqdata,
  796. }).then(({ data: { desc } }) => {
  797. console.log(desc);
  798. if (desc === "操作成功") {
  799. this.$message.success("操作成功");
  800. this.checkexa = false;
  801. this.dialogStatus = false;
  802. this.handleInit();
  803. } else {
  804. this.$message.error("操作失败");
  805. }
  806. });
  807. },
  808. // 电商接口人阅办---送项目经理会签
  809. handleCountersigned() {
  810. let receiveId = [];
  811. let receiveName = [];
  812. console.log(this.treeList);
  813. this.treeList.forEach((item) => {
  814. receiveId.push(item.loginNoStr);
  815. receiveName.push(item.label);
  816. });
  817. let reqdata = {
  818. operateName: this.operateName,
  819. receiveId: receiveId.join(","),
  820. receiveName: receiveName.join(","),
  821. reviewOpinion: this.operateName + "," + this.remark,
  822. woNo: this.woNo + "",
  823. };
  824. console.log(reqdata);
  825. this.$http({
  826. url: "/market/mkOnlineChannel/countersigned",
  827. method: "post",
  828. headers: {
  829. "Content-Type": "application/json",
  830. },
  831. data: reqdata,
  832. }).then(({ data: { desc } }) => {
  833. console.log(desc);
  834. if (desc === "操作成功") {
  835. this.$message.success("操作成功");
  836. this.checkexa = false;
  837. this.dialogStatus = false;
  838. this.handleInit();
  839. } else {
  840. this.$message.error("操作失败");
  841. }
  842. });
  843. },
  844. // 确认需求
  845. handleNeedyComfirm() {
  846. let receiveId = [];
  847. let receiveName = [];
  848. // console.log(this.treeList);
  849. this.treeList.forEach((item) => {
  850. receiveId.push(item.loginNoStr);
  851. receiveName.push(item.label);
  852. });
  853. let reqdata = {
  854. operateName: this.operateName,
  855. receiveId: receiveId.join(","),
  856. receiveName: receiveName.join(","),
  857. reviewOpinion: this.operateName + "," + this.remark,
  858. woNo: this.woNo + "",
  859. };
  860. console.log(reqdata);
  861. this.$http({
  862. url: "/market/mkOnlineChannel/confirmDemand",
  863. method: "post",
  864. headers: {
  865. "Content-Type": "application/json",
  866. },
  867. data: reqdata,
  868. }).then(({ data: { desc } }) => {
  869. console.log(desc);
  870. if (desc === "操作成功") {
  871. this.$message.success("操作成功");
  872. this.checkexa = false;
  873. this.dialogStatus = false;
  874. this.handleInit();
  875. } else {
  876. this.$message.error("操作失败");
  877. }
  878. });
  879. },
  880. // 打回方法
  881. handleBackRecord() {
  882. this.$http({
  883. url: "/market/mkOnlineChannel/backRecord",
  884. method: "get",
  885. headers: {
  886. "Content-Type": "application/json",
  887. },
  888. params: {
  889. woNo: this.woNo,
  890. remark: this.remark,
  891. },
  892. }).then(({ data: { desc } }) => {
  893. console.log(desc);
  894. if (desc === "操作成功") {
  895. this.$message.success("操作成功");
  896. this.dialogStatus = false;
  897. this.handleInit();
  898. } else {
  899. this.$message.error("操作失败");
  900. }
  901. });
  902. },
  903. // 表单提交
  904. formSubmit(type) {
  905. if (type === 1) {
  906. if (!this.treeList.length) {
  907. this.$message.error("请选择审核人员");
  908. return;
  909. }
  910. } else {
  911. if (!this.leader) {
  912. this.$message.error("请选择审核领导");
  913. return;
  914. }
  915. }
  916. let request = 0;
  917. let formData = new FormData();
  918. let origin_params = {};
  919. if (this.infolist.woNo) {
  920. origin_params = {
  921. // 需求编号
  922. woNo: this.infolist.woNo,
  923. createId: this.infolist.createId,
  924. createName: this.infolist.createName,
  925. id: this.infolist.id,
  926. };
  927. }
  928. let params = {
  929. ...origin_params,
  930. // 需求名称
  931. demandName: this.infolist.demandName,
  932. // 紧急程度
  933. urgDegree: this.infolist.urgDegree,
  934. // 业务主题
  935. busiSubject: this.infolist.busiSubject,
  936. // 需求类别
  937. demandTypeCode: this.infolist.busiSubject,
  938. //承载渠道
  939. carryChannelCode: this.infolist.carryChannelCode.join(","),
  940. // 加载周期 起止
  941. busiStartTime: this.busiTime[0]
  942. ? this.$formatDate(this.busiTime[0], "YYYY-MM-DD HH:mm:ss")
  943. : "",
  944. busiEndTime: this.busiTime[1]
  945. ? this.$formatDate(this.busiTime[1], "YYYY-MM-DD HH:mm:ss")
  946. : "",
  947. // 需求背景
  948. demandBackground: this.infolist.demandBackground,
  949. // 需求描述
  950. demandDesc: this.infolist.demandDesc,
  951. // 审批说明
  952. remark: this.remark,
  953. // 审核人员
  954. loginNameList: this.treeList.length
  955. ? this.treeList.map((el) => {
  956. return el.label;
  957. })
  958. : [this.leader],
  959. loginNoList: this.treeList.length
  960. ? this.treeList.map((el) => {
  961. return el.loginNoStr;
  962. })
  963. : [this.leader],
  964. type: this.type,
  965. // fileList: this.file,
  966. };
  967. // 处理其他参数
  968. for (let key in params) {
  969. formData.append(key, params[key]);
  970. }
  971. // 这是处理文件的参数
  972. if (this.file.length) {
  973. this.file.forEach((el, index) => {
  974. if (el.constructor.name === "File") {
  975. formData.append(`file${index + 1}`, el);
  976. }
  977. });
  978. }
  979. if (this.operateName === "确认需求") {
  980. this.handleNeedyComfirm();
  981. return;
  982. }
  983. if (this.operateName === "送项目经理会签") {
  984. this.handleCountersigned();
  985. return;
  986. }
  987. if (this.operateName === "送其他人办理") {
  988. this.handleDeliverReadOfficeOrOtherDo("2");
  989. return;
  990. }
  991. request = 1;
  992. if (request) {
  993. this.$http({
  994. url: "/market/mkOnlineChannel/saveOrUpdate",
  995. method: "post",
  996. headers: {
  997. "Content-Type": "multipart/form-data",
  998. },
  999. data: formData,
  1000. }).then(({ data }) => {
  1001. if (data && data.desc === "操作成功") {
  1002. this.$message({
  1003. type: "success",
  1004. message: data.desc,
  1005. });
  1006. this.dialogStatus = false;
  1007. this.disableStatus = false;
  1008. this.checkexa = false;
  1009. this.checkLaeder = false;
  1010. this.leader = "";
  1011. this.infolist = {};
  1012. this.handleInit();
  1013. }
  1014. });
  1015. }
  1016. },
  1017. // 送起草人编号发送
  1018. handleSendNo() {
  1019. this.$http({
  1020. url: "/market/mkOnlineChannel/createDemandNo",
  1021. method: "get",
  1022. headers: {
  1023. "Content-Type": "application/json",
  1024. },
  1025. params: {
  1026. woNo: this.woNo,
  1027. },
  1028. }).then(({ data: { desc } }) => {
  1029. console.log(desc);
  1030. if (desc === "操作成功") {
  1031. this.$message.success("操作成功");
  1032. this.dialogStatus = false;
  1033. this.handleInit();
  1034. } else {
  1035. this.$message.error("操作失败");
  1036. }
  1037. });
  1038. },
  1039. // 确认编号
  1040. handleComfirmNo() {
  1041. this.$http({
  1042. url: "/market/mkOnlineChannel/confirmNumber",
  1043. method: "post",
  1044. headers: {
  1045. "Content-Type": "application/json",
  1046. },
  1047. data: { woNo: this.woNo + "" },
  1048. }).then(({ data: { desc } }) => {
  1049. console.log(desc);
  1050. if (desc === "操作成功") {
  1051. this.$message.success("操作成功");
  1052. this.dialogStatus = false;
  1053. this.handleInit();
  1054. } else {
  1055. this.$message.error("操作失败");
  1056. }
  1057. });
  1058. },
  1059. // 初始化列表接口
  1060. handleInit() {
  1061. this.$http({
  1062. url: "/market/mkOnlineChannel/queryPage",
  1063. method: "post",
  1064. headers: {
  1065. "Content-Type": "application/json",
  1066. },
  1067. data: {
  1068. page: this.page,
  1069. pageSize: this.pageSize,
  1070. },
  1071. }).then(
  1072. ({
  1073. data: {
  1074. body: { data },
  1075. },
  1076. }) => {
  1077. this.tableData = data;
  1078. }
  1079. );
  1080. },
  1081. // 查看详情接口封装
  1082. queryDetails(id) {
  1083. this.$http({
  1084. url: "/market/mkOnlineChannel/getMkOnlineChannelById",
  1085. method: "post",
  1086. headers: {
  1087. "Content-Type": "application/json",
  1088. },
  1089. data: id,
  1090. }).then(
  1091. ({
  1092. data: {
  1093. body: { button, mkOnlineChannel },
  1094. },
  1095. }) => {
  1096. this.buttonList = button;
  1097. this.infolist = {
  1098. ...mkOnlineChannel,
  1099. carryChannelCode: mkOnlineChannel.carryChannelCode.split(","),
  1100. };
  1101. this.busiTime = [
  1102. mkOnlineChannel.busiStartTime,
  1103. mkOnlineChannel.busiEndTime,
  1104. ];
  1105. this.rovaList = mkOnlineChannel.logList;
  1106. this.datalist = {
  1107. ...this.datalist,
  1108. attList: mkOnlineChannel.attList,
  1109. };
  1110. //表单编号
  1111. this.woNo = mkOnlineChannel.woNo;
  1112. // 步骤
  1113. this.step = mkOnlineChannel.step;
  1114. // 最后一步是否办结
  1115. this.tableSatus = mkOnlineChannel.sts;
  1116. this.dialogStatus = true;
  1117. if (this.titname === "添加") {
  1118. // 审批说明
  1119. this.visionsts = "";
  1120. this.disableStatus = false;
  1121. } else {
  1122. if (this.titname === "查看") {
  1123. this.disableStatus = true;
  1124. this.visionsts = "";
  1125. // 数组回显
  1126. this.infodatas = mkOnlineChannel.logList;
  1127. } else {
  1128. if (this.step === "0") {
  1129. this.dialogStatus = false;
  1130. return;
  1131. }
  1132. this.dialogStatus = true;
  1133. if (this.step === "7") {
  1134. if (mkOnlineChannel.sts === "4") {
  1135. }
  1136. this.vision = "信息补填";
  1137. this.visionsts = "";
  1138. this.infodatas = mkOnlineChannel.workloadAndsupport.length
  1139. ? mkOnlineChannel.workloadAndsupport.map((el) => ({
  1140. factoryName: el.support,
  1141. workLoad: el.workload,
  1142. }))
  1143. : [
  1144. {
  1145. factoryName: "",
  1146. workLoad: "",
  1147. },
  1148. ];
  1149. } else {
  1150. // 数组回显
  1151. this.infodatas = mkOnlineChannel.logList;
  1152. this.visionsts = "2";
  1153. }
  1154. }
  1155. }
  1156. }
  1157. );
  1158. },
  1159. // 老方法
  1160. temp() {
  1161. if (JSON.stringify(this.infolist) == "{}") {
  1162. return;
  1163. }
  1164. let params = {};
  1165. params.infolist = this.infolist;
  1166. params.fileList = [];
  1167. params.attList = [];
  1168. this.attList.forEach((item) => {
  1169. let file = {
  1170. id: item.fileCode,
  1171. fileCode: item.fileCode,
  1172. fileName: item.fileName,
  1173. name: item.fileName,
  1174. };
  1175. params.fileList.push(file);
  1176. params.attList.push(file);
  1177. });
  1178. this.$http({
  1179. url: "/market/bpmTemp/temp",
  1180. method: "post",
  1181. headers: {
  1182. "Content-Type": "application/json",
  1183. },
  1184. data: {
  1185. bpmType: "1",
  1186. content: JSON.stringify(params),
  1187. },
  1188. }).then((res) => {
  1189. //console.log(res)
  1190. });
  1191. },
  1192. deletes(v) {
  1193. // this.treeListonly = {};
  1194. this.treeList = this.treeList.filter(
  1195. (el) => el.loginNoStr !== v.loginNoStr
  1196. );
  1197. this.closeList = !this.closeList;
  1198. },
  1199. treeCheckonly(v) {
  1200. this.treeList = v;
  1201. // this.treeListonly = v;
  1202. },
  1203. choline(v, n) {
  1204. if (v == 1) {
  1205. this.infodatas.push({});
  1206. } else {
  1207. this.infodatas.splice(n.$index, 1);
  1208. }
  1209. },
  1210. closedia() {
  1211. this.infolist = {};
  1212. this.attList = [];
  1213. this.file = [];
  1214. delete this.datalist.attList;
  1215. this.fileInfo.fileList = [];
  1216. this.dialogStatus = false;
  1217. this.checkexa = false;
  1218. this.only = false;
  1219. this.busiTime = [];
  1220. },
  1221. //获取列表
  1222. getList(v, n) {
  1223. this.pageSize = n;
  1224. let _this = this;
  1225. this.loading = true;
  1226. v.procName = "业务需求申请(地市公司),业务需求申请(省公司)";
  1227. this.$http({
  1228. url: "/bpm/api/queryToDoAndFinishTaskList",
  1229. method: "post",
  1230. headers: {
  1231. "Content-Type": "application/json",
  1232. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  1233. },
  1234. data: v,
  1235. }).then((res) => {
  1236. this.tableData = res.data.data;
  1237. this.total = res.data.totalRecord;
  1238. this.loading = false;
  1239. });
  1240. },
  1241. // 分页
  1242. currchange(v) {
  1243. this.pageSize = v;
  1244. this.getList(this.params, this.pageSize);
  1245. },
  1246. //申请 // 打开弹出层
  1247. dialogCheck(type, data) {
  1248. // let infolist = Object.assign({}, n);
  1249. this.vision = "";
  1250. this.visionsts = "";
  1251. if (type === 1) {
  1252. this.titname = "查看";
  1253. this.visionsts = "2";
  1254. this.queryDetails(data.woNo);
  1255. } else if (type === 2) {
  1256. this.titname = "审批";
  1257. this.visionsts = "2";
  1258. this.queryDetails(data.woNo);
  1259. } else if (type === 3) {
  1260. this.titname = "添加";
  1261. this.dialogStatus = true;
  1262. this.visionchonly = false;
  1263. this.disableStatus = false;
  1264. // this.$http({
  1265. // url: "/market/bpmTemp/query",
  1266. // method: "post",
  1267. // headers: { "Content-Type": "application/json" },
  1268. // data: { bpmType: "1" },
  1269. // }).then((res) => {
  1270. // if (res.data) {
  1271. // let content = JSON.parse(res.data.content);
  1272. // this.infolist = content.infolist;
  1273. // this.attList = content.attList;
  1274. // this.fileInfo.fileList = content.fileList;
  1275. // }
  1276. // // this.tempSave = true;
  1277. // });
  1278. // return;
  1279. }
  1280. // this.$http({
  1281. // url: "/bpm/api/taskInit",
  1282. // method: "post",
  1283. // headers: {
  1284. // "Content-Type": "application/json",
  1285. // },
  1286. // data: {
  1287. // woNo: n.woNo,
  1288. // },
  1289. // }).then((res) => {
  1290. // // this.infolist = Object.assign({}, res.data);
  1291. // this.terminal = infolist.procId;
  1292. // this.opname = res.data.opName;
  1293. // this.opno = res.data.opNo;
  1294. // this.infolist = JSON.parse(res.data.params.terminalRes);
  1295. // res.data.params.fillList
  1296. // ? (this.infodatas = JSON.parse(res.data.params.fillList))
  1297. // : "";
  1298. // this.infolist.procId = infolist.procId;
  1299. // this.infolist.procVersion = infolist.procVersion;
  1300. // this.remark = infolist.remark;
  1301. // this.infolist.stepId = infolist.stepId;
  1302. // this.infolist.taskId = infolist.taskId;
  1303. // this.infolist.taskName = infolist.taskName;
  1304. // this.infolist.opName = infolist.opName;
  1305. // this.infolist.opNo = infolist.opNo;
  1306. // this.infolist.opTime = infolist.opTime;
  1307. // this.infolist.woNo = infolist.woNo;
  1308. // this.busiTime = [];
  1309. // this.busiTime[0] = this.infolist.busiStartTime;
  1310. // this.busiTime[1] = this.infolist.busiEndTime;
  1311. // this.visionchonly = false;
  1312. // if (
  1313. // res.data.taskList[res.data.taskList.length - 1].taskName == "流程发起"
  1314. // ) {
  1315. // this.vision = "流程发起";
  1316. // if (this.titname == "审批") {
  1317. // this.disableStatus = false;
  1318. // }
  1319. // this.visionchonly = true;
  1320. // } else if (
  1321. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1322. // "科室主任初审"
  1323. // ) {
  1324. // this.vision = "科室主任初审";
  1325. // this.visionsts = "2";
  1326. // this.visionchonly = true;
  1327. // } else if (
  1328. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1329. // "部门副主任复审"
  1330. // ) {
  1331. // this.vision = "部门副主任复审";
  1332. // this.visionsts = "2";
  1333. // this.visionchonly = true;
  1334. // } else if (
  1335. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1336. // "主管副总终审" ||
  1337. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1338. // "部门副主任终审"
  1339. // ) {
  1340. // this.vision = "主管副总终审";
  1341. // this.visionsts = "2";
  1342. // this.visionchonly = true;
  1343. // } else if (
  1344. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1345. // "需求预评估"
  1346. // ) {
  1347. // this.vision = "需求预评估";
  1348. // this.visionsts = "2";
  1349. // this.visionchonly = true;
  1350. // } else if (
  1351. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1352. // "需求预评估初审"
  1353. // ) {
  1354. // this.vision = "需求预评估初审";
  1355. // this.visionsts = "2";
  1356. // this.visionchonly = true;
  1357. // } else if (
  1358. // res.data.taskList[res.data.taskList.length - 1].taskName ==
  1359. // "需求预评估复审"
  1360. // ) {
  1361. // this.vision = "需求预评估复审";
  1362. // this.visionsts = "2";
  1363. // this.visionchonly = true;
  1364. // } else if (
  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. // this.vision = "需求确认";
  1375. // this.visionsts = "3";
  1376. // this.visionchonly = true;
  1377. // } else if (
  1378. // res.data.taskList[res.data.taskList.length - 1].taskName == "上线管理"
  1379. // ) {
  1380. // this.vision = "上线管理";
  1381. // this.visionsts = "3";
  1382. // this.visionchonly = true;
  1383. // } else if (
  1384. // res.data.taskList[res.data.taskList.length - 1].taskName == "上线验证"
  1385. // ) {
  1386. // this.vision = "上线验证";
  1387. // this.visionsts = "3";
  1388. // this.visionchonly = true;
  1389. // } else if (
  1390. // res.data.taskList[res.data.taskList.length - 1].taskName == "信息补填"
  1391. // ) {
  1392. // this.vision = "信息补填";
  1393. // this.visionsts = "4";
  1394. // }
  1395. // this.datalist.attList = JSON.parse(res.data.params.attList);
  1396. // this.attList = [];
  1397. // this.fileInfo.fileList = [];
  1398. // this.datalist.attList.forEach((item) => {
  1399. // item.id = item.attchFileId;
  1400. // this.fileInfo.fileList.push({
  1401. // name: item.fileName,
  1402. // url: "",
  1403. // id: item.id,
  1404. // attchFileId: item.attchFileId,
  1405. // fileName: item.fileName,
  1406. // });
  1407. // this.attList.push({
  1408. // name: item.fileName,
  1409. // url: "",
  1410. // id: item.id,
  1411. // attchFileId: item.attchFileId,
  1412. // fileName: item.fileName,
  1413. // });
  1414. // });
  1415. // this.rovaList = res.data.taskList;
  1416. // this.uploadstatus = true;
  1417. // });
  1418. },
  1419. //审批
  1420. dialogCli(v) {
  1421. this.dialogStatus = false;
  1422. if (v === 3) {
  1423. this.infolist = {};
  1424. this.attList = [];
  1425. this.fileInfo.fileList = [];
  1426. this.checkexa = false;
  1427. this.tempSave = false;
  1428. return;
  1429. }
  1430. let _this = this;
  1431. this.infolist.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  1432. if (v === 1) {
  1433. let params = {
  1434. dealType: "1",
  1435. dealTypeDesc: "打回",
  1436. procId: this.infolist.procId,
  1437. procVersion: this.infolist.procVersion,
  1438. remark: this.remark,
  1439. stepId: this.infolist.stepId,
  1440. taskId: this.infolist.taskId,
  1441. taskName: this.infolist.taskName,
  1442. opName: this.infolist.opName,
  1443. opNo: this.opno,
  1444. opTime: this.infolist.opTime,
  1445. params: {
  1446. procExeCondiVal: "不同意",
  1447. terminalRes: JSON.stringify(this.infolist),
  1448. assigneeNo: this.opno,
  1449. assigneeName: this.opname,
  1450. },
  1451. woNo: this.infolist.woNo,
  1452. };
  1453. this.submitInfo("/bpm/api/submitTask", params);
  1454. } else if (v === 2) {
  1455. let param = {
  1456. dealType: "0",
  1457. dealTypeDesc: "提交",
  1458. procId: this.infolist.procId,
  1459. procVersion: this.infolist.procVersion,
  1460. remark: this.remark,
  1461. stepId: this.infolist.stepId,
  1462. taskId: this.infolist.taskId,
  1463. taskName: this.infolist.taskName,
  1464. opName: this.infolist.opName,
  1465. opNo: this.opno,
  1466. opTime: this.infolist.opTime,
  1467. params: {
  1468. woType: this.infolist.woType,
  1469. terminalRes: JSON.stringify(this.infolist),
  1470. },
  1471. woNo: this.infolist.woNo,
  1472. };
  1473. if (this.visionchonly) {
  1474. param.params.assigneeNo = this.treeListonly.leaderAuditNo;
  1475. param.params.assigneeName = this.treeListonly.leaderAuditName;
  1476. }
  1477. // if(this.vision == '科室主任初审'||this.vision == '部门副主任复审'){
  1478. // this.$http({
  1479. // url: "/sysmgr/csysuserinfo/queryUserListByLoginNoAndDuty",
  1480. // method: "post",
  1481. // headers: {
  1482. // "Content-Type": "application/json",
  1483. // "page": '{"pageNo":"' + 1 + '","pageSize":"100"}'
  1484. // },
  1485. // data: {"duty":"7,12"},
  1486. // }).then((res) => {
  1487. // if(res.data.length == 0){
  1488. // this.$message({
  1489. // message: '暂无领导审批,发起失败!',
  1490. // type: 'error'
  1491. // });
  1492. // return
  1493. // }else{
  1494. // param.params.assigneeNo=res.data[0].loginNoStr;
  1495. // param.params.assigneeName=res.data[0].loginNameStr;
  1496. // _this.submitInfo("/bpm/api/submitTask", param);
  1497. // return
  1498. // }
  1499. // });
  1500. // }else if(this.vision == '渠道经理会签'||this.vision == '上线管理'){
  1501. // param.params.assigneeNo= this.opno;
  1502. // param.params.assigneeName= this.opname;
  1503. // this.submitInfo("/bpm/api/submitTask", param);
  1504. // }
  1505. if (this.vision == "信息补填") {
  1506. param.params.fillList = JSON.stringify(this.infodatas);
  1507. this.submitInfo("/bpm/api/submitTask", param);
  1508. } else {
  1509. if (this.vision == "流程发起") {
  1510. let attList = [];
  1511. for (let i = 0; i < this.attList.length; i++) {
  1512. attList.push({
  1513. id: this.attList[i].id,
  1514. fileCode: this.attList[i].fileCode,
  1515. fileName: this.attList[i].fileName,
  1516. opName: this.attList[i].opName,
  1517. opNo: this.attList[i].opNo,
  1518. opTime: this.attList[i].opTime,
  1519. woNo: this.infolist.woNo,
  1520. attchFileId: this.attList[i].attchFileId,
  1521. });
  1522. }
  1523. param.params.attList = JSON.stringify(attList);
  1524. this.$http({
  1525. url: "/market/bpmTemp/del",
  1526. method: "post",
  1527. headers: {
  1528. "Content-Type": "application/json",
  1529. },
  1530. data: {
  1531. bpmType: "1",
  1532. },
  1533. }).then((res) => {
  1534. //console.log(res)
  1535. });
  1536. }
  1537. this.submitInfo("/bpm/api/submitTask", param);
  1538. }
  1539. }
  1540. this.checkexa = false;
  1541. },
  1542. //添加
  1543. dialogCliadd(v) {
  1544. let _this = this;
  1545. let info = {};
  1546. info.params = {};
  1547. info.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  1548. info.opNo = this.userInfo.loginNo;
  1549. info.opName = this.userInfo.loginName;
  1550. info.woTitle = this.infolist.demandName;
  1551. info.params.terminalRes = this.infolist;
  1552. info.params.terminalRes.busiStartTime = this.busiTime[0]
  1553. ? _this.$formatDate(this.busiTime[0], "YYYY-MM-DD")
  1554. : "";
  1555. info.params.terminalRes.busiEndTime = this.busiTime[1]
  1556. ? _this.$formatDate(this.busiTime[1], "YYYY-MM-DD")
  1557. : "";
  1558. info.procId = this.terminal;
  1559. info.params.assigneeNo = this.treeListonly.leaderAuditNo;
  1560. info.params.assigneeName = this.treeListonly.leaderAuditName;
  1561. for (let i = 0; i < this.options.length; i++) {
  1562. if (this.terminal == this.options[i].procId) {
  1563. info.procName = this.options[i].procName;
  1564. info.procVersion = this.options[i].procVersion;
  1565. }
  1566. }
  1567. let attList = [];
  1568. for (let i = 0; i < this.attList.length; i++) {
  1569. attList.push({
  1570. id: this.attList[i].id,
  1571. fileCode: this.attList[i].fileCode,
  1572. fileName: this.attList[i].fileName,
  1573. opName: this.attList[i].opName,
  1574. opNo: this.attList[i].opNo,
  1575. opTime: this.attList[i].opTime,
  1576. woNo: this.infolist.woNo,
  1577. attchFileId: this.attList[i].attchFileId,
  1578. });
  1579. }
  1580. let fillList = [{}, {}];
  1581. info.params.fillList = JSON.stringify(fillList);
  1582. info.params.attList = JSON.stringify(attList);
  1583. info.params.terminalRes = JSON.stringify(info.params.terminalRes);
  1584. this.checkexa = false;
  1585. this.visionchonly = false;
  1586. this.submitInfo("/bpm/api/startProc", info);
  1587. },
  1588. submitInfo(u, v) {
  1589. let _this = this;
  1590. this.$refs.infolist.validate((valid) => {
  1591. if (valid) {
  1592. this.$http({
  1593. url: u,
  1594. method: "post",
  1595. headers: {
  1596. "Content-Type": "application/json",
  1597. },
  1598. data: v,
  1599. }).then((res) => {
  1600. if (res.data.result === 1) {
  1601. _this.$message({
  1602. message: res.data.desc,
  1603. type: "error",
  1604. });
  1605. } else {
  1606. _this.$message({
  1607. message: "成功",
  1608. type: "success",
  1609. });
  1610. _this.closedia();
  1611. _this.infolist = {};
  1612. _this.attList = [];
  1613. _this.fileInfo.fileList = [];
  1614. _this.getList(this.params, this.pageSize);
  1615. }
  1616. });
  1617. }
  1618. });
  1619. },
  1620. getStanding() {
  1621. this.$router.push({
  1622. path: "/ywStanding",
  1623. });
  1624. this.setabList("线上业务需求台账", "/ywStanding");
  1625. },
  1626. setabList(n, p) {
  1627. let params = {
  1628. children: "",
  1629. name: n,
  1630. rountPath: p,
  1631. target: "_self",
  1632. };
  1633. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  1634. if (this.$store.state.tabList[i].name === params.name) {
  1635. this.$store.state.tabList[i] = params;
  1636. }
  1637. }
  1638. let set = new Set([...this.$store.state.tabList, params]);
  1639. set.add(params);
  1640. this.$store.commit("setDefaultActive", params.rountPath);
  1641. this.$store.commit("setTabList", Array.from(set));
  1642. },
  1643. //流程
  1644. getTermianl() {
  1645. this.$http({
  1646. url: "/bpm/api/queryBpmProcList",
  1647. method: "post",
  1648. headers: {
  1649. "Content-Type": "application/json",
  1650. page: '{"pageNo":"' + 1 + '","pageSize":"100"}',
  1651. },
  1652. data: {},
  1653. }).then((res) => {
  1654. this.options = res.data.data;
  1655. });
  1656. },
  1657. closeMessage(v) {
  1658. this.centerDialogVisible = false;
  1659. let _this = this;
  1660. if (v === 1) {
  1661. _this
  1662. .$http({
  1663. url: "/bpm/api/deleteBpmPrePlugin",
  1664. method: "post",
  1665. headers: {
  1666. "Content-Type": "application/json",
  1667. },
  1668. data: {
  1669. id: this.delid,
  1670. },
  1671. })
  1672. .then((res) => {
  1673. if (res.data.result === 1) {
  1674. _this.$message({
  1675. message: res.data.desc,
  1676. type: "error",
  1677. });
  1678. } else {
  1679. _this.$message({
  1680. message: "删除成功",
  1681. type: "success",
  1682. });
  1683. _this.getList(this.params, this.pageSize);
  1684. }
  1685. });
  1686. }
  1687. },
  1688. //删除
  1689. delLine(v) {
  1690. this.centerDialogVisible = true;
  1691. this.messTit = "即将删除此条数据, 是否删除?";
  1692. this.delid = v.id;
  1693. },
  1694. //文件返回值
  1695. uploadBack(v) {
  1696. this.attList = v;
  1697. },
  1698. uploadBackin(v) {
  1699. console.log(v, "v");
  1700. let x = [];
  1701. for (let i = 1; i < v.data.body.length; i++) {
  1702. x.push({
  1703. factoryName: v.data.body[i].factoryName,
  1704. workLoad: v.data.body[i].workLoad,
  1705. });
  1706. }
  1707. this.infodatas = x;
  1708. },
  1709. //功能栏
  1710. iconCli(v) {
  1711. if (v === 1) {
  1712. this.handleInit();
  1713. }
  1714. if (v === 2) {
  1715. this.fullscreen = !this.fullscreen;
  1716. }
  1717. },
  1718. getUser() {
  1719. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  1720. },
  1721. // 字典
  1722. // 需求类别 demandType
  1723. // 承载渠道 demandChnl
  1724. getsaleChnl() {
  1725. this.$http({
  1726. url: "/market/cfgDataDict/queryList",
  1727. method: "post",
  1728. headers: {
  1729. "Content-Type": "application/json",
  1730. },
  1731. data: {
  1732. dictCode: "demandType",
  1733. },
  1734. }).then((res) => {
  1735. this.demandTypeopt = res.data;
  1736. });
  1737. this.$http({
  1738. url: "/market/cfgDataDict/queryList",
  1739. method: "post",
  1740. headers: {
  1741. "Content-Type": "application/json",
  1742. },
  1743. data: {
  1744. dictCode: "demandChnl",
  1745. },
  1746. }).then((res) => {
  1747. this.carryChannelopt = res.data;
  1748. });
  1749. },
  1750. },
  1751. mounted() {
  1752. // 调用初始化接口
  1753. this.handleInit();
  1754. // this.getList({}, 1);
  1755. this.getUser();
  1756. this.getTermianl();
  1757. this.getsaleChnl();
  1758. },
  1759. created() {},
  1760. };
  1761. </script>
  1762. <style scoped lang="scss">
  1763. .onetab {
  1764. margin-bottom: 20px;
  1765. padding: 0 20px;
  1766. }
  1767. .simple-dialog {
  1768. position: relative;
  1769. min-height: 90vh;
  1770. }
  1771. .info {
  1772. &-footer {
  1773. display: flex;
  1774. margin-top: 50px;
  1775. justify-content: flex-end;
  1776. margin-bottom: 50px;
  1777. }
  1778. &-upload {
  1779. width: 500px !important;
  1780. }
  1781. }
  1782. .titbox {
  1783. div {
  1784. float: right;
  1785. i {
  1786. font-size: 22px;
  1787. margin-left: 20px;
  1788. cursor: pointer;
  1789. }
  1790. }
  1791. }
  1792. .upload {
  1793. position: relative;
  1794. left: calc(50% - 229px / 2);
  1795. vertical-align: middle;
  1796. display: flex !important;
  1797. flex-direction: column;
  1798. }
  1799. .tabbox {
  1800. margin-top: 15px;
  1801. }
  1802. .pageBox {
  1803. text-align: right;
  1804. margin-top: 10px;
  1805. }
  1806. .info-line {
  1807. width: 100%;
  1808. display: block;
  1809. padding-left: 20px;
  1810. div {
  1811. width: 50%;
  1812. display: inline-block;
  1813. }
  1814. span {
  1815. width: 100px;
  1816. display: inline-block;
  1817. text-align: left;
  1818. i {
  1819. color: red;
  1820. display: inline-block;
  1821. padding-right: 5px;
  1822. }
  1823. }
  1824. .el-select,
  1825. .el-input {
  1826. width: calc(100% - 120px);
  1827. }
  1828. }
  1829. .online {
  1830. width: 100%;
  1831. .el-select {
  1832. width: calc(100% - 100px);
  1833. }
  1834. span {
  1835. vertical-align: top;
  1836. }
  1837. .el-textarea {
  1838. width: calc(100% - 120px);
  1839. }
  1840. .tree {
  1841. width: calc(50% - 60px);
  1842. display: inline-block;
  1843. margin-right: 20px;
  1844. height: 300px;
  1845. overflow-y: scroll;
  1846. .el-icon-error {
  1847. float: right;
  1848. font-size: 20px;
  1849. margin-top: 9px;
  1850. cursor: pointer;
  1851. }
  1852. }
  1853. .treeUser {
  1854. margin: 0;
  1855. border: 1px solid #ddd;
  1856. p {
  1857. background: #f4f4f4;
  1858. padding: 0 20px;
  1859. border-bottom: 1px solid #fff;
  1860. }
  1861. }
  1862. .treeUserb {
  1863. width: calc(100% - 100px);
  1864. border: 1px solid #ddd;
  1865. background: #f4f4f4;
  1866. border-radius: 3px;
  1867. height: auto;
  1868. overflow: hidden;
  1869. p {
  1870. display: inline-block;
  1871. padding: 0 20px;
  1872. // margin-bottom: 5px;
  1873. }
  1874. }
  1875. }
  1876. .adv-type {
  1877. margin-top: 20px;
  1878. display: flex;
  1879. justify-content: space-between;
  1880. flex-wrap: wrap;
  1881. // border: 1px solid #ddd;
  1882. border-radius: 5px;
  1883. padding: 20px;
  1884. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  1885. div {
  1886. width: 33%;
  1887. text-align: center;
  1888. height: 80px;
  1889. overflow: hidden;
  1890. min-width: 100px;
  1891. cursor: pointer;
  1892. padding-top: 10px;
  1893. margin: 10px 0;
  1894. }
  1895. div:hover {
  1896. background: #cfe8fc;
  1897. border-radius: 5px;
  1898. }
  1899. span {
  1900. width: 100%;
  1901. display: inline-block;
  1902. height: 40px;
  1903. // line-height: 40px;
  1904. i {
  1905. color: #0074d9;
  1906. font-size: 36px;
  1907. }
  1908. }
  1909. }
  1910. </style>