outInspectRecord.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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;width:400px;' 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. statusType:'1'
  97. }
  98. },
  99. activated() {
  100. this.selectWarehouse()
  101. this.showType = this.isShow
  102. },
  103. methods: {
  104. returnsales(){
  105. this.$router.go(-1)
  106. },
  107. find() {
  108. this.getList()
  109. },
  110. print(row){
  111. window.open('../../../static/outInspectionPrint.html?type=2&dataList=' + JSON.stringify(row))
  112. },
  113. qualityInspection(row) {
  114. //查看
  115. this.$router.push({
  116. path: 'qualityInspection',
  117. query: {
  118. cangid: this.cangid,
  119. id: row.id,
  120. warehouseName: this.warehouseName,
  121. count: this.warehouseCount,
  122. warehouseNo: this.warehouseNo,
  123. contractNo: row.contractNo,
  124. binNumber: row.binNumber,
  125. carNumber: row.carNumber,
  126. storageTagNo: row.storageTagNo,
  127. goodsName: row.goodsName
  128. },
  129. })
  130. },
  131. selecttaskType(e) {
  132. for (let i = 0; i < this.warehouseList.length; i++) {
  133. if (this.warehouseList[i].value == e) {
  134. this.cangid = this.warehouseList[i].cangid
  135. }
  136. }
  137. this.getList()
  138. },
  139. handleSizeChange(val) {
  140. console.log(`每页 ${val} 条`)
  141. this.pageSize = val
  142. this.getList()
  143. },
  144. handleCurrentChange(val) {
  145. this.currentPage = val
  146. console.log(`当前页: ${val}`)
  147. this.getList()
  148. },
  149. selectWarehouse() {
  150. selectWarehouseSelf({
  151. compId: localStorage.getItem('ws-pf_compId'),
  152. })
  153. .toPromise()
  154. .then((response) => {
  155. this.warehouseList = []
  156. for (let i = 0; i < response.length; i++) {
  157. this.warehouseList.push({
  158. value: response[i].warehouseName,
  159. warehouseId: response[i].id,
  160. })
  161. }
  162. if(this.$route.query.warehouseName){
  163. this.warehouseName = this.$route.query.warehouseName
  164. }else{
  165. this.warehouseName = response[0].warehouseName
  166. }
  167. this.getList()
  168. })
  169. },
  170. getList() {
  171. getinspectList({
  172. compId: localStorage.getItem('ws-pf_compId'),
  173. currentPage: this.currentPage,
  174. pageSize: this.pageSize,
  175. searchKeyWord: this.searchKeyWord,
  176. // statusType:this.statusType,
  177. qualityType:"2",
  178. warehouseName: this.warehouseName,
  179. managementType: this.managementType,
  180. })
  181. .toPromise()
  182. .then((response) => {
  183. this.inspect = response.records
  184. this.deptBudgetTotal = response.total
  185. })
  186. },
  187. },
  188. }
  189. </script>
  190. <style lang="scss" scoped>
  191. // .title {
  192. // font-size: 20px;
  193. // font-weight: 600;
  194. // margin: 20px 0 0 20px;
  195. // }
  196. .tit {
  197. font-size: 16px;
  198. font-weight: 600;
  199. margin: 20px;
  200. }
  201. .ws-info-table {
  202. border: none;
  203. }
  204. .ws-info-table .el-form-item {
  205. width: 50%;
  206. border: none;
  207. }
  208. /deep/.ws-info-table .el-form-item .el-form-item__label {
  209. width: 30%;
  210. text-align: center;
  211. background: #ffffff;
  212. color: #8890b1;
  213. }
  214. /deep/.ws-info-table .el-form-item .el-form-item__content {
  215. border: none;
  216. }
  217. /deep/.el-table .el-table__header .cell,
  218. .el-table .el-table__body .cell {
  219. text-align: center;
  220. }
  221. /deep/.el-table--enable-row-transition .el-table__body td {
  222. text-align: center;
  223. }
  224. /deep/.base_header_layout .find.el-button--primary {
  225. width: 30px;
  226. border-top-left-radius: 0px;
  227. border-bottom-left-radius: 0px;
  228. }
  229. /deep/.base_header_layout .findinput input {
  230. border-top-right-radius: 0px;
  231. border-bottom-right-radius: 0px;
  232. }
  233. .toptitle {
  234. background: #f6f7fc;
  235. .bg-left {
  236. padding-left: 30px;
  237. }
  238. .bg-right {
  239. text-align: right;
  240. padding: 16px 20px;
  241. }
  242. .title {
  243. position: relative;
  244. }
  245. .title::before {
  246. content: '';
  247. display: inline-block;
  248. width: 5px;
  249. height: 30px;
  250. background: #5473e8;
  251. position: absolute;
  252. left: 0;
  253. }
  254. }
  255. </style>