Browse Source

0430

master
DESKTOP-00SUCB6\Administrator 4 years ago
parent
commit
2cf0ab243f
  1. 2
      public/config.js
  2. BIN
      public/fwm/aa.mp3
  3. 192
      public/fwm/fwm.html
  4. BIN
      public/fwm/img/close.png
  5. BIN
      public/fwm/img/nls.jpg
  6. BIN
      public/fwm/img/play.png
  7. BIN
      public/fwm/img/search-bg.png
  8. BIN
      public/fwm/img/sound.png
  9. BIN
      public/fwm/img/stop.png
  10. 2
      public/fwm/jquery.min.js
  11. 192
      public/m.html
  12. 30
      src/api/cancel.js
  13. 111
      src/api/company.js
  14. 29
      src/api/get.js
  15. 21
      src/api/returnReceipt.js
  16. 36
      src/api/status.js
  17. 2
      src/main.ts
  18. 2
      src/permission.js
  19. 14
      src/router/index.ts
  20. 21
      src/utils/validate.ts
  21. 100
      src/views/get/addCancel.vue
  22. 68
      src/views/get/addGet.vue
  23. 169
      src/views/get/cancel.vue
  24. 116
      src/views/get/deliverGoods.vue
  25. 51
      src/views/get/get.vue
  26. 74
      src/views/get/getDetail.vue
  27. 37
      src/views/get/returnReceipt.vue
  28. 3
      src/views/layout/components/AppMain.vue
  29. 2
      src/views/layout/components/Navbar.vue
  30. 53
      src/views/layout/components/Sidebar/SidebarItem.vue
  31. 10
      src/views/layout/components/Sidebar/index.vue
  32. 3
      src/views/login/index.vue
  33. 46
      src/views/send/cancel.vue
  34. 53
      src/views/send/cancelDetail.vue
  35. 28
      src/views/send/send.vue
  36. 33
      src/views/status/goodsCount.vue
  37. 77
      src/views/status/sendStatus.vue

2
public/config.js

@ -6,7 +6,7 @@
// } // }
config = { config = {
// API_URL: 'http://121.36.65.171:9999', // API_URL: 'http://121.36.65.171:9999',
API_URL: 'http://172.119.50.59:8081', API_URL: 'http://172.119.50.121:8081',
UPLOAD_URL: "http://61.135.192.42:8082/attachment/uploadOne", UPLOAD_URL: "http://61.135.192.42:8082/attachment/uploadOne",
DOWNLOAD_URL: "http://61.135.192.42:8082/api-ftp/ftp/download?filename=", DOWNLOAD_URL: "http://61.135.192.42:8082/api-ftp/ftp/download?filename=",

BIN
public/fwm/aa.mp3

Binary file not shown.

192
public/fwm/fwm.html

@ -0,0 +1,192 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="../favicon.ico">
<title id="sys_title">欢迎使用牛栏山二锅头防伪查询系统</title>
<script src="./jquery.min.js"></script>
<script src="../config.js"></script>
</head>
<style>
html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu {
margin: 0;
padding: 0;
}
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, Arial, Microsoft Yahei, Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif;
}
label {
font-weight: 700;
}
html {
height: 100%;
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
.flex-box {
display: -webkit-box;
display: -webkit-flex;
/* Safari */
display: flex;
justify-content: center;
align-items: center;
}
.flex-box-column {
display: -webkit-box;
display: -webkit-flex;
/* Safari */
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.search-input {
background: transparent;
width: 150px;
border: 1px solid #969696;
-webkit-appearance: none;
border-radius: 5px;
padding: 0 10px;
color: #333;
height: 35px;
font-size: 16px;
transition: background-color 50000s ease-in-out 0s;
-webkit-text-fill-color: #333 !important;
}
.search-container {
position: relative;
width: 100vw;
min-height: 100%;
background-image: url('./img/search-bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
.content-block {
position: relative;
margin-top: 42vh;
width: 320px;
color: #fff;
}
.content-block .title {
font-size: 18px;
line-height: 30px;
}
.content-box {
position: relative;
top:5px;
width: 100%;
min-height: 200px;
background: #fff;
border-radius: 20px;
padding: 15px;
word-wrap:break-word;
/* font-weight: 550; */
}
.content-box .content-text {
font-size: 14px;
line-height: 30px;
color: #000000;
}
.content-box .num-text {
font-size: 13px;
line-height: 30px;
color: #C02932;
}
.text-indent-1 {
text-indent:1em
}
.aplayer-block {
position: relative;
/* bottom: 20px; */
margin: 20px 0;
width: 100%;
height: 50px;
background: #fff;
border-radius: 25px;
}
.aplayer-block audio {
width: 100%;
}
.nla-public {
position: absolute;
right: 15px;
width: 80px;
height: 80px;
bottom: 10px;
}
</style>
<body>
<div class="search-container flex-box-column">
<div class="content-block">
<p class="title text-indent-1">查询结果:</p>
<div id="patch" class="content-box">
<img src="img/nls.jpg" class="nla-public">
<p class="content-text">尊敬的客户您好!</p>
<p class="content-text text-indent-1">您所查询的商品编码为:</p>
<p class="num-text" id="gyhl_code">86.121.1377451536954687488/F574AH121Y7#.F</p>
<p class="content-text text-indent-1">您查询的是由"北京顺鑫农业股份有限公司牛栏山酒厂"生产的正牌产品,请放心使用,谢谢您的查询。</p>
<br>
<p class="content-text">查询次数:<span id="scan_count"></span>,首次查询时间为:<br> <span id="first_scan"></span></p>
</div>
<div class="aplayer-block">
<audio id="play1" controls="controls" >
<source src="aa.mp3"></source>
</audio>
</div>
</div>
</div>
</body>
<script>
var SHOW_PIC_BASE_URL = config.SHOW_URL;
var SYS_TITLE = config.TITLE;
// $("#sys_title").html(SYS_TITLE)
var param = '';
var code = '';
// param = decodeURIComponent(window.location.href.split('?')[1])
param = window.location.href.split('?')[1] || ''
code = param.split('&')[0] || '0000LH5D2B82'
function checkSocureData() {
if(code)
{
$.ajax({
url: config.API_URL+"/scan/code/"+code,
type: "GET",
dataType: "json",
success: function(res) {
console.log(res.code);
if(res.code == 200)
{
$("#gyhl_code").text(res.data.gyhl_code)
$("#scan_count").text(res.data.scan_count)
$("#first_scan").text(res.data.first_scan)
} else {
console.log(res.msg)
}
},
error: function(err) {
console.log(err);
}
});
}
}
checkSocureData()
</script>
</html>

BIN
public/fwm/img/close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

BIN
public/fwm/img/nls.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
public/fwm/img/play.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

BIN
public/fwm/img/search-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

BIN
public/fwm/img/sound.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
public/fwm/img/stop.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

2
public/fwm/jquery.min.js

File diff suppressed because one or more lines are too long

192
public/m.html

@ -0,0 +1,192 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="./favicon.ico">
<title id="sys_title">欢迎使用牛栏山二锅头防伪查询系统</title>
<script src="./fwm/jquery.min.js"></script>
<script src="./config.js"></script>
</head>
<style>
html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu {
margin: 0;
padding: 0;
}
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, Arial, Microsoft Yahei, Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif;
}
label {
font-weight: 700;
}
html {
height: 100%;
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
.flex-box {
display: -webkit-box;
display: -webkit-flex;
/* Safari */
display: flex;
justify-content: center;
align-items: center;
}
.flex-box-column {
display: -webkit-box;
display: -webkit-flex;
/* Safari */
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.search-input {
background: transparent;
width: 150px;
border: 1px solid #969696;
-webkit-appearance: none;
border-radius: 5px;
padding: 0 10px;
color: #333;
height: 35px;
font-size: 16px;
transition: background-color 50000s ease-in-out 0s;
-webkit-text-fill-color: #333 !important;
}
.search-container {
position: relative;
width: 100vw;
min-height: 100%;
background-image: url('./fwm/img/search-bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
.content-block {
position: relative;
margin-top: 42vh;
width: 320px;
color: #fff;
}
.content-block .title {
font-size: 18px;
line-height: 30px;
}
.content-box {
position: relative;
top:5px;
width: 100%;
min-height: 200px;
background: #fff;
border-radius: 20px;
padding: 15px;
word-wrap:break-word;
/* font-weight: 550; */
}
.content-box .content-text {
font-size: 14px;
line-height: 30px;
color: #000000;
}
.content-box .num-text {
font-size: 13px;
line-height: 30px;
color: #C02932;
}
.text-indent-1 {
text-indent:1em
}
.aplayer-block {
position: relative;
/* bottom: 20px; */
margin: 20px 0;
width: 100%;
height: 50px;
background: #fff;
border-radius: 25px;
}
.aplayer-block audio {
width: 100%;
}
.nla-public {
position: absolute;
right: 15px;
width: 80px;
height: 80px;
bottom: 10px;
}
</style>
<body>
<div class="search-container flex-box-column">
<div class="content-block">
<p class="title text-indent-1">查询结果:</p>
<div id="patch" class="content-box">
<img src="./fwm/img/nls.jpg" class="nla-public">
<p class="content-text">尊敬的客户您好!</p>
<p class="content-text text-indent-1">您所查询的商品编码为:</p>
<p class="num-text" id="gyhl_code">86.121.1377451536954687488/F574AH121Y7#.F</p>
<p class="content-text text-indent-1">您查询的是由"北京顺鑫农业股份有限公司牛栏山酒厂"生产的正牌产品,请放心使用,谢谢您的查询。</p>
<br>
<p class="content-text">查询次数:<span id="scan_count"></span>,首次查询时间为:<br> <span id="first_scan"></span></p>
</div>
<div class="aplayer-block">
<audio id="play1" controls="controls" >
<source src="./fwm/aa.mp3"></source>
</audio>
</div>
</div>
</div>
</body>
<script>
var SHOW_PIC_BASE_URL = config.SHOW_URL;
var SYS_TITLE = config.TITLE;
// $("#sys_title").html(SYS_TITLE)
var param = '';
var code = '';
// param = decodeURIComponent(window.location.href.split('?')[1])
param = window.location.href.split('?')[1] || ''
code = param.split('&')[0] || '0000LH5D2B82'
function checkSocureData() {
if(code)
{
$.ajax({
url: config.API_URL+"/scan/code/"+code,
type: "GET",
dataType: "json",
success: function(res) {
console.log(res.code);
if(res.code == 200)
{
$("#gyhl_code").text(res.data.gyhl_code)
$("#scan_count").text(res.data.scan_count)
$("#first_scan").text(res.data.first_scan)
} else {
console.log(res.msg)
}
},
error: function(err) {
console.log(err);
}
});
}
}
checkSocureData()
</script>
</html>

30
src/api/cancel.js

@ -6,4 +6,32 @@ export function getDiscardList(params) {
method: 'post', method: 'post',
data:params data:params
}); });
} }
//添加废码单
export function addDiscard(params) {
return request({
url: '/discard/add',
method: 'post',
data:params
});
}
//废码单查看详情
export function getDiscardDetail(params) {
return request({
url: '/discard/detail',
method: 'post',
data:params
});
}
//废码单确认
export function commitDiscard(params) {
return request({
url: '/discard/commit',
method: 'post',
data:params
});
}

111
src/api/company.js

@ -1,111 +0,0 @@
import request from '@/utils/request';
//获取企业列表
export function getEnterpriseList(params) {
return request({
url: '/company/search',
method: 'post',
data:params
});
}
//删除企业
export function deleteEnterprise(params) {
return request({
url: '/company/delete',
method: 'post',
data:params
});
}
//获取企业详情
export function getEnterpriseDetails(params) {
return request({
url: '/company/get/'+params,
method: 'get'
});
}
//修改企业信息
export function editEnterprise(params) {
return request({
url: '/company/edit',
method: 'post',
data:params
});
}
//添加企业
export function addEnterprise(params) {
return request({
url: '/company/add',
method: 'post',
data:params
});
}
//区域查询接口
export function getArea(params) {
return request({
url: '/common/getComboList_2/40010/'+params,
method: 'get'
});
}
//行业大类查询接口
export function getBigIndustryList() {
return request({
url: '/common/getComboList_1/40008',
method: 'get'
});
}
//行业小类查询接口
export function getSmallIndustryList(params) {
return request({
url: '/common/getComboList_2/40009/'+params,
method: 'get'
});
}
//审核企业信息
export function approveEnterprise(params) {
return request({
url: '/company/audit',
method: 'post',
data:params
});
}
//启
export function enableEnterprise(params) {
return request({
url: '/api-enterprise/enterprise/enable',
method: 'put',
data:params
});
}
//停
export function disableEnterprise(params) {
return request({
url: '/api-enterprise/enterprise/disable',
method: 'put',
data:params
});
}
//企业审核列表
export function enApplyList(params) {
return request({
url: '/api-enterprise/enApply/page',
method: 'get',
params
});
}
//公司审核页面的详情
export function enApplyDetail(params) {
return request({
url: '/api-enterprise/enApply/detail',
method: 'get',
params
});
}

29
src/api/get.js

@ -14,4 +14,31 @@ export function addFetchList(params) {
method: 'post', method: 'post',
data:params data:params
}); });
} }
// 编辑取码单
export function updateFetch(params) {
return request({
url: '/fetch/update',
method: 'post',
data:params
});
}
//获取详情
export function getFetchDetail(params) {
return request({
url: '/fetch/detail',
method: 'post',
data:params
});
}
//生成防伪码印刷文件
export function generateFetch(params) {
return request({
url: '/fetch/generate',
method: 'post',
data:params
});
}

