123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <template>
- <div class="oYeInbound">
- <div class="search">
- <el-form :inline="true">
- <el-form-item>
- <el-date-picker
- v-model="startTime"
- type="datetime"
- placeholder="入库时间"
- style="width: 180px;"
- value-format="timestamp"
- >
- </el-date-picker>
- <span>至</span>
- <el-date-picker
- v-model="endTime"
- type="datetime"
- placeholder="入库时间"
- style="width: 180px;"
- value-format="timestamp"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model="screen"
- placeholder="选择条件"
- style="width:180px"
- clearable
- >
- <el-option
- v-for="(item, index) in selectOptions"
- :label="item.label"
- :key="index"
- :value="item.value"
- ></el-option>
- </el-select>
- <el-input v-model="con" style="width:200px" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model="screen1"
- placeholder="选择条件"
- style="width:180px"
- clearable
- >
- <el-option
- v-for="(item, index) in selectOptions"
- :label="item.label"
- :key="index"
- :value="item.value"
- ></el-option>
- </el-select>
- <el-input v-model="con1" style="width:200px" clearable></el-input>
- </el-form-item>
- <el-button type="primary" @click="search">查询</el-button>
- <el-form-item></el-form-item>
- </el-form>
- </div>
- <div class="table">
- <dilTable
- v-bind.sync="options"
- :showSummaryList="showSummaryList"
- :isshowSummary="true"
- :showIndex="false"
- :row-style="{ height: '35px' }"
- :cell-style="returnClassName"
- ></dilTable>
- </div>
- </div>
- </template>
- <script>
- import { getCookie, formatDate } from '@/utils/util.js'
- export default {
- data() {
- const generateStartDate = _ => {
- let startDate = new Date()
- let startDateStr = formatDate(startDate, 'yyyy-MM-dd')
- let startTimeStr = startDateStr + ' 00:00:00'
- let startTime = new Date(startTimeStr)
- return startTime.getTime()
- }
- const generateEndDate = _ => {
- let endDate = new Date()
- let endDateStr = formatDate(endDate, 'yyyy-MM-dd')
- let endTimeStr = endDateStr + ' 23:59:59'
- let endTime = new Date(endTimeStr)
- return endTime.getTime()
- }
- return {
- options: {
- requestUrl: '',
- requestQuery: {}
- },
- selectOptions: [
- {
- value: 'consigneeName',
- label: '客户'
- },
- {
- value: 'capacityNumber',
- label: '车牌号'
- },
- {
- value: 'saleArea',
- label: '片区'
- },
- {
- value: 'inboundArea',
- label: '仓库大类'
- },
- {
- value: 'inboundWarehouse',
- label: '具体仓库'
- },
- {
- value: 'materialName',
- label: '物资名称'
- },
- {
- value: 'materialSpe',
- label: '规格'
- }
- ],
- con: '',
- con1: '',
- screen: '',
- screen1: '',
- startTime: generateStartDate(),
- endTime: generateEndDate(),
- apiId: '529',
- orgCode: null,
- loginName: null,
- inboundWarehouse: null,
- showSummaryList: [
- 'materialNumber',
- 'netWeight',
- 'theoryWeight',
- 'orderNetWeight'
- ]
- }
- },
- created() {
- this.getInfo()
- this.getRequestUrl()
- },
- methods: {
- returnClassName({ row, column, rowIndex, columnIndex }) {
- return {
- fontWeight: '500 !important',
- fontSize: '14px !important'
- // backgroundColor: '#FFFF01'
- }
- },
- getInfo() {
- this.orgCode = getCookie('orgCode')
- if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
- this.apiId = 537
- this.loginName = getCookie('loginName')
- } else if (this.orgCode == 'ouyechangwaiku') {
- this.apiId = 529
- this.loginName = null
- console.log(getCookie('loginName'), 'loginName')
- this.inboundWarehouse = getCookie('loginName')
- } else {
- this.apiId = 529
- this.loginName = null
- }
- },
- getRequestUrl() {
- this.options.requestUrl =
- '/api/v1/wms/getOyeInboundResult?apiId=' +
- this.apiId +
- '&con=' +
- this.con +
- '&i=' +
- new Date() +
- '&startTime=' +
- this.startTime +
- '&endTime=' +
- this.endTime
- let queryMap = {}
- queryMap[this.screen] = this.con
- queryMap[this.screen1] = this.con1
- if (this.loginName != null) {
- queryMap['consigneeName'] = this.loginName
- }
- this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
- },
- search() {
- this.getRequestUrl()
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .oYeInbound {
- .search {
- margin-left: 10px;
- margin-top: 10px;
- }
- .table {
- margin-left: 10px;
- margin-top: 10px;
- }
- /deep/ .el-table__footer-wrapper {
- font-weight: 700 !important;
- font-size: 16px !important;
- }
- }
- </style>
|