outassembleRecordQuery.vue 6.1 KB

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