21
src/api/returnReceipt.js

@ -0,0 +1,21 @@
import request from '@/utils/request';
//添加送货
export function sentReceipt(params) {
return request({
url: '/receipt/sent',
method: 'post',
data:params
});
}
//上传回执单
export function uploadReceipt(params) {
return request({
url: '/receipt/upload',
method: 'post',
data:params
});
}

36
src/api/status.js

@ -0,0 +1,36 @@
import request from '@/utils/request';
//总数摘要信息
export function summaryPortal(params) {
return request({
url: '/portal/summary',
method: 'post',
data:params
});
}
//柱状图按月信息
export function columnPortal(params) {
return request({
url: '/portal/column',
method: 'post',
data:params
});
}
//汇总表格信息
export function tablePortal(params) {
return request({
url: '/portal/table',
method: 'post',
data:params
});
}
//成品统计
export function printList(params) {
return request({
url: '/print/list',
method: 'post',
data:params
});
}

2
src/main.ts

@ -14,7 +14,7 @@ import '@/icons' // icon
import echarts from 'echarts' //echarts import echarts from 'echarts' //echarts
import scroll from 'vue-seamless-scroll' //滚动插件 import scroll from 'vue-seamless-scroll' //滚动插件
import md5 from 'js-md5'; //md5 加密 import md5 from 'js-md5'; //md5 加密
// import '@/permission' // 权限控制 import '@/permission' // 权限控制
Vue.use(scroll) Vue.use(scroll)
Vue.use(ElementUI) Vue.use(ElementUI)

2
src/permission.js

@ -5,7 +5,7 @@ import 'nprogress/nprogress.css'// Progress 进度条样式
// import { Message } from 'element-ui' // import { Message } from 'element-ui'
import {getToken} from '@/utils/auth' // 验权 import {getToken} from '@/utils/auth' // 验权
const whiteList = ['/login', '/register', '/retrievePassword'] // 不重定向白名单 const whiteList = ['/login'] // 不重定向白名单
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
if (getToken()) { if (getToken()) {

14
src/router/index.ts

@ -154,6 +154,20 @@ const routes = [
component: () => import('@/views/status/sendStatus.vue'), component: () => import('@/views/status/sendStatus.vue'),
name: 'sendStatus', name: 'sendStatus',
meta: {title: '防伪码发放情况', icon: 'form', noCache: true}, meta: {title: '防伪码发放情况', icon: 'form', noCache: true},
},
{
path: 'cancelDetail',
name: 'statusCancelDetail',
hidden: true,
component: () => import('@/views/send/cancelDetail.vue'), //与管理员页面一样
meta: {title: '废码单详情', icon: 'form', noCache: true},
},
{
path: 'getDetail',
component: () => import('@/views/get/getDetail.vue'),
name: 'statusGetDetail',
hidden: true,
meta: {title: '取码单详情', icon: 'form', noCache: true},
} }
], ],
}, },

21
src/utils/validate.ts

@ -80,3 +80,24 @@ export function validateChinese(str) {
const reg = /[\u4E00-\u9FA5]/ const reg = /[\u4E00-\u9FA5]/
return reg.test(str) return reg.test(str)
} }
/*获取当前年月日*/
export function getDay() {
var nowDate = new Date();
  var year = nowDate.getFullYear();
  var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
  var day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
  var dateStr = year + "-" + month + "-" + day;
return dateStr
}
/*获取当前年月日时分秒*/
export function getDayTime() {
var nowDate = new Date();
  var year = nowDate.getFullYear();
  var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
  var day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
  var dateStr = year + "-" + month + "-" + day + ' ' + nowDate.toTimeString().split(" ")[0];
return dateStr
}

100
src/views/get/addCancel.vue

