liupopo 2 years ago
parent
commit
ab5deb6c5e
  1. 24
      supervise-customer-ui/src/router/modules/codemenu.js
  2. 217
      supervise-customer-ui/src/views/daydataupload/gdinventory/index.vue
  3. 2
      supervise-flowable-ui/.gitignore
  4. 8
      yxt-portal-ui/src/views/Home/Home.vue
  5. 6
      yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/YxtSuperviseDbcenterApplicationTests.java

24
supervise-customer-ui/src/router/modules/codemenu.js

@ -326,5 +326,29 @@ const codemenu = [{
noCache: true
}
}]
}, {
path: '/daydataupload',
component: Layout,
redirect: '/daydataupload/gdinventory',
meta: {
title: '当日数据上传'
},
children: [{
path: '/daydataupload/gdinventory',
component: () => import('@/views/daydataupload/gdinventory/index.vue'),
name: 'DaydatauploadGdinventory',
meta: {
title: '库存信息上传',
noCache: true
}
},{
path: '/purchaserequisition/listofcheck',
component: () => import('@/views/purchaserequisition/listofcheck/index.vue'),
name: 'purchaserequisitionlistofcheck',
meta: {
title: '采购申请',
noCache: true
}
}]
}]
export default codemenu

217
supervise-customer-ui/src/views/daydataupload/gdinventory/index.vue

