outassembleRecordQuery.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view>
  3. <view class="uni-form-item uni-column">
  4. <view class="uni-flex uni-row">
  5. <view class="title">物料信息:</view>
  6. <input class="uni-input" style="margin-right: 5px;" v-model="materialMsg" placeholder="请输入物料号或规格型号或图号"/>
  7. </view>
  8. <view class="uni-flex uni-row" style="margin-top: 3px;">
  9. <view class="title">BN\SN码:</view>
  10. <input class="uni-input" style="margin-right: 5px;" v-model="bnSnCode" placeholder="请输入BN\SN码"/>
  11. </view>
  12. <view class="uni-flex uni-row" style="margin-top: 3px;margin-bottom: 3px;">
  13. <view class="title">生产令号:</view>
  14. <input class="uni-input" style="margin-right: 5px;" v-model="bomNo" placeholder="请输入生产令号"/>
  15. </view>
  16. <view class="uni-flex uni-row">
  17. <button type="primary" style="-webkit-flex: 1;flex: 1;margin-left: 5px;" @click="queryFun">查询</button>
  18. <button type="primary" style="-webkit-flex: 1;flex: 1;margin-left: 5px;margin-right: 5px;" @click="resetCondition">重置条件</button>
  19. </view>
  20. </view>
  21. <uni-section title="装配记录清单:" type="line" style="margin-bottom: 3px;padding: 3px;">
  22. <view class="my-tips-view" v-if="isShowTips">没有查询到装配记录数据......</view>
  23. <uni-pagination :total="total" :current="current" :pageSize="pageSize" @change="pageChange" title="标题文字" v-if="!isShowTips" style="margin: 4px;"/>
  24. <view v-if="!isShowTips" style="text-align: center;">
  25. <text class="example-info">数据总量:{{ total }}条,每页数据:{{ pageSize }}</text>
  26. </view>
  27. <view v-for="(newsitem,key) in outassembleRecordList" :key="key">
  28. <view class="myDeliverDetail" >
  29. <view style="flex-direction: row;flex-direction: row;height: 25px;display: flex;padding: 2px;border-radius: 5px 5px;">
  30. <text style="align-self: center;">物料编号:</text>
  31. <text style="align-self: center;font-size: 30rpx;font-weight: bold;">{{newsitem.materialCode}}</text>
  32. <text :class="newsitem.keyFlag ? 'keyFlagRed' : 'keyFlagGray'" style="align-self: center;margin-left: 20px;">{{newsitem.keyFlag ? '★' : '■'}}</text>
  33. </view>
  34. <view class="line-h"></view>
  35. <view style="flex-direction: row;flex-direction: row;display: flex;-webkit-justify-content: space-between;justify-content: space-between;">
  36. <view>
  37. <view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
  38. <text style="align-self: center;color: #555;font-size: 25rpx;">物料名称:</text>
  39. <text style="align-self: center;font-size: 25rpx;word-wrap: break-word;width: 200px;">{{newsitem.materialName}}</text>
  40. </view>
  41. <view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
  42. <text style="align-self: center;color: #555;font-size: 25rpx;">规格型号/图号:</text>
  43. <text style="align-self: center;font-size: 30rpx;font-weight: bold;word-wrap: break-word;width: 200px;">{{newsitem.materialSpec}}</text>
  44. </view>
  45. <view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
  46. <text style="align-self: center;color: #555;font-size: 25rpx;">生产令号:</text>
  47. <text style="align-self: center;font-size: 30rpx;font-weight: bold;word-wrap: break-word;width: 200px;">{{newsitem.bomNo}}</text>
  48. </view>
  49. <view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
  50. <text style="align-self: center;color: #555;font-size: 25rpx;">BN/SN:</text>
  51. <text style="align-self: center;font-size: 30rpx;font-weight: bold;word-wrap: break-word;width: 200px;">{{newsitem.bnSnCode}}</text>
  52. </view>
  53. <view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
  54. <text style="align-self: center;color: #555;font-size: 25rpx;">装配数量:</text>
  55. <text style="align-self: center;font-size: 35rpx;font-weight: bold;color: blue;">{{newsitem.assembleQty}}</text>
  56. </view>
  57. <!-- <view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
  58. <text style="align-self: center;color: #555;font-size: 25rpx;">质检人:</text>
  59. <text style="align-self: center;font-size: 30rpx;">{{newsitem.inspectedBy}}</text>
  60. </view> -->
  61. <view style="flex-direction: row;flex-direction: row;display: flex;padding: 2px;">
  62. <text style="align-self: center;color: #555;font-size: 25rpx;">装配时间:</text>
  63. <text style="align-self: center;font-size: 30rpx;">{{newsitem.createTime}}</text>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </uni-section>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. bomNo: '',
  77. materialMsg: '',
  78. bnSnCode: '',
  79. isShowTips: true,
  80. outassembleRecordList:[],
  81. current: 1,
  82. total: 0,
  83. pageSize: 10
  84. }
  85. },
  86. methods: {
  87. async queryFun() {
  88. uni.showLoading({
  89. title: "正在查询...",
  90. mask: true,
  91. })
  92. this.outassembleRecordList = []
  93. let parm = {
  94. url : '/business/OutAssembleRecord/list',
  95. data: {
  96. BomNo: this.bomNo,
  97. BnSnCode: this.bnSnCode,
  98. MaterialCode: this.materialMsg,
  99. PageNum: this.current,
  100. PageSize: this.pageSize
  101. },
  102. method: 'GET',
  103. isHaveToken : true
  104. }
  105. let retData = await getApp().RequestData(parm)
  106. if(retData.isSuccess) {
  107. if(retData.data.code == 200) {
  108. let len = retData.data.data.result.length
  109. this.total = retData.data.data.totalNum
  110. this.outassembleRecordList = retData.data.data.result
  111. if(len > 0) {
  112. this.isShowTips = false
  113. }
  114. else {
  115. this.isShowTips = true
  116. }
  117. }
  118. else {
  119. this.isShowTips = true
  120. }
  121. }
  122. else {
  123. this.isShowTips = true
  124. }
  125. uni.hideLoading()
  126. },
  127. resetCondition() {
  128. this.bomNo = ''
  129. this.materialMsg = ''
  130. this.bnSnCode = ''
  131. },
  132. pageChange(e) {
  133. this.current = e.current
  134. this.queryFun()
  135. }
  136. }
  137. }
  138. </script>
  139. <style lang="scss">
  140. .my-tips-view {
  141. /* margin-top: 50px; */
  142. text-align: center;
  143. color: #999999;
  144. font-size: 20px;
  145. font-weight: normal;
  146. }
  147. .myDeliverDetail {
  148. border: 1px solid #cccccc;
  149. border-radius: 5px;
  150. margin-top: 1px;
  151. }
  152. .myDeliverDetail:active {
  153. background-color: aliceblue;
  154. }
  155. .line-h {
  156. height: 1rpx;
  157. background-color: #cccccc;
  158. }
  159. .keyFlagRed {
  160. color: red;
  161. }
  162. .keyFlagGray {
  163. color: lightgray;
  164. }
  165. </style>