@ -1,23 +1,44 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div> <div>
<el-form :inline="true" class="demo-form-inline"> <el-form :model="form" ref="rForm" :rules="rulesForm">
<el-form-item label="取码单编号:"> <el-form-item label="取码单编号:" prop="num">
123123123 {{form.num}}
</el-form-item> </el-form-item>
<el-form-item label="时间:"> <el-form-item label="时间:" prop="theGetTime">
2021-05-01 {{form.theGetTime}}
</el-form-item> </el-form-item>
<br> <el-form-item label="取码单:" prop="qmdnum">
<el-form-item label=" 取码单:"> <el-select v-model="form.qmdnum" multiple placeholder="请选择取码单">
<el-input v-model="paramsForm.num" size="small"></el-input> <el-option
v-for="(item,index) in QMD_list"
:key="index"
:label="item.fetchId"
:value="item.fetchId">
<!-- <span >{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.fetchTime }}</span> -->
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item class="float-right"> <el-form-item label="上传文件:" prop="fileName">
<el-button type="danger" size="mini" icon="el-icon-upload2" @click="uploadFile">导入</el-button> <el-upload
class="upload-demo"
action="http://172.119.50.59:8081/discard/upload"
:on-remove="handleRemove"
:on-success="handleAvatarSuccess"
:before-remove="beforeRemove"
:file-list="fileList"
accept=".text">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">导入文件为TXT文本文件且不超过50MB防伪码请按一列进行录入</div>
</el-upload>
</el-form-item> </el-form-item>
<!-- <el-form-item class="float-right">
<el-button type="danger" size="mini" icon="el-icon-upload2" @click="uploadFile">导入</el-button>
</el-form-item> -->
</el-form> </el-form>
</div> </div>
<el-form :model="paramsForm" ref="rForm" :rules="paramsForm.paramsRules"> <!-- <el-form :model="paramsForm" ref="rForm" :rules="paramsForm.paramsRules">
<el-table <el-table
:data="paramsForm.params" :data="paramsForm.params"
style="width: 100%"> style="width: 100%">
@ -53,13 +74,12 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form> -->
<br><br> <div slot="footer">
<div slot="footer" class="text-center">
<el-button type="primary" size="mini" @click="submitForm('rForm')">保存</el-button> <el-button type="primary" size="mini" @click="submitForm('rForm')">保存</el-button>
<el-button type="info" size="mini" @click="resetForm('rForm')">取消</el-button> <el-button type="info" size="mini" @click="resetForm('rForm')">取消</el-button>
</div> </div>
<el-dialog title="导入" :visible.sync="dialogUploadVisible" width="500px" :close-on-click-modal='false'> <!-- <el-dialog title="导入" :visible.sync="dialogUploadVisible" width="500px" :close-on-click-modal='false'>
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/" action="https://jsonplaceholder.typicode.com/posts/"
@ -78,13 +98,15 @@
<el-button type="primary" size="mini" >保存</el-button> <el-button type="primary" size="mini" >保存</el-button>
<el-button type="info" size="mini" @click="dialogUploadVisible = false">取消</el-button> <el-button type="info" size="mini" @click="dialogUploadVisible = false">取消</el-button>
</div> </div>
</el-dialog> </el-dialog> -->
</div> </div>
</template> </template>
<script> <script>
import { import {
getUserList getFetchList
} from "@/api/user" } from "@/api/get"
import {addDiscard} from "@/api/cancel"
import {getDayTime} from "@/utils/validate"
export default { export default {
name: "addGet", name: "addGet",
data() { data() {
@ -95,6 +117,22 @@ export default {
getTotal:'40000万', getTotal:'40000万',
otherTotal:'50000万', otherTotal:'50000万',
}, },
form:{
num:this.$route.query.ids || 'FMD_'+new Date().getTime(),
theGetTime:this.$route.query.times || getDayTime(),
qmdnum:'',
fileName:''
},
rulesForm: {
qmdnum: [
{required: true,message: '请选择取码单', trigger: 'change'}
],
fileName: [
{required: true,message: '请选择文件', trigger: 'change'}
],
},
id:this.$route.query.ids || "",
dialogUploadVisible:false, dialogUploadVisible:false,
fileList:[], fileList:[],
paramsForm:{ paramsForm:{
@ -107,28 +145,24 @@ export default {
{required: true, message: '请输入防伪码', trigger: 'blur'} {required: true, message: '请输入防伪码', trigger: 'blur'}
], ],
} }
} },
// QMD_list:[]
}; };
}, },
mounted() { mounted() {
this.initData() this.initData()
}, },
methods: { methods: {
// initData(){
initData() {
const params = { const params = {
pageNum: this.currentPage, pageNo: 1,
pageSize: this.pageSize, pageSize: 1000,
search:{
},
sort:''
} }
getUserList(params).then(res => { getFetchList(params).then(res => {
this.tableData = res.data.list this.QMD_list = res.data.list
this.total = res.data.count
}) })
}, },
addRowData(){ addRowData(){
this.paramsForm.params.push({describe:'',number:'',company:''}) this.paramsForm.params.push({describe:'',number:'',company:''})
}, },
@ -139,6 +173,9 @@ export default {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
addDiscard(this.form).then(res => {
console.log(res);
})
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
@ -154,6 +191,9 @@ export default {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.$router.go(-1) this.$router.go(-1)
}, },
handleAvatarSuccess(res, file) {
this.form.fileName = res.data
},
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log(file, fileList); console.log(file, fileList);
}, },

68
src/views/get/addGet.vue

