Compare commits

..

No commits in common. "49970b5d8d1af27c2fc4656168334161ccd3d356" and "bbac7b8a330aca8627561a6ed2c8d78d9410d165" have entirely different histories.

5 changed files with 9 additions and 72 deletions

View File

@ -32,17 +32,6 @@ const getStockUpdateRecord = (params) => {
})
}
const downloadStockUpdateRecordExcel = (data) => {
return request({
url: '/excel/downloadStockUpdateRecordExcel',
method: 'post',
responseType: 'blob',
data: data,
timeout: 600000
})
}
const handleExceptionStock = (params) => {
return request({
url: '/stock/handleExceptionStock',
@ -56,6 +45,5 @@ export {
updateStockInfo,
getStockNumByGoodsId,
getStockUpdateRecord,
handleExceptionStock,
downloadStockUpdateRecordExcel
handleExceptionStock
}

View File

@ -2,11 +2,11 @@ import axios from 'axios'
const request = axios.create({
baseURL: 'https://csclasrs.ecorp.cat.com/wmsServer/wms',
timeout: 10000
timeout: 5000
})
// axios.defaults.baseURL = 'http://10.90.36.70:443/wmsServer/wms'
//axios.defaults.baseURL = 'http://localhost:12315/wms'
// axios.defaults.baseURL = 'http://localhost:12315/wms'
// axios.defaults.baseURL = 'https://csclasrs.ecorp.cat.com/wmsServer/wms'
// // request 请求器

View File

@ -9,16 +9,11 @@
:suffix-icon="Search" />
<el-select-v2 v-model="reasonQuery" style="width: 158px; margin-right: 10px;"
placeholder="请选择更新原因" :options="reasonOptions" @change="search()"></el-select-v2>
<el-date-picker v-model="updateTimeQuery" type="date" placeholder="起始完成日期" :shortcuts="shortcuts"
<el-date-picker v-model="updateTimeQuery" type="date" placeholder="选择完成日期" :shortcuts="shortcuts"
style="width: 158px; margin-right: 10px;" clearable />
<el-date-picker v-model="updateEndTimeQuery" type="date" placeholder="完成结束日期" :shortcuts="shortcuts"
style="width: 158px; margin-right: 10px;" clearable />
<el-button type="primary" @click="search()">搜索</el-button>
<el-button type="warning" @click="reset()">重置</el-button>
</el-row>
<el-row>
<el-button style="background-color: #32CD32; color: #000;" @click="exportExcel">导出</el-button>
</el-row>
</div>
<br />
<el-table :data="recordList" stripe border v-loading="loading" class="table-class" highlight-current-row
@ -55,14 +50,12 @@
<script setup>
import store from '@/store'
import { getStockUpdateRecord } from '@/api/stock.js'
import { errorBox } from '@/utils/myMessageBox.js'
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
import { Search } from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
</script>
<script>
import {downloadStockUpdateRecordExcel} from "@/api/stock";
import {errorBox} from "@/utils/myMessageBox";
export default {
name: 'stockUpdateRecord',
data() {
@ -75,7 +68,6 @@ export default {
goodsIdQuery: '',
reasonQuery: '',
updateTimeQuery: null,
updateEndTimeQuery: null,
shortcuts: [
{
text: '今天',
@ -153,7 +145,6 @@ export default {
goodsId: this.goodsIdQuery.trim(),
reason: this.reasonQuery.trim(),
updateTime: timeFormatter(this.updateTimeQuery),
updateEndTime: timeFormatter(this.updateEndTimeQuery),
userName: store.getters.getUserName
}
getStockUpdateRecord(request).then(res => {
@ -170,43 +161,6 @@ export default {
})
this.loading = false
},
exportExcel() {
const request = {
pageNo: this.currentPage,
pageSize: this.pageSize,
vehicleId: this.vehicleIdQuery.trim(),
goodsId: this.goodsIdQuery.trim(),
reason: this.reasonQuery.trim(),
updateTime: timeFormatter(this.updateTimeQuery),
updateEndTime: timeFormatter(this.updateEndTimeQuery),
userName: store.getters.getUserName
}
downloadStockUpdateRecordExcel(request).then(res => {
const link = document.createElement('a');//a
try {
// let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'}); //blobblobtypexls
let blob = res.data //blob
// let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //
let _fileName = "库存更新记录" + dateFormatter(new Date) + ".xlsx"
link.style.display = 'none'//
// URL
const url = window.URL || window.webkitURL || window.moxURL
link.href = url.createObjectURL(blob)
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
url.revokeObjectURL(link.href)//url
} catch (e) {
console.log(e)
errorBox('下载文件失败')
}
}).catch(err => {
console.log(err)
errorBox('导出失败')
})
},
timeFormat: (row, column, cellValue, index) => {
return timeFormatter(cellValue)
},

View File

@ -11,10 +11,8 @@
:suffix-icon="Search" />
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
:suffix-icon="Search" />
<el-date-picker v-model="workDateQuery" type="date" placeholder="工作起始日期" :shortcuts="shortcuts"
<el-date-picker v-model="workDateQuery" type="date" placeholder="选择工作日期" :shortcuts="shortcuts"
style="width: 158px; margin-right: 10px;" clearable />
<el-date-picker v-model="workEndDateQuery" type="date" placeholder="工作结束日期" :shortcuts="shortcuts"
style="width: 158px; margin-right: 10px;" clearable />
<el-select-v2 v-model="lackStatusQuery" style="width: 158px; margin-right: 10px;"
placeholder="请选择缺料状态" :options="lackStatusOptions" @change="search()"></el-select-v2>
<el-button type="primary" @click="search()">搜索</el-button>
@ -83,7 +81,6 @@ export default {
goodsIdQuery: '',
standIdQuery: '',
workDateQuery: null,
workEndDateQuery: null,
shortcuts: [
{
text: '今天',
@ -132,7 +129,6 @@ export default {
goodsId: this.goodsIdQuery.trim(),
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
workDate: timeFormatter(this.workDateQuery),
workEndDate: timeFormatter(this.workEndDateQuery),
userName: store.getters.getUserName
}
getWorkSummary(request).then(res => {
@ -196,7 +192,6 @@ export default {
goodsId: this.goodsIdQuery.trim(),
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
workDate: timeFormatter(this.workDateQuery),
workEndDate: timeFormatter(this.workEndDateQuery),
userName: store.getters.getUserName
}
downloadWorkSummaryExcel(request).then(res => {

View File

@ -5,9 +5,9 @@
<el-form-item>
<el-input type="text" v-model="loginForm.loginAccount" auto-complete="off" placeholder="账号"></el-input>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-input type="password" v-model="loginForm.loginPassword" auto-complete="off" placeholder="密码"></el-input>
</el-form-item>
</el-form-item> -->
<el-form-item style="width: 100%">
<el-button type="primary" style="width: 100%; border: none" @click="login">登录</el-button>
</el-form-item>
@ -70,7 +70,7 @@ const login = () => {
text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)',
})
loginWithAuth(loginForm).then(res => {
loginWithoutAuth(loginForm).then(res => {
loading.close()
if (res.data.code == 0) {
store.commit('mutationUser', res.data.returnData.user)//