outstore01.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view>
  3. <view class="uni-form-item uni-column">
  4. <view class="uni-flex uni-row">
  5. <view class="title" style="width: 180rpx;">出库任务单号:</view>
  6. <input class="uni-input" style="-webkit-flex: 1;flex: 1;margin-right: 5px;" v-model="outTaskNo" :focus="foucusIndex === 0" placeholder="请输入出库任务单号" @confirm="foucusChange0"/>
  7. </view>
  8. <view class="uni-flex uni-row" style="margin-top: 3px;margin-bottom: 3px;">
  9. <view class="title" style="width: 180rpx;">生产令号:</view>
  10. <input class="uni-input" style="-webkit-flex: 1;flex: 1;margin-right: 5px;" :focus="foucusIndex === 1" v-model="bomNo" placeholder="请输入生产令号" @confirm="foucusChange1"/>
  11. </view>
  12. <view class="uni-flex uni-row">
  13. <button type="primary" style="-webkit-flex: 1;flex: 1;margin-left: 5px;" @click="queryFun">查询</button>
  14. <button type="primary" style="-webkit-flex: 1;flex: 1;margin-left: 5px;margin-right: 5px;" @click="resetCondition">重置条件</button>
  15. </view>
  16. </view>
  17. <view style="margin-left: 5px;margin-right: 5px;">
  18. <view style="margin-left: 10px;margin-bottom: 5px;">出库任务单数据:</view>
  19. <view class="my-tips-view" v-if="isShowTips">没有查询到出库任务单数据......</view>
  20. <view class="uni-navigate-item1 uni-flex uni-row" style="-webkit-justify-content: space-between;justify-content: space-between;"
  21. v-for="(item,key) in deliverList" :key="key" @click="goDetailPage(item)">
  22. <text class="uni-navigate-text">{{item.outTaskNo}}</text>
  23. <text class="uni-navigate-icon uni-icon">&#xe470;</text>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. // TODO 修复Android v3 加载过慢问题
  30. // #ifdef APP-PLUS
  31. var domModule = weex.requireModule('dom');
  32. domModule.addRule('fontFace', {
  33. 'fontFamily': "uniicons",
  34. 'src': "url('/static/uni.ttf')"
  35. });
  36. // #endif
  37. export default {
  38. data() {
  39. return {
  40. title: '没有查询到校验单数据......',
  41. outTaskNo : '',
  42. bomNo: '',
  43. isShowTips: true,
  44. deliverList:[],
  45. foucusIndex: 0
  46. }
  47. },
  48. methods: {
  49. async queryFun() {
  50. uni.showLoading({
  51. title: "正在查询...",
  52. mask: true,
  53. })
  54. this.deliverList = []
  55. let parm = {
  56. url : '/SapInterface/QuerySapOutTaskList',
  57. data: {
  58. OutTaskNo: this.outTaskNo,
  59. BomNo: this.bomNo
  60. },
  61. method: 'POST',
  62. isHaveToken : true
  63. }
  64. let retData = await getApp().RequestData(parm)
  65. // console.log(retData)
  66. if(retData.isSuccess) {
  67. if(retData.data.code == 200) {
  68. let len = retData.data.data.length
  69. for (let i = 0; i < len; i++) {
  70. this.deliverList.push({
  71. deliverid: i + 1,
  72. outTaskNo: retData.data.data[i].outTaskNo
  73. });
  74. }
  75. if(len > 0) {
  76. this.isShowTips = false
  77. }
  78. else {
  79. this.isShowTips = true
  80. }
  81. }
  82. else {
  83. this.isShowTips = true
  84. }
  85. }
  86. else {
  87. this.isShowTips = true
  88. }
  89. uni.hideLoading()
  90. },
  91. resetCondition() {
  92. this.outTaskNo = ''
  93. this.bomNo = ''
  94. this.foucusIndex = 0
  95. },
  96. goDetailPage(item) {
  97. let urlStr = '/pages/Outstore/outstoreDtlNew?outTaskNo=' + item.outTaskNo;
  98. uni.navigateTo({
  99. url: urlStr
  100. });
  101. },
  102. foucusChange0(event) {
  103. let str = event.detail.value
  104. if(str.length !== 0) {
  105. this.foucusIndex = 1
  106. }
  107. },
  108. foucusChange1(event) {
  109. let str = event.detail.value
  110. if(str.length !== 0) {
  111. this.foucusIndex = 2
  112. }
  113. }
  114. }
  115. }
  116. </script>
  117. <style lang="scss">
  118. @import '@/common/uni-nvue.css';
  119. .uni-navigate-icon-01 {
  120. //margin-left: 200px;
  121. // margin-right: 5px;
  122. color: #999999;
  123. font-size: 14px;
  124. font-weight: normal;
  125. }
  126. .uni-navigate-item1 {
  127. align-items: center;
  128. background-color: #FFFFFF;
  129. border-top-style: solid;
  130. border-top-color: #f0f0f0;
  131. border-top-width: 1px;
  132. padding: 12px;
  133. cursor: pointer;
  134. }
  135. .uni-navigate-item1:active {
  136. background-color: #007AFF;
  137. }
  138. .my-tips-view {
  139. margin-top: 50px;
  140. text-align: center;
  141. color: #999999;
  142. font-size: 20px;
  143. font-weight: normal;
  144. }
  145. </style>