index.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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. },
  84. mounted() {},
  85. methods: {
  86. bindClick(e) {
  87. console.log('点击item,返回数据' + JSON.stringify(e))
  88. console.log(e)
  89. let item = e.item
  90. console.log(item)
  91. if (item.name == "生产补料料管作业平台") {
  92. this.$tab.navigateTo('/pages/production-replenishment/index');
  93. }
  94. if (item.name == "生产领料料管作业平台") {
  95. const formId = 'LT_PRD_PMCWorkBench';
  96. const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  97. uni.setStorageSync('formId', formId)
  98. uni.setStorageSync('fbillType', fbillType)
  99. uni.setStorageSync('moudleName', item.name)
  100. uni.navigateTo({
  101. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  102. url: '/pages/stock-dispatch/index'
  103. });
  104. }
  105. if (item.name == "其他出库") {
  106. const formId = 'STK_MisDelivery';
  107. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  108. uni.setStorageSync('formId', formId)
  109. uni.setStorageSync('fbillType', null)
  110. uni.setStorageSync('moudleName', item.name)
  111. uni.navigateTo({
  112. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  113. url: '/pages/stock-dispatch/index'
  114. });
  115. }if (item.name == "简单生产领料") {
  116. const formId = 'SP_PickMtrl';
  117. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  118. uni.setStorageSync('formId', formId)
  119. uni.setStorageSync('fbillType', null)
  120. uni.setStorageSync('moudleName', item.name)
  121. uni.navigateTo({
  122. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  123. url: '/pages/stock-dispatch/index'
  124. });
  125. }if (item.name == "采购退料单") {
  126. const formId = 'PUR_MRB';
  127. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  128. uni.setStorageSync('formId', formId)
  129. uni.setStorageSync('fbillType', null)
  130. uni.setStorageSync('moudleName', item.name)
  131. uni.navigateTo({
  132. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  133. url: '/pages/stock-dispatch/index'
  134. });
  135. }
  136. if (item.name == "直接调拨管理平台") {
  137. const formId = 'STK_TransferDirect';
  138. const fbillType = 'ce8f49055c5c4782b65463a3f863bb4a';
  139. uni.setStorageSync('formId', formId)
  140. uni.setStorageSync('fbillType', fbillType)
  141. uni.setStorageSync('moudleName', item.name)
  142. uni.navigateTo({url: '/pages/direct-transfer/index'
  143. });
  144. }
  145. },
  146. goScan() {
  147. uni.navigateTo({
  148. url: "/pages/index/show"
  149. })
  150. },
  151. goClean() {
  152. let Yycbm = {
  153. 'Yycbm': uni.getStorageSync('HBFacadeName')
  154. };
  155. console.log(Yycbm)
  156. clearData(Yycbm).then(res => {
  157. console.log(res)
  158. if (res.Code == '0000') {
  159. this.$modal.msgSuccess('清理数据成功!');
  160. } else {
  161. this.$modal.msgError('数据已为空!');
  162. }
  163. })
  164. // let invl = uni.getStorageSync('invoiceList')
  165. // if (invl) {
  166. // uni.removeStorageSync('invoiceList')
  167. // this.$modal.msgSuccess('清理数据成功!');
  168. // } else {
  169. // }
  170. },
  171. goBack() {
  172. uni.reLaunch({
  173. url: "/pages/login/index"
  174. })
  175. },
  176. // 退出应用
  177. quitApp() {
  178. plus.runtime.quit();
  179. },
  180. }
  181. }
  182. </script>
  183. <style scoped>
  184. page {
  185. background-image: linear-gradient(to bottom, #b9c4de, #ffffff);
  186. }
  187. .menu {
  188. display: flex;
  189. flex-wrap: wrap;
  190. padding-top: 20%;
  191. flex-direction: column;
  192. }
  193. .btn {
  194. margin: 5%;
  195. }
  196. </style>