borrowing.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  1. <template>
  2. <view class="page">
  3. <view class="vtitle">借用人信息</view>
  4. <view class="form_group">
  5. <view class="lable">扫码</view>
  6. <view class="tag" @click="sm=true">
  7. <text class="span" style="width: 90%;">{{ code }}</text>
  8. <text class="icon code">&#xe60e;</text>
  9. </view>
  10. </view>
  11. <view class="form_group" v-if="op == '设备借用11'">
  12. <view class="lable">设备所属部门</view>
  13. <view class="tag">
  14. <view class="span">
  15. <picker @change="bindChange($event, 'dept')" :range="array1">
  16. <view class="picks">{{ item.dept ? item.dept : '选择2' }}</view>
  17. </picker>
  18. </view>
  19. <text class="icon more">&#xe631;</text>
  20. </view>
  21. </view>
  22. <view class="form_group">
  23. <view class="lable">借用人</view>
  24. <view class="tag">
  25. <input v-model="item.borrower" placeholder="输入借用人" />
  26. <text class="icon more">&#xe631;</text>
  27. </view>
  28. </view>
  29. <view class="form_group">
  30. <view class="lable">借用人部门</view>
  31. <view class="tag">
  32. <text class="span">{{ item.UNIT }}</text>
  33. <text class="icon more">&#xe631;</text>
  34. </view>
  35. </view>
  36. <view class="form_group">
  37. <view class="lable">手机号</view>
  38. <view class="tag">
  39. <input v-model="item.tel" placeholder="输入手机号" />
  40. <text class="icon more">&#xe631;</text>
  41. </view>
  42. </view>
  43. <view class="vtitle">借用设备信息</view>
  44. <view v-if="id">
  45. <view v-for="(item, index) in list" :key="index" class="item">
  46. <view class="form_group">
  47. <view class="lable">序号</view>
  48. <view class="tag">
  49. <text class="span">{{ index + 1 }}</text>
  50. </view>
  51. </view>
  52. <view class="form_group">
  53. <view class="lable">计量编号</view>
  54. <view class="tag">
  55. <text class="span">{{ item.items.__9ahUISXb1tM05xyD8UZ.value }}</text>
  56. </view>
  57. </view>
  58. <view class="form_group">
  59. <view class="lable">设备名称</view>
  60. <view class="tag">
  61. <text class="span">{{ item.items.__XrMyKpQJ7SfuTIhC0sk.value }}</text>
  62. </view>
  63. </view>
  64. <view class="form_group">
  65. <view class="lable">型号规格</view>
  66. <view class="tag">
  67. <text class="span">{{ item.items.__u8C4lICfaKzYYXt29WH.value }}</text>
  68. </view>
  69. </view>
  70. <view class="form_group">
  71. <view class="lable">测量范围</view>
  72. <view class="tag">
  73. <text class="span">{{ item.items.__aFNTBUh2rsvSMhRBU3Y.value }}</text>
  74. </view>
  75. </view>
  76. <view class="form_group">
  77. <view class="lable">最大允许误差</view>
  78. <view class="tag">
  79. <text class="span">{{ item.items.__J7HDuFkewsz1IRUnFKD.value }}</text>
  80. </view>
  81. </view>
  82. <view class="form_group">
  83. <view class="lable">内部编号</view>
  84. <view class="tag">
  85. <text class="span">{{ item.items.__F9KplKpwzKDy4ZQZMtI.value }}</text>
  86. </view>
  87. </view>
  88. <view class="form_group"><!-- <button class="btn del" @click="del(item)">移除</button> --></view>
  89. </view>
  90. </view>
  91. <view v-else>
  92. <view v-for="(item, index) in list" :key="index" class="item">
  93. <view class="form_group">
  94. <view class="lable">序号</view>
  95. <view class="tag">
  96. <text class="span">{{ index + 1 }}</text>
  97. </view>
  98. </view>
  99. <view class="form_group">
  100. <view class="lable">计量编号</view>
  101. <view class="tag">
  102. <text class="span">{{ item.items.__b5UmDDfLaCJJdn5F4JF.value }}</text>
  103. </view>
  104. </view>
  105. <view class="form_group">
  106. <view class="lable">设备名称</view>
  107. <view class="tag">
  108. <text class="span">{{ item.items.__FwAgiHdxI4bCZaKNs4A.value }}</text>
  109. </view>
  110. </view>
  111. <view class="form_group">
  112. <view class="lable">型号规格</view>
  113. <view class="tag">
  114. <text class="span">{{ item.items.__drInpQcmkMf2iWseaRR.value }}</text>
  115. </view>
  116. </view>
  117. <view class="form_group">
  118. <view class="lable">测量范围</view>
  119. <view class="tag">
  120. <text class="span">{{ item.items.__XcfZD8dzEQb5qURydpP.value }}</text>
  121. </view>
  122. </view>
  123. <view class="form_group">
  124. <view class="lable">最大允许误差</view>
  125. <view class="tag">
  126. <text class="span">{{ item.items.__ARvSmuzLwNLg6TlB4tV.value }}</text>
  127. </view>
  128. </view>
  129. <view class="form_group">
  130. <view class="lable">内部编号</view>
  131. <view class="tag">
  132. <text class="span">{{ item.items.__BEViJOuGBdPWSxES5Z5.value }}</text>
  133. </view>
  134. </view>
  135. <view class="form_group"><button class="btn del" @click="del(item)">移除</button></view>
  136. </view>
  137. </view>
  138. <u-empty v-if="list.length == 0"></u-empty>
  139. <view class="footer">
  140. <view class="flex">
  141. <view class="f"><button class="btn br" @click="submission()">提交</button></view>
  142. <!-- <view class="f" v-if="state == 1"><button class="btn br back" @click="back()">回退</button></view>
  143. <view class="f"><button class="btn" @click="validate()">保存</button></view>-->
  144. </view>
  145. </view>
  146. <u-popup :show="show" mode="bottom" @close="show = false" closeable round="15">
  147. <view class="popup">
  148. <u-divider text="提交流程面板"></u-divider>
  149. <scroll-view scroll-y="true" style="height: 450rpx;">
  150. <view v-for="(item, index) in nextNodes" :key="index" class="bitem"
  151. @click="bselect(item, 'nextNodes')">
  152. <view class="icon select check" v-if="item.check">&#xe600;</view>
  153. <view class="icon select" v-else>&#xe8bb;</view>
  154. <view class="title">{{ item.name }}</view>
  155. </view>
  156. <textarea placeholder="意见" style="height: 120px;" maxlength="200" v-model="itemt.attitude" />
  157. </scroll-view>
  158. <view class="confrim-btn"><button class="btn" @click="submit()">确定</button></view>
  159. </view>
  160. </u-popup>
  161. <u-popup :show="bshow" mode="bottom" @close="bshow = false" closeable round="15">
  162. <view class="popup">
  163. <u-divider text="回退流程面板"></u-divider>
  164. <scroll-view scroll-y="true" style="height: 450rpx;">
  165. <view v-for="(item, index) in backNodes" :key="index" class="bitem"
  166. @click="bselect(item, 'backNodes')">
  167. <view class="icon select check" v-if="item.check">&#xe600;</view>
  168. <view class="icon select" v-else>&#xe8bb;</view>
  169. <view class="title">{{ item.name }}</view>
  170. </view>
  171. <textarea placeholder="意见" style="height: 120px;" maxlength="200" v-model="itemt.attitude" />
  172. </scroll-view>
  173. <view class="confrim-btn"><button class="btn" @click="workflowsback()">确定</button></view>
  174. </view>
  175. </u-popup>
  176. <mumu-get-qrcode @success="qrcodeSucess" @error="qrcodeError" v-if="sm"></mumu-get-qrcode>
  177. </view>
  178. </template>
  179. <script>
  180. import mumuGetQrcode from '@/uni_modules/mumu-getQrcode/components/mumu-getQrcode/mumu-getQrcode.vue';
  181. export default {
  182. components: {
  183. mumuGetQrcode
  184. },
  185. data() {
  186. return {
  187. sm: false, //扫码
  188. array1: ['类型1', '类型2', '类型3', '类型4'], //实验类型1
  189. bitem: {
  190. applicationId: '__gAPYBW4YxB3UePM3lqO',
  191. exparams: {},
  192. formId: '__0FLGNncOS1lz0T9jsFn',
  193. id: '__79Wtw03ya4dJUDGPyAN',
  194. isRelate: 'undefined',
  195. parentId: '',
  196. sign: '',
  197. subDocuments: [],
  198. templateForm: '',
  199. versions: '0'
  200. },
  201. btitem: {
  202. applicationId: '__gAPYBW4YxB3UePM3lqO',
  203. exparams: {},
  204. formId: '__0FLGNncOS1lz0T9jsFn',
  205. id: '__79Wtw03ya4dJUDGPyAN',
  206. isRelate: 'undefined',
  207. parentId: '',
  208. sign: '',
  209. subDocuments: [],
  210. templateForm: '',
  211. versions: '0'
  212. },
  213. geteq: {
  214. DEVID: '202209211603170016',
  215. allow: 'false',
  216. appId: '__gAPYBW4YxB3UePM3lqO',
  217. datetime: '1670485443880',
  218. detp: '',
  219. fieldid: '__iLwKGJTxD89ZKnFzo2Y',
  220. formId: '__w9J1gxcIWgXmNw6pE1F',
  221. isEdit: 'true',
  222. mutil: 'true',
  223. parentId: '__NYI0rVs0LXbiW21z6Nv',
  224. searchForm: 'false',
  225. selectOne: 'false',
  226. viewId: '__WLVxKX6e0Pq0cTwdNUQ'
  227. },
  228. item: {},
  229. op: '设备借用',
  230. current: 0,
  231. code: '',
  232. list: [],
  233. show: false,
  234. bshow: false,
  235. itemt: {},
  236. up: {},
  237. id: '',
  238. content: '标题',
  239. nextNodes: [],
  240. backNodes: [],
  241. items: {
  242. document: {
  243. items: {}
  244. }
  245. },
  246. runViewDialogConfirmScript: {
  247. docId: "__DIl607e1fsiknRgGRQj",
  248. document: {
  249. items: {
  250. group: "",
  251. depttool: "",
  252. UNIT: "柳工",
  253. borrower: "",
  254. tel: "",
  255. remarks: ""
  256. },
  257. },
  258. fieldId: "__0TQu1UrRbMZVX1UvtBL",
  259. formId: "__w9J1gxcIWgXmNw6pE1F",
  260. viewId: "__WLVxKX6e0Pq0cTwdNUQ",
  261. _selects: "__sIJiL5GlxEYoL095Vo9",
  262. },
  263. };
  264. },
  265. onLoad(e) {
  266. this.op = e.op;
  267. this.id = e.id;
  268. console.log('e=======:' + JSON.stringify(e));
  269. if (e.ste == 1) {
  270. /* this.http.request({
  271. url: this.http.urls.xxxx + e.id,
  272. success: res => {
  273. this.item = res.data.data;
  274. }
  275. }); */
  276. this.getDocuments();
  277. } else {
  278. this.empty();
  279. }
  280. //选中审批人员监听函数,其它类型的参考这个
  281. uni.$on('select', res => {
  282. });
  283. },
  284. onReady() {
  285. uni.setNavigationBarTitle({
  286. title: this.op
  287. });
  288. },
  289. methods: {
  290. //提交或回退
  291. bselect(e, tag) {
  292. this[tag].forEach(item => {
  293. item.check = false;
  294. });
  295. e.check = true;
  296. this.itemt.nextNodeIds = [];
  297. this.itemt.nextNodeIds.push(e.id);
  298. this.$forceUpdate();
  299. }, //详情
  300. qr() {
  301. // 调用uni提供的调用相机api
  302. uni.chooseImage({
  303. sizeType: ['original'],
  304. sourceType: ['camera'],
  305. count: 1,
  306. success: res => {
  307. const tempFilePaths = res.tempFilePaths[0]; // 获取到二维码图片的链接
  308. qrcode.decode(tempFilePaths); // 解析二维码图片
  309. qrcode.callback = r => {
  310. var r1 = r.split('*')[1]
  311. this.code = r1;
  312. if (!this.code) {
  313. uni.showModal({
  314. title: '提示',
  315. content: '该二维码无法识别!!',
  316. showCancel: false,
  317. success: res => {
  318. if (res.confirm) {
  319. // uni.navigateBack();
  320. }
  321. }
  322. });
  323. return;
  324. }
  325. this.geteq.DEVID = this.code;
  326. if (this.list.length == 0) {
  327. this.getEq();
  328. } else {
  329. this.list.forEach(item => {
  330. if (item.items.__2sfNVgOh5Bzq6lXRVuM.value == this.geteq
  331. .DEVID) {
  332. uni.showModal({
  333. title: '提示',
  334. content: '该设备已经选择过了',
  335. showCancel: false,
  336. success: res => {
  337. if (res.confirm) {
  338. // uni.navigateBack();
  339. }
  340. }
  341. });
  342. } else {
  343. this.getEq();
  344. }
  345. });
  346. }
  347. console.log('asd:' + r);
  348. this.$forceUpdate();
  349. };
  350. }
  351. });
  352. },
  353. //扫码成功
  354. qrcodeSucess(data) {
  355. this.sm = false;
  356. uni.showModal({
  357. title: '成功',
  358. content: data //识别的数据
  359. });
  360. var r1 = data.split('*')[1]
  361. this.code = r1;
  362. this.geteq.DEVID = this.code;
  363. if (this.list.length == 0) {
  364. this.getEq();
  365. } else {
  366. this.list.forEach(item => {
  367. if (item.items.__2sfNVgOh5Bzq6lXRVuM.value == this.geteq
  368. .DEVID) {
  369. uni.showModal({
  370. title: '提示',
  371. content: '该设备已经选择过了',
  372. showCancel: false,
  373. success: res => {
  374. if (res.confirm) {
  375. // uni.navigateBack();
  376. }
  377. }
  378. });
  379. } else {
  380. this.getEq();
  381. }
  382. });
  383. }
  384. },
  385. qrcodeError(err) {
  386. console.log(err);
  387. uni.showModal({
  388. title: '摄像头授权失败',
  389. content: '摄像头授权失败,请检测当前浏览器是否有摄像头权限。',
  390. success: res => {
  391. console.log('asd:' + JSON.stringify(res));
  392. this.sm = false;
  393. }
  394. });
  395. },
  396. //选择结果形式
  397. change(e) {
  398. this.current = e;
  399. console.log('aa:' + this.radio[this.current].name);
  400. },
  401. //选择实验类型
  402. bindChange(e, type) {
  403. this.item[type] = this.array1[e.target.value];
  404. this.$forceUpdate();
  405. },
  406. //选择审批人员
  407. select() {
  408. uni.navigateTo({
  409. url: '/pages/index/select'
  410. });
  411. },
  412. //查看借用详情
  413. getDocuments() {
  414. this.http.request({
  415. url: this.http.urls.documents + this.id,
  416. data: this.item,
  417. success: res => {
  418. this.item = res.data.data.items;
  419. //this.p = res.data.data;
  420. //console.log('res.data.data:' + JSON.stringify(res.data.data));
  421. this.boor_list();
  422. this.iteml = res.data.data;
  423. this.items.applicationId = '__gAPYBW4YxB3UePM3lqO';
  424. this.items.docId = this.iteml.id;
  425. this.items.id = this.iteml.id;
  426. this.items.formId = this.iteml.formid;
  427. this.items.parentId = '';
  428. this.items.subSelects = [];
  429. this.items.templateForm = '';
  430. this.items.viewId = '';
  431. this.items.document.items = this.item;
  432. this.items.document.applicationId = '__gAPYBW4YxB3UePM3lqO';
  433. this.items.document.exparams = {};
  434. this.items.document.formId = this.iteml.formid;
  435. this.items.document.id = this.iteml.id;
  436. this.items.document.parentId = '';
  437. this.items.document.sign = '';
  438. this.items.document.stateId = this.iteml.stateid;
  439. this.items.document.subDocuments = [];
  440. this.items.document.templateForm = '';
  441. this.items.document.versions = '0';
  442. }
  443. });
  444. },
  445. getEq() {
  446. this.http.request({
  447. url: this.http.urls.eq_list +
  448. 'parentId=' +
  449. this.geteq.parentid,
  450. data: this.geteq,
  451. method: 'POST',
  452. success: res => {
  453. //console.log('res2:' + JSON.stringify(res.data.data.data));
  454. if (res.data.errcode == 0) {
  455. if (res.data.data.data.length > 0) {
  456. res.data.data.data.forEach(item => {
  457. this.list.push(item);
  458. });
  459. } else {
  460. uni.showModal({
  461. title: '提示',
  462. content: '该设备不在该部门或者正在在借用中',
  463. showCancel: false,
  464. success: res => {
  465. if (res.confirm) {
  466. // uni.navigateBack();
  467. }
  468. }
  469. });
  470. }
  471. }
  472. }
  473. });
  474. },
  475. //查看详情时获取子表信息
  476. boor_list() {
  477. this.http.request({
  478. url: this.http.urls.boor_list +
  479. 'parentId=' +
  480. this.id,
  481. method: 'POST',
  482. success: res => {
  483. console.log('res2:' + JSON.stringify(res));
  484. if (res.data.errcode == 0) {
  485. res.data.data.data.forEach(item => {
  486. this.list.push(item);
  487. });
  488. }
  489. }
  490. });
  491. },
  492. //创建表单获取初始数据
  493. empty() {
  494. var url = '';
  495. if (this.op == '设备借用') {
  496. url = this.http.urls.borr_empty;
  497. } else {
  498. url = this.http.urls.return_empty;
  499. }
  500. this.http.request({
  501. url: url,
  502. data: this.item,
  503. success: res => {
  504. this.item = res.data.data.items;
  505. this.bitem.id = res.data.data.id;
  506. this.bitem.formId = res.data.data.formid;
  507. this.bitem.versions = res.data.data.versions;
  508. this.geteq.parentid = res.data.data.id;
  509. //创建时组建提交流程面板请求数据
  510. this.iteml = res.data.data;
  511. this.items.applicationId = '__gAPYBW4YxB3UePM3lqO';
  512. this.items.docId = this.iteml.id;
  513. this.items.id = this.iteml.id;
  514. this.items.formId = this.iteml.formid;
  515. this.items.parentId = '';
  516. this.items.subSelects = [];
  517. this.items.templateForm = '';
  518. this.items.viewId = '';
  519. this.items.document.items = this.item;
  520. this.items.document.applicationId = '__gAPYBW4YxB3UePM3lqO';
  521. this.items.document.exparams = {};
  522. this.items.document.formId = this.iteml.formid;
  523. this.items.document.id = this.iteml.id;
  524. this.items.document.parentId = '';
  525. this.items.document.sign = '';
  526. this.items.document.stateId = this.iteml.stateid;
  527. this.items.document.subDocuments = [];
  528. this.items.document.templateForm = '';
  529. this.items.document.versions = '0';
  530. //console.log('res2:' + JSON.stringify(res.data.data));
  531. }
  532. });
  533. },
  534. //移除借用设备信息
  535. del(item) {
  536. this.list.splice(this.list.indexOf(item), 1);
  537. },
  538. tool_borrowing_empty() {
  539. this.list.forEach(item => {
  540. this.http.request({
  541. url: this.http.urls.tool_borrowing_empty,
  542. data: this.item,
  543. success: res => {
  544. console.log('tool_borrowing_empty:' + JSON.stringify(res));
  545. //this.item = res.data.data.items;
  546. console.log('this.bitem:' + JSON.stringify(this.bitem));
  547. this.btitem.id = res.data.data.id;
  548. this.btitem.formId = res.data.data.formid;
  549. this.btitem.versions = res.data.data.versions;
  550. this.btitem.parentId = this.bitem.id;
  551. //this.btitem.parent=this.bitem.id;
  552. this.btitem.items = res.data.data.items;
  553. this.btitem.items.HERST = item.items.__SH6ZSHZMqHeGHDFLAaO.value; //
  554. this.btitem.items.TYPBZ = item.items.__drInpQcmkMf2iWseaRR.value; //
  555. this.btitem.items.EQKTX = item.items.__FwAgiHdxI4bCZaKNs4A.value; //
  556. this.btitem.items.FBL = item.items.__Tyyw12PleIHLPjjJWsV.value; //
  557. this.btitem.items.TPLNR = item.items.__a7cgJzxvCbcNNH0KjCn.value; //
  558. this.btitem.items.EQUNR = item.items.__b5UmDDfLaCJJdn5F4JF.value; //
  559. this.btitem.items.NUMBER = item.items.__2sfNVgOh5Bzq6lXRVuM.value;
  560. this.btitem.items.CLFW = item.items.__XcfZD8dzEQb5qURydpP.value; //
  561. this.btitem.items.borrowing_date = this.util.getDate('time'); //借用日期
  562. this.btitem.items.ZQDDJ = item.items.__Rhr5ihIebMolSIr8CKn.value; //
  563. this.btitem.items.ZDYXWC = item.items.__ARvSmuzLwNLg6TlB4tV.value; //
  564. this.btitem.items.STTXU = item.items.__SBtfwetYprHFQ5J2MAn.value; //
  565. this.btitem.items.SERGE = item.items.__qyobrAFN4PtseWXiY5A.value; //
  566. this.btitem.items.INTNUM = item.items.__BEViJOuGBdPWSxES5Z5.value; //
  567. this.btitem.items.NPLDA = item.items.__R8QpJNSHAVFaYwHnVCo.value; //
  568. //this.btitem.items.toolstate=0;//借用日期
  569. this.btitem.items.DEVID = item.items.__2sfNVgOh5Bzq6lXRVuM.value;
  570. console.log('this.btitem1:' + JSON.stringify(this.btitem));
  571. this.validate();
  572. console.log('保存子表数据========:' + JSON.stringify(res.data.data));
  573. }
  574. });
  575. });
  576. },
  577. //提交
  578. validate() {
  579. this.http.request({
  580. url: this.http.urls.validate +
  581. '?parentId=' +
  582. this.btitem.parentId,
  583. data: this.btitem,
  584. method: 'POST',
  585. success: res => {
  586. console.log('validate101:' + JSON.stringify(res));
  587. this.updateparent(this.btitem.parentId, res.data.data.id);
  588. }
  589. });
  590. },
  591. updateparent(parent, id) {
  592. this.http.request({
  593. url: this.http.urls.update_parent + 'parent=' + parent + '&id=' + id +
  594. '&table=tlk_tool_borrowing',
  595. method: 'POST',
  596. success: res => {
  597. console.log('validate102:' + JSON.stringify(res));
  598. }
  599. });
  600. },
  601. //提交流程面板
  602. submission() {
  603. //this.validate();
  604. this.http.request({
  605. url: this.http.urls.documents + this.bitem.id + '/panels/submission',
  606. data: this.items,
  607. method: 'POST',
  608. success: res => {
  609. //this.item=res.data.data;
  610. //console.log('zx22:' + JSON.stringify(res));
  611. this.show = true;
  612. this.title = res.data.data.name;
  613. this.nextNodes = res.data.data.nextNodes;
  614. this.itemt.flowId = res.data.data.flowId;
  615. this.itemt.flowType = '80';
  616. this.itemt.currentNodeId = res.data.data.currentNodeId;
  617. this.itemt.attitude = '';
  618. this.itemt.signature = '';
  619. this.itemt.submitTo = '';
  620. this.itemt.circulatorInfo = '';
  621. this.itemt.subFlowApproverInfo = '';
  622. this.itemt.subFlowApproverInfoAll = '';
  623. this.itemt.document = this.items.document;
  624. //this.content=res.data.data.formname;
  625. }
  626. });
  627. }, //提交流程
  628. submit() {
  629. //this.itemt.document.items.purpose="试验目的5656";
  630. //this.itemt.document.items.title="标题5656";
  631. if (this.itemt.document.items.borrower == '' || this.itemt.document.items.borrower == null) {
  632. uni.showModal({
  633. title: '提示',
  634. content: '请填写借用人',
  635. showCancel: false,
  636. success: res => {
  637. if (res.confirm) {
  638. //uni.navigateBack();
  639. }
  640. }
  641. });
  642. return;
  643. }
  644. if (this.itemt.document.items.tel == '' || this.itemt.document.items.tel == null) {
  645. uni.showModal({
  646. title: '提示',
  647. content: '请填写手机号',
  648. showCancel: false,
  649. success: res => {
  650. if (res.confirm) {
  651. //uni.navigateBack();
  652. }
  653. }
  654. });
  655. return;
  656. }
  657. this.tool_borrowing_empty();
  658. this.itemt.applicationId = '__gAPYBW4YxB3UePM3lqO';
  659. this.itemt.docId = this.iteml.id;
  660. this.itemt.id = this.iteml.id;
  661. this.itemt.formId = this.iteml.formid;
  662. this.itemt.parentId = '';
  663. this.itemt.subFlowApprover = [];
  664. this.itemt.subSelects = [];
  665. this.itemt.submitTo = [];
  666. this.itemt.templateForm = '';
  667. this.itemt.viewId = '';
  668. this.http.request({
  669. url: this.http.urls.documents + this.id + '/workflows/submit',
  670. data: this.itemt,
  671. method: 'PUT',
  672. success: res => {
  673. //this.item=res.data.data;
  674. console.log('zx22:' + JSON.stringify(res));
  675. if (res.data.errcode == 0) {
  676. uni.showModal({
  677. title: '提示',
  678. content: res.data.data,
  679. showCancel: false,
  680. success: res => {
  681. if (res.confirm) {
  682. uni.navigateBack();
  683. }
  684. }
  685. });
  686. //if (this.id == null) {
  687. //this.tool_borrowing_empty();
  688. //}
  689. } else {
  690. uni.showModal({
  691. title: '提示',
  692. content: res.data.errmsg,
  693. showCancel: false,
  694. success: res => {
  695. if (res.confirm) {
  696. //uni.navigateBack();
  697. }
  698. }
  699. });
  700. }
  701. this.show = false;
  702. this.title = res.data.data.name;
  703. this.nextNodes = res.data.data.nextNodes;
  704. }
  705. });
  706. }, //刷新数据
  707. //提交
  708. add() {
  709. this.http.request({
  710. url: this.http.urls.user_task_add,
  711. data: this.item,
  712. method: 'POST',
  713. success: res => {
  714. uni.showModal({
  715. title: '提示',
  716. content: '提交成功',
  717. showCancel: false,
  718. success: res => {
  719. if (res.confirm) {
  720. uni.navigateBack();
  721. }
  722. }
  723. });
  724. }
  725. });
  726. }
  727. }
  728. };
  729. </script>
  730. <style lang="scss">
  731. .page {
  732. padding-bottom: 80px;
  733. }
  734. .item {
  735. margin-bottom: 10px;
  736. }
  737. .del {
  738. width: 70%;
  739. background-color: #e64340;
  740. }
  741. </style>