index.vue 7.7 KB

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