index.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <view>
  3. <uni-indexed-list :options="list" :showSelect="false" @click="bindClick"></uni-indexed-list>
  4. <!-- <uni-collapse>
  5. <uni-collapse-item title="默认开启" :open="true">
  6. <text>折叠内容</text>
  7. </uni-collapse-item>
  8. <uni-collapse-item title="折叠内容">
  9. <text>折叠内容</text>
  10. </uni-collapse-item>
  11. <uni-collapse-item title="禁用状态" disabled>
  12. <text>折叠内容</text>
  13. </uni-collapse-item>
  14. <uni-collapse-item title="折叠内容使用 uni-list 组件">
  15. <uni-list>
  16. <uni-list-item title="列表文字"></uni-list-item>
  17. <uni-list-item :disabled="true" title="列表文字" note="列表禁用状态"></uni-list-item>
  18. <uni-list-item title="列表右侧显示 switch" :show-switch="true"></uni-list-item>
  19. <uni-list-item :show-extra-icon="true" :extra-icon="extraIcon" title="列表左侧带扩展图标"></uni-list-item>
  20. <uni-list-item title="列表左侧带略缩图" note="列表描述信息"
  21. thumb="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" thumb-size="lg"
  22. rightText="右侧文字" showArrow></uni-list-item>
  23. <uni-list-item title="开启点击反馈" clickable showArrow @click="onClick"></uni-list-item>
  24. </uni-list>
  25. </uni-collapse-item>
  26. <uni-collapse-item title="折叠内容使用 uni-list 组件">
  27. <uni-list>
  28. <uni-list-item title="列表文字"></uni-list-item>
  29. <uni-list-item :disabled="true" title="列表文字" note="列表禁用状态"></uni-list-item>
  30. <uni-list-item title="列表右侧显示 switch" :show-switch="true"></uni-list-item>
  31. <uni-list-item :show-extra-icon="true" :extra-icon="extraIcon" title="列表左侧带扩展图标"></uni-list-item>
  32. <uni-list-item title="列表左侧带略缩图" note="列表描述信息"
  33. thumb="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" thumb-size="lg"
  34. rightText="右侧文字" showArrow></uni-list-item>
  35. <uni-list-item title="开启点击反馈" clickable showArrow @click="onClick"></uni-list-item>
  36. </uni-list>
  37. </uni-collapse-item>
  38. </uni-collapse> -->
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. clearData
  44. } from '@/api/workshop.js';
  45. export default {
  46. data() {
  47. return {
  48. noticeText: '',
  49. list: [{
  50. "letter": "其他功能集",
  51. "data": [
  52. "入库盘点",
  53. "出库盘点",
  54. "仓位盘点",
  55. "直接调拨(生成)",
  56. ]
  57. }, {
  58. "letter": "入库功能集",
  59. "data": [
  60. "其他入库单",
  61. "采购入库单",
  62. "受托加工入库单",
  63. ]
  64. }, {
  65. "letter": "退库功能集",
  66. "data": [
  67. "生产退料料管作业平台",
  68. "简单生产退料单",
  69. "其他出库(退货)",
  70. ]
  71. }, {
  72. "letter": "出库功能集",
  73. "data": [
  74. "其他出库",
  75. "生产补料料管作业平台",
  76. "生产领料料管作业平台",
  77. "简单生产领料",
  78. "采购退料单",
  79. ]
  80. }]
  81. }
  82. },
  83. mounted() {},
  84. methods: {
  85. bindClick(e) {
  86. console.log('点击item,返回数据' + JSON.stringify(e))
  87. console.log(e)
  88. let item = e.item
  89. console.log(item)
  90. if (item.name == "生产补料料管作业平台") {
  91. this.$tab.navigateTo('/pages/production-replenishment/index');
  92. }
  93. if (item.name == "生产领料料管作业平台") {
  94. const formId = 'LT_PRD_PMCWorkBench';
  95. const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  96. uni.setStorageSync('formId', formId)
  97. uni.setStorageSync('fbillType', fbillType)
  98. uni.setStorageSync('moudleName', item.name)
  99. uni.navigateTo({
  100. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  101. url: '/pages/stock-dispatch/index'
  102. });
  103. }
  104. if (item.name == "其他出库") {
  105. const formId = 'STK_MisDelivery';
  106. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  107. uni.setStorageSync('formId', formId)
  108. uni.setStorageSync('fbillType', null)
  109. uni.setStorageSync('moudleName', item.name)
  110. uni.navigateTo({
  111. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  112. url: '/pages/stock-dispatch/index'
  113. });
  114. }if (item.name == "简单生产领料") {
  115. const formId = 'SP_PickMtrl';
  116. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  117. uni.setStorageSync('formId', formId)
  118. uni.setStorageSync('fbillType', null)
  119. uni.setStorageSync('moudleName', item.name)
  120. uni.navigateTo({
  121. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  122. url: '/pages/stock-dispatch/index'
  123. });
  124. }if (item.name == "采购退料单") {
  125. const formId = 'PUR_MRB';
  126. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  127. uni.setStorageSync('formId', formId)
  128. uni.setStorageSync('fbillType', null)
  129. uni.setStorageSync('moudleName', item.name)
  130. uni.navigateTo({
  131. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  132. url: '/pages/stock-dispatch/index'
  133. });
  134. }
  135. },
  136. goScan() {
  137. uni.navigateTo({
  138. url: "/pages/index/show"
  139. })
  140. },
  141. goClean() {
  142. let Yycbm = {
  143. 'Yycbm': uni.getStorageSync('HBFacadeName')
  144. };
  145. console.log(Yycbm)
  146. clearData(Yycbm).then(res => {
  147. console.log(res)
  148. if (res.Code == '0000') {
  149. this.$modal.msgSuccess('清理数据成功!');
  150. } else {
  151. this.$modal.msgError('数据已为空!');
  152. }
  153. })
  154. // let invl = uni.getStorageSync('invoiceList')
  155. // if (invl) {
  156. // uni.removeStorageSync('invoiceList')
  157. // this.$modal.msgSuccess('清理数据成功!');
  158. // } else {
  159. // }
  160. },
  161. goBack() {
  162. uni.reLaunch({
  163. url: "/pages/login/index"
  164. })
  165. },
  166. // 退出应用
  167. quitApp() {
  168. plus.runtime.quit();
  169. },
  170. }
  171. }
  172. </script>
  173. <style scoped>
  174. page {
  175. background-image: linear-gradient(to bottom, #b9c4de, #ffffff);
  176. }
  177. .menu {
  178. display: flex;
  179. flex-wrap: wrap;
  180. padding-top: 20%;
  181. flex-direction: column;
  182. }
  183. .btn {
  184. margin: 5%;
  185. }
  186. </style>