index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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. },
  87. mounted() {},
  88. methods: {
  89. bindClick(e) {
  90. console.log('点击item,返回数据' + JSON.stringify(e))
  91. console.log(e)
  92. let item = e.item
  93. console.log(item)
  94. if (item.name == "生产补料料管作业平台") {
  95. this.$tab.navigateTo('/pages/production-replenishment/index');
  96. }
  97. if (item.name == "生产领料料管作业平台") {
  98. const formId = 'LT_PRD_PMCWorkBench';
  99. const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  100. uni.setStorageSync('formId', formId)
  101. uni.setStorageSync('fbillType', fbillType)
  102. uni.setStorageSync('moudleName', item.name)
  103. uni.navigateTo({
  104. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  105. url: '/pages/stock-dispatch/index'
  106. });
  107. }
  108. if (item.name == "其他出库") {
  109. const formId = 'STK_MisDelivery';
  110. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  111. uni.setStorageSync('formId', formId)
  112. uni.setStorageSync('fbillType', null)
  113. uni.setStorageSync('moudleName', item.name)
  114. uni.navigateTo({
  115. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  116. url: '/pages/stock-dispatch/index'
  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. }if (item.name == "采购退料单") {
  129. const formId = 'PUR_MRB';
  130. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  131. uni.setStorageSync('formId', formId)
  132. uni.setStorageSync('fbillType', null)
  133. uni.setStorageSync('moudleName', item.name)
  134. uni.navigateTo({
  135. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  136. url: '/pages/stock-dispatch/index'
  137. });
  138. }
  139. if (item.name == "直接调拨管理平台") {
  140. const formId = 'STK_TransferDirect';
  141. const fbillType = 'ce8f49055c5c4782b65463a3f863bb4a';
  142. uni.setStorageSync('formId', formId)
  143. uni.setStorageSync('fbillType', fbillType)
  144. uni.setStorageSync('moudleName', item.name)
  145. uni.navigateTo({url: '/pages/direct-transfer/index'
  146. });
  147. }
  148. if (item.name == "直接调拨(生成)") {
  149. const formId = 'STK_TransferDirect';
  150. const fbillType = 'ce8f49055c5c4782b65463a3f863bb4a';
  151. uni.setStorageSync('formId', formId)
  152. uni.setStorageSync('fbillType', fbillType)
  153. uni.setStorageSync('moudleName', item.name)
  154. uni.navigateTo({url: '/pages/direct-transfer/index?isCreate=true'
  155. });
  156. }
  157. if (item.name == "受托加工材料退料单") {
  158. const formId = 'STK_OEMInStockRETURN';
  159. uni.setStorageSync('formId', formId)
  160. uni.setStorageSync('fbillType', null)
  161. uni.setStorageSync('moudleName', item.name)
  162. uni.navigateTo({
  163. url: '/pages/stock-dispatch/index'
  164. });
  165. }
  166. if (item.name == "销售出库") {
  167. const formId = 'SAL_OUTSTOCK';
  168. uni.setStorageSync('formId', formId)
  169. uni.setStorageSync('fbillType', null)
  170. uni.setStorageSync('moudleName', item.name)
  171. uni.navigateTo({
  172. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  173. url: '/pages/stock-dispatch/index',
  174. });
  175. }
  176. if (item.name == "简单生产领料(智能)") {
  177. const formId = 'SP_PickMtrl';
  178. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  179. uni.setStorageSync('formId', formId)
  180. uni.setStorageSync('fbillType', 'B')
  181. uni.setStorageSync('moudleName', item.name)
  182. uni.navigateTo({
  183. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  184. url: '/pages/stock-dispatch/index'
  185. });
  186. }
  187. if (item.name == "其他入库单") {
  188. const formId = 'STK_MISCELLANEOUS';
  189. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  190. uni.setStorageSync('formId', formId)
  191. uni.setStorageSync('fbillType', null)
  192. uni.setStorageSync('moudleName', item.name)
  193. uni.navigateTo({
  194. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  195. url: '/pages/storage/index'
  196. });
  197. }
  198. if (item.name == "采购入库单") {
  199. const formId = 'STK_InStock';
  200. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  201. uni.setStorageSync('formId', formId)
  202. // uni.setStorageSync('fbillType', null)
  203. uni.setStorageSync('moudleName', item.name)
  204. uni.navigateTo({
  205. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  206. url: '/pages/storage/index'
  207. });
  208. }
  209. if (item.name == "受托加工入库单") {
  210. const formId = 'STK_OEMInStock';
  211. // const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
  212. uni.setStorageSync('formId', formId)
  213. // uni.setStorageSync('fbillType', null)
  214. uni.setStorageSync('moudleName', item.name)
  215. uni.navigateTo({
  216. // url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
  217. url: '/pages/storage/index'
  218. });
  219. }
  220. if (item.name == "生产退料料管作业平台") {
  221. const formId = 'LT_PRD_PMCWorkBench';
  222. uni.setStorageSync('formId', formId)
  223. uni.setStorageSync('fbillType', 'd43d7e5b9def82fd11e3e603ca986cd9')
  224. uni.setStorageSync('moudleName', item.name)
  225. uni.navigateTo({
  226. url: '/pages/storage/index'
  227. });
  228. }
  229. if (item.name == "简单生产退料单") {
  230. const formId = 'SP_ReturnMtrl';
  231. uni.setStorageSync('formId', formId)
  232. // uni.setStorageSync('fbillType', 'd43d7e5b9def82fd11e3e603ca986cd9')
  233. uni.setStorageSync('moudleName', item.name)
  234. uni.navigateTo({
  235. url: '/pages/storage/index'
  236. });
  237. }
  238. if (item.name == "其他出库(退货)") {
  239. const formId = 'STK_MisDelivery';
  240. uni.setStorageSync('formId', formId)
  241. uni.setStorageSync('fbillType', 'RETURN')
  242. uni.setStorageSync('moudleName', item.name)
  243. uni.navigateTo({
  244. url: '/pages/storage/index'
  245. });
  246. }
  247. },
  248. goScan() {
  249. uni.navigateTo({
  250. url: "/pages/index/show"
  251. })
  252. },
  253. goClean() {
  254. let Yycbm = {
  255. 'Yycbm': uni.getStorageSync('HBFacadeName')
  256. };
  257. console.log(Yycbm)
  258. clearData(Yycbm).then(res => {
  259. console.log(res)
  260. if (res.Code == '0000') {
  261. this.$modal.msgSuccess('清理数据成功!');
  262. } else {
  263. this.$modal.msgError('数据已为空!');
  264. }
  265. })
  266. // let invl = uni.getStorageSync('invoiceList')
  267. // if (invl) {
  268. // uni.removeStorageSync('invoiceList')
  269. // this.$modal.msgSuccess('清理数据成功!');
  270. // } else {
  271. // }
  272. },
  273. goBack() {
  274. uni.reLaunch({
  275. url: "/pages/login/index"
  276. })
  277. },
  278. // 退出应用
  279. quitApp() {
  280. plus.runtime.quit();
  281. },
  282. }
  283. }
  284. </script>
  285. <style scoped>
  286. page {
  287. background-image: linear-gradient(to bottom, #b9c4de, #ffffff);
  288. }
  289. .menu {
  290. display: flex;
  291. flex-wrap: wrap;
  292. padding-top: 20%;
  293. flex-direction: column;
  294. }
  295. .btn {
  296. margin: 5%;
  297. }
  298. </style>