outInspectRecord.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <!--质检记录-->
  2. <template>
  3. <div class="center">
  4. <el-row class="toptitle">
  5. <el-col :span="12">
  6. <h2 class="bg-left title">质检记录</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button type="primary" size="small" @click="returnsales()">
  10. <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
  11. src="../../../public/img/lujing.png" alt="" />返回
  12. </el-button>
  13. </el-col>
  14. </el-row>
  15. <BaseHeaderLayout :leftSpan="12">
  16. <template slot="right">
  17. <ws-select style='margin-right:10px;' v-model="warehouseName" placeholder="" @change="selecttaskType"
  18. :value="searchType">
  19. <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  20. style="color: #8890b1;" />
  21. </ws-select>
  22. <div></div>
  23. <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按业务编号、合同编号、车牌号查找"
  24. clearable maxlength="500" type="input"></ws-input>
  25. <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
  26. vertical-align: text-top;
  27. position: relative;
  28. top: 0px;
  29. left: -8px;
  30. " src="../../../public/img/sousuo.png" alt="" /></ws-button>
  31. </template>
  32. </BaseHeaderLayout>
  33. <el-table :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border height="calc(100vh - 30vh)">
  34. <el-table-column type="index" label="序号" width="50">
  35. <template scope="scope">
  36. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  37. <span v-else>{{ scope.$index + 1 }}</span>
  38. </template>
  39. </el-table-column>
  40. <el-table-column prop="number" label="业务编号"></el-table-column>
  41. <el-table-column prop="contractNo" label="合同编号/移库编号" width="122"></el-table-column>
  42. <el-table-column prop="carNumber" label="车牌号"></el-table-column>
  43. <el-table-column prop="goodsName" label="货名"></el-table-column>
  44. <el-table-column prop="waterContent" label="水分(%)"></el-table-column>
  45. <el-table-column prop="type" label="类型"></el-table-column>
  46. <el-table-column prop="binNumber" label="仓位号"></el-table-column>
  47. <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
  48. <el-table-column prop="updateDate" label="质检时间"></el-table-column>
  49. <el-table-column prop="status" label="状态"></el-table-column>
  50. <el-table-column width="300" label="操作">
  51. <template slot-scope="scope">
  52. <!-- v-if="scope.row.status == '已质检'" -->
  53. <span v-hasPermission=" `outbound.acquisitionQualityOut.view`">
  54. <el-button @click="qualityInspection(scope.row)">查看</el-button>
  55. </span>
  56. <!-- v-if="scope.row.status == '已称毛重' || !scope.row.status" -->
  57. <span v-hasPermission=" `outbound.acquisitionQualityOut.edit`">
  58. <el-button @click="print(scope.row)">打印</el-button>
  59. </span>
  60. </template>
  61. </el-table-column>
  62. </el-table>
  63. <div style="text-align: center;">
  64. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  65. :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
  66. :total="deptBudgetTotal">
  67. </el-pagination>
  68. </div>
  69. </div>
  70. </template>
  71. <script>
  72. import {
  73. selectWarehouseSelf,
  74. getinspectList,
  75. } from '@/model/outboundManagement/index'
  76. export default {
  77. components: {},
  78. watch: {},
  79. data() {
  80. return {
  81. //分页
  82. currentPage: 1,
  83. pageSize: 10,
  84. deptCircularPage: {},
  85. deptBudgetTotal: 0,
  86. managementType: 3,
  87. searchKeyWord: '',
  88. taskTypeList: [],
  89. searchType: 0,
  90. warehouseName: '',
  91. inspect: [],
  92. warehouseList: [],
  93. cangid: '', //仓库id
  94. }
  95. },
  96. activated() {
  97. this.selectWarehouse()
  98. this.showType = this.isShow
  99. },
  100. methods: {
  101. returnsales(){
  102. this.$router.go(-1)
  103. },
  104. find() {
  105. this.getList()
  106. },
  107. print(row){
  108. window.open('../../../static/outInspectionPrint.html?type=2&dataList=' + JSON.stringify(row))
  109. },
  110. qualityInspection(row) {
  111. //查看
  112. this.$router.push({
  113. path: 'qualityInspection',
  114. query: {
  115. cangid: this.cangid,
  116. id: row.id,
  117. warehouseName: this.warehouseName,
  118. count: this.warehouseCount,
  119. warehouseNo: this.warehouseNo,
  120. contractNo: row.contractNo,
  121. binNumber: row.binNumber,
  122. carNumber: row.carNumber,
  123. storageTagNo: row.storageTagNo,
  124. goodsName: row.goodsName
  125. },
  126. })
  127. },
  128. selecttaskType(e) {
  129. for (let i = 0; i < this.warehouseList.length; i++) {
  130. if (this.warehouseList[i].value == e) {
  131. this.cangid = this.warehouseList[i].cangid
  132. }
  133. }
  134. this.getList()
  135. },
  136. handleSizeChange(val) {
  137. console.log(`每页 ${val} 条`)
  138. this.pageSize = val
  139. this.getList()
  140. },
  141. handleCurrentChange(val) {
  142. this.currentPage = val
  143. console.log(`当前页: ${val}`)
  144. this.getList()
  145. },
  146. selectWarehouse() {
  147. selectWarehouseSelf({
  148. compId: localStorage.getItem('ws-pf_compId'),
  149. })
  150. .toPromise()
  151. .then((response) => {
  152. this.warehouseList = []
  153. for (let i = 0; i < response.length; i++) {
  154. this.warehouseList.push({
  155. value: response[i].warehouseName,
  156. warehouseId: response[i].id,
  157. })
  158. }
  159. if(this.$route.query.warehouseName){
  160. this.warehouseName = this.$route.query.warehouseName
  161. }else{
  162. this.warehouseName = response[0].warehouseName
  163. }
  164. this.getList()
  165. })
  166. },
  167. getList() {
  168. getinspectList({
  169. compId: localStorage.getItem('ws-pf_compId'),
  170. currentPage: this.currentPage,
  171. pageSize: this.pageSize,
  172. searchKeyWord: this.searchKeyWord,
  173. warehouseName: this.warehouseName,
  174. managementType: this.managementType,
  175. })
  176. .toPromise()
  177. .then((response) => {
  178. this.inspect = response.records
  179. this.deptBudgetTotal = response.total
  180. })
  181. },
  182. },
  183. }
  184. </script>
  185. <style lang="scss" scoped>
  186. // .title {
  187. // font-size: 20px;
  188. // font-weight: 600;
  189. // margin: 20px 0 0 20px;
  190. // }
  191. .tit {
  192. font-size: 16px;
  193. font-weight: 600;
  194. margin: 20px;
  195. }
  196. .ws-info-table {
  197. border: none;
  198. }
  199. .ws-info-table .el-form-item {
  200. width: 50%;
  201. border: none;
  202. }
  203. /deep/.ws-info-table .el-form-item .el-form-item__label {
  204. width: 30%;
  205. text-align: center;
  206. background: #ffffff;
  207. color: #8890b1;
  208. }
  209. /deep/.ws-info-table .el-form-item .el-form-item__content {
  210. border: none;
  211. }
  212. /deep/.el-table .el-table__header .cell,
  213. .el-table .el-table__body .cell {
  214. text-align: center;
  215. }
  216. /deep/.el-table--enable-row-transition .el-table__body td {
  217. text-align: center;
  218. }
  219. /deep/.base_header_layout .find.el-button--primary {
  220. width: 30px;
  221. border-top-left-radius: 0px;
  222. border-bottom-left-radius: 0px;
  223. }
  224. /deep/.base_header_layout .findinput input {
  225. border-top-right-radius: 0px;
  226. border-bottom-right-radius: 0px;
  227. }
  228. .toptitle {
  229. background: #f6f7fc;
  230. .bg-left {
  231. padding-left: 30px;
  232. }
  233. .bg-right {
  234. text-align: right;
  235. padding: 16px 20px;
  236. }
  237. .title {
  238. position: relative;
  239. }
  240. .title::before {
  241. content: '';
  242. display: inline-block;
  243. width: 5px;
  244. height: 30px;
  245. background: #5473e8;
  246. position: absolute;
  247. left: 0;
  248. }
  249. }
  250. </style>