detail.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  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 class="xze">
  202. <view class="users omit">
  203. <text>基栋,滕工,周公,基栋,滕工,周公,基栋,滕工,周公,基栋,滕工,周公</text>
  204. </view>
  205. <view class="icon">&#xeb25;</view>
  206. </view>
  207. </view>
  208. </scroll-view>
  209. <view class="confrim-btn"><button class="btn" @click="submit()">确定</button></view>
  210. </view>
  211. </u-popup>
  212. <u-popup :show="bshow" mode="bottom" @close="bshow = false" closeable round="15">
  213. <view class="popup">
  214. <u-divider text="回退流程面板"></u-divider>
  215. <scroll-view scroll-y="true" style="height: 300rpx;">
  216. <view v-for="(item, index) in backNodes" :key="index" class="bitem" @click="bselect(item, 'backNodes')">
  217. <view class="icon select check" v-if="item.check">&#xe600;</view>
  218. <view class="icon select" v-else>&#xe8bb;</view>
  219. <view class="title">{{ item.name }}</view>
  220. </view>
  221. </scroll-view>
  222. <view class="confrim-btn"><button class="btn" @click="workflowsback()">确定</button></view>
  223. </view>
  224. </u-popup>
  225. </view>
  226. </template>
  227. <script>
  228. let qrcode = require('@/common/code.js');
  229. export default {
  230. data() {
  231. return {
  232. ip: this.http.urls.ip,
  233. p: {},
  234. item: {},
  235. current: 0,
  236. radio: [
  237. {
  238. name: '正式报告'
  239. },
  240. {
  241. name: '仅原始数据'
  242. },
  243. {
  244. name: '协助试验'
  245. }
  246. ],
  247. id: '',
  248. items: {
  249. document: {
  250. items: {}
  251. }
  252. },
  253. users: [],
  254. array1: ['整机性能', '系统性能', '台架', '可靠性','部件'], //实验类型1
  255. array2: ['装载机', '平地机', '叉车', '推土机','小型机','挖掘机','压缩机','起重机','压路机','农机','高空作业平台','其他'], //实验类型2
  256. show: false,
  257. bshow: false,
  258. dshow: false,
  259. itemt: {},
  260. up: {},
  261. content: '标题',
  262. nextNodes: [],
  263. backNodes: [],
  264. touser: {
  265. nodeid: '1649917385058',
  266. isToPerson: true,
  267. userids: '__jFFZYvLIG6uFc7CdBMg'
  268. },
  269. btnshow: false,
  270. state: 0,
  271. btitem: {
  272. applicationId: '__gAPYBW4YxB3UePM3lqO',
  273. exparams: {},
  274. formId: '__0FLGNncOS1lz0T9jsFn',
  275. id: '__79Wtw03ya4dJUDGPyAN',
  276. isRelate: 'true',
  277. parentId: '',
  278. sign: '',
  279. subDocuments: [],
  280. templateForm: '',
  281. versions: '0'
  282. }
  283. };
  284. },
  285. onLoad(e) {
  286. this.id = e.id;
  287. //传过来的id
  288. this.state = e.ste;
  289. if (e.ste == 1) {
  290. /* this.http.request({
  291. url: this.http.urls.xxxx + e.id,
  292. success: res => {
  293. this.item = res.data.data;
  294. }
  295. }); */
  296. this.getDocuments();
  297. } else if (e.ste == 2) {
  298. this.empty();
  299. }
  300. //选中审批人员监听函数,其它类型的参考这个
  301. uni.$on('select', res => {
  302. console.log('asd2:' + JSON.stringify(res));
  303. if (res.ste == 1) {
  304. this.item.WTXQSH = res.items.__psLiBtymgDqatneDeJM.value;
  305. } else if (res.ste == 2) {
  306. this.item.WTSYSH = res.items.__d9UDIcG9cd9TPsauffQ.value;
  307. } else if (res.ste == 3) {
  308. this.item.WTXQPZ = res.items.__EaOA4o6je5WFAGSDelj.value;
  309. } else if (res.ste == 4) {
  310. this.item.WTSYPZ = res.items.__cDWoqYpeJkPwLjignVY.value;
  311. } else if (res.ste == 5) {
  312. this.item.WTRWFP = res.items.__vhLhnW6B7JBtaxiXkQ3.value;
  313. }
  314. this.convert();
  315. });
  316. },
  317. methods: {
  318. //选择实验类型
  319. bindChange(e, type) {
  320. this.item[type] = this.array1[e.target.value];
  321. this.$forceUpdate();
  322. },
  323. //下载模板
  324. download(url) {
  325. const a = document.createElement('a');
  326. a.href = url;
  327. a.download = 'download';
  328. a.click();
  329. this.dshow = false;
  330. },
  331. //提交或回退
  332. bselect(e, tag) {
  333. this[tag].forEach(item => {
  334. item.check = false;
  335. });
  336. e.check = true;
  337. this.itemt.nextNodeIds = [];
  338. this.itemt.nextNodeIds.push(e.id);
  339. this.$forceUpdate();
  340. }, //详情
  341. getDocuments() {
  342. this.http.request({
  343. url: this.http.urls.documents + this.id,
  344. data: this.item,
  345. success: res => {
  346. this.item = res.data.data.items;
  347. this.p = res.data.data;
  348. this.getUsers();
  349. //保存数据
  350. this.btitem.id = res.data.data.id;
  351. this.btitem.formId = res.data.data.formid;
  352. this.btitem.versions = res.data.data.versions;
  353. this.btitem.parentId = '';
  354. if (this.item.unstructured) {
  355. this.item.unstructured = JSON.parse(this.item.unstructured);
  356. } else {
  357. this.item.unstructured = [];
  358. }
  359. if (this.p.lastFlowOperation == undefined || this.p.auditorList.includes(this.getUser().id)) {
  360. this.btnshow = true;
  361. }
  362. //this.current=res.data.data.items.report_type;
  363. if (this.item.report_type == '正式报告') {
  364. this.current = 0;
  365. } else if (this.item.report_type == '仅原始数据') {
  366. this.current = 1;
  367. } else if (this.item.report_type == '协助试验') {
  368. this.current = 2;
  369. }
  370. this.iteml = res.data.data;
  371. this.items.applicationId = '__gAPYBW4YxB3UePM3lqO';
  372. this.items.docId = this.iteml.id;
  373. this.items.id = this.iteml.id;
  374. this.items.formId = this.iteml.formid;
  375. this.items.parentId = '';
  376. this.items.subSelects = [];
  377. this.items.templateForm = '';
  378. this.items.viewId = '';
  379. this.items.document.items = this.item;
  380. this.items.document.applicationId = '__gAPYBW4YxB3UePM3lqO';
  381. this.items.document.exparams = {};
  382. this.items.document.formId = this.iteml.formid;
  383. this.items.document.id = this.iteml.id;
  384. this.items.document.parentId = '';
  385. this.items.document.sign = '';
  386. this.items.document.stateId = this.iteml.stateid;
  387. this.items.document.subDocuments = [];
  388. this.items.document.templateForm = '';
  389. this.items.document.versions = '0';
  390. }
  391. });
  392. },
  393. empty() {
  394. this.btnshow = true;
  395. this.http.request({
  396. url: this.http.urls.empty,
  397. data: this.item,
  398. success: res => {
  399. console.log('res2:' + JSON.stringify(res));
  400. this.item = res.data.data.items;
  401. this.p = res.data.data;
  402. //保存数据
  403. this.btitem.id = res.data.data.id;
  404. this.btitem.formId = res.data.data.formid;
  405. this.btitem.versions = res.data.data.versions;
  406. this.btitem.parentId = '';
  407. console.log('this.p1:' + JSON.stringify(this.p));
  408. //this.current=res.data.data.items.report_type;
  409. if (this.item.report_type == '正式报告') {
  410. this.current = 0;
  411. } else if (this.item.report_type == '仅原始数据') {
  412. this.current = 1;
  413. } else if (this.item.report_type == '协助试验') {
  414. this.current = 2;
  415. }
  416. this.iteml = res.data.data;
  417. this.items.applicationId = '__gAPYBW4YxB3UePM3lqO';
  418. this.items.docId = this.iteml.id;
  419. this.items.id = this.iteml.id;
  420. this.items.formId = this.iteml.formid;
  421. this.items.parentId = '';
  422. this.items.subSelects = [];
  423. this.items.templateForm = '';
  424. this.items.viewId = '';
  425. this.items.document.items = this.item;
  426. this.items.document.applicationId = '__gAPYBW4YxB3UePM3lqO';
  427. this.items.document.exparams = {};
  428. this.items.document.formId = this.iteml.formid;
  429. this.items.document.id = this.iteml.id;
  430. this.items.document.parentId = '';
  431. this.items.document.sign = '';
  432. this.items.document.stateId = this.iteml.stateid;
  433. this.items.document.subDocuments = [];
  434. this.items.document.templateForm = '';
  435. this.items.document.versions = '0';
  436. }
  437. });
  438. },
  439. //获取全部用户用于显示名字
  440. getUsers() {
  441. this.http.request({
  442. url: this.http.urls.user_list,
  443. success: res => {
  444. this.users = res.data.data;
  445. this.convert();
  446. }
  447. });
  448. },
  449. convert() {
  450. this.users.forEach(item => {
  451. if (this.item.WTXQSH == item.ID) {
  452. this.item.WTXQSH_NAME = item.NAME;
  453. }
  454. if (this.item.WTSYSH == item.ID) {
  455. this.item.WTSYSH_NAME = item.NAME;
  456. }
  457. if (this.item.WTXQPZ == item.ID) {
  458. this.item.WTXQPZ_NAME = item.NAME;
  459. }
  460. if (this.item.WTSYPZ == item.ID) {
  461. this.item.WTSYPZ_NAME = item.NAME;
  462. }
  463. if (this.item.WTRWFP == item.ID) {
  464. this.item.WTRWFP_NAME = item.NAME;
  465. }
  466. if (this.item.applicant == item.ID) {
  467. this.item.applicant_name = item.NAME;
  468. }
  469. });
  470. this.$forceUpdate();
  471. },
  472. //选择结果形式
  473. change(e) {
  474. this.current = e;
  475. console.log('aa:' + this.radio[this.current].name);
  476. this.item.report_type = this.radio[this.current].name;
  477. },
  478. //选择审批人员
  479. select(e) {
  480. uni.navigateTo({
  481. url: '/pages/index/select?ste=' + e
  482. });
  483. },
  484. //选择文件上传
  485. upload(e, item) {
  486. uni.showLoading({ title: '正在上传.....', mask: true });
  487. e.tempFilePaths.forEach((temp, index) => {
  488. uni.uploadFile({
  489. url: this.http.urls.upload,
  490. filePath: temp,
  491. name: 'files',
  492. formData: {
  493. applicationId: '__gAPYBW4YxB3UePM3lqO',
  494. allowedTypes: '00',
  495. fieldId: this.id + '_unstructured',
  496. fileSaveMode: '00',
  497. path: 'ITEM_PATH',
  498. actionType: ''
  499. },
  500. header: { accessToken: this.getUser().accessToken },
  501. success: res => {
  502. uni.hideLoading();
  503. let data = JSON.parse(res.data);
  504. if (data.errcode == 0) {
  505. this.item.unstructured.push({
  506. name: data.data[0].fileName,
  507. path: data.data[0].filePath,
  508. size: data.data[0].fileSize,
  509. fileType: data.data[0].fileType
  510. });
  511. this.$forceUpdate();
  512. } else {
  513. uni.showModal({ content: '上传失败', showCancel: false });
  514. }
  515. },
  516. fail: res => {
  517. uni.hideLoading();
  518. uni.showModal({ content: '上传失败', showCancel: false });
  519. }
  520. });
  521. });
  522. },
  523. //删除上传的文件
  524. del(item) {
  525. this.item.unstructured.splice(this.item.unstructured.indexOf(item), 1);
  526. },
  527. //文件预览
  528. look(item) {
  529. console.log('asd:' + JSON.stringify(item));
  530. uni.openDocument({
  531. //新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx。
  532. filePath: this.ip + item.path,
  533. showMenu: true,
  534. success: res => {
  535. console.log('打开文档成功');
  536. }
  537. });
  538. },
  539. //提交
  540. add() {
  541. this.http.request({
  542. url: this.http.urls.user_task_add,
  543. data: this.item,
  544. method: 'POST',
  545. success: res => {
  546. uni.showModal({
  547. title: '提示',
  548. content: '提交成功',
  549. showCancel: false,
  550. success: res => {
  551. if (res.confirm) {
  552. uni.navigateBack();
  553. }
  554. }
  555. });
  556. }
  557. });
  558. },
  559. //保存
  560. validate() {
  561. this.btitem.items = this.item;
  562. this.http.request({
  563. url: this.http.urls.validate + '/' + this.btitem.id + '/withoutValid?' + this.btitem.parentId,
  564. data: this.btitem,
  565. method: 'PUT',
  566. success: res => {
  567. console.log('validate1:' + JSON.stringify(res));
  568. if (res.data.errcode == 0) {
  569. uni.$emit('index');
  570. uni.redirectTo({
  571. url: '/pages/index/index'
  572. });
  573. } else {
  574. uni.showModal({
  575. title: '提示',
  576. content: res.data.data.errmsg,
  577. showCancel: false,
  578. success: res => {
  579. if (res.confirm) {
  580. //uni.navigateBack();
  581. }
  582. }
  583. });
  584. return;
  585. }
  586. }
  587. });
  588. },
  589. //提交流程面板
  590. submission() {
  591. this.http.request({
  592. url: this.http.urls.documents + this.id + '/panels/submission',
  593. data: this.items,
  594. method: 'POST',
  595. success: res => {
  596. //this.item=res.data.data;
  597. console.log('zx22:' + JSON.stringify(res));
  598. this.show = true;
  599. this.title = res.data.data.name;
  600. this.nextNodes = res.data.data.nextNodes;
  601. this.itemt.flowId = res.data.data.flowId;
  602. this.itemt.flowType = '80';
  603. this.itemt.currentNodeId = res.data.data.currentNodeId;
  604. this.itemt.attitude = '';
  605. this.itemt.signature = '';
  606. this.itemt.submitTo = '';
  607. this.itemt.circulatorInfo = '';
  608. this.itemt.subFlowApproverInfo = '';
  609. this.itemt.subFlowApproverInfoAll = '';
  610. this.itemt.document = this.items.document;
  611. //this.content=res.data.data.formname;
  612. }
  613. });
  614. }, //提交流程
  615. submit() {
  616. //this.itemt.document.items.purpose="试验目的5656";
  617. //this.itemt.document.items.title="标题5656";
  618. this.itemt.applicationId = '__gAPYBW4YxB3UePM3lqO';
  619. this.itemt.docId = this.iteml.id;
  620. this.itemt.id = this.iteml.id;
  621. this.itemt.formId = this.iteml.formid;
  622. this.itemt.parentId = '';
  623. this.itemt.subFlowApprover = [];
  624. this.itemt.subSelects = [];
  625. this.itemt.submitTo = [];
  626. this.itemt.templateForm = '';
  627. this.itemt.viewId = '';
  628. this.http.request({
  629. url: this.http.urls.documents + this.id + '/workflows/submit',
  630. data: this.itemt,
  631. method: 'PUT',
  632. success: res => {
  633. //this.item=res.data.data;
  634. console.log('zx22:' + JSON.stringify(res));
  635. this.show = false;
  636. this.title = res.data.data.name;
  637. this.nextNodes = res.data.data.nextNodes;
  638. uni.$emit('index');
  639. uni.redirectTo({
  640. url: '/pages/index/index'
  641. });
  642. //this.content=res.data.data.formname;
  643. }
  644. });
  645. }, //刷新数据
  646. //回退流程面板
  647. back() {
  648. this.http.request({
  649. url: this.http.urls.documents + this.id + '/panels/back',
  650. data: this.items,
  651. method: 'POST',
  652. success: res => {
  653. //this.item=res.data.data;
  654. console.log('zx22:' + JSON.stringify(res.data.data));
  655. this.bshow = true;
  656. this.title = res.data.data.name;
  657. this.backNodes = res.data.data.backNodes;
  658. this.itemt.flowId = res.data.data.flowId;
  659. this.itemt.flowType = '81';
  660. this.itemt.currentNodeId = res.data.data.currentNodeId;
  661. this.itemt.attitude = '';
  662. this.itemt.signature = '';
  663. this.itemt.submitTo = '';
  664. this.itemt.circulatorInfo = '';
  665. this.itemt.subFlowApproverInfo = '';
  666. this.itemt.subFlowApproverInfoAll = '';
  667. this.itemt.document = this.items.document;
  668. //this.content=res.data.data.formname;
  669. }
  670. });
  671. }, //提交回退流程
  672. workflowsback() {
  673. //this.itemt.document.items.purpose="试验目的111";
  674. this.itemt.applicationId = '__gAPYBW4YxB3UePM3lqO';
  675. this.itemt.docId = this.iteml.id;
  676. this.itemt.id = this.iteml.id;
  677. this.itemt.formId = this.iteml.formid;
  678. this.itemt.parentId = '';
  679. this.itemt.subFlowApprover = [];
  680. this.itemt.subSelects = [];
  681. this.itemt.submitTo = [];
  682. this.itemt.templateForm = '';
  683. this.itemt.viewId = '';
  684. this.http.request({
  685. url: this.http.urls.documents + this.id + '/workflows/back',
  686. data: this.itemt,
  687. method: 'PUT',
  688. success: res => {
  689. //this.item=res.data.data;
  690. console.log('zx22:' + JSON.stringify(res));
  691. this.bshow = false;
  692. this.title = res.data.data.name;
  693. this.nextNodes = res.data.data.nextNodes;
  694. uni.$emit('index');
  695. uni.redirectTo({
  696. url: '/pages/index/index'
  697. });
  698. //this.content=res.data.data.formname;
  699. }
  700. });
  701. }
  702. }
  703. };
  704. </script>
  705. <style lang="scss">
  706. .pages {
  707. padding-bottom: 85px;
  708. }
  709. </style>