borrowing.vue 20 KB

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