You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1081 lines
33 KiB

2 years ago
​
1 year ago
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
1 year ago
1 year ago
​
1 year ago
1 year ago
2 years ago
​
1 year ago
​
3 months ago
1 year ago
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
2 months ago
​
​
​
​
​
3 months ago
​
1 year ago
1 year ago
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
12 months ago
1 year ago
​
​
​
​
1 year ago
​
​
​
1 year ago
​
3 months ago
​
​
​
3 months ago
3 months ago
​
​
​
​
​
3 months ago
3 months ago
​
​
​
​
3 months ago
3 months ago
​
​
​
​
3 months ago
3 months ago
​
​
​
​
3 months ago
3 months ago
3 months ago
​
​
​
3 months ago
3 months ago
3 months ago
​
​
​
3 months ago
3 months ago
​
​
​
​
3 months ago
3 months ago
​
​
​
​
3 months ago
3 months ago
2 months ago
​
​
​
​
3 months ago
​
3 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 months ago
​
​
​
​
​
3 months ago
​
​
​
​
​
​
​
3 months ago
​
1 year ago
​
3 months ago
1 year ago
​
​
​
​
3 months ago
​
​
1 year ago
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
12 months ago
​
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
​
​
3 months ago
1 year ago
​
​
1 year ago
3 months ago
​
​
11 months ago
3 months ago
11 months ago
​
​
11 months ago
11 months ago
3 months ago
​
​
​
​
1 year ago
1 year ago
1 year ago
3 months ago
1 year ago
​
​
​
​
1 year ago
​
​
​
3 months ago
1 year ago
​
​
​
​
11 months ago
3 months ago
1 year ago
11 months ago
1 year ago
11 months ago
1 year ago
11 months ago
​
​
​
​
​
​
1 year ago
2 years ago
1 year ago
​
2 years ago
​
​
​
​
1 year ago
​
2 years ago
​
​
1 year ago
​
​
​
​
​
2 years ago
​
3 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 months ago
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
1 year ago
3 months ago
1 year ago
1 year ago
1 year ago
2 years ago
3 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
3 months ago
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
1 year ago
​
​
​
​
​
​
​
​
​
​
3 months ago
​
1 year ago
​
3 months ago
​
​
​
​
​
​
​
1 year ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
1 year ago
​
​
1 year ago
1 year ago
​
​
1 year ago
​
​
​
1 year ago
​
​
​
1 year ago
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
1 year ago
​
1 year ago
1 year ago
1 year ago
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
1 year ago
1 year ago
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
1 year ago
​
1 year ago
​
​
​
​
​
​
1 year ago
1 year ago
​
​
​
​
1 year ago
​
1 year ago
​
​
​
​
1 year ago
1 year ago
​
2 years ago
1 year ago
​
2 years ago
​
1 year ago
1 year ago
​
​
1 year ago
​
​
1 year ago
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
1 year ago
​
1 year ago
​
​
​
1 year ago
1 year ago
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
2 years ago
1 year ago
​
​
​
1 year ago
1 year ago
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
1 year ago
1 year ago
​
​
1 year ago
1 year ago
​
​
1 year ago
1 year ago
​
​
1 year ago
1 year ago
​
​
1 year ago
1 year ago
​
​
1 year ago
​
​
​
1 year ago
1 year ago
1 year ago
1 year ago
​
​
​
​
​
1 year ago
2 years ago
1 year ago
​
​
1 year ago
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
1 year ago
1 year ago
​
​
​
​
1 year ago
​
​
1 year ago
​
​
​
​
1 year ago
2 years ago
  1. <template>
  2. <div class="pda-container">
  3. <!-- 头部栏 -->
  4. <div class="header-bar">
  5. <div class="warehouse-selector" @click="toggleWarehouseDropdown">
  6. <span class="warehouse-text">{{ selectedWarehouseName || '选择仓库' }}</span>
  7. <i class="el-icon-arrow-down" :class="{ 'rotate': showWarehouseDropdown }"></i>
  8. <div class="warehouse-dropdown" v-show="showWarehouseDropdown">
  9. <div class="dropdown-item loading" v-if="warehouseLoading">
  10. <i class="el-icon-loading"></i>
  11. 加载中...
  12. </div>
  13. <div
  14. v-else
  15. v-for="item in warehouseList"
  16. :key="item.warehouseid"
  17. class="dropdown-item"
  18. :class="{ 'active': selectedWarehouse === item.warehouseid }"
  19. @click.stop="selectWarehouse(item)">
  20. {{ item.warehousename }}
  21. </div>
  22. <div class="dropdown-item empty" v-if="!warehouseLoading && warehouseList.length === 0">
  23. 暂无可用仓库
  24. </div>
  25. </div>
  26. </div>
  27. <div style="font-size: 18px">{{username}}</div>
  28. <div class="logout-button" @click="logoutHandle()">
  29. <i class="el-icon-close"></i>
  30. <span>退出</span>
  31. </div>
  32. </div>
  33. <!-- 功能区域 -->
  34. <div class="content-area">
  35. <!-- section层级也支持site授权,默认*全工厂可见,按需改为具体site编码 - rqrq -->
  36. <!-- 收货入库 -->
  37. <div class="section" v-site-auth="'*'">
  38. <div class="section-header">
  39. <span class="bullet">•</span>
  40. <span class="section-title">收货入库</span>
  41. </div>
  42. <div class="button-grid">
  43. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('porecv')">
  44. <div class="menu-icon purchase">
  45. <van-icon name="shopping-cart-o" size="24" />
  46. </div>
  47. <div class="menu-text">采购入库</div>
  48. </div>
  49. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('productionInboundProduction')">
  50. <div class="menu-icon production-inbound">
  51. <van-icon name="cart" size="24" />
  52. </div>
  53. <div class="menu-text">生产入库</div>
  54. </div>
  55. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('productionreturn')">
  56. <div class="menu-icon production-return">
  57. <van-icon name="revoke" size="24" />
  58. </div>
  59. <div class="menu-text">生产退料</div>
  60. </div>
  61. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('salereturn')">
  62. <div class="menu-icon sales-return">
  63. <van-icon name="revoke" size="24" />
  64. </div>
  65. <div class="menu-text">销售退货</div>
  66. </div>
  67. </div>
  68. </div>
  69. <!-- 拣货出库 -->
  70. <div class="section" v-site-auth="'*'">
  71. <div class="section-header">
  72. <span class="bullet">•</span>
  73. <span class="section-title">拣货出库</span>
  74. </div>
  75. <div class="button-grid">
  76. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('inventory-move')">
  77. <div class="menu-icon inventory-move">
  78. <van-icon name="exchange" size="24" />
  79. </div>
  80. <div class="menu-text">移库</div>
  81. </div>
  82. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('inventory-move-cross-site')">
  83. <div class="menu-icon inventory-move">
  84. <van-icon name="guide-o" size="24" />
  85. </div>
  86. <div class="menu-text">跨site移库</div>
  87. </div>
  88. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('otherinout')">
  89. <div class="menu-icon other">
  90. <van-icon name="exchange" size="24" />
  91. </div>
  92. <div class="menu-text">其他出入库</div>
  93. </div>
  94. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('productionissue')">
  95. <div class="menu-icon production-issue">
  96. <van-icon name="send-gift-o" size="24" />
  97. </div>
  98. <div class="menu-text">生产领料</div>
  99. </div>
  100. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('mrissue')">
  101. <div class="menu-icon mr">
  102. <van-icon name="orders-o" size="24" />
  103. </div>
  104. <div class="menu-text">MR发料</div>
  105. </div>
  106. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('outsource')">
  107. <div class="menu-icon outsourcing">
  108. <van-icon name="logistics" size="24" />
  109. </div>
  110. <div class="menu-text">委外发料</div>
  111. </div>
  112. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('customerissue')">
  113. <!-- <div class="menu-item disabled" @click="handleDisabledFeature('customerissue')"> -->
  114. <div class="menu-icon sales-delivery">
  115. <van-icon name="logistics" size="24" />
  116. </div>
  117. <div class="menu-text">销售出库</div>
  118. </div>
  119. <!-- <div class="menu-item disabled" @click="handleDisabledFeature('transportation')">
  120. <div class="menu-icon transport">
  121. <van-icon name="guide-o" size="24" />
  122. </div>
  123. <div class="menu-text">运输任务</div>
  124. </div> -->
  125. </div>
  126. </div>
  127. <!-- 海安立库操作(固定开放工厂54)- rqrq -->
  128. <div class="section" v-site-auth="'54'">
  129. <div class="section-header">
  130. <span class="bullet">•</span>
  131. <span class="section-title">立库日常操作</span>
  132. </div>
  133. <div class="button-grid">
  134. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianCallOutToStation')">
  135. <div class="menu-icon purchase">
  136. <van-icon name="shopping-cart-o" size="24" />
  137. </div>
  138. <div class="menu-text">立库取货</div>
  139. </div>
  140. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianPalletPacking')">
  141. <div class="menu-icon purchase">
  142. <van-icon name="shopping-cart-o" size="24" />
  143. </div>
  144. <div class="menu-text">组盘入库</div>
  145. </div>
  146. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianPalletSorting')">
  147. <div class="menu-icon purchase">
  148. <van-icon name="shopping-cart-o" size="24" />
  149. </div>
  150. <div class="menu-text">分拣组盘</div>
  151. </div>
  152. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianPalletSearch')">
  153. <div class="menu-icon purchase">
  154. <van-icon name="shopping-cart-o" size="24" />
  155. </div>
  156. <div class="menu-text">查看托盘</div>
  157. </div>
  158. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianPalletChangeStation')">
  159. <div class="menu-icon purchase">
  160. <van-icon name="shopping-cart-o" size="24" />
  161. </div>
  162. <div class="menu-text">托盘运输</div>
  163. </div>
  164. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianEmptyPalletAssembly')">
  165. <div class="menu-icon purchase">
  166. <van-icon name="shopping-cart-o" size="24" />
  167. </div>
  168. <div class="menu-text">空托盘入库</div>
  169. </div>
  170. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianCancelWcsPallet')">
  171. <div class="menu-icon purchase">
  172. <van-icon name="shopping-cart-o" size="24" />
  173. </div>
  174. <div class="menu-text">取消组盘</div>
  175. </div>
  176. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianPalletMerge')">
  177. <div class="menu-icon purchase">
  178. <van-icon name="shopping-cart-o" size="24" />
  179. </div>
  180. <div class="menu-text">栈板合托</div>
  181. </div>
  182. <!-- 海安齐套运输入口,沿用当前仓库选择校验,业务site由新页面显式传递。- rqrq -->
  183. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianCacheTransport')">
  184. <div class="menu-icon transport"><van-icon name="logistics" size="24" /></div>
  185. <div class="menu-text">齐套运输</div>
  186. </div>
  187. </div>
  188. </div>
  189. <div class="section" v-site-auth="'54'">
  190. <div class="section-header">
  191. <span class="bullet">•</span>
  192. <span class="section-title">立库特殊操作</span>
  193. </div>
  194. <div class="button-grid">
  195. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianCallOut')">
  196. <div class="menu-icon purchase">
  197. <van-icon name="shopping-cart-o" size="24" />
  198. </div>
  199. <div class="menu-text">Call料</div>
  200. </div>
  201. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianPalletAssembly')">
  202. <div class="menu-icon purchase">
  203. <van-icon name="shopping-cart-o" size="24" />
  204. </div>
  205. <div class="menu-text">直接组盘</div>
  206. </div>
  207. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianPalletManualMove')">
  208. <div class="menu-icon purchase">
  209. <van-icon name="shopping-cart-o" size="24" />
  210. </div>
  211. <div class="menu-text">栈板人工移动</div>
  212. </div>
  213. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianWmsCancelReserve')">
  214. <div class="menu-icon inventory">
  215. <van-icon name="orders-o" size="24" />
  216. </div>
  217. <!-- WMS标签状态统一展示为预定,reserve字段和Y/N判断保持原有业务含义 - rqrq -->
  218. <div class="menu-text">取消预定</div>
  219. </div>
  220. <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianManualCount54')">
  221. <div class="menu-icon purchase">
  222. <van-icon name="shopping-cart-o" size="24" />
  223. </div>
  224. <div class="menu-text">立库手工盘点</div>
  225. </div>
  226. <!-- <div class="menu-item" v-site-auth="'54'" @click="navigateWithWarehouseCheck('haianCallOutForHetuo')">-->
  227. <!-- <div class="menu-icon purchase">-->
  228. <!-- <van-icon name="shopping-cart-o" size="24" />-->
  229. <!-- </div>-->
  230. <!-- <div class="menu-text">合托Call板</div>-->
  231. <!-- </div>-->
  232. </div>
  233. </div>
  234. <div class="section" v-site-auth="'55'">
  235. <div class="section-header">
  236. <span class="bullet">•</span>
  237. <span class="section-title">立库常规操作</span>
  238. </div>
  239. <div class="button-grid">
  240. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('callOutToStation')">
  241. <div class="menu-icon purchase">
  242. <van-icon name="shopping-cart-o" size="24" />
  243. </div>
  244. <div class="menu-text">立库取货</div>
  245. </div>
  246. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('palletPacking')">
  247. <div class="menu-icon purchase">
  248. <van-icon name="shopping-cart-o" size="24" />
  249. </div>
  250. <div class="menu-text">组盘入库</div>
  251. </div>
  252. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('palletSorting')">
  253. <div class="menu-icon purchase">
  254. <van-icon name="shopping-cart-o" size="24" />
  255. </div>
  256. <div class="menu-text">分拣组盘</div>
  257. </div>
  258. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('palletSearch')">
  259. <div class="menu-icon purchase">
  260. <van-icon name="shopping-cart-o" size="24" />
  261. </div>
  262. <div class="menu-text">查看托盘</div>
  263. </div>
  264. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('palletChangeStation')">
  265. <div class="menu-icon purchase">
  266. <van-icon name="shopping-cart-o" size="24" />
  267. </div>
  268. <div class="menu-text">托盘运输</div>
  269. </div>
  270. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('emptyPalletAssembly')">
  271. <div class="menu-icon purchase">
  272. <van-icon name="shopping-cart-o" size="24" />
  273. </div>
  274. <div class="menu-text">空托盘入库</div>
  275. </div>
  276. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('cancelWcsPallet')">
  277. <div class="menu-icon purchase">
  278. <van-icon name="shopping-cart-o" size="24" />
  279. </div>
  280. <div class="menu-text">取消组盘</div>
  281. </div>
  282. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('palletMerge')">
  283. <div class="menu-icon purchase">
  284. <van-icon name="shopping-cart-o" size="24" />
  285. </div>
  286. <div class="menu-text">栈板合托</div>
  287. </div>
  288. </div>
  289. </div>
  290. <div class="section" v-site-auth="'55'">
  291. <div class="section-header">
  292. <span class="bullet">•</span>
  293. <span class="section-title">立库特殊操作</span>
  294. </div>
  295. <div class="button-grid">
  296. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('callOut')">
  297. <div class="menu-icon purchase">
  298. <van-icon name="shopping-cart-o" size="24" />
  299. </div>
  300. <div class="menu-text">Call料</div>
  301. </div>
  302. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('palletAssembly')">
  303. <div class="menu-icon purchase">
  304. <van-icon name="shopping-cart-o" size="24" />
  305. </div>
  306. <div class="menu-text">直接组盘</div>
  307. </div>
  308. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('palletManualMove')">
  309. <div class="menu-icon purchase">
  310. <van-icon name="shopping-cart-o" size="24" />
  311. </div>
  312. <div class="menu-text">栈板人工移动</div>
  313. </div>
  314. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('wmsCancelReserve')">
  315. <div class="menu-icon inventory">
  316. <van-icon name="orders-o" size="24" />
  317. </div>
  318. <div class="menu-text">取消预定</div>
  319. </div>
  320. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('palletSortingNoAgv')">
  321. <div class="menu-icon purchase">
  322. <van-icon name="shopping-cart-o" size="24" />
  323. </div>
  324. <div class="menu-text">无AGV分拣</div>
  325. </div>
  326. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('callOutForHetuo')">
  327. <div class="menu-icon purchase">
  328. <van-icon name="shopping-cart-o" size="24" />
  329. </div>
  330. <div class="menu-text">合托Call板</div>
  331. </div>
  332. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('manualCount')">
  333. <div class="menu-icon purchase">
  334. <van-icon name="shopping-cart-o" size="24" />
  335. </div>
  336. <div class="menu-text">立库手工盘点</div>
  337. </div>
  338. </div>
  339. </div>
  340. <!-- 库内管理 -->
  341. <div class="section" v-site-auth="'*'">
  342. <div class="section-header">
  343. <span class="bullet">•</span>
  344. <span class="section-title">库内管理</span>
  345. </div>
  346. <div class="button-grid">
  347. <!-- <div class="menu-item disabled" @click="handleDisabledFeature('attributechange')">
  348. <div class="menu-icon attribute">
  349. <van-icon name="setting-o" size="24" />
  350. </div>
  351. <div class="menu-text">属性变动</div>
  352. </div>-->
  353. <div class="menu-item" v-site-auth="'*'" @click="navigateWithWarehouseCheck('labelQuery')">
  354. <div class="menu-icon inventory">
  355. <van-icon name="orders-o" size="24" />
  356. </div>
  357. <div class="menu-text">标签查询</div>
  358. </div>
  359. <div class="menu-item" v-site-auth="'55'" @click="navigateWithWarehouseCheck('labelCalibration')">
  360. <div class="menu-icon inventory">
  361. <van-icon name="orders-o" size="24" />
  362. </div>
  363. <div class="menu-text">标签校准</div>
  364. </div>
  365. <!-- <div class="menu-item disabled" @click="handleDisabledFeature('stocktaking')">-->
  366. <!-- <div class="menu-icon inventory">-->
  367. <!-- <van-icon name="records" size="24" />-->
  368. <!-- </div>-->
  369. <!-- <div class="menu-text">盘点</div>-->
  370. <!-- </div>-->
  371. </div>
  372. </div>
  373. </div>
  374. </div>
  375. </template>
  376. <script>
  377. import { getUserAuthorizedWarehouses } from "@/api/warehouse.js"
  378. export default {
  379. data() {
  380. return {
  381. username: localStorage.getItem('userName'),
  382. warehouseList: [],
  383. selectedWarehouse: localStorage.getItem('selectedWarehouse') || '',
  384. selectedWarehouseName: '',
  385. warehouseLoading: false,
  386. showWarehouseDropdown: false
  387. }
  388. },
  389. directives: {
  390. // 站点授权指令:* 或 当前site 命中才渲染菜单 - rqrq
  391. siteAuth: {
  392. inserted(el, binding, vnode) {
  393. if (vnode.context && vnode.context.applySiteAuthForElement) {
  394. vnode.context.applySiteAuthForElement(el, binding)
  395. }
  396. },
  397. componentUpdated(el, binding, vnode) {
  398. if (vnode.context && vnode.context.applySiteAuthForElement) {
  399. vnode.context.applySiteAuthForElement(el, binding)
  400. }
  401. }
  402. }
  403. },
  404. computed: {
  405. documentClientHeight: {
  406. get() {
  407. return this.$store.state.common.documentClientHeight
  408. },
  409. set(val) {
  410. this.$store.commit('common/updateDocumentClientHeight', val)
  411. }
  412. },
  413. sidebarFold: {
  414. get() {
  415. return this.$store.state.common.sidebarFold
  416. }
  417. },
  418. userId: {
  419. get() {
  420. return this.$store.state.user.id
  421. },
  422. set(val) {
  423. this.$store.commit('user/updateId', val)
  424. }
  425. },
  426. userName: {
  427. get() {
  428. return this.$store.state.user.name
  429. },
  430. set(val) {
  431. this.$store.commit('user/updateName', val)
  432. }
  433. },
  434. site: {
  435. get() {
  436. const storeSite = this.$store.state.user.site
  437. const normalizedStoreSite = storeSite === null || storeSite === undefined ? '' : String(storeSite).trim()
  438. if (normalizedStoreSite && normalizedStoreSite !== '0') {
  439. return normalizedStoreSite
  440. }
  441. return (localStorage.getItem('site') || '').trim()
  442. },
  443. set(val) {
  444. this.$store.commit('user/updateSite', val)
  445. }
  446. },
  447. languageDefault: {
  448. get() {
  449. return this.$store.state.user.languageDefault
  450. },
  451. set(val) {
  452. this.$store.commit('user/updateLanguageDefault', val)
  453. }
  454. },
  455. userDisplay: {
  456. get() {
  457. return this.$store.state.user.userDisplay
  458. },
  459. set(val) {
  460. this.$store.commit('user/updateUserDisplay', val)
  461. }
  462. },
  463. },
  464. mounted() {
  465. // 点击外部关闭下拉框
  466. document.addEventListener('click', this.handleDocumentClick)
  467. },
  468. beforeDestroy() {
  469. document.removeEventListener('click', this.handleDocumentClick)
  470. },
  471. created() {
  472. this.syncStoreSiteFromCache()
  473. this.getUserInfo()
  474. this.getWarehouseList();
  475. },
  476. methods: {
  477. // 将缓存site同步到store,保证菜单渲染和接口取值一致 - rqrq
  478. syncStoreSiteFromCache() {
  479. const cacheSite = (localStorage.getItem('site') || '').trim()
  480. if (cacheSite) {
  481. this.$store.commit('user/updateSite', cacheSite)
  482. }
  483. },
  484. // 标准化菜单授权site配置:空值按*处理,支持逗号分隔多site - rqrq
  485. normalizeMenuSiteAuthValue(siteAuthValue) {
  486. const rawValue = siteAuthValue === null || siteAuthValue === undefined ? '*' : String(siteAuthValue).trim()
  487. return rawValue === '' ? '*' : rawValue
  488. },
  489. // 菜单授权规则:*全工厂可见,非*必须命中当前site才显示 - rqrq
  490. isMenuVisibleForCurrentSite(siteAuthValue) {
  491. const normalizedAuthValue = this.normalizeMenuSiteAuthValue(siteAuthValue)
  492. if (normalizedAuthValue === '*') {
  493. return true
  494. }
  495. const currentSite = this.site
  496. if (!currentSite) {
  497. return false
  498. }
  499. const authSiteList = normalizedAuthValue
  500. .split(',')
  501. .map(item => item.trim())
  502. .filter(item => item !== '')
  503. return authSiteList.includes('*') || authSiteList.includes(String(currentSite).trim())
  504. },
  505. // 指令落地:根据site授权值直接控制菜单节点显示 - rqrq
  506. applySiteAuthForElement(el, binding) {
  507. const isVisible = this.isMenuVisibleForCurrentSite(binding.value)
  508. el.style.display = isVisible ? '' : 'none'
  509. },
  510. // 处理禁用功能点击
  511. handleDisabledFeature(featureName) {
  512. this.$message({
  513. type: 'warning',
  514. message: `开发中,敬请期待...`,
  515. duration: 8000 // 停留 5 秒
  516. });
  517. },
  518. // 处理点击事件
  519. handleDocumentClick(event) {
  520. // 检查点击是否在仓库选择器内部
  521. const warehouseSelector = this.$el.querySelector('.warehouse-selector');
  522. if (warehouseSelector && !warehouseSelector.contains(event.target)) {
  523. this.showWarehouseDropdown = false;
  524. }
  525. },
  526. // 获取仓库列表
  527. getWarehouseList() {
  528. const currentSite = this.site;
  529. if (!currentSite) {
  530. this.$message.error('请先选择工厂');
  531. this.$router.push({ name: 'login' });
  532. return;
  533. }
  534. this.warehouseLoading = true;
  535. getUserAuthorizedWarehouses({ site: currentSite }).then(({data}) => {
  536. this.warehouseLoading = false;
  537. if (data && data.code === 0) {
  538. this.warehouseList = data.data || [];
  539. // 如果只有一个仓库,自动选中
  540. if (this.warehouseList.length === 1) {
  541. this.selectWarehouse(this.warehouseList[0]);
  542. }
  543. // 如果之前有选择的仓库,检查是否还在列表中并设置名称
  544. else if (this.selectedWarehouse) {
  545. const warehouse = this.warehouseList.find(w => w.warehouseid === this.selectedWarehouse);
  546. if (warehouse) {
  547. this.selectedWarehouseName = warehouse.warehousename;
  548. } else {
  549. this.selectedWarehouse = '';
  550. this.selectedWarehouseName = '';
  551. localStorage.removeItem('selectedWarehouse');
  552. }
  553. }
  554. } else {
  555. this.$message.error(data.msg || '获取仓库列表失败');
  556. }
  557. }).catch(error => {
  558. this.warehouseLoading = false;
  559. console.error('获取仓库列表失败:', error);
  560. this.$message.error('获取仓库列表失败');
  561. })
  562. },
  563. // 切换下拉框显示
  564. toggleWarehouseDropdown(event) {
  565. event.stopPropagation(); // 阻止事件冒泡
  566. this.showWarehouseDropdown = !this.showWarehouseDropdown;
  567. },
  568. // 关闭下拉框
  569. closeWarehouseDropdown() {
  570. this.showWarehouseDropdown = false;
  571. },
  572. // 选择仓库
  573. selectWarehouse(warehouse) {
  574. this.selectedWarehouse = warehouse.warehouseid;
  575. this.selectedWarehouseName = warehouse.warehousename;
  576. localStorage.setItem('selectedWarehouse', warehouse.warehouseid);
  577. this.showWarehouseDropdown = false;
  578. //this.$message.success(`已切换到仓库:${warehouse.warehousename}`);
  579. },
  580. // 检查是否已选择仓库
  581. checkWarehouseSelection() {
  582. if (!this.selectedWarehouse) {
  583. this.$message.warning('请先选择仓库');
  584. return false;
  585. }
  586. return true;
  587. },
  588. // 带仓库检查的路由跳转
  589. navigateWithWarehouseCheck(routeName) {
  590. if (this.checkWarehouseSelection()) {
  591. this.$router.push(routeName);
  592. }
  593. },
  594. // 退出
  595. logoutHandle() {
  596. this.$confirm('确定退出?', '提示', {
  597. confirmButtonText: '确认',
  598. cancelButtonText: '取消',
  599. type: 'warning'
  600. }).then(() => {
  601. this.$http({
  602. url: this.$http.adornUrl('/sys/logout'),
  603. method: 'post',
  604. data: this.$http.adornData()
  605. }).then(({data}) => {
  606. if (data && data.code === 0) {
  607. this.$router.push({name: 'login'})
  608. }
  609. })
  610. }).catch(() => {
  611. })
  612. }, // 获取当前管理员信息
  613. getUserInfo() {
  614. this.$http({
  615. url: this.$http.adornUrl('/sys/user/info'),
  616. method: 'get',
  617. params: this.$http.adornParams()
  618. }).then(({data}) => {
  619. if (data && data.code === 0) {
  620. this.loading = false
  621. this.userId = data.user.userId
  622. this.userName = data.user.username
  623. // 再次确保user对象建立后store中可直接读取当前site - rqrq
  624. this.$store.commit('user/updateSite', this.site)
  625. this.languageDefault = data.user.languageDefault
  626. this.userDisplay = data.user.userDisplay
  627. let userSubSiteCodeList = []
  628. try {
  629. const cacheValue = JSON.parse(localStorage.getItem('userSubSiteCodeList') || '[]')
  630. userSubSiteCodeList = Array.isArray(cacheValue) ? cacheValue : []
  631. } catch (e) {
  632. userSubSiteCodeList = []
  633. }
  634. this.$store.commit('user/updateSubSiteCodeList', userSubSiteCodeList)
  635. }
  636. })
  637. },
  638. },
  639. }
  640. </script>
  641. <style>
  642. .pda-container {
  643. width: 100vw;
  644. height: 100vh;
  645. display: flex;
  646. flex-direction: column;
  647. background: #f5f5f5;
  648. font-family: 'Arial', sans-serif;
  649. }
  650. /* 头部栏 */
  651. .header-bar {
  652. display: flex;
  653. justify-content: space-between;
  654. align-items: center;
  655. padding: 8px 16px;
  656. background: #17B3A3;
  657. color: white;
  658. height: 40px;
  659. min-height: 40px;
  660. max-height: 40px;
  661. }
  662. /* 仓库选择器样式 */
  663. .warehouse-selector {
  664. position: relative;
  665. display: flex;
  666. align-items: center;
  667. cursor: pointer;
  668. padding: 0;
  669. user-select: none;
  670. }
  671. .warehouse-text {
  672. color: white;
  673. font-size: 16px;
  674. font-weight: 500;
  675. margin-right: 8px;
  676. }
  677. .warehouse-selector .el-icon-arrow-down {
  678. color: white;
  679. font-size: 14px;
  680. transition: transform 0.2s ease;
  681. }
  682. .warehouse-selector .el-icon-arrow-down.rotate {
  683. transform: rotate(180deg);
  684. }
  685. /* 下拉框样式 */
  686. .warehouse-dropdown {
  687. position: absolute;
  688. top: 100%;
  689. left: 0;
  690. min-width: 120px;
  691. background: white;
  692. border-radius: 4px;
  693. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  694. z-index: 9999;
  695. margin-top: 4px;
  696. overflow: hidden;
  697. border: 1px solid #e0e0e0;
  698. }
  699. .dropdown-item {
  700. padding: 12px 16px;
  701. cursor: pointer;
  702. font-size: 14px;
  703. color: #333;
  704. transition: background-color 0.2s ease;
  705. }
  706. .dropdown-item:hover {
  707. background: #f5f5f5;
  708. }
  709. .dropdown-item.active {
  710. //background: #17B3A3;
  711. color: #17B3A3;
  712. }
  713. .dropdown-item.loading {
  714. text-align: center;
  715. color: #666;
  716. cursor: default;
  717. }
  718. .dropdown-item.loading:hover {
  719. background: white;
  720. }
  721. .dropdown-item.loading i {
  722. margin-right: 6px;
  723. animation: spin 1s linear infinite;
  724. }
  725. @keyframes spin {
  726. from { transform: rotate(0deg); }
  727. to { transform: rotate(360deg); }
  728. }
  729. .dropdown-item.empty {
  730. text-align: center;
  731. color: #999;
  732. cursor: default;
  733. }
  734. .dropdown-item.empty:hover {
  735. background: white;
  736. }
  737. .logout-button {
  738. background: rgba(255, 255, 255, 0.15);
  739. color: white;
  740. padding: 6px 12px;
  741. border-radius: 16px;
  742. cursor: pointer;
  743. display: flex;
  744. align-items: center;
  745. font-size: 13px;
  746. font-weight: 400;
  747. transition: all 0.3s ease;
  748. min-width: 55px;
  749. justify-content: center;
  750. border: 1px solid rgba(255, 255, 255, 0.3);
  751. backdrop-filter: blur(10px);
  752. position: relative;
  753. overflow: hidden;
  754. }
  755. .logout-button::before {
  756. content: '';
  757. position: absolute;
  758. top: 0;
  759. left: -100%;
  760. width: 100%;
  761. height: 100%;
  762. background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  763. transition: left 0.5s ease;
  764. }
  765. .logout-button:hover {
  766. background: rgba(255, 255, 255, 0.25);
  767. border-color: rgba(255, 255, 255, 0.5);
  768. transform: translateY(-1px);
  769. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  770. }
  771. .logout-button:hover::before {
  772. left: 100%;
  773. }
  774. .logout-button:active {
  775. transform: translateY(0);
  776. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  777. }
  778. .logout-button i {
  779. margin-right: 6px;
  780. font-size: 14px;
  781. flex-shrink: 0;
  782. }
  783. .logout-button span {
  784. white-space: nowrap;
  785. }
  786. /* 内容区域 */
  787. .content-area {
  788. flex: 1;
  789. padding: 10px;
  790. overflow-y: auto;
  791. }
  792. /* 功能区域 */
  793. .section {
  794. margin-bottom: 15px;
  795. }
  796. .section-header {
  797. display: flex;
  798. align-items: center;
  799. margin-bottom: 9px;
  800. padding: 6px 0;
  801. border-bottom: 1.5px solid #17B3A3;
  802. }
  803. .bullet {
  804. color: #17B3A3;
  805. font-size: 16px;
  806. margin-right: 8px;
  807. font-weight: bold;
  808. }
  809. .section-title {
  810. color: #17B3A3;
  811. font-size: 15px;
  812. font-weight: bold;
  813. }
  814. /* 按钮网格 */
  815. .button-grid {
  816. display: grid;
  817. grid-template-columns: repeat(4, 1fr) !important;
  818. gap: 8px;
  819. }
  820. /* 菜单项 */
  821. .menu-item {
  822. background: white;
  823. border-radius: 12px;
  824. padding: 12px 6px 10px;
  825. text-align: center;
  826. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  827. transition: transform 0.2s;
  828. cursor: pointer;
  829. display: flex;
  830. flex-direction: column;
  831. align-items: center;
  832. justify-content: center;
  833. min-height: 80px;
  834. }
  835. .menu-item:active {
  836. transform: scale(0.95);
  837. }
  838. .menu-item.disabled {
  839. opacity: 0.6;
  840. position: relative;
  841. }
  842. .menu-item.disabled::after {
  843. content: '开发中';
  844. position: absolute;
  845. top: 6px;
  846. right: 6px;
  847. background: #ff9500;
  848. color: white;
  849. font-size: 8px;
  850. padding: 2px 4px;
  851. border-radius: 6px;
  852. font-weight: bold;
  853. z-index: 1;
  854. }
  855. .menu-icon {
  856. width: 38px;
  857. height: 38px;
  858. border-radius: 50%;
  859. display: flex;
  860. align-items: center;
  861. justify-content: center;
  862. margin: 0 auto 8px;
  863. color: white;
  864. flex-shrink: 0;
  865. }
  866. .menu-icon.purchase {
  867. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  868. }
  869. .menu-icon.production-return {
  870. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  871. }
  872. .menu-icon.production-inbound {
  873. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  874. }
  875. .menu-icon.sales-return {
  876. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  877. }
  878. .menu-icon.purchase-return {
  879. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  880. }
  881. .menu-icon.production-issue {
  882. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  883. }
  884. .menu-icon.mr {
  885. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  886. }
  887. .menu-icon.outsourcing {
  888. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  889. }
  890. .menu-icon.customer-issue {
  891. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  892. }
  893. .menu-icon.sales-delivery {
  894. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  895. }
  896. .menu-icon.transport {
  897. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  898. }
  899. .menu-icon.attribute {
  900. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  901. }
  902. .menu-icon.inventory {
  903. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  904. }
  905. .menu-icon.other {
  906. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  907. }
  908. .menu-icon.hu {
  909. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  910. }
  911. .menu-icon.inventory-move {
  912. background: linear-gradient(135deg, #17B3A3 0%, #1dc5ef 100%);
  913. }
  914. .menu-text {
  915. font-size: 11px;
  916. color: #333;
  917. font-weight: bold;
  918. line-height: 1.2;
  919. margin-top: 2px;
  920. white-space: nowrap;
  921. overflow: hidden;
  922. text-overflow: ellipsis;
  923. max-width: 100%;
  924. }
  925. /* 响应式设计 */
  926. @media screen and (max-width: 480px) {
  927. .header-bar {
  928. padding: 8px 12px;
  929. }
  930. .warehouse-text {
  931. font-size: 14px;
  932. }
  933. .logout-button {
  934. padding: 5px 10px;
  935. font-size: 12px;
  936. min-width: 50px;
  937. border-radius: 14px;
  938. }
  939. .logout-button i {
  940. margin-right: 4px;
  941. font-size: 12px;
  942. }
  943. .warehouse-dropdown {
  944. min-width: 120px;
  945. }
  946. .content-area {
  947. padding: 8px;
  948. }
  949. .section-header {
  950. padding: 2px 10px;
  951. }
  952. .section-title {
  953. font-size: 13px;
  954. }
  955. .button-grid {
  956. grid-template-columns: repeat(2, 1fr);
  957. gap: 10px;
  958. }
  959. .menu-item {
  960. padding: 8px 4px 6px;
  961. min-height: 70px;
  962. }
  963. .menu-icon {
  964. width: 35px;
  965. height: 35px;
  966. margin-bottom: 6px;
  967. }
  968. .menu-text {
  969. font-size: 10px;
  970. line-height: 1.1;
  971. margin-top: 2px;
  972. }
  973. .menu-item.disabled::after {
  974. top: 4px;
  975. right: 4px;
  976. font-size: 7px;
  977. padding: 1px 3px;
  978. border-radius: 4px;
  979. }
  980. }
  981. @media screen and (min-width: 481px) and (max-width: 767px) {
  982. .button-grid {
  983. grid-template-columns: repeat(3, 1fr);
  984. }
  985. .menu-item {
  986. padding: 10px 5px 8px;
  987. min-height: 75px;
  988. }
  989. .menu-icon {
  990. width: 38px;
  991. height: 38px;
  992. margin-bottom: 7px;
  993. }
  994. .menu-text {
  995. font-size: 10.5px;
  996. }
  997. }
  998. @media screen and (min-width: 768px) {
  999. .button-grid {
  1000. grid-template-columns: repeat(4, 1fr);
  1001. }
  1002. }
  1003. </style>