index.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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 = 'PUR_MRB';
  131. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  132. uni.setStorageSync('formId', formId)
  133. uni.setStorageSync('fbillType', null)
  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 = 'STK_OEMInStockRETURN';
  142. uni.setStorageSync('formId', formId)
  143. uni.setStorageSync('fbillType', null)
  144. uni.setStorageSync('moudleName', item.name)
  145. uni.navigateTo({
  146. url: '/pages/stock-dispatch/index'
  147. });
  148. }
  149. if (item.name == "销售出库") {
  150. const formId = 'SAL_OUTSTOCK';
  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/stock-dispatch/index',
  157. });
  158. }
  159. if (item.name == "简单生产领料(智能)") {
  160. const formId = 'SP_PickMtrl';
  161. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  162. uni.setStorageSync('formId', formId)
  163. uni.setStorageSync('fbillType', 'B')
  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. if (item.name == "其他入库单") {
  171. const formId = 'STK_MISCELLANEOUS';
  172. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  173. uni.setStorageSync('formId', formId)
  174. uni.setStorageSync('fbillType', null)
  175. uni.setStorageSync('moudleName', item.name)
  176. uni.navigateTo({
  177. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  178. url: '/pages/storage/index'
  179. });
  180. }
  181. if (item.name == "采购入库单") {
  182. const formId = 'STK_InStock';
  183. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  184. uni.setStorageSync('formId', formId)
  185. // uni.setStorageSync('fbillType', null)
  186. uni.setStorageSync('moudleName', item.name)
  187. uni.navigateTo({
  188. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  189. url: '/pages/storage/index'
  190. });
  191. }
  192. if (item.name == "受托加工入库单") {
  193. const formId = 'STK_OEMInStock';
  194. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  195. uni.setStorageSync('formId', formId)
  196. // uni.setStorageSync('fbillType', null)
  197. uni.setStorageSync('moudleName', item.name)
  198. uni.navigateTo({
  199. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  200. url: '/pages/storage/index'
  201. });
  202. }
  203. if (item.name == "生产退料料管作业平台") {
  204. const formId = 'LT_PRD_PMCWorkBench';
  205. uni.setStorageSync('formId', formId)
  206. uni.setStorageSync('fbillType', 'd43d7e5b9def82fd11e3e603ca986cd9')
  207. uni.setStorageSync('moudleName', item.name)
  208. uni.navigateTo({
  209. url: '/pages/storage/index'
  210. });
  211. }
  212. if (item.name == "简单生产退料单") {
  213. const formId = 'SP_ReturnMtrl';
  214. uni.setStorageSync('formId', formId)
  215. // uni.setStorageSync('fbillType', 'd43d7e5b9def82fd11e3e603ca986cd9')
  216. uni.setStorageSync('moudleName', item.name)
  217. uni.navigateTo({
  218. url: '/pages/storage/index'
  219. });
  220. }
  221. if (item.name == "其他出库(退货)") {
  222. const formId = 'STK_MisDelivery';
  223. uni.setStorageSync('formId', formId)
  224. uni.setStorageSync('fbillType', 'RETURN')
  225. uni.setStorageSync('moudleName', item.name)
  226. uni.navigateTo({
  227. url: '/pages/storage/index'
  228. });
  229. }
  230. },
  231. goScan() {
  232. uni.navigateTo({
  233. url: "/pages/index/show"
  234. })
  235. },
  236. goClean() {
  237. let Yycbm = {
  238. 'Yycbm': uni.getStorageSync('HBFacadeName')
  239. };
  240. console.log(Yycbm)
  241. clearData(Yycbm).then(res => {
  242. console.log(res)
  243. if (res.Code == '0000') {
  244. this.$modal.msgSuccess('清理数据成功!');
  245. } else {
  246. this.$modal.msgError('数据已为空!');
  247. }
  248. })
  249. // let invl = uni.getStorageSync('invoiceList')
  250. // if (invl) {
  251. // uni.removeStorageSync('invoiceList')
  252. // this.$modal.msgSuccess('清理数据成功!');
  253. // } else {
  254. // }
  255. },
  256. goBack() {
  257. uni.reLaunch({
  258. url: "/pages/login/index"
  259. })
  260. },
  261. // 退出应用
  262. quitApp() {
  263. plus.runtime.quit();
  264. },
  265. }
  266. }
  267. </script>
  268. <style scoped>
  269. page {
  270. background-image: linear-gradient(to bottom, #b9c4de, #ffffff);
  271. }
  272. .menu {
  273. display: flex;
  274. flex-wrap: wrap;
  275. padding-top: 20%;
  276. flex-direction: column;
  277. }
  278. .btn {
  279. margin: 5%;
  280. }
  281. </style>