index.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168
  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 style="float: right;margin-top: 10px;" type="primary" @click="dialogCheck(3)">添加</el-button>
  7. </div>
  8. <div class="tabbox">
  9. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  10. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
  11. <el-table-column prop="woTitle" label="业务名称">
  12. </el-table-column>
  13. <el-table-column prop="opName" label="申请姓名">
  14. </el-table-column>
  15. <el-table-column prop="createTime" label="申请时间">
  16. </el-table-column>
  17. <el-table-column prop="stsDesc" label="状态">
  18. </el-table-column>
  19. <el-table-column label="操作" width="120px" align="center">
  20. <template slot-scope="scope">
  21. <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
  22. <el-button size="mini" type="danger" v-if="scope.row.sts != 1"
  23. @click="dialogCheck(2,scope.row)">处理</el-button>
  24. </template>
  25. </el-table-column>
  26. </el-table>
  27. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  28. :total="total">
  29. </el-pagination>
  30. </div>
  31. </div>
  32. <el-dialog :title="titname" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
  33. :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia" :fullscreen="true">
  34. <div v-loading="loadinged">
  35. <el-form :model="infolist" ref="infolist" :rules="rules"
  36. style="height: calc(100vh - 180px);overflow-y: scroll;">
  37. <div class="info-line">
  38. <el-form-item>
  39. <span>申请部门</span>
  40. <el-input v-model="infolist.groupName" disabled>
  41. </el-input>
  42. </el-form-item>
  43. <el-form-item>
  44. <span>拟稿人</span>
  45. <el-input v-model="infolist.loginName" disabled>
  46. </el-input>
  47. </el-form-item>
  48. <el-form-item>
  49. <span>拟稿日期</span>
  50. <el-input v-model="infolist.opTime" disabled>
  51. </el-input>
  52. </el-form-item>
  53. <el-form-item>
  54. <span>编号</span>
  55. <el-input v-model="infolist.woNo" disabled>
  56. </el-input>
  57. </el-form-item>
  58. <el-form-item prop="telNum">
  59. <span>联系电话</span>
  60. <el-input v-model="infolist.telNum" placeholder="联系电话"
  61. :disabled="titname != '添加'&&vision != '流程发起'">
  62. </el-input>
  63. </el-form-item>
  64. <el-form-item prop="mailBox">
  65. <span>邮箱</span>
  66. <el-input v-model="infolist.mailBox" placeholder="邮箱"
  67. :disabled="titname != '添加'&&vision != '流程发起'">
  68. </el-input>
  69. </el-form-item>
  70. <el-form-item prop="woName">
  71. <span>需求名称</span>
  72. <el-input v-model="infolist.woName" placeholder="需求名称"
  73. :disabled="titname != '添加'&&vision != '流程发起'">
  74. </el-input>
  75. </el-form-item>
  76. <!-- <el-form-item prop="terminal">
  77. <span>申请流程</span>
  78. <el-select clearable v-model="terminal" placeholder="申请流程"
  79. :disabled="titname != '添加'&&vision != '流程发起'">
  80. <el-option v-for="items in options" :key="items.procId" :label="items.procName"
  81. :value="items.procId">
  82. </el-option>
  83. </el-select>
  84. </el-form-item> -->
  85. <el-form-item prop="telType">
  86. <span>电话类型</span>
  87. <el-select clearable v-model="infolist.telType" placeholder="联系电话类型"
  88. :disabled="titname != '添加'&&vision != '流程发起'">
  89. <el-option v-for="items in telopt" :key="items.dataCode" :label="items.dataName"
  90. :value="items.dataCode">
  91. </el-option>
  92. </el-select>
  93. </el-form-item>
  94. <el-form-item prop="needType">
  95. <span>需求类型</span>
  96. <el-select clearable v-model="infolist.needType" placeholder="需求类型"
  97. :disabled="titname != '添加'&&vision != '流程发起'">
  98. <el-option v-for="items in needopt" :key="items.dataCode" :label="items.dataName"
  99. :value="items.dataCode">
  100. </el-option>
  101. </el-select>
  102. </el-form-item>
  103. <el-form-item prop="outType">
  104. <span>外呼平台</span>
  105. <el-select clearable v-model="infolist.outType" placeholder="外呼平台"
  106. :disabled="titname != '添加'&&vision != '流程发起'">
  107. <el-option v-for="items in outopt" :key="items.dataCode" :label="items.dataName"
  108. :value="items.dataCode">
  109. </el-option>
  110. </el-select>
  111. </el-form-item>
  112. <el-form-item prop="customer">
  113. <span>客户数量</span>
  114. <el-input v-model="infolist.customer" placeholder="外呼客户数量"
  115. :disabled="titname != '添加'&&vision != '流程发起'">
  116. </el-input>
  117. </el-form-item>
  118. </div>
  119. <el-form-item class="info-line online" prop="requirement">
  120. <span>需求描述</span>
  121. <el-input v-model="infolist.requirement" placeholder="需求描述" type="textarea"
  122. :autosize="{ minRows: 3, maxRows: 10}" :disabled="titname != '添加'&&vision != '流程发起'">
  123. </el-input>
  124. </el-form-item>
  125. <div class="info-line">
  126. <el-form-item prop="business">
  127. <span>涉及业务</span>
  128. <el-input v-model="infolist.business" placeholder="涉及业务"
  129. :disabled="titname != '添加'&&vision != '流程发起'">
  130. </el-input>
  131. </el-form-item>
  132. <el-form-item prop="completion">
  133. <span>完成标志</span>
  134. <el-input v-model="infolist.completion" placeholder="需求完成标志"
  135. :disabled="titname != '添加'&&vision != '流程发起'">
  136. </el-input>
  137. </el-form-item>
  138. <el-form-item prop="feedback">
  139. <span>反馈内容</span>
  140. <el-input v-model="infolist.feedback" placeholder="结果反馈内容"
  141. :disabled="titname != '添加'&&vision != '流程发起'">
  142. </el-input>
  143. </el-form-item>
  144. <el-form-item prop="outTime">
  145. <span>外呼时间</span>
  146. <el-date-picker v-model="infolist.outTime" type="daterange" placeholder="计划外呼时间"
  147. :disabled="titname != '添加'&&vision != '流程发起'">
  148. </el-date-picker>
  149. </el-form-item>
  150. <el-form-item prop="dataRemark">
  151. <span>数据描述</span>
  152. <el-input v-model="infolist.dataRemark" placeholder="呼出数据属性描述"
  153. :disabled="titname != '添加'&&vision != '流程发起'">
  154. </el-input>
  155. </el-form-item>
  156. </div>
  157. <el-form-item prop="technique" class="info-line online">
  158. <span>外呼话术</span>
  159. <el-input v-model="infolist.technique" placeholder="外呼话术" type="textarea"
  160. :autosize="{ minRows: 3, maxRows: 10}" :disabled="titname != '添加'&&vision != '流程发起'">
  161. </el-input>
  162. </el-form-item>
  163. <el-form-item prop="marketing" class="info-line online">
  164. <span>外呼营销</span>
  165. <el-input v-model="infolist.marketing" placeholder="外呼营销/服务政策" type="textarea"
  166. :autosize="{ minRows: 3, maxRows: 10}" :disabled="titname != '添加'&&vision != '流程发起'">
  167. </el-input>
  168. </el-form-item>
  169. <el-form-item prop="attention" class="info-line online">
  170. <span>注意事项</span>
  171. <el-input v-model="infolist.attention" placeholder="相关注意事项" type="textarea"
  172. :autosize="{ minRows: 3, maxRows: 10}" :disabled="titname != '添加'&&vision != '流程发起'">
  173. </el-input>
  174. </el-form-item>
  175. <div style="padding:0 20px 0 120px;margin-bottom: 20px;" v-if="disableStatus">
  176. <uploadDown :datalist="datalist" :dialogStatus="uploadstatus"></uploadDown>
  177. </div>
  178. <div v-if="!disableStatus">
  179. <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
  180. </myUpload>
  181. </div>
  182. <el-form-item class="info-line online" v-if="visionsts == '2'">
  183. <span>审批说明</span>
  184. <el-input v-model="remark" placeholder="审批说明" type="textarea" :rows="3"
  185. :disabled="titname == '查看'">
  186. </el-input>
  187. </el-form-item>
  188. <div style="margin-bottom: 20px;padding: 0 20px;" v-if="titname != '添加'">
  189. <el-table class="com-table" ref="multipleTable" :data="rovaList" tooltip-effect="dark"
  190. size="small" border style="width: 100%">
  191. <el-table-column prop="taskId" label="编号">
  192. </el-table-column>
  193. <el-table-column prop="taskName" label="环节">
  194. </el-table-column>
  195. <el-table-column prop="assigneeName" label="处理人">
  196. </el-table-column>
  197. <el-table-column prop="assigneeNo" label="处理人工号">
  198. </el-table-column>
  199. <el-table-column prop="opTime" label="处理时间">
  200. </el-table-column>
  201. <el-table-column prop="remark" label="备注">
  202. </el-table-column>
  203. </el-table>
  204. </div>
  205. </el-form>
  206. <div slot="footer" class="dialog-footer myfooter">
  207. <el-button v-if="titname != '查看' && vision == '流程发起'" type="primary" @click="checkexa = true">确 定
  208. </el-button>
  209. <el-button v-if="titname != '查看' && vision == '上刊用印'" type="primary" @click="dialogCli(2)">导 出
  210. </el-button>
  211. <el-button v-if="titname != '查看' && visionsts == '2'" type="primary" @click="checkexa = true">通 过
  212. </el-button>
  213. <el-button v-if="titname != '查看' && visionsts == '2'" type="primary" @click="dialogCli(1)">打 回
  214. </el-button>
  215. <el-button v-if="titname == '添加'" type="primary" @click="checkexa = true">确 定</el-button>
  216. <el-button v-if="titname == '查看'" @click="dialogCli(3)">确 定</el-button>
  217. <el-button @click="dialogCli(3)">取 消</el-button>
  218. </div>
  219. </div>
  220. </el-dialog>
  221. <el-dialog
  222. title="选择审批人"
  223. :visible.sync="checkexa"
  224. width="100%"
  225. style="height: 100%"
  226. :fullscreen="true"
  227. :destroy-on-close="true"
  228. :modal-append-to-body="false"
  229. :close-on-click-modal="false"
  230. >
  231. <div style="height: 100%">
  232. <el-form :model="infolist" ref="infolist" style="height: 100%">
  233. <el-form-item prop="visiblec" style="height: 100%">
  234. <!-- <span style="width: 80px">审批人员</span> -->
  235. <deptTreeOnly
  236. @treeCheck="treeCheckonly"
  237. :defaultList="defaultList"
  238. :type="depttype"
  239. :closeList="closeList"
  240. ></deptTreeOnly>
  241. <div style="text-align: center; margin-top: 30px">
  242. <el-button type="primary" @click="checkProcessUser()"
  243. >确 定</el-button
  244. >
  245. <!-- <el-button type="primary" @click="dialogCliadd" v-if="!visionchonly">确 定</el-button>
  246. <el-button type="primary" @click="dialogCli(2)" v-if="visionchonly">确 定</el-button> -->
  247. <el-button @click="checkexa = false">取 消</el-button>
  248. </div>
  249. <!-- <div class="tree treeUser">
  250. <p>
  251. {{ treeListonly.leaderAuditName }}
  252. <i
  253. v-if="treeListonly.leaderAuditName"
  254. @click="treeDelete()"
  255. class="el-icon-error"
  256. ></i>
  257. </p>
  258. </div> -->
  259. </el-form-item>
  260. </el-form>
  261. </div>
  262. </el-dialog>
  263. <!-- <el-dialog title="选择审批人" :visible.sync="checkexa" width="50%" :destroy-on-close="true"
  264. :modal-append-to-body="false" :close-on-click-modal="false">
  265. <div>
  266. <el-form :model="infolist" ref="infolist" :rules="rules">
  267. <el-form-item prop="visiblec" class="info-line online">
  268. <span>审批人员</span>
  269. <deptTreeOnly class="tree" @treeCheck="treeCheckonly" :defaultList="defaultList"
  270. :type="depttype" :closeList="closeList"></deptTreeOnly>
  271. <div class="tree treeUser">
  272. <p>{{treeListonly.leaderAuditName}}
  273. <i v-if="treeListonly.leaderAuditName" @click="deletes()"
  274. class="el-icon-error"></i>
  275. </p>
  276. </div>
  277. </el-form-item>
  278. </el-form>
  279. <div slot="footer" style="text-align: right;padding-bottom: 20px;">
  280. <el-button type="primary" @click="dialogCliadd" v-if="!visionchonly">确 定</el-button>
  281. <el-button type="primary" @click="dialogCli(2)" v-if="visionchonly">确 定</el-button>
  282. <el-button @click="checkexa = false">取 消</el-button>
  283. </div>
  284. </div>
  285. </el-dialog> -->
  286. </fullscreen>
  287. </template>
  288. <script>
  289. import mySearch from "../../../components/search.vue";
  290. import myMessage from "../../../components/myMessage.vue"
  291. import toolList from '../../../components/toolList'
  292. import myUpload from '../../../components/upload'
  293. import uploadDown from '../../../components/uploadDown.vue'
  294. // import deptTreeOnly from "../../../components/deptTreeOnly.vue"
  295. import deptTreeOnly from "../../../components/newTree.vue";
  296. export default {
  297. components: {
  298. mySearch,
  299. myMessage,
  300. toolList,
  301. myUpload,
  302. uploadDown,
  303. deptTreeOnly
  304. },
  305. data() {
  306. const woName = (rule, value, callback) => {
  307. if (!this.infolist.woName) {
  308. callback(new Error('不能为空'))
  309. } else {
  310. callback()
  311. }
  312. }
  313. const telNum = (rule, value, callback) => {
  314. if (!this.infolist.telNum) {
  315. callback(new Error('不能为空'))
  316. } else {
  317. callback()
  318. }
  319. }
  320. const mailBox = (rule, value, callback) => {
  321. if (!this.infolist.mailBox) {
  322. callback(new Error('不能为空'))
  323. } else {
  324. callback()
  325. }
  326. }
  327. const telType = (rule, value, callback) => {
  328. if (!this.infolist.telType) {
  329. callback(new Error('不能为空'))
  330. } else {
  331. callback()
  332. }
  333. }
  334. const needType = (rule, value, callback) => {
  335. if (!this.infolist.needType) {
  336. callback(new Error('不能为空'))
  337. } else {
  338. callback()
  339. }
  340. }
  341. const outType = (rule, value, callback) => {
  342. if (!this.infolist.outType) {
  343. callback(new Error('不能为空'))
  344. } else {
  345. callback()
  346. }
  347. }
  348. const customer = (rule, value, callback) => {
  349. if (!this.infolist.customer) {
  350. callback(new Error('不能为空'))
  351. } else {
  352. callback()
  353. }
  354. }
  355. const requirement = (rule, value, callback) => {
  356. if (!this.infolist.requirement) {
  357. callback(new Error('不能为空'))
  358. } else {
  359. callback()
  360. }
  361. }
  362. const business = (rule, value, callback) => {
  363. if (!this.infolist.business) {
  364. callback(new Error('不能为空'))
  365. } else {
  366. callback()
  367. }
  368. }
  369. const completion = (rule, value, callback) => {
  370. if (!this.infolist.completion) {
  371. callback(new Error('不能为空'))
  372. } else {
  373. callback()
  374. }
  375. }
  376. const feedback = (rule, value, callback) => {
  377. if (!this.infolist.feedback) {
  378. callback(new Error('不能为空'))
  379. } else {
  380. callback()
  381. }
  382. }
  383. const outTime = (rule, value, callback) => {
  384. if (!this.infolist.outTime) {
  385. callback(new Error('不能为空'))
  386. } else {
  387. callback()
  388. }
  389. }
  390. const dataRemark = (rule, value, callback) => {
  391. if (!this.infolist.dataRemark) {
  392. callback(new Error('不能为空'))
  393. } else {
  394. callback()
  395. }
  396. }
  397. const technique = (rule, value, callback) => {
  398. if (!this.infolist.technique) {
  399. callback(new Error('不能为空'))
  400. } else {
  401. callback()
  402. }
  403. }
  404. return {
  405. rules: {
  406. woName: [{
  407. required: true,
  408. trigger: 'blur',
  409. validator: woName
  410. }],
  411. telNum: [{
  412. required: true,
  413. trigger: 'blur',
  414. validator: telNum
  415. }],
  416. mailBox: [{
  417. required: true,
  418. trigger: 'blur',
  419. validator: mailBox
  420. }],
  421. telType: [{
  422. required: true,
  423. trigger: 'change',
  424. validator: telType
  425. }],
  426. needType: [{
  427. required: true,
  428. trigger: 'change',
  429. validator: needType
  430. }],
  431. outType: [{
  432. required: true,
  433. trigger: 'change',
  434. validator: outType
  435. }],
  436. customer: [{
  437. required: true,
  438. trigger: 'blur',
  439. validator: customer
  440. }],
  441. requirement: [{
  442. required: true,
  443. trigger: 'blur',
  444. validator: requirement
  445. }],
  446. business: [{
  447. required: true,
  448. trigger: 'blur',
  449. validator: business
  450. }],
  451. completion: [{
  452. required: true,
  453. trigger: 'blur',
  454. validator: completion
  455. }],
  456. feedback: [{
  457. required: true,
  458. trigger: 'blur',
  459. validator: feedback
  460. }],
  461. outTime: [{
  462. required: true,
  463. trigger: 'blur',
  464. validator: outTime
  465. }],
  466. dataRemark: [{
  467. required: true,
  468. trigger: 'blur',
  469. validator: dataRemark
  470. }],
  471. technique: [{
  472. required: true,
  473. trigger: 'blur',
  474. validator: technique
  475. }],
  476. },
  477. tooltit: '外呼需求',
  478. fullscreen: false,
  479. total: 0,
  480. pageSize: 1,
  481. tableData: [{}],
  482. dialogStatus: false,
  483. disableStatus: false,
  484. titname: '',
  485. infolist: {
  486. groupName: "",
  487. loginName: "",
  488. opTime: ''
  489. },
  490. userInfo: {},
  491. params: {},
  492. messTit: '',
  493. delid: '',
  494. loading: false,
  495. loadinged: false,
  496. fileInfo: {
  497. limit: 5,
  498. url: '/bpm/api/upload',
  499. fileList: []
  500. },
  501. rovaList: [],
  502. vision: '',
  503. datalist: {
  504. url: '/bpm/api/download',
  505. type: 1
  506. },
  507. uploadstatus: false,
  508. opname: '',
  509. opno: '',
  510. attList: [],
  511. options: [],
  512. terminal: '729292981242601472',
  513. // terminal: '727707168239054848',
  514. remark: '',
  515. visionsts: '1',
  516. telopt: [{
  517. dataCode: '1',
  518. dataName: '普通外呼需求'
  519. },
  520. {
  521. dataCode: '2',
  522. dataName: '特殊外呼需求'
  523. }
  524. ],
  525. needopt: [{
  526. dataCode: '1',
  527. dataName: '服务类'
  528. },
  529. {
  530. dataCode: '2',
  531. dataName: '家庭业务类'
  532. },
  533. {
  534. dataCode: '3',
  535. dataName: '存量营销类'
  536. }
  537. ],
  538. outopt: [{
  539. dataCode: '1',
  540. dataName: '10085常客维系平台'
  541. },
  542. {
  543. dataCode: '2',
  544. dataName: '10086自有人员'
  545. },
  546. {
  547. dataCode: '3',
  548. dataName: '10085众包人员'
  549. }
  550. ],
  551. checkexa: false,
  552. treeListonly: {},
  553. defaultList: [],
  554. closeList: false,
  555. visionchonly: false,
  556. depttype: 0,
  557. }
  558. },
  559. methods: {
  560. checkProcessUser() {
  561. let _this = this;
  562. if (_this.treeListonly.length > 1) {
  563. _this.$message({
  564. message: "只能选择一个人",
  565. type: "error",
  566. });
  567. } else {
  568. _this.dialogCliadd();
  569. }
  570. },
  571. deletes() {
  572. this.treeListonly = {};
  573. this.closeList = !this.closeList;
  574. },
  575. treeCheckonly(v) {
  576. this.treeListonly = v;
  577. this.treeListonly.leaderAuditName = v[0].label;
  578. this.treeListonly.leaderAuditNo = v[0].key;
  579. },
  580. closedia() {
  581. this.infolist = {
  582. groupName: "",
  583. loginName: "",
  584. opTime: ''
  585. };
  586. this.attList = [];
  587. this.fileInfo.fileList = [];
  588. this.dialogStatus = false;
  589. this.checkexa = false;
  590. },
  591. //获取列表
  592. getList(v, n) {
  593. this.pageSize = n;
  594. let _this = this;
  595. this.loading = true;
  596. v.procName = "外呼需求申请";
  597. this.$http({
  598. url: "/bpm/api/queryToDoAndFinishTaskList",
  599. method: "post",
  600. headers: {
  601. "Content-Type": "application/json",
  602. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  603. },
  604. data: v,
  605. }).then((res) => {
  606. this.tableData = res.data.data;
  607. this.total = res.data.totalRecord;
  608. this.loading = false;
  609. });
  610. },
  611. // 分页
  612. currchange(v) {
  613. this.pageSize = v;
  614. this.getList(this.params, this.pageSize);
  615. },
  616. //申请
  617. dialogCheck(v, n) {
  618. this.dialogStatus = true;
  619. let infolist = Object.assign({}, n);
  620. this.vision = '';
  621. this.visionsts = '';
  622. this.infodatas = [{}, {}];
  623. if (v === 1) {
  624. this.titname = '查看';
  625. this.disableStatus = true;
  626. } else if (v === 2) {
  627. this.titname = '审批';
  628. this.disableStatus = true;
  629. } else if (v === 3) {
  630. this.titname = '添加';
  631. this.disableStatus = false;
  632. this.$http({
  633. url: "/sysmgr/csysuserinfo/queryUserInfoByLoginNo",
  634. method: "post",
  635. headers: {
  636. "Content-Type": "application/json",
  637. },
  638. data: {},
  639. }).then((res) => {
  640. this.infolist.groupName = res.data.groupName;
  641. this.infolist.loginName = res.data.loginName;
  642. console.log(this.infolist)
  643. });
  644. this.$http({
  645. url: "/sysmgr/csysuserinfo/queryUserInfoByLoginNo",
  646. method: "post",
  647. headers: {
  648. "Content-Type": "application/json",
  649. },
  650. data: {},
  651. }).then((res) => {
  652. console.log(res.data)
  653. });
  654. return
  655. }
  656. this.$http({
  657. url: '/bpm/api/taskInit',
  658. method: "post",
  659. headers: {
  660. "Content-Type": "application/json",
  661. },
  662. data: {
  663. woNo: n.woNo
  664. },
  665. }).then((res) => {
  666. // this.infolist = Object.assign({}, res.data);
  667. this.terminal = infolist.procId;
  668. this.opname = res.data.opName;
  669. this.opno = res.data.opNo;
  670. this.infolist = JSON.parse(res.data.params.terminalRes);
  671. this.infolist.procId = infolist.procId;
  672. this.infolist.procVersion = infolist.procVersion;
  673. this.remark = infolist.remark;
  674. this.infolist.stepId = infolist.stepId;
  675. this.infolist.taskId = infolist.taskId;
  676. this.infolist.taskName = infolist.taskName;
  677. this.infolist.opName = infolist.opName;
  678. this.infolist.opNo = infolist.opNo;
  679. // this.infolist.opTime = infolist.opTime;
  680. this.infolist.woNo = infolist.woNo;
  681. this.visionchonly = true;
  682. if (res.data.taskList[res.data.taskList.length - 1].taskName == '流程发起') {
  683. this.vision = '流程发起';
  684. if (this.titname == '审批') {
  685. this.disableStatus = false;
  686. }
  687. } else {
  688. this.vision = '审批';
  689. this.visionsts = '2';
  690. }
  691. this.datalist.attList = JSON.parse(res.data.params.attList);
  692. this.attList = [];
  693. this.fileInfo.fileList = [];
  694. this.datalist.attList.forEach(item => {
  695. item.id = item.attchFileId;
  696. this.fileInfo.fileList.push({
  697. name: item.fileName,
  698. url: '',
  699. id: item.id,
  700. attchFileId: item.attchFileId,
  701. fileName: item.fileName
  702. });
  703. this.attList.push({
  704. name: item.fileName,
  705. url: '',
  706. id: item.id,
  707. attchFileId: item.attchFileId,
  708. fileName: item.fileName
  709. });
  710. })
  711. this.rovaList = res.data.taskList;
  712. this.uploadstatus = true;
  713. });
  714. },
  715. //审批
  716. dialogCli(v, n) {
  717. this.dialogStatus = false;
  718. if (v === 3) {
  719. this.infolist = {
  720. groupName: "",
  721. loginName: "",
  722. opTime: ''
  723. };
  724. this.attList = [];
  725. this.fileInfo.fileList = [];
  726. this.checkexa = false;
  727. return
  728. }
  729. let _this = this;
  730. // this.infolist.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD")
  731. if (v === 1) {
  732. let params = {
  733. dealType: '1',
  734. dealTypeDesc: '打回',
  735. procId: this.infolist.procId,
  736. procVersion: this.infolist.procVersion,
  737. remark: this.remark,
  738. stepId: this.infolist.stepId,
  739. taskId: this.infolist.taskId,
  740. taskName: this.infolist.taskName,
  741. opName: this.infolist.opName,
  742. opNo: this.opno,
  743. opTime: this.infolist.opTime,
  744. params: {
  745. procExeCondiVal: '不同意',
  746. terminalRes: JSON.stringify(this.infolist),
  747. },
  748. woNo: this.infolist.woNo,
  749. }
  750. this.submitInfo("/bpm/api/submitTask", params);
  751. } else if (v === 2) {
  752. let param = {
  753. dealType: '0',
  754. dealTypeDesc: '提交',
  755. procId: this.infolist.procId,
  756. procVersion: this.infolist.procVersion,
  757. remark: this.remark,
  758. stepId: this.infolist.stepId,
  759. taskId: this.infolist.taskId,
  760. taskName: this.infolist.taskName,
  761. opName: this.infolist.opName,
  762. opNo: this.opno,
  763. opTime: this.infolist.opTime,
  764. params: {
  765. woType: this.infolist.woType,
  766. terminalRes: JSON.stringify(this.infolist),
  767. },
  768. woNo: this.infolist.woNo,
  769. }
  770. param.params.assigneeNo = this.treeListonly.leaderAuditNo;
  771. param.params.assigneeName = this.treeListonly.leaderAuditName;
  772. console.log(this.treeListonly)
  773. // if (this.vision == '审批' && this.visionsts == '2') {
  774. // param.params.assigneeNo = this.opno;
  775. // param.params.assigneeName = this.opname;
  776. // }
  777. if (this.vision == '流程发起') {
  778. let attList = [];
  779. for (let i = 0; i < this.attList.length; i++) {
  780. attList.push({
  781. id: this.attList[i].id,
  782. fileCode: this.attList[i].fileCode,
  783. fileName: this.attList[i].fileName,
  784. opName: this.attList[i].opName,
  785. opNo: this.attList[i].opNo,
  786. opTime: this.attList[i].opTime,
  787. woNo: this.infolist.woNo,
  788. attchFileId: this.attList[i].attchFileId,
  789. });
  790. }
  791. param.params.attList = JSON.stringify(attList)
  792. }
  793. if (this.vision == '上刊用印') {
  794. let param = new FormData();
  795. param.append("woNo", this.infolist.woNo);
  796. this.$http({
  797. url: "/market/cAdvPubWo/excelExport",
  798. method: "post",
  799. headers: {
  800. "Content-Type": "application/json",
  801. },
  802. responseType: "blob",
  803. data: param,
  804. }).then((response) => {
  805. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  806. let blob = new Blob([response.data], {
  807. type: 'application/vnd.ms-excel'
  808. })
  809. window.navigator.msSaveOrOpenBlob(blob,
  810. new Date().getTime() + '.xlsx')
  811. } else {
  812. /* 火狐谷歌的文件下载方式 */
  813. var blob = new Blob([response.data])
  814. var downloadElement = document.createElement('a')
  815. var href = window.URL.createObjectURL(blob)
  816. downloadElement.href = href
  817. downloadElement.download = new Date().getTime() + '.xlsx'
  818. document.body.appendChild(downloadElement)
  819. downloadElement.click()
  820. document.body.removeChild(downloadElement)
  821. window.URL.revokeObjectURL(href)
  822. }
  823. });
  824. }
  825. this.submitInfo("/bpm/api/submitTask", param);
  826. }
  827. },
  828. //添加
  829. dialogCliadd(v) {
  830. let _this = this;
  831. let info = {};
  832. info.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  833. this.infolist.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  834. info.opNo = this.userInfo.loginNo;
  835. info.opName = this.userInfo.loginName;
  836. info.woTitle = this.infolist.woName;
  837. info.params = {};
  838. info.params.terminalRes = this.infolist;
  839. info.procId = this.terminal;
  840. for (let i = 0; i < this.options.length; i++) {
  841. if (this.terminal == this.options[i].procId) {
  842. info.procName = this.options[i].procName;
  843. info.procVersion = this.options[i].procVersion;
  844. }
  845. }
  846. let attList = [];
  847. for (let i = 0; i < this.attList.length; i++) {
  848. attList.push({
  849. id: this.attList[i].id,
  850. fileCode: this.attList[i].fileCode,
  851. fileName: this.attList[i].fileName,
  852. opName: this.attList[i].opName,
  853. opNo: this.attList[i].opNo,
  854. opTime: this.attList[i].opTime,
  855. woNo: this.infolist.woNo,
  856. attchFileId: this.attList[i].attchFileId,
  857. });
  858. }
  859. info.params.assigneeNo = this.treeListonly.leaderAuditNo;
  860. info.params.assigneeName = this.treeListonly.leaderAuditName;
  861. info.params.attList = JSON.stringify(attList)
  862. info.params.terminalRes = JSON.stringify(info.params.terminalRes);
  863. this.submitInfo("/bpm/api/startProc", info);
  864. },
  865. submitInfo(u, v) {
  866. let _this = this;
  867. this.$refs.infolist.validate(valid => {
  868. if (valid) {
  869. this.$http({
  870. url: u,
  871. method: "post",
  872. headers: {
  873. "Content-Type": "application/json",
  874. },
  875. data: v,
  876. }).then((res) => {
  877. if (res.data.result === 1) {
  878. _this.$message({
  879. message: res.data.desc,
  880. type: 'error'
  881. });
  882. } else {
  883. _this.$message({
  884. message: '成功',
  885. type: 'success'
  886. });
  887. _this.closedia();
  888. _this.infolist = {
  889. groupName: "",
  890. loginName: "",
  891. opTime: ''
  892. };
  893. _this.attList = [];
  894. _this.checkexa = false;
  895. _this.fileInfo.fileList = [];
  896. _this.getList(this.params, this.pageSize);
  897. }
  898. });
  899. }
  900. })
  901. },
  902. getStanding(v) {
  903. if (v == 1) {
  904. this.$router.push({
  905. path: '/advgys',
  906. });
  907. this.setabList('供应商管理', '/advgys');
  908. } else {
  909. this.$router.push({
  910. path: '/advysx',
  911. });
  912. this.setabList('预算及上限', '/advysx');
  913. }
  914. },
  915. setabList(n, p) {
  916. let params = {
  917. children: "",
  918. name: n,
  919. rountPath: p,
  920. target: "_self",
  921. };
  922. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  923. if (this.$store.state.tabList[i].name === params.name) {
  924. this.$store.state.tabList[i] = params;
  925. }
  926. }
  927. let set = new Set([...this.$store.state.tabList, params]);
  928. set.add(params);
  929. this.$store.commit("setDefaultActive", params.rountPath);
  930. this.$store.commit("setTabList", Array.from(set));
  931. },
  932. //流程
  933. getTermianl() {
  934. this.$http({
  935. url: "/bpm/api/queryBpmProcList",
  936. method: "post",
  937. headers: {
  938. "Content-Type": "application/json",
  939. "page": '{"pageNo":"' + 1 + '","pageSize":"100"}'
  940. },
  941. data: {},
  942. }).then((res) => {
  943. this.options = res.data.data;
  944. });
  945. },
  946. //文件返回值
  947. uploadBack(v) {
  948. this.attList = v;
  949. },
  950. //功能栏
  951. iconCli(v) {
  952. if (v === 1) {
  953. this.getList(this.params, this.pageSize);
  954. }
  955. if (v === 2) {
  956. this.fullscreen = !this.fullscreen
  957. }
  958. },
  959. getUser() {
  960. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  961. }
  962. },
  963. mounted() {
  964. this.getList({}, 1);
  965. this.getUser();
  966. this.getTermianl();
  967. },
  968. created() {
  969. }
  970. }
  971. </script>
  972. <style scoped lang="scss">
  973. ::v-deep .el-dialog .flex-box{
  974. height: 400px;
  975. }
  976. .onetab {
  977. margin-bottom: 20px;
  978. padding: 0 20px;
  979. }
  980. .titbox {
  981. div {
  982. float: right;
  983. i {
  984. font-size: 22px;
  985. margin-left: 20px;
  986. cursor: pointer;
  987. }
  988. }
  989. }
  990. .tabbox {
  991. margin-top: 15px;
  992. }
  993. .pageBox {
  994. text-align: right;
  995. margin-top: 10px;
  996. }
  997. .info-line {
  998. width: 100%;
  999. display: block;
  1000. padding-left: 20px;
  1001. div {
  1002. width: 50%;
  1003. display: inline-block;
  1004. }
  1005. span {
  1006. width: 100px;
  1007. display: inline-block;
  1008. text-align: left;
  1009. i {
  1010. color: red;
  1011. display: inline-block;
  1012. padding-right: 5px;
  1013. }
  1014. }
  1015. .el-select,
  1016. .el-input {
  1017. width: calc(100% - 120px);
  1018. }
  1019. .el-date-editor{
  1020. display: inline-flex;
  1021. width: calc(100% - 120px);
  1022. }
  1023. }
  1024. .online {
  1025. width: 100%;
  1026. .el-select {
  1027. width: calc(100% - 120px);
  1028. }
  1029. span {
  1030. vertical-align: top;
  1031. }
  1032. .el-textarea {
  1033. width: calc(100% - 120px);
  1034. }
  1035. }
  1036. .adv-type {
  1037. margin-top: 20px;
  1038. display: flex;
  1039. justify-content: space-between;
  1040. flex-wrap: wrap;
  1041. // border: 1px solid #ddd;
  1042. border-radius: 5px;
  1043. padding: 20px;
  1044. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  1045. div {
  1046. width: 33%;
  1047. text-align: center;
  1048. height: 80px;
  1049. overflow: hidden;
  1050. min-width: 100px;
  1051. cursor: pointer;
  1052. padding-top: 10px;
  1053. margin: 10px 0;
  1054. }
  1055. div:hover {
  1056. background: #CFE8FC;
  1057. border-radius: 5px;
  1058. }
  1059. span {
  1060. width: 100%;
  1061. display: inline-block;
  1062. height: 40px;
  1063. // line-height: 40px;
  1064. i {
  1065. color: #0074D9;
  1066. font-size: 36px;
  1067. }
  1068. }
  1069. }
  1070. .online {
  1071. width: 100%;
  1072. .el-select {
  1073. width: calc(100% - 100px);
  1074. }
  1075. span {
  1076. vertical-align: top;
  1077. }
  1078. .el-textarea {
  1079. width: calc(100% - 120px);
  1080. }
  1081. .tree {
  1082. width: calc(50% - 60px);
  1083. display: inline-block;
  1084. margin-right: 20px;
  1085. height: 300px;
  1086. overflow-y: scroll;
  1087. .el-icon-error {
  1088. float: right;
  1089. font-size: 20px;
  1090. margin-top: 9px;
  1091. cursor: pointer;
  1092. }
  1093. }
  1094. .treeUser {
  1095. margin: 0;
  1096. border: 1px solid #ddd;
  1097. p {
  1098. background: #f4f4f4;
  1099. padding: 0 20px;
  1100. margin-bottom: 5px;
  1101. }
  1102. }
  1103. .treeUserb {
  1104. width: calc(100% - 100px);
  1105. border: 1px solid #ddd;
  1106. background: #f4f4f4;
  1107. border-radius: 3px;
  1108. height: auto;
  1109. overflow: hidden;
  1110. p {
  1111. display: inline-block;
  1112. padding: 0 20px;
  1113. margin-bottom: 5px;
  1114. }
  1115. }
  1116. }
  1117. </style>