oYeInbound.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <div class="oYeInbound">
  3. <div class="search">
  4. <el-form :inline="true">
  5. <el-form-item>
  6. <el-date-picker
  7. v-model="startTime"
  8. type="datetime"
  9. placeholder="入库时间"
  10. style="width: 180px;"
  11. value-format="timestamp"
  12. >
  13. </el-date-picker>
  14. <span>至</span>
  15. <el-date-picker
  16. v-model="endTime"
  17. type="datetime"
  18. placeholder="入库时间"
  19. style="width: 180px;"
  20. value-format="timestamp"
  21. >
  22. </el-date-picker>
  23. </el-form-item>
  24. <el-form-item>
  25. <el-select
  26. v-model="screen"
  27. placeholder="选择条件"
  28. style="width:180px"
  29. clearable
  30. >
  31. <el-option
  32. v-for="(item, index) in selectOptions"
  33. :label="item.label"
  34. :key="index"
  35. :value="item.value"
  36. ></el-option>
  37. </el-select>
  38. <el-input v-model="con" style="width:200px" clearable></el-input>
  39. </el-form-item>
  40. <el-form-item>
  41. <el-select
  42. v-model="screen1"
  43. placeholder="选择条件"
  44. style="width:180px"
  45. clearable
  46. >
  47. <el-option
  48. v-for="(item, index) in selectOptions"
  49. :label="item.label"
  50. :key="index"
  51. :value="item.value"
  52. ></el-option>
  53. </el-select>
  54. <el-input v-model="con1" style="width:200px" clearable></el-input>
  55. </el-form-item>
  56. <el-button type="primary" @click="search">查询</el-button>
  57. <el-form-item></el-form-item>
  58. </el-form>
  59. </div>
  60. <div class="table">
  61. <dilTable
  62. v-bind.sync="options"
  63. :showSummaryList="showSummaryList"
  64. :isshowSummary="true"
  65. :showIndex="false"
  66. :row-style="{ height: '35px' }"
  67. :cell-style="returnClassName"
  68. ></dilTable>
  69. </div>
  70. </div>
  71. </template>
  72. <script>
  73. import { getCookie, formatDate } from '@/utils/util.js'
  74. export default {
  75. data() {
  76. const generateStartDate = _ => {
  77. let startDate = new Date()
  78. let startDateStr = formatDate(startDate, 'yyyy-MM-dd')
  79. let startTimeStr = startDateStr + ' 00:00:00'
  80. let startTime = new Date(startTimeStr)
  81. return startTime.getTime()
  82. }
  83. const generateEndDate = _ => {
  84. let endDate = new Date()
  85. let endDateStr = formatDate(endDate, 'yyyy-MM-dd')
  86. let endTimeStr = endDateStr + ' 23:59:59'
  87. let endTime = new Date(endTimeStr)
  88. return endTime.getTime()
  89. }
  90. return {
  91. options: {
  92. requestUrl: '',
  93. requestQuery: {}
  94. },
  95. selectOptions: [
  96. {
  97. value: 'consigneeName',
  98. label: '客户'
  99. },
  100. {
  101. value: 'capacityNumber',
  102. label: '车牌号'
  103. },
  104. {
  105. value: 'saleArea',
  106. label: '片区'
  107. },
  108. {
  109. value: 'inboundArea',
  110. label: '仓库大类'
  111. },
  112. {
  113. value: 'inboundWarehouse',
  114. label: '具体仓库'
  115. },
  116. {
  117. value: 'materialName',
  118. label: '物资名称'
  119. },
  120. {
  121. value: 'materialSpe',
  122. label: '规格'
  123. }
  124. ],
  125. con: '',
  126. con1: '',
  127. screen: '',
  128. screen1: '',
  129. startTime: generateStartDate(),
  130. endTime: generateEndDate(),
  131. apiId: '529',
  132. orgCode: null,
  133. loginName: null,
  134. inboundWarehouse: null,
  135. showSummaryList: [
  136. 'materialNumber',
  137. 'netWeight',
  138. 'theoryWeight',
  139. 'orderNetWeight'
  140. ]
  141. }
  142. },
  143. created() {
  144. this.getInfo()
  145. this.getRequestUrl()
  146. },
  147. methods: {
  148. returnClassName({ row, column, rowIndex, columnIndex }) {
  149. return {
  150. fontWeight: '500 !important',
  151. fontSize: '14px !important'
  152. // backgroundColor: '#FFFF01'
  153. }
  154. },
  155. getInfo() {
  156. this.orgCode = getCookie('orgCode')
  157. if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
  158. this.apiId = 537
  159. this.loginName = getCookie('loginName')
  160. } else if (this.orgCode == 'ouyechangwaiku') {
  161. this.apiId = 529
  162. this.loginName = null
  163. console.log(getCookie('loginName'), 'loginName')
  164. this.inboundWarehouse = getCookie('loginName')
  165. } else {
  166. this.apiId = 529
  167. this.loginName = null
  168. }
  169. },
  170. getRequestUrl() {
  171. this.options.requestUrl =
  172. '/api/v1/wms/getOyeInboundResult?apiId=' +
  173. this.apiId +
  174. '&con=' +
  175. this.con +
  176. '&i=' +
  177. new Date() +
  178. '&startTime=' +
  179. this.startTime +
  180. '&endTime=' +
  181. this.endTime
  182. let queryMap = {}
  183. queryMap[this.screen] = this.con
  184. queryMap[this.screen1] = this.con1
  185. if (this.loginName != null) {
  186. queryMap['consigneeName'] = this.loginName
  187. }
  188. this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
  189. },
  190. search() {
  191. this.getRequestUrl()
  192. }
  193. }
  194. }
  195. </script>
  196. <style lang="scss" scoped>
  197. .oYeInbound {
  198. .search {
  199. margin-left: 10px;
  200. margin-top: 10px;
  201. }
  202. .table {
  203. margin-left: 10px;
  204. margin-top: 10px;
  205. }
  206. /deep/ .el-table__footer-wrapper {
  207. font-weight: 700 !important;
  208. font-size: 16px !important;
  209. }
  210. }
  211. </style>