qualityInspectionManagement.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <!--质检管理-->
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="12">
  5. <template slot="right">
  6. <ws-select
  7. v-model="warehouseName"
  8. placeholder=""
  9. @change="selecttaskType"
  10. :value="searchType"
  11. >
  12. <ws-option
  13. v-for="item in warehouseList"
  14. :key="item.value"
  15. :label="item.value"
  16. :value="item.value"
  17. style="color: #8890b1"
  18. />
  19. </ws-select>
  20. <div></div>
  21. <ws-input
  22. v-model="searchKeyWord"
  23. placeholder="可按合同编号、车牌号查找"
  24. clearable
  25. maxlength="500"
  26. type="input"
  27. ></ws-input>
  28. <ws-button class="find" type="primary" @click="find()"
  29. ><img
  30. width="16"
  31. height="16"
  32. style="
  33. vertical-align: text-top;
  34. position: relative;
  35. top: 0px;
  36. left: -8px;
  37. "
  38. src="../../../public/img/sousuo.png"
  39. alt=""
  40. /></ws-button>
  41. </template>
  42. </BaseHeaderLayout>
  43. <el-table
  44. :data="inspect"
  45. style="width: 100%; margin-top: 20px"
  46. ref="inspect"
  47. border
  48. height="780"
  49. >
  50. <el-table-column type="index" label="序号" width="50">
  51. <template scope="scope">
  52. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  53. <span v-else>{{ scope.$index + 1 }}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column prop="contractNo" label="合同编号"></el-table-column>
  57. <el-table-column prop="carNumber" label="车牌号"></el-table-column>
  58. <el-table-column prop="goodsName" label="货名"></el-table-column>
  59. <el-table-column prop="bulkDensity" label="容重(克/升)"></el-table-column>
  60. <el-table-column prop="waterContent" label="水分(%)"></el-table-column>
  61. <el-table-column prop="binNumber" label="仓位号"></el-table-column>
  62. <el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
  63. <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
  64. <el-table-column prop="updateDate" label="质检时间"></el-table-column>
  65. <el-table-column prop="status" label="状态"></el-table-column>
  66. <el-table-column width="300" label="操作">
  67. <template slot-scope="scope">
  68. <span v-if="scope.row.status == '已质检'"><el-button @click="qualityInspection(scope.row, 2)">查看</el-button></span>
  69. <span v-if="scope.row.status == '已称皮重' || scope.row.status == '' || scope.row.status == null"><el-button @click="qualityInspection(scope.row, 1)">质检</el-button></span>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. <div style="text-align: center">
  74. <el-pagination
  75. @size-change="handleSizeChange"
  76. @current-change="handleCurrentChange"
  77. :current-page="currentPage"
  78. :page-size="deptCircularPage.pageSize"
  79. layout="total, sizes, prev, pager, next, jumper"
  80. :total="deptBudgetTotal"
  81. >
  82. </el-pagination>
  83. </div>
  84. </div>
  85. </template>
  86. <script>
  87. import {
  88. selectWarehouseSelf,
  89. getinspectList,
  90. } from '@/model/outboundManagement/index'
  91. export default {
  92. components: {},
  93. watch: {},
  94. data() {
  95. return {
  96. //分页
  97. currentPage: 1,
  98. pageSize: 10,
  99. deptCircularPage: {},
  100. deptBudgetTotal: 0,
  101. searchKeyWord: '',
  102. taskTypeList: [],
  103. searchType: 0,
  104. warehouseName: '',
  105. inspect: [],
  106. warehouseList: [],
  107. cangid: '', //仓库id
  108. }
  109. },
  110. activated() {
  111. this.getList()
  112. },
  113. methods: {
  114. find(){
  115. this.getList()
  116. },
  117. qualityInspection(row, index) {
  118. //添加/查看
  119. console.log(row.id, 'id值')
  120. this.$router.push({
  121. path: 'qualityInspection',
  122. query: { type: index, cangid: this.cangid, id: row.id ,warehouseName:this.warehouseName,count:this.warehouseCount,
  123. warehouseNo:this.warehouseNo,contractNo:row.contractNo,binNumber:row.binNumber,carNumber:row.carNumber,
  124. storageTagNo:row.storageTagNo,goodsName:row.goodsName},
  125. })
  126. },
  127. selecttaskType(e) {
  128. console.log(e)
  129. },
  130. handleSizeChange(val) {
  131. console.log(`每页 ${val} 条`)
  132. this.pageSize = val
  133. this.getList()
  134. },
  135. handleCurrentChange(val) {
  136. this.currentPage = val
  137. console.log(`当前页: ${val}`)
  138. this.getList()
  139. },
  140. getList() {
  141. selectWarehouseSelf({
  142. compId: sessionStorage.getItem('ws-pf_compId'),
  143. personCharge: sessionStorage.getItem('ws-pf_staffName'),
  144. })
  145. .toPromise()
  146. .then((response) => {
  147. this.warehouseList = []
  148. for (let i = 0; i < response.length; i++) {
  149. this.warehouseList.push({
  150. // valueKey: i,
  151. value: response[i].warehouseName,
  152. id: response[i].id,
  153. })
  154. }
  155. this.warehouseName = response[0].warehouseName
  156. this.cangid = response[0].id
  157. })
  158. getinspectList({
  159. compId: sessionStorage.getItem('ws-pf_compId'),
  160. currentPage: this.currentPage,
  161. pageSize: this.pageSize,
  162. searchKeyWord: this.searchKeyWord,
  163. warehouseName: this.warehouseName,
  164. })
  165. .toPromise()
  166. .then((response) => {
  167. // for (let i = 0; i < response.length; i++) {
  168. // this.warehouseList.push({
  169. // valueKey: i,
  170. // value: response[i].warehouseName,
  171. // id:response[i].id
  172. // })
  173. // }
  174. // this.searchTypeText = response[0].warehouseName
  175. // this.id = response[0].id
  176. // console.log(response)
  177. this.inspect = response.records
  178. console.log(this.inspect,'容重')
  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. </style>