inspectRecordQuery.vue 6.7 KB

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