outInspectRecord.vue 8.1 KB

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