return.vue 21 KB

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