@ -0,0 +1,217 @@
<template>
<div class="app-container">
<button-bar ref="btnbar" view-title="采购订单列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>导入库存信息查询</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="resetCache">缓存数据重置(监管商品仓店索引供应商索引)</el-button>
</div>
<div>
<el-upload
ref="upload"
class="upload-demo"
:action="updateAction"
:on-change="handleChange"
:on-progress="handleProgress"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-success="handleSuccess"
:file-list="fileList"
:auto-upload="false"
:multiple="false"
:limit="1"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
<div slot="tip" class="el-upload__tip">上传 库存信息查询.xlsx文件</div>
</el-upload>
</div>
<div>
<h3>文件上传结果</h3>
<el-card class="box-card">
<div>{{ uploadResultMesssage }}</div>
</el-card>
</div>
<div>
<h3>库存汇总数据</h3>
<el-card class="box-card">
<div>{{ hzResultMesssage }}</div>
<div>
<el-button :disabled="!hzFilePath" size="small" type="primary" @click="doDownloadHz">下载库存汇总文件</el-button>
<!-- <el-button :disabled="!ychzFilePath" size="small" type="primary" @click="doDownloadHzYc">下载烟草汇总文件</el-button> -->
</div>
</el-card>
</div>
</el-card>
</div>
</template>
<script>
import {
kchz,
resetAllCache
} from '@/api/kucun/kucun'
export default {
name: 'KucunKcxxcxIndex',
// components: { },
data() {
return {
btndisabled: false,
updateAction: process.env.VUE_APP_BASE_API + '/kucun/uploadGdData',
name: '库存数据导入',
fileList: [],
uploadResultMesssage: '',
hzResultMesssage: '',
hzFilePath: '',
ychzFilePath: '',
fullscreenloading: null
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
this.init()
//
// this.getList()
},
methods: {
btnHandle(btnKey) {
switch (btnKey) {
case 'toUploadXlsx':
this.toUploadXlsx()
break
case 'filing':
this.filing()
break
case 'doDel':
this.doDel()
break
default:
break
}
},
init() {},
getList() {},
//
handleReturn() {
this.$router.go(-1)
},
submitUpload() {
this.$refs.upload.submit()
},
handleRemove(file, fileList) {
console.log(file, fileList)
},
handlePreview(file) {
console.log('handlePreview', file)
},
handleChange(file) {
console.log(this.fileList)
},
handleProgress(event, file, fileList) {
// this.progressFlag = true; //
// this.loadProgress = parseInt(event.percent); //
// if (this.loadProgress >= 100) {
// this.loadProgress = 100
// setTimeout( () => {this.progressFlag = false}, 1000) //
// }
const _this = this
this.fullscreenloading = this.$loading({
lock: true,
text: '文件正在上传',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
console.log('111', event.percent)
if (event.percent >= 100) {
_this.fullscreenloading.text = '上传完成,正在导入数据库'
}
},
handleSuccess(resp, file, fileList) {
// if (this.fullscreenloading) this.fullscreenloading.close()
// this.fullscreenloading = null
console.log('222', resp)
const rdata = resp.data
const _this = this
_this.fullscreenloading.text = '数据导入完成,进行汇总'
_this.uploadResultMesssage = '共导入数据:' + rdata.allNum + ' 条;符合监管条件的数据:' + rdata.validNum + ' 条;用时:' + rdata.durations + ' 毫秒。'
kchz()
.then(res => {
if (this.fullscreenloading) this.fullscreenloading.close()
this.fullscreenloading = null
console.log('333', res)
_this.hzFilePath = res.data
})
.catch(e => {
if (this.fullscreenloading) this.fullscreenloading.close()
this.fullscreenloading = null
})
// kchzyc()
// .then(res => {
// if (this.fullscreenloading) this.fullscreenloading.close()
// this.fullscreenloading = null
// console.log('444', res)
// _this.ychzFilePath = res.data
// })
// .catch(e => {
// if (this.fullscreenloading) this.fullscreenloading.close()
// this.fullscreenloading = null
// })
},
doDownloadHz() {
window.open(this.hzFilePath, '_blank')
// downloadhz({ filepath: this.hzFilePath })
// .then(res => {
// console.log('xxx', res)
// const blob = new Blob([res.data])
// const url = window.URL.createObjectURL(blob) // url blob
// const a = document.createElement('a')
// a.href = url
// a.download = '.xlsx'
// a.click()
// window.URL.revokeObjectURL(url) // ur
// })
// .catch(e => {
// console.log(e)
// })
},
doDownloadHzYc() {
window.open(this.ychzFilePath, '_blank')
},
resetCache() {
resetAllCache()
.then(res => {
this.$message({
message: '缓存数据已重置!',
type: 'success'
})
})
.catch(e => {
console.log('resetAllCache', e)
})
}
}
}
</script>
<style scoped>
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>

2
supervise-flowable-ui/.gitignore

@ -21,3 +21,5 @@ selenium-debug.log
package-lock.json
yarn.lock
flowable-ui/

8
yxt-portal-ui/src/views/Home/Home.vue

@ -436,8 +436,8 @@
if (index === 10) {
window.open('/#/index', '_blank')
} else if (index === 0) {
window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank')
// window.open('http://jianguan.yyundong.com/customer/#/' + '?token=' + getStorage(), '_blank')
// window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/customer/#/' + '?token=' + getStorage(), '_blank')
} else if (index === 1) {
// window.open('http://192.168.3.8:9531#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/report/#/' + '?token=' + getStorage(), '_blank')
@ -455,8 +455,8 @@
// window.open('http://192.168.3.8:9531/#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/organizational/#/' + '?token=' + getStorage(), '_blank')
} else if (index === 8) {
window.open('http://192.168.3.8:9531/#/' + '?token=' + getStorage(), '_blank')
// window.open('http://jianguan.yyundong.com/crm/#/' + '?token=' + getStorage(), '_blank')
// window.open('http://192.168.3.8:9531/#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/crm/#/' + '?token=' + getStorage(), '_blank')
} else if (index === 9) {
// window.open('http://192.168.3.8:9532/#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/warehouse/#/' + '?token=' + getStorage(), '_blank')

6
yxt-supervise-dbcenter/yxt-supervise-dbcenter-biz/src/test/java/com/yxt/supervise/dbcenter/YxtSuperviseDbcenterApplicationTests.java

@ -24,11 +24,11 @@ class YxtSuperviseDbcenterApplicationTests {
@Test
void contextLoads() {
String currDay = "2023-05-05";
String currDay = "2023-05-11";
crawlSalesAmountService.pullData(currDay);
// crawlSalesAmountService.pullData(currDay);
crawlSalesDishesService.pullData(currDay);
crawlPurchaseService.pullData(currDay);
// crawlPurchaseService.pullData(currDay);
}

Loading…
Cancel
Save