index.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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. }
  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. }
  126. if (item.name == "采购退料单") {
  127. const formId = 'PUR_MRB';
  128. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  129. uni.setStorageSync('formId', formId)
  130. uni.setStorageSync('fbillType', null)
  131. uni.setStorageSync('moudleName', item.name)
  132. uni.navigateTo({
  133. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  134. url: '/pages/stock-dispatch/index'
  135. });
  136. }
  137. if (item.name == "其他入库单") {
  138. const formId = 'STK_MISCELLANEOUS';
  139. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  140. uni.setStorageSync('formId', formId)
  141. uni.setStorageSync('fbillType', null)
  142. uni.setStorageSync('moudleName', item.name)
  143. uni.navigateTo({
  144. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  145. url: '/pages/storage/index'
  146. });
  147. }
  148. if (item.name == "采购入库单") {
  149. const formId = 'STK_InStock';
  150. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  151. uni.setStorageSync('formId', formId)
  152. // uni.setStorageSync('fbillType', null)
  153. uni.setStorageSync('moudleName', item.name)
  154. uni.navigateTo({
  155. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  156. url: '/pages/storage/index'
  157. });
  158. }
  159. if (item.name == "受托加工入库单") {
  160. const formId = 'STK_OEMInStock';
  161. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  162. uni.setStorageSync('formId', formId)
  163. // uni.setStorageSync('fbillType', null)
  164. uni.setStorageSync('moudleName', item.name)
  165. uni.navigateTo({
  166. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  167. url: '/pages/storage/index'
  168. });
  169. }
  170. if (item.name == "生产退料料管作业平台") {
  171. const formId = 'LT_PRD_PMCWorkBench';
  172. uni.setStorageSync('formId', formId)
  173. uni.setStorageSync('fbillType', 'd43d7e5b9def82fd11e3e603ca986cd9')
  174. uni.setStorageSync('moudleName', item.name)
  175. uni.navigateTo({
  176. url: '/pages/storage/index'
  177. });
  178. }
  179. if (item.name == "简单生产退料单") {
  180. const formId = 'SP_ReturnMtrl';
  181. uni.setStorageSync('formId', formId)
  182. // uni.setStorageSync('fbillType', 'd43d7e5b9def82fd11e3e603ca986cd9')
  183. uni.setStorageSync('moudleName', item.name)
  184. uni.navigateTo({
  185. url: '/pages/storage/index'
  186. });
  187. }
  188. if (item.name == "其他出库(退货)") {
  189. const formId = 'STK_MisDelivery';
  190. uni.setStorageSync('formId', formId)
  191. uni.setStorageSync('fbillType', 'RETURN')
  192. uni.setStorageSync('moudleName', item.name)
  193. uni.navigateTo({
  194. url: '/pages/storage/index'
  195. });
  196. }
  197. },
  198. goScan() {
  199. uni.navigateTo({
  200. url: "/pages/index/show"
  201. })
  202. },
  203. goClean() {
  204. let Yycbm = {
  205. 'Yycbm': uni.getStorageSync('HBFacadeName')
  206. };
  207. console.log(Yycbm)
  208. clearData(Yycbm).then(res => {
  209. console.log(res)
  210. if (res.Code == '0000') {
  211. this.$modal.msgSuccess('清理数据成功!');
  212. } else {
  213. this.$modal.msgError('数据已为空!');
  214. }
  215. })
  216. // let invl = uni.getStorageSync('invoiceList')
  217. // if (invl) {
  218. // uni.removeStorageSync('invoiceList')
  219. // this.$modal.msgSuccess('清理数据成功!');
  220. // } else {
  221. // }
  222. },
  223. goBack() {
  224. uni.reLaunch({
  225. url: "/pages/login/index"
  226. })
  227. },
  228. // 退出应用
  229. quitApp() {
  230. plus.runtime.quit();
  231. },
  232. }
  233. }
  234. </script>
  235. <style scoped>
  236. page {
  237. background-image: linear-gradient(to bottom, #b9c4de, #ffffff);
  238. }
  239. .menu {
  240. display: flex;
  241. flex-wrap: wrap;
  242. padding-top: 20%;
  243. flex-direction: column;
  244. }
  245. .btn {
  246. margin: 5%;
  247. }
  248. </style>