inspectRecordQuery.vue 6.5 KB

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