detail.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. <template>
  2. <view class="pages">
  3. <view class="vtitle">检测申请方填写</view>
  4. <view class="form_group">
  5. <view class="lable">委托单编号</view>
  6. <view class="tag">
  7. <text class="span">{{ item.wt_num }}</text>
  8. <text class="icon more">&#xe631;</text>
  9. </view>
  10. </view>
  11. <view class="form_group">
  12. <view class="lable">标题</view>
  13. <view class="tag">
  14. <input v-model="item.title" placeholder="输入标题" />
  15. <text class="icon more">&#xe631;</text>
  16. </view>
  17. </view>
  18. <view class="form_group">
  19. <view class="lable">申请单位/部门</view>
  20. <view class="tag">
  21. <input v-model="item.dept" placeholder="输入申请单位/部门" />
  22. <text class="icon more">&#xe631;</text>
  23. </view>
  24. </view>
  25. <view class="form_group">
  26. <view class="lable">试验目的</view>
  27. <view class="tag">
  28. <input v-model="item.purpose" placeholder="输入试验目的" />
  29. <text class="icon more">&#xe631;</text>
  30. </view>
  31. </view>
  32. <view class="form_group">
  33. <view class="lable">申请人</view>
  34. <view class="tag">
  35. <input v-model="item.applicant_name" placeholder="输入申请人" />
  36. <text class="icon more">&#xe631;</text>
  37. </view>
  38. </view>
  39. <view class="form_group">
  40. <view class="lable">电话</view>
  41. <view class="tag">
  42. <input v-model="item.tel" placeholder="输入电话" />
  43. <text class="icon more">&#xe631;</text>
  44. </view>
  45. </view>
  46. <view class="form_group">
  47. <view class="lable">试验部门</view>
  48. <view class="tag">
  49. <input v-model="item.test_dept" placeholder="输入试验部门" />
  50. <text class="icon more">&#xe631;</text>
  51. </view>
  52. </view>
  53. <view class="form_group">
  54. <view class="lable">所属项目</view>
  55. <view class="tag">
  56. <input v-model="item.item" placeholder="输入所属项目" />
  57. <text class="icon more">&#xe631;</text>
  58. </view>
  59. </view>
  60. <view class="form_group">
  61. <view class="lable">试验类型</view>
  62. <view class="tag">
  63. <view class="span">
  64. <picker @change="bindChange($event, 'experiment_type')" :range="array1">
  65. <view class="picks">{{ item.experiment_type ? item.experiment_type : '选择试验类型' }}</view>
  66. </picker>
  67. <picker @change="bindChange($event, 'product')" :range="array2">
  68. <view class="picks">{{ item.product ? item.product : '选择产品线' }}</view>
  69. </picker>
  70. </view>
  71. <text class="icon more">&#xe631;</text>
  72. </view>
  73. </view>
  74. <view class="form_group">
  75. <view class="lable">项目编号</view>
  76. <view class="tag">
  77. <input v-model="item.item_num" placeholder="输入项目编号" />
  78. <text class="icon more">&#xe631;</text>
  79. </view>
  80. </view>
  81. <view class="form_group">
  82. <view class="lable">结果形式</view>
  83. <view class="tag"><u-subsection :list="radio" :current="current" @change="change"></u-subsection></view>
  84. </view>
  85. <view class="form_group">
  86. <view class="lable">模板</view>
  87. <view class="tag" @click="dshow = true">
  88. <text class="span">2个模板</text>
  89. <text class="icon more">&#xe631;</text>
  90. </view>
  91. </view>
  92. <view class="form_group">
  93. <view class="lable">附件上传</view>
  94. <view class="tag" @click="dshow = true"><text class="span">最大上传5个</text></view>
  95. </view>
  96. <view class="form_group">
  97. <uni-file-picker :limit="5" @select="upload($event, item)" file-mediatype="all">
  98. <button class="up">
  99. <text class="icon">&#xe604;</text>
  100. <text>选择文件</text>
  101. </button>
  102. </uni-file-picker>
  103. <view class="ufiles">
  104. <view class="fil" v-for="(item, index) in item.unstructured" :key="index" @click="look(item)">
  105. <view v-if="item.fileType">
  106. <view class="icon" v-if="item.fileType.toLowerCase() == '.png' || item.fileType.toLowerCase() == '.jpg'">&#xe63e;</view>
  107. </view>
  108. <view class="icon" v-else>&#xeb66;</view>
  109. <view class="name">
  110. <view class="omit">{{ item.name }}</view>
  111. <view class="desc">{{ (item.size / 1024).toFixed(2) }}kb</view>
  112. </view>
  113. <view class="del" @click.stop="del(item)">删除</view>
  114. <view class="clear"></view>
  115. </view>
  116. </view>
  117. </view>
  118. <view class="vtitle">设置审批人员</view>
  119. <view class="form_group" @click="select('1')">
  120. <view class="lable">需求审核-产品经理或主管人员</view>
  121. <view class="tag">
  122. <text class="span">{{ item.WTXQSH_NAME }}</text>
  123. <text class="icon more">&#xe631;</text>
  124. </view>
  125. </view>
  126. <view class="form_group" @click="select('2')">
  127. <view class="lable">试验审核-试验对接人</view>
  128. <view class="tag">
  129. <text class="span">{{ item.WTSYSH_NAME }}</text>
  130. <text class="icon more">&#xe631;</text>
  131. </view>
  132. </view>
  133. <view class="form_group" @click="select('3')">
  134. <view class="lable">需求批准-本部门领导</view>
  135. <view class="tag">
  136. <text class="span">{{ item.WTXQPZ_NAME }}</text>
  137. <text class="icon more">&#xe631;</text>
  138. </view>
  139. </view>
  140. <view class="form_group" @click="select('4')">
  141. <view class="lable">试验批准</view>
  142. <view class="tag">
  143. <text class="span">{{ item.WTSYPZ_NAME }}</text>
  144. <text class="icon more">&#xe631;</text>
  145. </view>
  146. </view>
  147. <view class="form_group" @click="select('5')">
  148. <view class="lable">任务分派-任务分派人</view>
  149. <view class="tag">
  150. <text class="span">{{ item.WTRWFP_NAME }}</text>
  151. <text class="icon more">&#xe631;</text>
  152. </view>
  153. </view>
  154. <view class="vtitle">样机</view>
  155. <view class="form_group">
  156. <view class="lable">GH560</view>
  157. <view class="tag">
  158. <text class="span">XH890656565556</text>
  159. <text class="icon more">&#xe631;</text>
  160. </view>
  161. </view>
  162. <view class="form_group">
  163. <view class="lable">GH560</view>
  164. <view class="tag">
  165. <text class="span">XH890656565556</text>
  166. <text class="icon more">&#xe631;</text>
  167. </view>
  168. </view>
  169. <view class="footer" v-if="btnshow">
  170. <view class="flex">
  171. <view class="f"><button class="btn br" @click="validate()">保存</button></view>
  172. <view class="f"><button class="btn br" @click="submission()">提交</button></view>
  173. <view class="f" v-if="state == 1"><button class="btn br back" @click="back()">回退</button></view>
  174. </view>
  175. </view>
  176. <u-popup :show="dshow" mode="center" @close="dshow = false" round="5" closeable customStyle="width:92%">
  177. <view class="popup">
  178. <u-divider text="模板下载"></u-divider>
  179. <view class="citem" @click="download('https://img-operation.csdnimg.cn/csdn/silkroad/img/1670234405428.jpg')">
  180. <view class="title omit">提交流程面板提交流程面板提交流程面板</view>
  181. <view class="xz">点击下载</view>
  182. </view>
  183. <view class="citem" @click="download('https://img-operation.csdnimg.cn/csdn/silkroad/img/1670234405428.jpg')">
  184. <view class="title omit">提交流程面板提交流程面板提交流程面板</view>
  185. <view class="xz">点击下载</view>
  186. </view>
  187. <view class="citem" @click="download('https://img-operation.csdnimg.cn/csdn/silkroad/img/1670234405428.jpg')">
  188. <view class="title omit">提交流程面板提交流程面板提交流程面板</view>
  189. <view class="xz">点击下载</view>
  190. </view>
  191. </view>
  192. </u-popup>
  193. <u-popup :show="show" mode="bottom" @close="show = false" closeable round="15">
  194. <view class="popup">
  195. <u-divider text="提交流程面板"></u-divider>
  196. <scroll-view scroll-y="true" style="height: 300rpx;">
  197. <view v-for="(item, index) in nextNodes" :key="index" class="bitem" @click="bselect(item, 'nextNodes')">
  198. <view class="icon select check" v-if="item.check">&#xe600;</view>
  199. <view class="icon select" v-else>&#xe8bb;</view>
  200. <view class="title">{{ item.name }}</view>
  201. </view>
  202. </scroll-view>
  203. <view class="confrim-btn"><button class="btn" @click="submit()">确定</button></view>
  204. </view>
  205. </u-popup>
  206. <u-popup :show="bshow" mode="bottom" @close="bshow = false" closeable round="15">
  207. <view class="popup">
  208. <u-divider text="回退流程面板"></u-divider>
  209. <scroll-view scroll-y="true" style="height: 300rpx;">
  210. <view v-for="(item, index) in backNodes" :key="index" class="bitem" @click="bselect(item, 'backNodes')">
  211. <view class="icon select check" v-if="item.check">&#xe600;</view>
  212. <view class="icon select" v-else>&#xe8bb;</view>
  213. <view class="title">{{ item.name }}</view>
  214. </view>
  215. </scroll-view>
  216. <view class="confrim-btn"><button class="btn" @click="workflowsback()">确定</button></view>
  217. </view>
  218. </u-popup>
  219. </view>
  220. </template>
  221. <script>
  222. let qrcode = require('@/common/code.js');
  223. export default {
  224. data() {
  225. return {
  226. ip: this.http.urls.ip,
  227. p: {},
  228. item: {},
  229. current: 0,
  230. radio: [
  231. {
  232. name: '正式报告'
  233. },
  234. {
  235. name: '仅原始数据'
  236. },
  237. {
  238. name: '协助试验'
  239. }
  240. ],
  241. id: '',
  242. items: {
  243. document: {
  244. items: {}
  245. }
  246. },
  247. users: [],
  248. array1: ['整机性能', '系统性能', '台架', '可靠性','部件'], //实验类型1
  249. array2: ['装载机', '平地机', '叉车', '推土机','小型机','挖掘机','压缩机','起重机','压路机','农机','高空作业平台','其他'], //实验类型2
  250. show: false,
  251. bshow: false,
  252. dshow: false,
  253. itemt: {},
  254. up: {},
  255. content: '标题',
  256. nextNodes: [],
  257. backNodes: [],
  258. touser: {
  259. nodeid: '1649917385058',
  260. isToPerson: true,
  261. userids: '__jFFZYvLIG6uFc7CdBMg'
  262. },
  263. btnshow: false,
  264. state: 0,
  265. btitem: {
  266. applicationId: '__gAPYBW4YxB3UePM3lqO',
  267. exparams: {},
  268. formId: '__0FLGNncOS1lz0T9jsFn',
  269. id: '__79Wtw03ya4dJUDGPyAN',
  270. isRelate: 'true',
  271. parentId: '',
  272. sign: '',
  273. subDocuments: [],
  274. templateForm: '',
  275. versions: '0'
  276. }
  277. };
  278. },
  279. onLoad(e) {
  280. this.id = e.id;
  281. //传过来的id
  282. this.state = e.ste;
  283. if (e.ste == 1) {
  284. /* this.http.request({
  285. url: this.http.urls.xxxx + e.id,
  286. success: res => {
  287. this.item = res.data.data;
  288. }
  289. }); */
  290. this.getDocuments();
  291. } else if (e.ste == 2) {
  292. this.empty();
  293. }
  294. //选中审批人员监听函数,其它类型的参考这个
  295. uni.$on('select', res => {
  296. console.log('asd2:' + JSON.stringify(res));
  297. if (res.ste == 1) {
  298. this.item.WTXQSH = res.items.__psLiBtymgDqatneDeJM.value;
  299. } else if (res.ste == 2) {
  300. this.item.WTSYSH = res.items.__d9UDIcG9cd9TPsauffQ.value;
  301. } else if (res.ste == 3) {
  302. this.item.WTXQPZ = res.items.__EaOA4o6je5WFAGSDelj.value;
  303. } else if (res.ste == 4) {
  304. this.item.WTSYPZ = res.items.__cDWoqYpeJkPwLjignVY.value;
  305. } else if (res.ste == 5) {
  306. this.item.WTRWFP = res.items.__vhLhnW6B7JBtaxiXkQ3.value;
  307. }
  308. this.convert();
  309. });
  310. },
  311. methods: {
  312. //选择实验类型
  313. bindChange(e, type) {
  314. this.item[type] = this.array1[e.target.value];
  315. this.$forceUpdate();
  316. },
  317. //下载模板
  318. download(url) {
  319. const a = document.createElement('a');
  320. a.href = url;
  321. a.download = 'download';
  322. a.click();
  323. this.dshow = false;
  324. },
  325. //提交或回退
  326. bselect(e, tag) {
  327. this[tag].forEach(item => {
  328. item.check = false;
  329. });
  330. e.check = true;
  331. this.itemt.nextNodeIds = [];
  332. this.itemt.nextNodeIds.push(e.id);
  333. this.$forceUpdate();
  334. }, //详情
  335. getDocuments() {
  336. this.http.request({
  337. url: this.http.urls.documents + this.id,
  338. data: this.item,
  339. success: res => {
  340. this.item = res.data.data.items;
  341. this.p = res.data.data;
  342. this.getUsers();
  343. //保存数据
  344. this.btitem.id = res.data.data.id;
  345. this.btitem.formId = res.data.data.formid;
  346. this.btitem.versions = res.data.data.versions;
  347. this.btitem.parentId = '';
  348. if (this.item.unstructured) {
  349. this.item.unstructured = JSON.parse(this.item.unstructured);
  350. } else {
  351. this.item.unstructured = [];
  352. }
  353. if (this.p.lastFlowOperation == undefined || this.p.auditorList.includes(this.getUser().id)) {
  354. this.btnshow = true;
  355. }
  356. //this.current=res.data.data.items.report_type;
  357. if (this.item.report_type == '正式报告') {
  358. this.current = 0;
  359. } else if (this.item.report_type == '仅原始数据') {
  360. this.current = 1;
  361. } else if (this.item.report_type == '协助试验') {
  362. this.current = 2;
  363. }
  364. this.iteml = res.data.data;
  365. this.items.applicationId = '__gAPYBW4YxB3UePM3lqO';
  366. this.items.docId = this.iteml.id;
  367. this.items.id = this.iteml.id;
  368. this.items.formId = this.iteml.formid;
  369. this.items.parentId = '';
  370. this.items.subSelects = [];
  371. this.items.templateForm = '';
  372. this.items.viewId = '';
  373. this.items.document.items = this.item;
  374. this.items.document.applicationId = '__gAPYBW4YxB3UePM3lqO';
  375. this.items.document.exparams = {};
  376. this.items.document.formId = this.iteml.formid;
  377. this.items.document.id = this.iteml.id;
  378. this.items.document.parentId = '';
  379. this.items.document.sign = '';
  380. this.items.document.stateId = this.iteml.stateid;
  381. this.items.document.subDocuments = [];
  382. this.items.document.templateForm = '';
  383. this.items.document.versions = '0';
  384. }
  385. });
  386. },
  387. empty() {
  388. this.btnshow = true;
  389. this.http.request({
  390. url: this.http.urls.empty,
  391. data: this.item,
  392. success: res => {
  393. console.log('res2:' + JSON.stringify(res));
  394. this.item = res.data.data.items;
  395. this.p = res.data.data;
  396. //保存数据
  397. this.btitem.id = res.data.data.id;
  398. this.btitem.formId = res.data.data.formid;
  399. this.btitem.versions = res.data.data.versions;
  400. this.btitem.parentId = '';
  401. console.log('this.p1:' + JSON.stringify(this.p));
  402. //this.current=res.data.data.items.report_type;
  403. if (this.item.report_type == '正式报告') {
  404. this.current = 0;
  405. } else if (this.item.report_type == '仅原始数据') {
  406. this.current = 1;
  407. } else if (this.item.report_type == '协助试验') {
  408. this.current = 2;
  409. }
  410. this.iteml = res.data.data;
  411. this.items.applicationId = '__gAPYBW4YxB3UePM3lqO';
  412. this.items.docId = this.iteml.id;
  413. this.items.id = this.iteml.id;
  414. this.items.formId = this.iteml.formid;
  415. this.items.parentId = '';
  416. this.items.subSelects = [];
  417. this.items.templateForm = '';
  418. this.items.viewId = '';
  419. this.items.document.items = this.item;
  420. this.items.document.applicationId = '__gAPYBW4YxB3UePM3lqO';
  421. this.items.document.exparams = {};
  422. this.items.document.formId = this.iteml.formid;
  423. this.items.document.id = this.iteml.id;
  424. this.items.document.parentId = '';
  425. this.items.document.sign = '';
  426. this.items.document.stateId = this.iteml.stateid;
  427. this.items.document.subDocuments = [];
  428. this.items.document.templateForm = '';
  429. this.items.document.versions = '0';
  430. }
  431. });
  432. },
  433. //获取全部用户用于显示名字
  434. getUsers() {
  435. this.http.request({
  436. url: this.http.urls.user_list,
  437. success: res => {
  438. this.users = res.data.data;
  439. this.convert();
  440. }
  441. });
  442. },
  443. convert() {
  444. this.users.forEach(item => {
  445. if (this.item.WTXQSH == item.ID) {
  446. this.item.WTXQSH_NAME = item.NAME;
  447. }
  448. if (this.item.WTSYSH == item.ID) {
  449. this.item.WTSYSH_NAME = item.NAME;
  450. }
  451. if (this.item.WTXQPZ == item.ID) {
  452. this.item.WTXQPZ_NAME = item.NAME;
  453. }
  454. if (this.item.WTSYPZ == item.ID) {
  455. this.item.WTSYPZ_NAME = item.NAME;
  456. }
  457. if (this.item.WTRWFP == item.ID) {
  458. this.item.WTRWFP_NAME = item.NAME;
  459. }
  460. if (this.item.applicant == item.ID) {
  461. this.item.applicant_name = item.NAME;
  462. }
  463. });
  464. this.$forceUpdate();
  465. },
  466. //选择结果形式
  467. change(e) {
  468. this.current = e;
  469. console.log('aa:' + this.radio[this.current].name);
  470. this.item.report_type = this.radio[this.current].name;
  471. },
  472. //选择审批人员
  473. select(e) {
  474. uni.navigateTo({
  475. url: '/pages/index/select?ste=' + e
  476. });
  477. },
  478. //选择文件上传
  479. upload(e, item) {
  480. uni.showLoading({ title: '正在上传.....', mask: true });
  481. e.tempFilePaths.forEach((temp, index) => {
  482. uni.uploadFile({
  483. url: this.http.urls.upload,
  484. filePath: temp,
  485. name: 'files',
  486. formData: {
  487. applicationId: '__gAPYBW4YxB3UePM3lqO',
  488. allowedTypes: '00',
  489. fieldId: this.id + '_unstructured',
  490. fileSaveMode: '00',
  491. path: 'ITEM_PATH',
  492. actionType: ''
  493. },
  494. header: { accessToken: this.getUser().accessToken },
  495. success: res => {
  496. uni.hideLoading();
  497. let data = JSON.parse(res.data);
  498. if (data.errcode == 0) {
  499. this.item.unstructured.push({
  500. name: data.data[0].fileName,
  501. path: data.data[0].filePath,
  502. size: data.data[0].fileSize,
  503. fileType: data.data[0].fileType
  504. });
  505. this.$forceUpdate();
  506. } else {
  507. uni.showModal({ content: '上传失败', showCancel: false });
  508. }
  509. },
  510. fail: res => {
  511. uni.hideLoading();
  512. uni.showModal({ content: '上传失败', showCancel: false });
  513. }
  514. });
  515. });
  516. },
  517. //删除上传的文件
  518. del(item) {
  519. this.item.unstructured.splice(this.item.unstructured.indexOf(item), 1);
  520. },
  521. //文件预览
  522. look(item) {
  523. console.log('asd:' + JSON.stringify(item));
  524. uni.openDocument({
  525. //新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。
  526. filePath: this.ip + item.path,
  527. showMenu: true,
  528. success: res => {
  529. console.log('打开文档成功');
  530. }
  531. });
  532. },
  533. //提交
  534. add() {
  535. this.http.request({
  536. url: this.http.urls.user_task_add,
  537. data: this.item,
  538. method: 'POST',
  539. success: res => {
  540. uni.showModal({
  541. title: '提示',
  542. content: '提交成功',
  543. showCancel: false,
  544. success: res => {
  545. if (res.confirm) {
  546. uni.navigateBack();
  547. }
  548. }
  549. });
  550. }
  551. });
  552. },
  553. //保存
  554. validate() {
  555. this.btitem.items = this.item;
  556. this.http.request({
  557. url: this.http.urls.validate + '/' + this.btitem.id + '/withoutValid?' + this.btitem.parentId,
  558. data: this.btitem,
  559. method: 'PUT',
  560. success: res => {
  561. console.log('validate1:' + JSON.stringify(res));
  562. if (res.data.errcode == 0) {
  563. uni.$emit('index');
  564. uni.redirectTo({
  565. url: '/pages/index/index'
  566. });
  567. } else {
  568. uni.showModal({
  569. title: '提示',
  570. content: res.data.data.errmsg,
  571. showCancel: false,
  572. success: res => {
  573. if (res.confirm) {
  574. //uni.navigateBack();
  575. }
  576. }
  577. });
  578. return;
  579. }
  580. }
  581. });
  582. },
  583. //提交流程面板
  584. submission() {
  585. this.http.request({
  586. url: this.http.urls.documents + this.id + '/panels/submission',
  587. data: this.items,
  588. method: 'POST',
  589. success: res => {
  590. //this.item=res.data.data;
  591. console.log('zx22:' + JSON.stringify(res));
  592. this.show = true;
  593. this.title = res.data.data.name;
  594. this.nextNodes = res.data.data.nextNodes;
  595. this.itemt.flowId = res.data.data.flowId;
  596. this.itemt.flowType = '80';
  597. this.itemt.currentNodeId = res.data.data.currentNodeId;
  598. this.itemt.attitude = '';
  599. this.itemt.signature = '';
  600. this.itemt.submitTo = '';
  601. this.itemt.circulatorInfo = '';
  602. this.itemt.subFlowApproverInfo = '';
  603. this.itemt.subFlowApproverInfoAll = '';
  604. this.itemt.document = this.items.document;
  605. //this.content=res.data.data.formname;
  606. }
  607. });
  608. }, //提交流程
  609. submit() {
  610. //this.itemt.document.items.purpose="试验目的5656";
  611. //this.itemt.document.items.title="标题5656";
  612. this.itemt.applicationId = '__gAPYBW4YxB3UePM3lqO';
  613. this.itemt.docId = this.iteml.id;
  614. this.itemt.id = this.iteml.id;
  615. this.itemt.formId = this.iteml.formid;
  616. this.itemt.parentId = '';
  617. this.itemt.subFlowApprover = [];
  618. this.itemt.subSelects = [];
  619. this.itemt.submitTo = [];
  620. this.itemt.templateForm = '';
  621. this.itemt.viewId = '';
  622. this.http.request({
  623. url: this.http.urls.documents + this.id + '/workflows/submit',
  624. data: this.itemt,
  625. method: 'PUT',
  626. success: res => {
  627. //this.item=res.data.data;
  628. console.log('zx22:' + JSON.stringify(res));
  629. this.show = false;
  630. this.title = res.data.data.name;
  631. this.nextNodes = res.data.data.nextNodes;
  632. uni.$emit('index');
  633. uni.redirectTo({
  634. url: '/pages/index/index'
  635. });
  636. //this.content=res.data.data.formname;
  637. }
  638. });
  639. }, //刷新数据
  640. //回退流程面板
  641. back() {
  642. this.http.request({
  643. url: this.http.urls.documents + this.id + '/panels/back',
  644. data: this.items,
  645. method: 'POST',
  646. success: res => {
  647. //this.item=res.data.data;
  648. console.log('zx22:' + JSON.stringify(res.data.data));
  649. this.bshow = true;
  650. this.title = res.data.data.name;
  651. this.backNodes = res.data.data.backNodes;
  652. this.itemt.flowId = res.data.data.flowId;
  653. this.itemt.flowType = '81';
  654. this.itemt.currentNodeId = res.data.data.currentNodeId;
  655. this.itemt.attitude = '';
  656. this.itemt.signature = '';
  657. this.itemt.submitTo = '';
  658. this.itemt.circulatorInfo = '';
  659. this.itemt.subFlowApproverInfo = '';
  660. this.itemt.subFlowApproverInfoAll = '';
  661. this.itemt.document = this.items.document;
  662. //this.content=res.data.data.formname;
  663. }
  664. });
  665. }, //提交回退流程
  666. workflowsback() {
  667. //this.itemt.document.items.purpose="试验目的111";
  668. this.itemt.applicationId = '__gAPYBW4YxB3UePM3lqO';
  669. this.itemt.docId = this.iteml.id;
  670. this.itemt.id = this.iteml.id;
  671. this.itemt.formId = this.iteml.formid;
  672. this.itemt.parentId = '';
  673. this.itemt.subFlowApprover = [];
  674. this.itemt.subSelects = [];
  675. this.itemt.submitTo = [];
  676. this.itemt.templateForm = '';
  677. this.itemt.viewId = '';
  678. this.http.request({
  679. url: this.http.urls.documents + this.id + '/workflows/back',
  680. data: this.itemt,
  681. method: 'PUT',
  682. success: res => {
  683. //this.item=res.data.data;
  684. console.log('zx22:' + JSON.stringify(res));
  685. this.bshow = false;
  686. this.title = res.data.data.name;
  687. this.nextNodes = res.data.data.nextNodes;
  688. uni.$emit('index');
  689. uni.redirectTo({
  690. url: '/pages/index/index'
  691. });
  692. //this.content=res.data.data.formname;
  693. }
  694. });
  695. }
  696. }
  697. };
  698. </script>
  699. <style lang="scss">
  700. .pages {
  701. padding-bottom: 85px;
  702. }
  703. </style>