Commit 9d78a185 by huangqy

教学模拟

parent 4b50705c
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<script> <script>
window._CONFIG = {}; window._CONFIG = {};
window._CONFIG['publicURL'] = 'http://192.168.3.123:10026'; window._CONFIG['publicURL'] = 'http://192.168.3.130:10026';
window._CONFIG['domianURL'] = 'http://192.168.3.123:10026/JX'; window._CONFIG['domianURL'] = 'http://192.168.3.130:10026/JX';
window._CONFIG['screenFull'] = 'http://127.0.0.1:9602' window._CONFIG['screenFull'] = 'http://127.0.0.1:9602';
window._CONFIG['wsUrl'] = 'ws://127.0.0.1:8081';
</script> </script>
<style> <style>
.el-card {overflow-y: auto;} .el-card {overflow-y: auto;}
......
...@@ -59,7 +59,10 @@ import { ...@@ -59,7 +59,10 @@ import {
Descriptions, Descriptions,
DescriptionsItem, DescriptionsItem,
TimeSelect, TimeSelect,
Calendar Calendar,
Carousel,
CarouselItem,
Image
} from 'element-ui' } from 'element-ui'
// import element from 'element-ui' // import element from 'element-ui'
Vue.use(Step) Vue.use(Step)
...@@ -119,6 +122,9 @@ Vue.use(DescriptionsItem) ...@@ -119,6 +122,9 @@ Vue.use(DescriptionsItem)
Vue.use(TimeSelect) Vue.use(TimeSelect)
Vue.use(Loading) Vue.use(Loading)
Vue.use(Calendar) Vue.use(Calendar)
Vue.use(Carousel)
Vue.use(CarouselItem)
Vue.use(Image)
// 绑定方法到Vue全局为所有vue实例添加方法 // 绑定方法到Vue全局为所有vue实例添加方法
// 弹出对话框 // 弹出对话框
// import Element from 'element-ui'; // import Element from 'element-ui';
......
...@@ -28,5 +28,11 @@ const statistics = [ ...@@ -28,5 +28,11 @@ const statistics = [
name: 'statistics/goods', name: 'statistics/goods',
component: () => import(/* webpackChunkName: "index/statistics/goods" */ '@/statistics/goods') component: () => import(/* webpackChunkName: "index/statistics/goods" */ '@/statistics/goods')
}, },
{
// 统计分析 - 物资分布统计
path: prefix +'/statistics/shelfModel',
name: 'statistics/shelfModel',
component: () => import(/* webpackChunkName: "index/statistics/goods" */ '@/statistics/shelfModel')
},
] ]
export default statistics export default statistics
...@@ -43,6 +43,13 @@ ...@@ -43,6 +43,13 @@
同步数据 同步数据
</a-button> </a-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-upload :action=filePath :multiple="false" :show-file-list="false" :file-list="fileList"
v-loading.fullscreen.lock="fullscreenLoading"
:http-request="uploadFilesCustomRequest" :limit="1">
<a-button ghost icon="upload" type="primary">单位导入</a-button>
</el-upload>
</el-form-item>
</el-row> </el-row>
</el-form> </el-form>
...@@ -74,6 +81,8 @@ ...@@ -74,6 +81,8 @@
export default { export default {
data () { data () {
return { return {
filePath: window._CONFIG['domianURL'] + '/offline/upload',
fileList: [],
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
// 同步遮罩层 // 同步遮罩层
fullscreenLoading: false, fullscreenLoading: false,
...@@ -108,6 +117,25 @@ export default { ...@@ -108,6 +117,25 @@ export default {
this.total = res.data.totalRows - 0 this.total = res.data.totalRows - 0
this.companyData = res.data.records this.companyData = res.data.records
}, },
// 文件上传
async uploadFilesCustomRequest(file) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
formData.append('file', file.file)
formData.append('storeList', this.storeCodeList)
const { data: res } = await this.$axios.post(this.filePath, formData)
loading.close()
if (res.code !== 99200) return this.$message.error(res.message)
this.$message.success(res.message)
this.fileList = []
this.selectList = []
this.getCompanyData()
},
// 重置 // 重置
resClick () { resClick () {
this.searchData = { this.searchData = {
......
...@@ -45,6 +45,13 @@ ...@@ -45,6 +45,13 @@
数据同步 数据同步
</a-button> </a-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-upload :action=filePath :multiple="false" :show-file-list="false" :file-list="fileList"
v-loading.fullscreen.lock="fullscreenLoading"
:http-request="uploadFilesCustomRequest" :limit="1">
<a-button ghost icon="upload" type="primary">物资导入</a-button>
</el-upload>
</el-form-item>
</el-row> </el-row>
</el-form> </el-form>
...@@ -94,6 +101,8 @@ export default { ...@@ -94,6 +101,8 @@ export default {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
// 同步遮罩层 // 同步遮罩层
fullscreenLoading: false, fullscreenLoading: false,
filePath: window._CONFIG['domianURL'] + '/offline/upload',
fileList: [],
goodsData: [], goodsData: [],
// 筛选数据 // 筛选数据
searchData: { searchData: {
...@@ -134,6 +143,25 @@ export default { ...@@ -134,6 +143,25 @@ export default {
} }
this.getGoodsData() this.getGoodsData()
}, },
// 文件上传
async uploadFilesCustomRequest(file) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
formData.append('file', file.file)
formData.append('storeList', this.storeCodeList)
const { data: res } = await this.$axios.post(this.filePath, formData)
loading.close()
if (res.code !== 99200) return this.$message.error(res.message)
this.$message.success(res.message)
this.fileList = []
this.selectList = []
this.getGoodsData()
},
// 同步数据 // 同步数据
async synClick () { async synClick () {
......
...@@ -49,6 +49,14 @@ ...@@ -49,6 +49,14 @@
同步库房 同步库房
</a-button> </a-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-upload :action=filePath :multiple="false" :show-file-list="false" :file-list="fileList"
v-loading.fullscreen.lock="fullscreenLoading"
:http-request="uploadFilesCustomRequest" :limit="1">
<a-button ghost icon="upload" type="primary">库房导入</a-button>
</el-upload>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
...@@ -244,7 +252,11 @@ export default { ...@@ -244,7 +252,11 @@ export default {
cb(new Error('只能为英文数字和下划线组成')) cb(new Error('只能为英文数字和下划线组成'))
} }
return { return {
filePath: window._CONFIG['domianURL'] + '/offline/upload',
fileList: [],
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
// 同步遮罩层
fullscreenLoading: false,
storeCode: '', storeCode: '',
storeDefCode: '', storeDefCode: '',
// roomsData: '', // roomsData: '',
...@@ -319,6 +331,25 @@ export default { ...@@ -319,6 +331,25 @@ export default {
onEnterPress() { onEnterPress() {
this.getRoomData() this.getRoomData()
}, },
// 文件上传
async uploadFilesCustomRequest(file) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
formData.append('file', file.file)
formData.append('storeList', this.storeCodeList)
const { data: res } = await this.$axios.post(this.filePath, formData)
loading.close()
if (res.code !== 99200) return this.$message.error(res.message)
this.$message.success(res.message)
this.fileList = []
this.selectList = []
this.getRoomData()
},
async syncData () { async syncData () {
this.loadingFlag = true this.loadingFlag = true
const { data: res } = await this.$axios.get('/async/store') const { data: res } = await this.$axios.get('/async/store')
......
...@@ -62,6 +62,14 @@ ...@@ -62,6 +62,14 @@
</a-button> </a-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-upload :action=filePath :multiple="false" :show-file-list="false" :file-list="fileList"
v-loading.fullscreen.lock="fullscreenLoading"
:http-request="uploadFilesCustomRequest" :limit="1">
<a-button ghost icon="upload" type="primary">单据导入</a-button>
</el-upload>
</el-form-item>
<el-form-item> <el-form-item>
<!-- <a-icon type="audit" /> --> <!-- <a-icon type="audit" /> -->
<a-button ghost type="primary" icon="audit" @click="confimClick()"> <a-button ghost type="primary" icon="audit" @click="confimClick()">
...@@ -81,6 +89,11 @@ ...@@ -81,6 +89,11 @@
</a-button> </a-button>
<!-- <el-button type="success" size="medium" @click="serchClick()">接收</el-button> --> <!-- <el-button type="success" size="medium" @click="serchClick()">接收</el-button> -->
</el-form-item> </el-form-item>
<el-form-item>
<a-button ghost type="primary" icon="download" @click="exportData()">
单据导出
</a-button>
</el-form-item>
<el-form-item> <el-form-item>
<a-button ghost type="danger" icon="delete" v-if="activeAllData.state == 'T'" @click="deleteData()"> <a-button ghost type="danger" icon="delete" v-if="activeAllData.state == 'T'" @click="deleteData()">
删除 删除
...@@ -94,7 +107,10 @@ ...@@ -94,7 +107,10 @@
<el-col :span="14"> <el-col :span="14">
<!-- 主表 --> <!-- 主表 -->
<el-card :style="'height: ' + (height -200)*0.5 + 'px;position:relative;'"> <el-card :style="'height: ' + (height -200)*0.5 + 'px;position:relative;'">
<el-table :data="allData" style="width: 100%;overflow:auto" :height="(height -200)*0.5*0.77" size="medium" highlight-current-row @row-click="getgoodsData" ref="allTableRef"> <el-table :data="allData" style="width: 100%;overflow:auto" :height="(height -200)*0.5*0.77" size="medium" highlight-current-row
@selection-change="handleSelectionChange"
@row-click="getgoodsData" ref="allTableRef">
<el-table-column type="selection" width="15"/>
<el-table-column prop="billId" label="凭证号" align="center" /> <el-table-column prop="billId" label="凭证号" align="center" />
<el-table-column prop="name" label="凭证字" align="center" /> <el-table-column prop="name" label="凭证字" align="center" />
<el-table-column prop="glOrgName" label="管理单位" align="center" /> <el-table-column prop="glOrgName" label="管理单位" align="center" />
...@@ -209,6 +225,10 @@ export default { ...@@ -209,6 +225,10 @@ export default {
data () { data () {
return { return {
height: document.documentElement.clientHeight - 176, height: document.documentElement.clientHeight - 176,
filePath: window._CONFIG['domianURL'] + '/offline/upload',
fileList: [],
// 同步遮罩层
fullscreenLoading: false,
// 弹出框控制 // 弹出框控制
dialogVisible: false, dialogVisible: false,
// 加载状态 // 加载状态
...@@ -282,7 +302,8 @@ export default { ...@@ -282,7 +302,8 @@ export default {
}, },
// 总条数 // 总条数
total: 0, total: 0,
orgList: [] orgList: [],
selectList: []
} }
}, },
...@@ -309,6 +330,10 @@ export default { ...@@ -309,6 +330,10 @@ export default {
let time = y + '-' + m + '-' + d let time = y + '-' + m + '-' + d
this.searchData.condition.date = time this.searchData.condition.date = time
}, },
// 单据复选框
async handleSelectionChange (e) {
this.selectList = this.$refs.allTableRef.selection.map((item) => item.id);
},
async getOrgName(orgCode) { async getOrgName(orgCode) {
if (null != orgCode && '' != orgCode) { if (null != orgCode && '' != orgCode) {
const {data: res} = await this.$axios.post('/org/getOrgByCode', { const {data: res} = await this.$axios.post('/org/getOrgByCode', {
...@@ -318,6 +343,43 @@ export default { ...@@ -318,6 +343,43 @@ export default {
this.orgList = res.data this.orgList = res.data
} }
}, },
// 文件上传
async uploadFilesCustomRequest(file) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
formData.append('file', file.file)
formData.append('storeList', this.storeCodeList)
const { data: res } = await this.$axios.post(this.filePath, formData)
loading.close()
if (res.code !== 99200) return this.$message.error(res.message)
this.$message.success(res.message)
this.fileList = []
this.selectList = []
this.getAllData()
},
// 导出单据
exportData () {
if (this.selectList.length <=0 ) return this.$message.error('请至少选择一条单据')
this.$confirm('确认导出, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const {data: res} = await this.$axios.get('/offline/exportCheck?idList=' + this.selectList)
if (res.code !== 99200) return this.$message.error(res.message)
const url = '/offline/exportBill?idList=' + this.selectList
window.location.href = `${this.$axios.defaults.baseURL}${url}`
}).catch(() => {
this.$message.error('已取消操作')
}).finally(() => {
this.getAllData()
})
},
// 同步数据 // 同步数据
async syncData () { async syncData () {
this.loadingFlag = true this.loadingFlag = true
......
...@@ -72,6 +72,14 @@ ...@@ -72,6 +72,14 @@
</a-button> </a-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-upload :action=filePath :multiple="false" :show-file-list="false" :file-list="fileList"
v-loading.fullscreen.lock="fullscreenLoading"
:http-request="uploadFilesCustomRequest" :limit="1">
<a-button ghost icon="upload" type="primary">单据导入</a-button>
</el-upload>
</el-form-item>
<!-- <el-form-item> <!-- <el-form-item>
<a-button type="primary" icon="exception" class="warning" @click="warnData()"> <a-button type="primary" icon="exception" class="warning" @click="warnData()">
问题货位 问题货位
...@@ -88,6 +96,11 @@ ...@@ -88,6 +96,11 @@
上报 上报
</a-button> </a-button>
</el-form-item> </el-form-item>
<el-form-item>
<a-button ghost type="primary" icon="download" @click="exportData()">
单据导出
</a-button>
</el-form-item>
<el-form-item> <el-form-item>
<a-button ghost type="danger" icon="delete" v-if="activeAllData.state == 'T'" @click="deleteData()"> <a-button ghost type="danger" icon="delete" v-if="activeAllData.state == 'T'" @click="deleteData()">
删除 删除
...@@ -101,7 +114,10 @@ ...@@ -101,7 +114,10 @@
<el-col :span="14"> <el-col :span="14">
<!-- 主表 --> <!-- 主表 -->
<el-card :style="'height: ' + (height -200)*0.5 + 'px;position:relative;'"> <el-card :style="'height: ' + (height -200)*0.5 + 'px;position:relative;'">
<el-table :data="allData" style="width: 100%;overflow: auto;" :height="(height -200)*0.5*0.77" size="medium" highlight-current-row @row-click="getgoodsData" ref="allTableRef"> <el-table :data="allData" style="width: 100%;overflow: auto;" :height="(height -200)*0.5*0.77" size="medium" highlight-current-row
@selection-change="handleSelectionChange"
@row-click="getgoodsData" ref="allTableRef">
<el-table-column type="selection" width="15"/>
<el-table-column prop="billId" label="凭证号" align="center" /> <el-table-column prop="billId" label="凭证号" align="center" />
<el-table-column prop="name" label="凭证字" align="center" /> <el-table-column prop="name" label="凭证字" align="center" />
<el-table-column prop="glOrgName" label="管理单位" align="center" /> <el-table-column prop="glOrgName" label="管理单位" align="center" />
...@@ -207,7 +223,10 @@ export default { ...@@ -207,7 +223,10 @@ export default {
loadingFlag: false, loadingFlag: false,
// 修改节流阀 // 修改节流阀
editFlag: false, editFlag: false,
// 同步遮罩层
fullscreenLoading: false,
fileList: [],
filePath: window._CONFIG['domianURL'] + '/offline/upload',
// 筛选功能 // 筛选功能
// 日期方法 // 日期方法
pickerOptions: { pickerOptions: {
...@@ -254,6 +273,8 @@ export default { ...@@ -254,6 +273,8 @@ export default {
goodsData: [], goodsData: [],
// 号型数据 // 号型数据
typeData: [], typeData: [],
//复选框数组
selectList: [],
// 选中的单据 // 选中的单据
activeAllData: {}, activeAllData: {},
...@@ -289,6 +310,47 @@ export default { ...@@ -289,6 +310,47 @@ export default {
}, },
methods: { methods: {
// 文件上传
async uploadFilesCustomRequest(file) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const formData = new FormData()
formData.append('file', file.file)
formData.append('storeList', this.storeCodeList)
const { data: res } = await this.$axios.post(this.filePath, formData)
loading.close()
if (res.code !== 99200) return this.$message.error(res.message)
this.$message.success(res.message)
this.fileList = []
this.selectList = []
this.getAllData()
},
// 导出单据
exportData () {
if (this.selectList.length <=0 ) return this.$message.error('请至少选择一条单据')
this.$confirm('确认导出, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const {data: res} = await this.$axios.get('/offline/exportCheck?idList=' + this.selectList)
if (res.code !== 99200) return this.$message.error(res.message)
const url = '/offline/exportBill?idList=' + this.selectList
window.location.href = `${this.$axios.defaults.baseURL}${url}`
}).catch(() => {
this.$message.error('已取消操作')
}).finally(() => {
this.getAllData()
})
},
// 单据复选框
async handleSelectionChange (e) {
this.selectList = this.$refs.allTableRef.selection.map((item) => item.id);
},
async getOrgName(orgCode) { async getOrgName(orgCode) {
if (null != orgCode && '' != orgCode) { if (null != orgCode && '' != orgCode) {
const {data: res} = await this.$axios.post('/org/getOrgByCode', { const {data: res} = await this.$axios.post('/org/getOrgByCode', {
......
<template>
<div class="body" :style="'height:' + height + 'px'">
<div style="border: 2px solid #43A747;">
<!-- 主体区域 - 卡片视图 -->
<el-card :style="'height:' + (height - 60) + 'px;overflow: auto;'">
<el-carousel :interval="5000" arrow="always" :height="height - 60 + 'px'">
<el-carousel-item v-for="item in 8" :key="item">
<div style="display: flex;justify-content: center;">
<el-image :src="require('../../assets/carousel/'+ item + '.jpg')"></el-image>
</div>
</el-carousel-item>
</el-carousel>
</el-card>
</div>
</div>
</template>
<script>
export default {
data() {
return {
height: document.documentElement.clientHeight - 176,
}
},
mounted() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 176
}
},
}
</script>
<style>
/* .el-carousel__item h3 {
color: #475669;
font-size: 18px;
opacity: 0.75;
line-height: 300px;
margin: 0;
}
.el-carousel__item:nth-child(2n) {
background-color: #99a9bf;
}
.el-carousel__item:nth-child(2n+1) {
background-color: #d3dce6;
} */
</style>
\ No newline at end of file
...@@ -299,7 +299,7 @@ export default { ...@@ -299,7 +299,7 @@ export default {
this.initData() this.initData()
}, },
initWbSocket() { initWbSocket() {
this.websock = new WebSocket('ws://127.0.0.1:8081'); this.websock = new WebSocket(window._CONFIG['wsUrl']);
this.websock.onopen = this.websocketOnopen; this.websock.onopen = this.websocketOnopen;
this.websock.onerror = this.websocketOnerror; this.websock.onerror = this.websocketOnerror;
this.websock.onmessage = this.websocketOnmessage; this.websock.onmessage = this.websocketOnmessage;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论