borrowing.vue 20 KB

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