@ -9,9 +9,9 @@
{{theGetTime}} {{theGetTime}}
</el-form-item> </el-form-item>
</el-form> </el-form>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码总数{{AllData.sendTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码总数{{AllData.totalSend}}</span>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">取码总数{{AllData.getTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">取码总数{{AllData.totalFetch}}</span>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码剩余{{AllData.otherTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码剩余{{AllData.sendRemainder}}</span>
<br><br> <br><br>
</div> </div>
<el-form :model="paramsForm" ref="rForm" :rules="paramsForm.paramsRules"> <el-form :model="paramsForm" ref="rForm" :rules="paramsForm.paramsRules">
@ -73,22 +73,20 @@
</template> </template>
<script> <script>
import { import {
addFetchList addFetchList,getFetchDetail,updateFetch
} from "@/api/get" } from "@/api/get"
import { getWhitelist } from "@/api/user" import { getWhitelist } from "@/api/user"
import {getDayTime} from "@/utils/validate"
import {summaryPortal} from '@/api/status';
export default { export default {
name: "addGet", name: "addGet",
data() { data() {
return { return {
AllData:{ AllData:{},
sendTotal:'90000万', id:this.$route.query.ids || "",
getTotal:'40000万', num:this.$route.query.ids || 'QMD_'+new Date().getTime(),
otherTotal:'50000万', theGetTime:this.$route.query.times || getDayTime(),
},
id:this.$route.query.id || "",
num:'FMD_'+new Date().getTime(),
theGetTime:new Date().toLocaleDateString() + ' ' + new Date().toTimeString().split(" ")[0],
paramsForm:{ paramsForm:{
params: [], params: [],
paramsRules:{ paramsRules:{
@ -100,13 +98,33 @@ export default {
], ],
} }
}, },
whiteList:[] whiteList:[],
isEdit:false
}; };
}, },
mounted() { mounted() {
console.log(this.$route.query);
this.getCompanyList() this.getCompanyList()
if(this.id != '')
{
this.isEdit = true
this.initData()
} else {
this.isEdit = false
}
this.getSummaryData()
}, },
methods: { methods: {
initData() {
getFetchDetail({fetch_id:this.id}).then(res => {
this.paramsForm.params = res.data.fetchDetail
})
},
getSummaryData(){
summaryPortal().then(res =>{
this.AllData = res.data
})
},
getCompanyList(){ getCompanyList(){
const params = { const params = {
pageNo: 1, pageNo: 1,
@ -139,11 +157,33 @@ export default {
console.log(err); console.log(err);
}) })
}, },
upDateData(){
const params = {
fetch_time:this.theGetTime,
fetch_id:this.num,
list:this.paramsForm.params
}
updateFetch(params).then(res => {
this.$message({
message: res.msg,
type: res.code == 200 ? 'success' : 'error'
});
this.$router.go(-1);
}).catch(err => {
console.log(err);
})
},
//form //form
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.addFetch() if(this.isEdit)
{
this.upDateData()
} else {
this.addFetch()
}
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; return false;

169
src/views/get/cancel.vue

@ -7,6 +7,7 @@
v-model="formSearch.time" v-model="formSearch.time"
size="mini" size="mini"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
@ -24,14 +25,19 @@
</el-form> </el-form>
</div> </div>
<el-table :data="tableData" style="width: 100%" header-row-class-name=""> <el-table :data="tableData" style="width: 100%" header-row-class-name="">
<el-table-column prop="a" label="日期"></el-table-column> <el-table-column prop="discardTime" label="日期"></el-table-column>
<el-table-column prop="b" label="摘要"></el-table-column> <el-table-column prop="summary" label="摘要"></el-table-column>
<el-table-column prop="c" label="废码单号"></el-table-column> <el-table-column prop="discardId" label="废码单号"></el-table-column>
<el-table-column prop="d" label="废码数"></el-table-column> <el-table-column prop="discardCount" label="废码数"></el-table-column>
<el-table-column prop="e" label="废码状态"></el-table-column> <el-table-column prop="status" label="废码状态">
<template slot-scope="scope">
<span v-if="scope.row.status == 0" class="color-wait">待确认</span>
<span v-else-if="scope.row.status == 1" class="color-error">已废弃</span>
</template>
</el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="showDetail">查看</el-button> <el-button type="text" size="small" @click="showDetail(scope.row.discardId)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -45,13 +51,49 @@
layout="total, prev, pager, next, sizes, jumper" layout="total, prev, pager, next, sizes, jumper"
:total="total"> :total="total">
</el-pagination> </el-pagination>
<el-dialog title="废码" :visible.sync="dialogCancelVisible" width="500px">
<el-form :model="cancelForm" ref="cancelForm" :rules="cancelRules">
<el-form-item label="废码单编号:" prop="discard_id">
{{cancelForm.discard_id}}
</el-form-item>
<el-form-item label="时间:" prop="discard_time">
{{cancelForm.discard_time}}
</el-form-item>
<el-form-item label="取码单:" prop="fetch_id">
<el-select v-model="cancelForm.fetch_id" multiple placeholder="请选择取码单">
<el-option
v-for="(item,index) in QMD_list"
:key="index"
:label="item.fetchId"
:value="item.fetchId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="上传文件:" prop="filename">
<el-upload
class="upload-demo"
:action="UPLOAD_URL"
:on-remove="handleRemove"
:on-success="handleAvatarSuccess"
:before-remove="beforeRemove"
:file-list="fileList"
accept=".txt">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">导入文件为TXT文本文件且不超过50MB防伪码请按一列进行录入</div>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="mini" @click="submitForm('cancelForm')">保存</el-button>
<el-button type="info" size="mini" @click="resetForm('cancelForm')">取消</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import { getDiscardList,addDiscard } from "@/api/cancel"
getUserList, import { getFetchList } from "@/api/get"
} from "@/api/user" import {getDayTime} from "@/utils/validate"
export default { export default {
name: "getCancel", name: "getCancel",
data() { data() {
@ -61,12 +103,28 @@ export default {
time: '', time: '',
number: '', number: '',
}, },
UPLOAD_URL:config.API_URL + '/discard/upload',
currentPage: 1, // currentPage: 1, //
pageSize: 10, // pageSize: 10, //
total: 0, // total: 0, //
tableData: [ tableData: [], //
{a:'11',b:'11',c:'1',d:'',e:'1'} dialogCancelVisible:false,
], // QMD_list:[],
fileList:[],
cancelForm:{
discard_id:this.$route.query.ids || 'FMD_'+new Date().getTime(),
discard_time:this.$route.query.times || getDayTime(),
fetch_id:'',
filename:''
},
cancelRules: {
fetch_id: [
{required: true,message: '请选择取码单', trigger: 'change'}
],
filename: [
{required: true,message: '请选择文件', trigger: 'change'}
],
},
}; };
}, },
mounted() { mounted() {
@ -81,40 +139,62 @@ export default {
// //
initData() { initData() {
const params = { const params = {
pageNum: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
search:{ discardId: this.formSearch.number|| null,
}, startTime:this.formSearch.time?this.formSearch.time[0] : null,
sort:'' endTime:this.formSearch.time?this.formSearch.time[1] : null
} }
getUserList(params).then(res => { getDiscardList(params).then(res => {
this.tableData = res.data.list this.tableData = res.data.list
this.total = res.data.count this.total = res.data.count
}) })
}, },
confirm(){ getQMDList(){
this.$confirm('此操作将废弃本防伪码, 是否继续?', '提示', { const params = {
confirmButtonText: '确定', pageNo: 1,
cancelButtonText: '取消', pageSize: 1000,
type: 'warning' }
}).then(() => { getFetchList(params).then(res => {
this.$message({ this.QMD_list = res.data.list
type: 'success', })
message: '废弃成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消废弃'
});
});
}, },
addCancelDialog(){ addCancelDialog(){
this.$router.push({name:'addCancel'}) this.dialogCancelVisible = true
this.getQMDList()
// this.$router.push({name:'addCancel'})
}, },
// //
showDetail() { showDetail(id) {
this.$router.push({name:'getCancelDetail'}) this.$router.push({name:'getCancelDetail',query:{FMD_id:id}})
},
//form
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
const params = {
discard_id:this.cancelForm.discard_id,
discard_time:this.cancelForm.discard_time,
fetch_id:this.cancelForm.fetch_id.join(','),
filename:this.cancelForm.filename,
}
addDiscard(params).then(res => {
this.$message({
message: res.msg,
type: res.code == 200 ? 'success' : 'error'
});
})
this.resetForm('cancelForm')
} else {
console.log('error submit!!');
return false;
}
});
},
//form
resetForm(formName) {
this.dialogCancelVisible = false
this.$refs[formName].resetFields();
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {
@ -125,6 +205,21 @@ export default {
handleCurrentChange(val) { handleCurrentChange(val) {
this.currentPage = val this.currentPage = val
this.initData() this.initData()
},
handleAvatarSuccess(res, file) {
this.cancelForm.filename = res.data
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${ file.name }`);
} }
} }

116
src/views/get/deliverGoods.vue

@ -3,14 +3,14 @@
<div> <div>
<el-form :inline="true" class="demo-form-inline"> <el-form :inline="true" class="demo-form-inline">
<el-form-item label="取码单编号:"> <el-form-item label="取码单编号:">
123123123 {{QMD_id}}
</el-form-item> </el-form-item>
<el-form-item label="时间:"> <el-form-item label="时间:">
2021-05-01 {{QMD_time}}
</el-form-item> </el-form-item>
<br> <br>
<el-form-item label="取码数量:"> <el-form-item label="取码数量:">
100 {{QMD_count}}
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -23,11 +23,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
:prop="'params.' + scope.$index + '.company'" :prop="'params.' + scope.$index + '.whitelist_id'"
:rules="paramsForm.paramsRules.company"> :rules="paramsForm.paramsRules.whitelist_id">
<el-select v-model="scope.row.company" placeholder="请选择印刷公司" size="small"> <el-select v-model="scope.row.whitelist_id" placeholder="请选择印刷公司" size="small">
<el-option label="公司一" value="1"></el-option> <el-option v-for="(item,index) in whiteList" :key="index" :label="item.companyName" :value="item.id"></el-option>
<el-option label="公司二" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
@ -37,11 +36,12 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
:prop="'params.' + scope.$index + '.time'" :prop="'params.' + scope.$index + '.sent_time'"
:rules="paramsForm.paramsRules.time"> :rules="paramsForm.paramsRules.sent_time">
<el-date-picker <el-date-picker
v-model="scope.row.time" v-model="scope.row.sent_time"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"> placeholder="选择日期时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -52,9 +52,9 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
:prop="'params.' + scope.$index + '.number'" :prop="'params.' + scope.$index + '.sent_count'"
:rules="paramsForm.paramsRules.number"> :rules="paramsForm.paramsRules.sent_count">
<el-input v-model.number="scope.row.number" size="small"></el-input> <el-input v-model.number="scope.row.sent_count" size="small"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -63,16 +63,17 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
:prop="'params.' + scope.$index + '.file'" :prop="'params.' + scope.$index + '.receipt'"
:rules="paramsForm.paramsRules.file"> :rules="paramsForm.paramsRules.receipt">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/" :action="UPLOAD_URL"
:on-success="handleAvatarSuccess" :on-success="function (res, file) { return handleAvatarSuccess(res, file, scope.$index)}"
:on-remove="handleRemove" :on-remove="handleRemove"
:file-list="fileList"> :before-upload="beforeAvatarUpload"
>
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div> --> <div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过2MB</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -98,8 +99,9 @@
</template> </template>
<script> <script>
import { import {
getUserList sentReceipt,uploadReceipt
} from "@/api/user" } from "@/api/returnReceipt"
import { getWhitelist } from "@/api/user"
export default { export default {
name: "deliverGoods", name: "deliverGoods",
data() { data() {
@ -116,22 +118,26 @@ export default {
getTotal:'40000万', getTotal:'40000万',
otherTotal:'50000万', otherTotal:'50000万',
}, },
UPLOAD_URL:config.API_URL + '/receipt/upload',
whiteList:[],
fileList:[], fileList:[],
QMD_id:this.$route.query.id || '',
QMD_time:this.$route.query.time || '',
QMD_count:this.$route.query.count || '',
paramsForm:{ paramsForm:{
params: [ params: [
{company:'公司1',time:'',number:123,file:''}
], ],
paramsRules:{ paramsRules:{
company:[ whitelist_id:[
{required: true, message: '请选择公司', trigger: 'change'} {required: true, message: '请选择公司', trigger: 'change'}
], ],
time:[ sent_time:[
{required: true, message: '请输入送货时间', trigger: 'change'} {required: true, message: '请输入送货时间', trigger: 'change'}
], ],
number:[ sent_count:[
{required: true,type:'number', message: '请输入送货数量', trigger: 'blur'} {required: true,type:'number', message: '请输入送货数量', trigger: 'blur'}
], ],
file:[ receipt:[
{required: true, validator: checkPhotoOpe, trigger: "blur"} {required: true, validator: checkPhotoOpe, trigger: "blur"}
] ]
} }
@ -140,33 +146,44 @@ export default {
}; };
}, },
mounted() { mounted() {
this.initData() this.getCompanyList()
}, },
methods: { methods: {
// getCompanyList(){
initData() {
const params = { const params = {
pageNum: this.currentPage, pageNo: 1,
pageSize: this.pageSize, pageSize: 1000,
search:{
},
sort:''
} }
getUserList(params).then(res => { getWhitelist(params).then(res => {
this.tableData = res.data.list this.whiteList = res.data.list
this.total = res.data.count
}) })
}, },
addRowData(){ addRowData(){
this.paramsForm.params.push({describe:'',number:'',company:''}) this.paramsForm.params.push({sent_time:null,sent_count:null,whitelist_id:null,receipt:null,origin_filename:null})
}, },
deleteData(index){ deleteData(index){
this.paramsForm.params.splice(index,1) this.paramsForm.params.splice(index,1)
}, },
addReceipt(){
const params = {
fetch_id:this.QMD_id,
list:this.paramsForm.params
}
sentReceipt(params).then(res => {
this.$message({
message: res.msg,
type: res.code == 200 ? 'success' : 'error'
});
this.$router.go(-1);
}).catch(err => {
console.log(err);
})
},
//form //form
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.addReceipt()
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
@ -181,8 +198,25 @@ export default {
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log(file, fileList); console.log(file, fileList);
}, },
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file,index) {
// this.imageUrl = URL.createObjectURL(file.raw); this.paramsForm.params[index].receipt = res.data;
this.paramsForm.params[index].origin_filename = file.name;
},
beforeAvatarUpload(file) {
if(file)
{
const isJPG = file.type === 'image/jpeg' || file.type === 'image/jpg' || file.type === 'image/png';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
}
} }
} }
}; };

51
src/views/get/get.vue

@ -20,7 +20,7 @@
<el-button type="primary" size="mini" icon="el-icon-search" @click="search">查询</el-button> <el-button type="primary" size="mini" icon="el-icon-search" @click="search">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item class="float-right"> <el-form-item class="float-right">
<el-button type="danger" size="mini" icon="el-icon-circle-plus-outline" @click="addGetDialog">创建取码单</el-button> <el-button type="danger" size="mini" icon="el-icon-circle-plus-outline" @click="addGetDialog()">创建取码单</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -29,17 +29,23 @@
<el-table-column prop="fetchTime" label="日期"></el-table-column> <el-table-column prop="fetchTime" label="日期"></el-table-column>
<!-- <el-table-column prop="summary" label="摘要"></el-table-column> --> <!-- <el-table-column prop="summary" label="摘要"></el-table-column> -->
<el-table-column prop="fetchCount" label="取码数"></el-table-column> <el-table-column prop="fetchCount" label="取码数"></el-table-column>
<el-table-column prop="status" label="取码单状态"></el-table-column> <el-table-column prop="status" label="取码单状态">
<template slot-scope="scope">
<span v-if="scope.row.status == 0" class="color-wait">未生成</span>
<span v-else-if="scope.row.status == 1" class="color-send">生成中</span>
<span v-else-if="scope.row.status == 2" class="color-success">已生成</span>
</template>
</el-table-column>
<el-table-column prop="fileName" label="防伪码"> <el-table-column prop="fileName" label="防伪码">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="scope.row.downloadUrl"><el-button type="text">{{scope.row.fileName}}</el-button></a> <a :href="BASE_URL + scope.row.downloadUrl"><el-button type="text">{{scope.row.fileName}}</el-button></a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="250"> <el-table-column label="操作" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="addGetDialog(scope.row.id)">编辑</el-button> <el-button type="text" size="small" @click="addGetDialog(scope.row.fetchId,scope.row.fetchTime)">编辑</el-button>
<el-button type="text" size="small" @click="confirm(scope.row.id)">生成防伪码印刷文件</el-button> <el-button type="text" size="small" @click="confirm(scope.row.fetchId)">生成防伪码印刷文件</el-button>
<el-button type="text" size="small" @click="showDetail">查看</el-button> <el-button type="text" size="small" @click="showDetail(scope.row.fetchId)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -58,13 +64,14 @@
</template> </template>
<script> <script>
import { import {
getFetchList getFetchList,generateFetch
} from "@/api/get" } from "@/api/get"
export default { export default {
name: "getGet", name: "getGet",
data() { data() {
return { return {
BASE_URL:config.API_URL,
formSearch: {// formSearch: {//
time: '', time: '',
number: '', number: '',
@ -88,28 +95,38 @@ export default {
}, },
// //
initData() { initData() {
const params = { const params = {
pageNo: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
discardId: this.formSearch.number|| null, discardId: this.formSearch.number|| null,
startTime:this.formSearch.time[0] || null, startTime:this.formSearch.time?this.formSearch.time[0] : null,
endTime:this.formSearch.time[1] || null endTime:this.formSearch.time?this.formSearch.time[1] : null
} }
getFetchList(params).then(res => { getFetchList(params).then(res => {
this.tableData = res.data.list this.tableData = res.data.list
this.total = res.data.count this.total = res.data.count
}) })
}, },
confirm(){ confirm(id){
this.$confirm('此操作将生成防伪码印刷文件, 是否继续?', '提示', { this.$confirm('此操作将生成防伪码印刷文件, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$message({ generateFetch({fetch_id:id}).then(res => {
type: 'success', this.$message({
message: '操作成功!' type: 'success',
}); message: '操作成功!'
});
this.initData()
}).catch(err => {
this.$message({
message: err.msg,
type: err.code == 200 ? 'success' : 'error'
});
})
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
@ -119,11 +136,11 @@ export default {
}, },
// //
showDetail(id) { showDetail(id) {
this.$router.push({name:'getGetDetail'}) this.$router.push({name:'getGetDetail',query:{id:id}})
}, },
// //
addGetDialog(id){ addGetDialog(ids = null,times = null){
this.$router.push({name:'addGet',query:{id:id}}) this.$router.push({name:'addGet',query:{ids:ids,times:times}})
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {

74
src/views/get/getDetail.vue

@ -3,32 +3,32 @@
<div> <div>
<el-form :inline="true" class="demo-form-inline"> <el-form :inline="true" class="demo-form-inline">
<el-form-item label="取码单编号:"> <el-form-item label="取码单编号:">
123123123 {{id}}
</el-form-item> </el-form-item>
<el-form-item label="时间:"> <!-- <el-form-item label="时间:">
2021-05-01 2021-05-01
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码总数{{AllData.sendTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码总数{{AllData.totalSend}}</span>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">取码总数{{AllData.getTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">取码总数{{AllData.totalFetch}}</span>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码剩余{{AllData.otherTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码剩余{{AllData.sendRemainder}}</span>
<br><br> <br><br>
</div> </div>
<label>取码详情</label> <label>取码详情</label>
<el-table :data="tableData" style="width: 100%" header-row-class-name=""> <el-table :data="tableData" style="width: 100%" header-row-class-name="">
<el-table-column prop="account" label="公司名称"></el-table-column> <el-table-column prop="whitelistName" label="公司名称"></el-table-column>
<el-table-column prop="name" label="摘要"></el-table-column> <el-table-column prop="summary" label="摘要"></el-table-column>
<el-table-column prop="enIdText" label="取码数(万)"></el-table-column> <el-table-column prop="fetch_count" label="取码数(万)"></el-table-column>
</el-table> </el-table>
<br><br> <br><br>
<label>送码详情</label> <label>送码详情</label>
<el-table :data="tableData2" style="width: 100%" header-row-class-name=""> <el-table :data="tableData2" style="width: 100%" header-row-class-name="">
<el-table-column prop="a" label="收货公司"></el-table-column> <el-table-column prop="whitelistName" label="收货公司"></el-table-column>
<el-table-column prop="b" label="送货时间"></el-table-column> <el-table-column prop="sent_time" label="送货时间"></el-table-column>
<el-table-column prop="c" label="送货数量(盘)"></el-table-column> <el-table-column prop="sent_count" label="送货数量(盘)"></el-table-column>
<el-table-column prop="file" label="送货回执单"> <el-table-column prop="receipt" label="送货回执单">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="showPic(scope.row.file)"><i class="el-icon-eye"></i>预览</el-button> <el-button type="text" size="small" @click="showPic(scope.row.receipt)"><i class="el-icon-eye"></i>预览</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -37,54 +37,52 @@
title="回执单" title="回执单"
:visible.sync="dialogPicVisible" :visible.sync="dialogPicVisible"
width="30%"> width="30%">
<img :src="imgPic" style="width:100%;height:200px;"> <img :src="imgPic" style="width:100%;">
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import { getFetchDetail } from "@/api/get"
getUserList import {summaryPortal} from '@/api/status';
} from "@/api/user"
export default { export default {
name: "getGetDetail", name: "getGetDetail",
data() { data() {
return { return {
AllData:{ AllData:{},
sendTotal:'90000万', BASE_URL:config.API_URL,
getTotal:'40000万', id:this.$route.query.id || "",
otherTotal:'50000万',
},
dialogPicVisible:false, dialogPicVisible:false,
imgPic:'', imgPic:'',
tableData: [ tableData: [
], // ], //
tableData2:[ tableData2:[]
{a:'123',b:'123',c:'123',file:'123.png'}
]
}; };
}, },
mounted() { mounted() {
this.initData() if(this.id != '')
{
this.initData()
this.getSummaryData()
}
}, },
methods: { methods: {
// //
initData() { initData() {
const params = { getFetchDetail({fetch_id:this.id}).then(res => {
pageNum: this.currentPage, console.log(res);
pageSize: this.pageSize, this.tableData = res.data.fetchDetail
search:{ this.tableData2 = res.data.receipt
}, })
sort:'' },
} getSummaryData(){
getUserList(params).then(res => { summaryPortal().then(res =>{
this.tableData = res.data.list this.AllData = res.data
this.total = res.data.count
}) })
}, },
showPic(file){ showPic(file){
this.dialogPicVisible = true this.dialogPicVisible = true
this.imgPic = file this.imgPic = this.BASE_URL + file
}, },
} }

37
src/views/get/returnReceipt.vue

@ -7,6 +7,7 @@
v-model="formSearch.time" v-model="formSearch.time"
size="mini" size="mini"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
@ -21,13 +22,13 @@
</el-form> </el-form>
</div> </div>
<el-table :data="tableData" style="width: 100%" header-row-class-name=""> <el-table :data="tableData" style="width: 100%" header-row-class-name="">
<el-table-column prop="c" label="取码单号"></el-table-column> <el-table-column prop="fetchId" label="取码单号"></el-table-column>
<el-table-column prop="a" label="日期"></el-table-column> <el-table-column prop="fetchTime" label="日期"></el-table-column>
<el-table-column prop="d" label="取码数"></el-table-column> <el-table-column prop="fetchCount" label="取码数"></el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="deliverGoods(scope.row.id)">送货</el-button> <el-button type="text" size="small" @click="deliverGoods(scope.row.fetchId,scope.row.fetchTime,scope.row.fetchCount)">送货</el-button>
<el-button type="text" size="small" @click="showDetail">查看</el-button> <el-button type="text" size="small" @click="showDetail(scope.row.fetchId)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -46,8 +47,8 @@
</template> </template>
<script> <script>
import { import {
getUserList, getFetchList
} from "@/api/user" } from "@/api/get"
export default { export default {
name: "returnReceipt", name: "returnReceipt",
data() { data() {
@ -60,9 +61,7 @@ export default {
currentPage: 1, // currentPage: 1, //
pageSize: 10, // pageSize: 10, //
total: 0, // total: 0, //
tableData: [ tableData: [], //
{a:'11',b:'11',c:'1',d:'',e:'1'}
], //
}; };
}, },
mounted() { mounted() {
@ -77,24 +76,24 @@ export default {
// //
initData() { initData() {
const params = { const params = {
pageNum: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
search:{ discardId: this.formSearch.number|| null,
}, startTime:this.formSearch.time?this.formSearch.time[0] : null,
sort:'' endTime:this.formSearch.time?this.formSearch.time[1] : null
} }
getUserList(params).then(res => { getFetchList(params).then(res => {
this.tableData = res.data.list this.tableData = res.data.list
this.total = res.data.count this.total = res.data.count
}) })
}, },
// //
deliverGoods(id){ deliverGoods(id,time,count){
this.$router.push({name:'deliverGoods'}) this.$router.push({name:'deliverGoods',query:{id:id,time:time,count:count}})
}, },
// //
showDetail() { showDetail(id) {
this.$router.push({name:'returnReceiptDetail'}) this.$router.push({name:'returnReceiptDetail',query:{id:id}})
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {

3
src/views/layout/components/AppMain.vue

@ -12,9 +12,8 @@
<!-- <router-view :key="key"></router-view> --> <!-- <router-view :key="key"></router-view> -->
<!-- 内容页 --> <!-- 内容页 -->
<!-- <keep-alive :include="aliveList"> --> <!-- <keep-alive :include="aliveList"> -->
<keep-alive >
<router-view style="min-width:700px;" /> <router-view style="min-width:700px;" />
</keep-alive> <!-- </keep-alive> -->
</transition> </transition>
</section> </section>
</div> </div>

2
src/views/layout/components/Navbar.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="navbar"> <div class="navbar">
<hamburger :toggle-click="toggleSideBar" :is-active="sidebar.opened" class="hamburger-container"/> <!-- <hamburger :toggle-click="toggleSideBar" :is-active="sidebar.opened" class="hamburger-container"/> -->
<span style="vertical-align: top;color:#97a8be;">您的位置</span> <span style="vertical-align: top;color:#97a8be;">您的位置</span>
<breadcrumb/> <breadcrumb/>
</div> </div>

53
src/views/layout/components/Sidebar/SidebarItem.vue

@ -1,37 +1,6 @@
<template> <template>
<!-- <div class="menu-wrapper">
<template v-for="item in routes">
<template v-if="!item.hidden&&item.children">
<router-link v-if="hasOneShowingChildren(item.children) && !item.children[0].children&&!item.alwaysShow" :to="item.path+'/'+item.children[0].path" :key="item.children[0].name">
<el-menu-item :index="item.path+'/'+item.children[0].path" :class="{'submenu-title-noDropdown':!isNest}">
<svg-icon v-if="item.children[0].meta&&item.children[0].meta.icon" :icon-class="item.children[0].meta.icon"></svg-icon>
<span v-if="item.children[0].meta&&item.children[0].meta.title" slot="title">{{item.children[0].meta.title}}</span>
</el-menu-item>
</router-link>
<el-submenu v-else :index="item.name||item.path" :key="item.name" >
<template slot="title">
<svg-icon v-if="item.meta&&item.meta.icon" :icon-class="item.meta.icon"></svg-icon>
<span v-if="item.meta&&item.meta.title" slot="title">{{item.meta.title}}</span>
</template>
<template v-for="child in item.children">
<template v-if="!child.hidden">
<sidebar-item :is-nest="true" class="nest-menu" v-if="child.children&&child.children.length>0" :routes="[child]" :key="child.path"></sidebar-item>
<router-link v-else :to="item.path+'/'+child.path" :key="child.name">
<el-menu-item :index="item.path+'/'+child.path">
<svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
<span v-if="child.meta&&child.meta.title" slot="title">{{child.meta.title}}</span>
</el-menu-item>
</router-link>
</template>
</template>
</el-submenu>
</template>
</template>
</div> -->
<div class="menu-wrapper"> <!-- <div class="menu-wrapper">
<template v-for="item in routes"> <template v-for="item in routes">
<template v-if="!item.hidden&&item.children"> <template v-if="!item.hidden&&item.children">
<router-link v-if="hasOneShowingChildren(item.children)" :to="{name:item.name}" <router-link v-if="hasOneShowingChildren(item.children)" :to="{name:item.name}"
@ -59,24 +28,24 @@
</el-submenu> </el-submenu>
</template> </template>
</template> </template>
</div> </div> -->
<!-- <div class="menu-wrapper"> <div class="menu-wrapper">
<template v-for="item in routes"> <template v-for="item in routes">
<template v-if="!item.hidden&&item.son"> <template v-if="!item.hidden&&item.son">
<router-link v-if="hasOneShowingChildren(item.son)" :to="{name:item.name}" <router-link v-if="hasOneShowingChildren(item.son)" :to="{name:item.url}"
:key="item.name"> :key="item.url">
<el-menu-item :index="item.name"> <el-menu-item :index="item.url">
<span class="myTitle" slot="title">{{item.item}}</span> <span class="myTitle" slot="title">{{item.item}}</span>
</el-menu-item> </el-menu-item>
</router-link> </router-link>
<el-submenu v-else :index="item.name" :key="item.name"> <el-submenu v-else :index="item.url" :key="item.url">
<template slot="title"> <template slot="title">
<span class="myTitle" slot="title">{{item.item}}</span> <span class="myTitle" slot="title">{{item.item}}</span>
</template> </template>
<template v-for="child in item.son"> <template v-for="child in item.son">
<template v-if="!child.hidden"> <template v-if="!child.hidden">
<router-link :to="{name:child.name}" :key="child.name"> <router-link :to="{name:child.url}" :key="child.url">
<el-menu-item :index="child.name"> <el-menu-item :index="child.url">
<span class="myTitle" slot="title">{{child.item}}</span> <span class="myTitle" slot="title">{{child.item}}</span>
</el-menu-item> </el-menu-item>
</router-link> </router-link>
@ -85,7 +54,7 @@
</el-submenu> </el-submenu>
</template> </template>
</template> </template>
</div> --> </div>
</template> </template>
<script> <script>
@ -124,7 +93,7 @@
const showingChildren = children.filter(item => { const showingChildren = children.filter(item => {
return !item.hidden return !item.hidden
}) })
if (showingChildren.length === 1) { if (showingChildren.length === 1 || showingChildren.length === 0) {
return true return true
} }
return false return false

10
src/views/layout/components/Sidebar/index.vue

@ -30,21 +30,21 @@
variables() { variables() {
return variables; return variables;
}, },
routes() { // routes() {
return this.$router.options.routes[2].children // return this.$router.options.routes[2].children
}, // },
isCollapse() { isCollapse() {
return !this.sidebar.opened; return !this.sidebar.opened;
}, },
}, },
data(){ data(){
return { return {
// routes:[] routes:[]
} }
}, },
mounted() { mounted() {
// this.routes = this.router this.routes = this.router
}, },
}; };
</script> </script>

3
src/views/login/index.vue

@ -168,8 +168,9 @@ export default {
this.$store this.$store
.dispatch("Login", params) .dispatch("Login", params)
.then(data => { .then(data => {
let url = data.permission[0].url || data.permission[0].son[0].url
this.loading = false; this.loading = false;
this.$router.push({name: "send"}); this.$router.push({name: url});
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;

46
src/views/send/cancel.vue

@ -7,6 +7,7 @@
v-model="formSearch.time" v-model="formSearch.time"
size="mini" size="mini"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
@ -21,15 +22,20 @@
</el-form> </el-form>
</div> </div>
<el-table :data="tableData" style="width: 100%" header-row-class-name=""> <el-table :data="tableData" style="width: 100%" header-row-class-name="">
<el-table-column prop="account" label="日期"></el-table-column> <el-table-column prop="discardTime" label="日期"></el-table-column>
<el-table-column prop="name" label="摘要"></el-table-column> <el-table-column prop="summary" label="摘要"></el-table-column>
<el-table-column prop="phone" label="废码单号"></el-table-column> <el-table-column prop="discardId" label="废码单号"></el-table-column>
<el-table-column prop="enIdText" label="废码数"></el-table-column> <el-table-column prop="discardCount" label="废码数"></el-table-column>
<el-table-column prop="enIdText" label="废码状态"></el-table-column> <el-table-column prop="status" label="废码状态">
<template slot-scope="scope">
<span v-if="scope.row.status == 0" class="color-wait">待确认</span>
<span v-else-if="scope.row.status == 1" class="color-error">已废弃</span>
</template>
</el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="confirm(scope.row.id)"><i class="el-icon-edit"></i>确认</el-button> <el-button type="text" size="small" v-if="scope.row.status == 0" @click="confirm(scope.row.discardId)"><i class="el-icon-edit"></i>确认</el-button>
<el-button type="text" size="small" @click="showDetail">查看</el-button> <el-button type="text" size="small" @click="showDetail(scope.row.discardId)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -48,7 +54,7 @@
</template> </template>
<script> <script>
import { import {
getDiscardList getDiscardList,commitDiscard
} from "@/api/cancel" } from "@/api/cancel"
export default { export default {
name: "sendCancel", name: "sendCancel",
@ -77,27 +83,31 @@ export default {
// //
initData() { initData() {
const params = { const params = {
pageNum: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
discardId: this.formSearch.number|| null, discardId: this.formSearch.number|| null,
startTime:this.formSearch.time[0] || null, startTime:this.formSearch.time?this.formSearch.time[0] : null,
endTime:this.formSearch.time[1] || null endTime:this.formSearch.time?this.formSearch.time[1] : null
} }
getDiscardList(params).then(res => { getDiscardList(params).then(res => {
this.tableData = res.data.list this.tableData = res.data.list
this.total = res.data.count this.total = res.data.count
}) })
}, },
confirm(){ confirm(id){
this.$confirm('此操作将废弃本防伪码, 是否继续?', '提示', { this.$confirm('此操作将废弃本防伪码, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$message({ commitDiscard({discard_id:id}).then(res => {
type: 'success', this.$message({
message: '废弃成功!' message: res.msg,
}); type: res.code == 200 ? 'success' : 'error'
});
this.initData()
})
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
@ -106,8 +116,8 @@ export default {
}); });
}, },
// //
showDetail() { showDetail(id) {
this.$router.push({name:'getCancelDetail',query:{FMD_id:id}})
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {

53
src/views/send/cancelDetail.vue

@ -3,50 +3,77 @@
<div> <div>
<el-form :inline="true" class="demo-form-inline"> <el-form :inline="true" class="demo-form-inline">
<el-form-item label="废码单编号:"> <el-form-item label="废码单编号:">
<span>YMD_00001</span> <span>{{FMD_id}}</span>
</el-form-item> </el-form-item>
<el-form-item label="时间:"> <el-form-item label="时间:">
<span>2021-05-01</span> <span>{{FMD_time}}</span>
</el-form-item> </el-form-item>
<br> <br>
<el-form-item label="取码单编号:"> <el-form-item label="取码单编号:">
<span>QMD_00001</span> <span>{{QMD_id}}</span>
</el-form-item> </el-form-item>
<!-- <el-form-item class="float-right"> <!-- <el-form-item class="float-right">
<el-button type="danger" size="mini" icon="el-icon-download" @click="addUserDialog">下载</el-button> <el-button type="danger" size="mini" icon="el-icon-download" @click="addUserDialog">下载</el-button>
</el-form-item> --> </el-form-item> -->
</el-form> </el-form>
</div> </div>
<el-table :data="tableData" style="width: 100%" show-summary :summary-method="getSummaries"> <el-table :data="tableData" style="width: 100%">
<el-table-column prop="account" label="摘要"></el-table-column> <el-table-column prop="discard_id" label="废码单号"></el-table-column>
<el-table-column prop="name" label="防伪码"></el-table-column> <el-table-column prop="code" label="防伪码"></el-table-column>
</el-table> </el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
layout="total, prev, pager, next, sizes, jumper"
:total="total">
</el-pagination>
</div> </div>
</template> </template>
<script> <script>
import {getUserList} from "@/api/user" import {getDiscardDetail} from "@/api/cancel"
export default { export default {
name: "sendCancelDetail", name: "sendCancelDetail",
data() { data() {
return { return {
tableData: [], // tableData: [], //
FMD_id:this.$route.query.FMD_id || '',
currentPage: 1, //
pageSize: 10, //
total: 0, //
FMD_time:'',
QMD_id:''
}; };
}, },
mounted() { mounted() {
this.initData() this.initData()
}, },
methods: { methods: {
//
initData() { initData() {
const params = { const params = {
pageNo: this.currentPage,
pageSize: this.pageSize,
discard_id:this.FMD_id
} }
getUserList(params).then(res => { getDiscardDetail(params).then(res => {
this.tableData = res.data.list this.tableData = res.data.list.list
this.total = res.data.count this.FMD_time = res.data.record.discardTime
this.QMD_id = res.data.record.fetch_id
this.total = res.data.list.total
}) })
}, },
getSummaries(){ //
handleSizeChange(val) {
this.pageSize = val
this.initData()
},
//
handleCurrentChange(val) {
this.currentPage = val
this.initData()
} }
} }

28
src/views/send/send.vue

@ -28,9 +28,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码总数{{AllData.sendTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码总数{{AllData.totalSend}}</span>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">取码总数{{AllData.getTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">取码总数{{AllData.totalFetch}}</span>
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码剩余{{AllData.otherTotal}}</span> <span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码剩余{{AllData.sendRemainder}}</span>
<br><br> <br><br>
<el-table :data="tableData" style="width: 100%" header-row-class-name=""> <el-table :data="tableData" style="width: 100%" header-row-class-name="">
<el-table-column prop="sendTime" label="发码日期"></el-table-column> <el-table-column prop="sendTime" label="发码日期"></el-table-column>
@ -38,11 +38,11 @@
<el-table-column prop="sendRemainder" label="发码剩余"></el-table-column> <el-table-column prop="sendRemainder" label="发码剩余"></el-table-column>
<el-table-column prop="receivedCount" label="取码数"></el-table-column> <el-table-column prop="receivedCount" label="取码数"></el-table-column>
<el-table-column prop="status" label="发码状态"></el-table-column> <el-table-column prop="status" label="发码状态"></el-table-column>
<el-table-column label="操作" width="200"> <!-- <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="showDetail(scope.row.id)"><i class="el-icon-edit"></i>查看</el-button> <el-button type="text" size="small" @click="showDetail(scope.row.id)"><i class="el-icon-edit"></i>查看</el-button>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<el-pagination <el-pagination
background background
@ -98,6 +98,7 @@ import {
getSendList, getSendList,
addSendList addSendList
} from "@/api/send" } from "@/api/send"
import {summaryPortal} from '@/api/status';
export default { export default {
name: "sendSend", name: "sendSend",
data() { data() {
@ -106,11 +107,7 @@ export default {
time: '', time: '',
status:null status:null
}, },
AllData:{ AllData:{},
sendTotal:'90000万',
getTotal:'40000万',
otherTotal:'50000万',
},
currentPage: 1, // currentPage: 1, //
pageSize: 10, // pageSize: 10, //
total: 0, // total: 0, //
@ -136,6 +133,8 @@ export default {
}, },
mounted() { mounted() {
this.initData() this.initData()
this.getSummaryData()
}, },
methods: { methods: {
// //
@ -149,14 +148,19 @@ export default {
pageNo: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
fetchStatus :this.formSearch.status || 0, fetchStatus :this.formSearch.status || 0,
startTime:this.formSearch.time[0] || null, startTime:this.formSearch.time?this.formSearch.time[0] : null,
endTime:this.formSearch.time[1] || null endTime:this.formSearch.time?this.formSearch.time[1] : null
} }
getSendList(params).then(res => { getSendList(params).then(res => {
this.tableData = res.data.list this.tableData = res.data.list
this.total = res.data.count this.total = res.data.count
}) })
}, },
getSummaryData(){
summaryPortal().then(res =>{
this.AllData = res.data
})
},
//.dialog //.dialog
addUserDialog() { addUserDialog() {
this.dialogSendVisible = true this.dialogSendVisible = true

33
src/views/status/goodsCount.vue

@ -6,6 +6,7 @@
<el-date-picker <el-date-picker
v-model="formSearch.time" v-model="formSearch.time"
size="mini" size="mini"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -18,15 +19,15 @@
</el-form> </el-form>
</div> </div>
<el-table :data="tableData" style="width: 100%" header-row-class-name=""> <el-table :data="tableData" style="width: 100%" header-row-class-name="">
<el-table-column prop="a" label="取码单号"></el-table-column> <el-table-column prop="fetchId" label="取码单号"></el-table-column>
<el-table-column prop="b" label="取码日期"></el-table-column> <el-table-column prop="fetchTime" label="取码日期"></el-table-column>
<el-table-column prop="c" label="取码数(万)"></el-table-column> <el-table-column prop="fetchCount" label="取码数(万)"></el-table-column>
<el-table-column prop="d" label="印码数"></el-table-column> <el-table-column prop="printCount" label="印码数"></el-table-column>
<el-table-column prop="e" label="已送货胶带数"></el-table-column> <el-table-column prop="sentBand" label="已送货胶带数"></el-table-column>
<el-table-column prop="e" label="未印制码数"></el-table-column> <el-table-column prop="unPrintCount" label="未印制码数"></el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="showDetail">查看去向</el-button> <el-button type="text" size="small" @click="showDetail(scope.row.fetchId)">查看去向</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -45,8 +46,8 @@
</template> </template>
<script> <script>
import { import {
getUserList printList
} from "@/api/user" } from "@/api/status"
export default { export default {
name: "goodsCount", name: "goodsCount",
data() { data() {
@ -59,7 +60,6 @@ export default {
pageSize: 10, // pageSize: 10, //
total: 0, // total: 0, //
tableData: [ tableData: [
{a:'11',b:'11',c:'11',d:'11',e:'11'}
], ],
}; };
}, },
@ -75,20 +75,19 @@ export default {
// //
initData() { initData() {
const params = { const params = {
pageNum: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
search:{ startTime:this.formSearch.time?this.formSearch.time[0] : null,
}, endTime:this.formSearch.time?this.formSearch.time[1] : null
sort:''
} }
getUserList(params).then(res => { printList(params).then(res => {
this.tableData = res.data.list this.tableData = res.data.list
this.total = res.data.count this.total = res.data.count
}) })
}, },
// //
showDetail() { showDetail(id) {
this.$router.push({name:'getGoodsDetail'}) this.$router.push({name:'getGoodsDetail',query:{id:id}})
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {

77
src/views/status/sendStatus.vue

@ -7,6 +7,7 @@
<el-date-picker <el-date-picker
v-model="formSearch.time" v-model="formSearch.time"
size="mini" size="mini"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -19,14 +20,14 @@
</el-form> </el-form>
</div> </div>
<el-table :data="tableData" style="width: 100%" header-row-class-name=""> <el-table :data="tableData" style="width: 100%" header-row-class-name="">
<el-table-column prop="a" label="日期"></el-table-column> <el-table-column prop="time" label="日期"></el-table-column>
<el-table-column prop="b" label="发码数(万)"></el-table-column> <el-table-column prop="send_count" label="发码数(万)"></el-table-column>
<el-table-column prop="c" label="领码数(万)"></el-table-column> <el-table-column prop="fetch_count" label="领码数(万)"></el-table-column>
<el-table-column prop="d" label="废码数"></el-table-column> <el-table-column prop="discard_count" label="废码数"></el-table-column>
<el-table-column prop="e" label="发码剩余(万)"></el-table-column> <el-table-column prop="send_remainder" label="发码剩余(万)"></el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="showDetail">查看</el-button> <el-button type="text" size="small" v-if="scope.row.type != 1" @click="showDetail(scope.row.real_id,scope.row.type)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -68,8 +69,8 @@
</template> </template>
<script> <script>
import { import {
getUserList columnPortal,tablePortal
} from "@/api/user" } from "@/api/status"
import * as echarts from 'echarts'; import * as echarts from 'echarts';
export default { export default {
name: "sendStatus", name: "sendStatus",
@ -90,13 +91,13 @@ export default {
pageSize: 10, // pageSize: 10, //
total: 0, // total: 0, //
tableData: [ tableData: [
{a:'11',b:'11',c:'11',d:'11',e:'11'}
], // ], //
}; };
}, },
mounted() { mounted() {
this.initData() this.initData()
this.setEcharts() this.initEchartsData()
// this.setEcharts()
}, },
methods: { methods: {
// //
@ -107,30 +108,58 @@ export default {
// //
initData() { initData() {
const params = { const params = {
pageNum: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
search:{ startTime:this.formSearch.time?this.formSearch.time[0] : null,
}, endTime:this.formSearch.time?this.formSearch.time[1] : null
sort:''
} }
getUserList(params).then(res => { tablePortal(params).then(res => {
this.tableData = res.data.list this.tableData = res.data.list
this.total = res.data.count this.total = res.data.count
}) })
},
initEchartsData(){
let myDate = new Date()
var nowTime = myDate.toLocaleDateString()
var nowTime = nowTime.split('/')[0] + (nowTime.split('/')[1].length > 1 ? nowTime.split('/')[1] : '0'+nowTime.split('/')[1])
var beforeTime = new Date(myDate.setMonth(myDate.getMonth() - 11)).toLocaleDateString()
var beforeTime = beforeTime.split('/')[0] + (beforeTime.split('/')[1].length > 1 ?beforeTime.split('/')[1] : '0'+beforeTime.split('/')[1])
const params2 = {
start_month:beforeTime,
end_month:nowTime
}
columnPortal(params2).then(res => {
let data = res.data
var xData = []
var yData1 = []
var yData2 = []
var yData3 = []
for (let i = 0; i < data.length; i++) {
const element = data[i];
xData.push(element.month)
yData1.push(element.send_count)
yData2.push(element.fetch_count)
yData3.push(element.discard_count)
}
this.setEcharts(xData,yData1,yData2,yData3)
})
}, },
// //
showDetail(id) { showDetail(id,type) {
this.dialogDetailVisible = true // this.dialogDetailVisible = true
if(type == 2) {
this.$router.push({name:'statusGetDetail',query:{id:id}})
} else if (type == 3) {
this.$router.push({name:'statusCancelDetail',query:{FMD_id:id}})
}
}, },
// //
showGetDetail(){ showGetDetail(){
this.$router.push({name:'getDetail'}) this.$router.push({name:'getDetail'})
}, },
setEcharts( setEcharts(xData,yData1,yData2,yData3){
xData = ['2020-11', '2020-12', '2021-01', '2021-02', '2021-03', '2021-04', '2021-05', '2021-06', '2021-07', '2021-08', '2021-09', '2021-10'],
productIdiss = [120, 200, 150, 80, 70, 110, 130, 200, 150, 80, 70, 110] ){
this.ehcarts_1 = echarts.init(document.getElementById("ehcarts_1")); this.ehcarts_1 = echarts.init(document.getElementById("ehcarts_1"));
let option = { let option = {
grid: { grid: {
@ -172,7 +201,7 @@ export default {
position: "top" position: "top"
} }
}, },
data: productIdiss data: yData1
}, },
{ {
name: "取码", name: "取码",
@ -185,7 +214,7 @@ export default {
position: "top" position: "top"
} }
}, },
data: productIdiss data: yData2
}, },
{ {
name: "作废", name: "作废",
@ -198,7 +227,7 @@ export default {
position: "top" position: "top"
} }
}, },
data: productIdiss data: yData3
} }
] ]
} }

Loading…
Cancel
Save