Storage.ets 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. import { TitleStateComp } from '../common/component/TitleStateComp';
  2. import {IntelligentWarehousingOutbound, SelectMaterialslist}from '../view/IntelligentWarehousingOutbound'
  3. import {Statistics}from '../view/Statistics'
  4. import {IntelligentStorageWarehousing }from '../view/IntelligentStorageWarehousing'
  5. import {OtherStorageOutbound}from '../view/OtherStorageOutbound'
  6. import {OtherWarehousing}from '../view/OtherWarehousing'
  7. import { OtherStatistics } from '../view/OtherStatistics';
  8. import taskSheetInformation from '../model/TaskSheetInformation';
  9. export interface class1{
  10. choicePages?:number
  11. }
  12. export interface ScanStorageclass {
  13. //改变的数量
  14. exchangeNumber?:number
  15. label?:string
  16. //订单编号
  17. taskId:string
  18. //批次号
  19. //已经占用箱数
  20. useNum?:number
  21. //空箱数
  22. emptyBoxNum?:string
  23. //可用箱数
  24. canUsedNum?:string
  25. //总容量箱数
  26. allNum?:number
  27. //仓储类型
  28. type?:string
  29. //批次号
  30. coordinate?: string
  31. //创建时间
  32. created?: string
  33. //
  34. creator?: string
  35. //仓库编码
  36. houseNo?:string
  37. deptId?: string
  38. houseType?:string
  39. //主键
  40. id?:string
  41. locationNo?: string
  42. // 物料名称
  43. materialName?:string
  44. //物料编码
  45. materialNo?: string
  46. //出入库数量
  47. num?: number
  48. orgId?: string
  49. planNo?: string
  50. position?: string
  51. // 序列号
  52. seqNo?: string
  53. // 状态;1-待处理;2-处理中;3-处理异常;4-已完成
  54. state?:string
  55. // 库存数量
  56. stockNum?:string
  57. //出入库任务单号
  58. taskNo?: string
  59. unit?:string
  60. updated?: string
  61. //任务名称
  62. taskName?:string
  63. updator?: string
  64. vehicleNo?: string
  65. batchCode?:string
  66. }
  67. export interface ScanStoragecodeclass {
  68. //批次号
  69. //已经占用箱数
  70. useNum?:number
  71. //空箱数
  72. emptyBoxNum?:string
  73. //可用箱数
  74. canUsedNum?:string
  75. //总容量箱数
  76. allNum?:number
  77. //仓储类型
  78. type?:string
  79. //批次号
  80. coordinate?: string
  81. //创建时间
  82. created?: string
  83. //
  84. creator?: string
  85. //仓库编码
  86. houseNo?:string
  87. deptId?: string
  88. houseType?:string
  89. //主键
  90. id?:string
  91. locationNo?: string
  92. // 物料名称
  93. materialName?:string
  94. //物料编码
  95. materialNo?: string
  96. //出入库数量
  97. num?: number
  98. orgId?: string
  99. planNo?: string
  100. position?: string
  101. // 序列号
  102. seqNo?: string
  103. // 状态;1-待处理;2-处理中;3-处理异常;4-已完成
  104. state?:string
  105. // 库存数量
  106. stockNum?:string
  107. //出入库任务单号
  108. taskNo?: string
  109. unit?:string
  110. updated?: string
  111. //任务名称
  112. taskName?:string
  113. updator?: string
  114. vehicleNo?: string
  115. batchCode?:string
  116. }
  117. @Entry
  118. @Component
  119. struct Storage {
  120. @State choicePages:class1={}
  121. @State userName:string=''
  122. @State avatar:string=''
  123. @State primaryKeyId:string=''
  124. @State textValue: string = ''
  125. @State inputValue: string = ''
  126. scroller: Scroller = new Scroller()
  127. @State CangKu:number=0
  128. @State CunQuHuo:number=0
  129. @State ChuRukun:number=0
  130. @State ZhuangTai:number=0
  131. @State private ScanStoragecodelist:Array<ScanStoragecodeclass>=[]
  132. @State private scanStorageList:Array<ScanStorageclass>=[]
  133. @State private SelectMaterial:Array<taskSheetInformation>=[]
  134. private isHomePage:boolean = false
  135. build() {
  136. Row() {
  137. Column() {
  138. TitleStateComp({isHomePage : this.isHomePage})
  139. Column(){
  140. //选中
  141. Row(){
  142. Row({space:10}){
  143. Stack(){
  144. Row(){
  145. }.width('100%')
  146. .height('100%')
  147. if(this.CangKu===0){
  148. Row(){
  149. Text('智能仓储')
  150. .textAlign(TextAlign.Center)
  151. .width('50%')
  152. .fontSize('32px')
  153. .height('100%')
  154. .fontWeight(FontWeight.Medium)
  155. .fontColor('#e6000000')
  156. .borderRadius(15)
  157. .backgroundColor('#FFFFFF')
  158. .onClick(()=>{
  159. this.CangKu=0
  160. })
  161. Text('其他仓储')
  162. .width('50%')
  163. .textAlign(TextAlign.Center)
  164. .border({width:0})
  165. .fontSize('32px')
  166. .height('100%')
  167. .fontWeight(FontWeight.Medium)
  168. .borderRadius(15)
  169. .fontColor('#e6000000')
  170. .onClick(()=>{
  171. this.CangKu=1
  172. })
  173. }.width('100%')
  174. .height('100%')
  175. .borderRadius(15)
  176. }else if(this.CangKu===1){
  177. Row(){
  178. Text('智能仓储')
  179. .textAlign(TextAlign.Center)
  180. .width('50%')
  181. .fontSize('32px')
  182. .fontWeight(FontWeight.Medium)
  183. .height('100%')
  184. .fontColor('#e6000000')
  185. .borderRadius(15)
  186. .onClick(()=>{
  187. this.CangKu=0
  188. })
  189. Text('其他仓储')
  190. .width('50%')
  191. .textAlign(TextAlign.Center)
  192. .border({width:0})
  193. .height('100%')
  194. .fontWeight(FontWeight.Medium)
  195. .fontSize('32px')
  196. .borderRadius(15)
  197. .backgroundColor('#FFFFFF')
  198. .fontColor('#e6000000')
  199. .onClick(()=>{
  200. this.CangKu=1
  201. })
  202. }.width('100%')
  203. .height('100%')
  204. .borderRadius(15)
  205. }
  206. }.width('30%')
  207. .height('80%')
  208. .borderRadius(15)
  209. .backgroundColor('#1a000000')
  210. .margin({left:10})
  211. }
  212. Blank()
  213. Stack(){
  214. Row(){
  215. }.width('100%')
  216. .height('100%')
  217. .backgroundColor('#1a000000')
  218. .borderRadius(15)
  219. if(this.ChuRukun===0){
  220. Row(){
  221. Text('入库')
  222. .textAlign(TextAlign.Center)
  223. .width('33%')
  224. .height('100%')
  225. .fontSize('32px')
  226. .fontWeight(FontWeight.Medium)
  227. .fontColor('#e6000000')
  228. .borderRadius(15)
  229. .onClick(()=>{
  230. this.ChuRukun=1
  231. })
  232. Text('出库')
  233. .textAlign(TextAlign.Center)
  234. .width('33%')
  235. .fontSize('32px')
  236. .border({width:0})
  237. .fontWeight(FontWeight.Medium)
  238. .height('100%')
  239. .borderRadius(15)
  240. .backgroundColor('#FFFFFF')
  241. .fontColor('#e6000000')
  242. .onClick(()=>{
  243. this.ChuRukun=0
  244. })
  245. Text('统计')
  246. .textAlign(TextAlign.Center)
  247. .width('33%')
  248. .fontWeight(FontWeight.Medium)
  249. .fontSize('32px')
  250. .border({width:0})
  251. .height('100%')
  252. .borderRadius(15)
  253. .fontColor('#e6000000')
  254. .onClick(()=>{
  255. this.ChuRukun=2
  256. })
  257. }.width('100%')
  258. .height('100%')
  259. .borderRadius(15)
  260. }else if(this.ChuRukun===1){
  261. Row(){
  262. Text('入库')
  263. .textAlign(TextAlign.Center)
  264. .width('33%')
  265. .height('100%')
  266. .fontSize('32px')
  267. .fontWeight(FontWeight.Medium)
  268. .fontColor('#e6000000')
  269. .borderRadius(15)
  270. .backgroundColor('#FFFFFF')
  271. .onClick(()=>{
  272. this.ChuRukun=1
  273. })
  274. Text('出库')
  275. .textAlign(TextAlign.Center)
  276. .width('33%')
  277. .border({width:0})
  278. .height('100%')
  279. .fontSize('32px')
  280. .borderRadius(15)
  281. .fontWeight(FontWeight.Medium)
  282. .fontColor('#e6000000')
  283. .onClick(()=>{
  284. this.ChuRukun=0
  285. })
  286. Text('统计')
  287. .textAlign(TextAlign.Center)
  288. .width('33%')
  289. .fontSize('32px')
  290. .fontWeight(FontWeight.Medium)
  291. .border({width:0})
  292. .height('100%')
  293. .borderRadius(15)
  294. .fontColor('#e6000000')
  295. .onClick(()=>{
  296. this.ChuRukun=2
  297. })
  298. }.width('100%')
  299. .height('100%')
  300. .borderRadius(15)
  301. }else if (this.ChuRukun===2){
  302. Row(){
  303. Text('入库')
  304. .textAlign(TextAlign.Center)
  305. .width('33%')
  306. .fontWeight(FontWeight.Medium)
  307. .height('100%')
  308. .fontSize('32px')
  309. .fontColor('#e6000000')
  310. .borderRadius(15)
  311. .onClick(()=>{
  312. this.ChuRukun=1
  313. })
  314. Text('出库')
  315. .textAlign(TextAlign.Center)
  316. .width('33%')
  317. .fontSize('32px')
  318. .border({width:0})
  319. .height('100%')
  320. .fontWeight(FontWeight.Medium)
  321. .borderRadius(15)
  322. .fontColor('#e6000000')
  323. .onClick(()=>{
  324. this.ChuRukun=0
  325. })
  326. Text('统计')
  327. .textAlign(TextAlign.Center)
  328. .width('34%')
  329. .border({width:0})
  330. .height('100%')
  331. .fontWeight(FontWeight.Medium)
  332. .fontSize('32px')
  333. .borderRadius(15)
  334. .backgroundColor('#FFFFFF')
  335. .fontColor('#e6000000')
  336. .onClick(()=>{
  337. this.ChuRukun=2
  338. })
  339. }.width('100%')
  340. .height('100%')
  341. .borderRadius(15)
  342. }
  343. }.width('45%')
  344. .height('80%')
  345. .borderRadius(15)
  346. Blank()
  347. }.width('100%')
  348. .height('10%')
  349. Row({space:15}){
  350. //仓储3D位置
  351. if (this.ChuRukun===0&&this.CangKu===0){
  352. //出库
  353. IntelligentWarehousingOutbound({scanStorageList:this.scanStorageList,SelectMaterial:this.SelectMaterial,primaryKeyId:this.primaryKeyId })
  354. }else if (this.ChuRukun===1&&this.CangKu===0){
  355. //入库
  356. IntelligentStorageWarehousing({ScanStoragelist:this.ScanStoragecodelist})
  357. }else if (this.ChuRukun===2&&this.CangKu===0){
  358. //智能仓储统计
  359. Statistics()
  360. // Statistics({ useNum:this.useNum,canUsedNum:this.canUsedNum,
  361. // allNum:this.allNum, emptyBoxNum:this.emptyBoxNum})
  362. }else if (this.ChuRukun===0&&this.CangKu===1){
  363. OtherStorageOutbound()
  364. }else if (this.ChuRukun===1&&this.CangKu===1){
  365. OtherWarehousing()
  366. }else if (this.ChuRukun===2&&this.CangKu===1){
  367. OtherStatistics()
  368. }
  369. }.width('100%')
  370. .height('90%')
  371. }
  372. .width('100%')
  373. .height('92%')
  374. }
  375. .width('100%')
  376. .backgroundColor('#F1F3F5')
  377. .width('100%')
  378. }
  379. .height('100%')
  380. .width('100%')
  381. }
  382. }