queryInspectRecords.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item prop="washCode">
  5. <el-input v-model="queryParams.washCode" placeholder="请输入衣服条码" clearable @keyup.enter.native="handleQuery" />
  6. </el-form-item>
  7. <el-form-item prop="dateRange">
  8. <el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
  9. </el-form-item>
  10. <el-form-item prop="orgId">
  11. <el-select v-model="queryParams.orgId" placeholder="请选择门店" style="width: 200px" clearable>
  12. <el-option v-for="item in storelist" :key="item.id" :label="item.name" :value="item.id" />
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item prop="checkClothById">
  16. <el-select v-model="queryParams.checkClothById" style="width: 200px" placeholder="请选择提交人" clearable>
  17. <el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userId" />
  18. </el-select>
  19. </el-form-item>
  20. <el-form-item>
  21. <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  22. <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  23. </el-form-item>
  24. </el-form>
  25. <el-row :gutter="10" class="mb8">
  26. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  27. </el-row>
  28. <el-tabs v-model="queryParams.clothType" @tab-click="handleQuery">
  29. <el-tab-pane label="衣服" name="1"></el-tab-pane>
  30. <el-tab-pane label="附件" name="2"></el-tab-pane>
  31. </el-tabs>
  32. <Page uri="/mapi/order/clothItem/findFactoryClothPage" :request-params="queryParams" ref="pagination">
  33. <el-table-column label="衣物条码" align="center" prop="washCode" />
  34. <el-table-column label="所属门店" align="center" prop="orgName">
  35. <template slot-scope="scope">
  36. {{ scope.row.orgName ? scope.row.orgName : '--' }}
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="衣物名称" align="center" prop="clothItemName" />
  40. <el-table-column label="是否重洗" align="center" prop="repeatCount">
  41. <template slot-scope="scope">
  42. <span v-if="scope.row.repeatCount && scope.row.repeatCount > 0" style="color: red"> 重洗 {{ scope.row.repeatCount }} 次 </span>
  43. <span v-else> 否 </span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="颜色" align="center" prop="clothColorName">
  47. <template slot-scope="scope">
  48. {{ getColor(scope.row.orderClothColors) }}
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="加急" align="center" prop="clothSpeedName" />
  52. <el-table-column label="状态" align="center" prop="flowStatus">
  53. <template slot-scope="scope">
  54. <dict-tag :options="dict.type.order_cloth_flow_status" :value="scope.row.flowStatus" />
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="检查时间" align="center" prop="takeClothTime">
  58. <template slot-scope="scope">
  59. {{ scope.row.checkClothTime ? scope.row.checkClothTime : '--' }}
  60. </template>
  61. </el-table-column>
  62. </Page>
  63. </div>
  64. </template>
  65. <script>
  66. import { listfindFactoryClothPage } from '@/api/system/inquiry'
  67. import { allOrg } from '@/api/system/store'
  68. import { AllUser } from '@/api/system/user'
  69. export default {
  70. name: 'queryInspectRecords',
  71. dicts: ['order_cloth_flow_status'],
  72. data() {
  73. return {
  74. // 遮罩层
  75. loading: true,
  76. // 显示搜索条件
  77. showSearch: true,
  78. // 总条数
  79. total: 0,
  80. // 表格数据
  81. clothingList: [],
  82. // 查询参数
  83. queryParams: {
  84. washCode: undefined,
  85. orgId: undefined,
  86. beginCheckClothTime: undefined,
  87. endCheckClothTime: undefined,
  88. clothType: '1',
  89. flowStatus: 2
  90. },
  91. dateRange: '',
  92. //门店下拉数据
  93. storelist: [],
  94. //提交人数据
  95. userList: []
  96. }
  97. },
  98. created() {
  99. this.getList()
  100. this.getStoreList()
  101. this.getuserList()
  102. },
  103. computed: {},
  104. methods: {
  105. /** 查询公告列表 */
  106. getList() {
  107. this.loading = true
  108. if (this.dateRange.length) {
  109. this.queryParams.beginCheckClothTime = this.dateRange[0]
  110. this.queryParams.endCheckClothTime = this.dateRange[1]
  111. }
  112. if (this.queryParams.orgId) {
  113. const obj = this.storelist.find((item) => item.id === this.queryParams.orgId)
  114. this.queryParams.sourceType = obj.sourceType
  115. }
  116. this.$nextTick(() => {
  117. this.$refs.pagination.handleSearch(true)
  118. })
  119. },
  120. /** 获取门店下拉数据 */
  121. getStoreList() {
  122. allOrg({
  123. sourceType: '02'
  124. }).then((response) => {
  125. console.log(response)
  126. this.storelist = response.data
  127. })
  128. },
  129. // 获取提交人数据
  130. getuserList() {
  131. AllUser({}).then((response) => {
  132. this.userList = response.data
  133. })
  134. },
  135. /** 搜索按钮操作 */
  136. handleQuery() {
  137. this.getList()
  138. },
  139. /** 重置按钮操作 */
  140. resetQuery() {
  141. this.resetForm('queryForm')
  142. this.handleQuery()
  143. },
  144. //获取颜色
  145. getColor(data) {
  146. if (data && data != null) {
  147. const _color = []
  148. data.forEach((item) => {
  149. _color.push(item.clothColorName)
  150. })
  151. return _color.join(',')
  152. } else {
  153. return '--'
  154. }
  155. }
  156. }
  157. }
  158. </script>
  159. <style></style>