Commit 9d9cb833 authored by 张锡奇's avatar 张锡奇

commit

parent 65e2cd33
......@@ -2,10 +2,10 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1,user-scalable=no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3,minimum-scale=0.1,user-scalable=yes">
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons' rel="stylesheet">
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script src="https://cdn.bootcss.com/html2canvas/0.4.1/html2canvas.js"></script>
<title>图表</title>
</head>
<body>
......
......@@ -30,7 +30,9 @@
"vux-loader": "^1.2.9"
},
"devDependencies": {
"@antv/f2": "^3.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/runtime": "^7.7.6",
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
......
......@@ -19,18 +19,21 @@
<style lang="less">
@import "./styles/icon";
@import "./styles/iconfont";
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
// font-family: 'Avenir', Helvetica, Arial, sans-serif;
// -webkit-font-smoothing: antialiased;
// -moz-osx-font-smoothing: grayscale;
// color: #2c3e50;
background: #eef4fe;
height:100%;
width:100%;
font-size:12px;
}
* {
touch-action: pan-y;
// touch-action: all;
// touch-action: pan-x;
}
</style>
<style lang="less">
.modal{
opacity: 0;
display: none;
transition: all 0.3s;
}
.modalActive{
opacity: 1;
display: block;
}
.modal>.content,.modal_active>.content{
position: absolute;
top:0;
left:0;
height:100%;
width:100%;
background: rgba(0, 0, 0, 0.5);
z-index:999;
display: flex;
justify-content: center;
align-items: center;
}
</style>
<template>
<div :class="showModal ? 'modal modalActive' : 'modal'">
<div class="content">
<slot></slot>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
export default {
name: 'Modal',
data () {
return {
}
},
props:{
showModal: {
type: Boolean,
default: false
},
},
async mounted(){
window.d = this;
},
methods:{
},
components:{
},
}
</script>
This diff is collapsed.
<template>
<div class="searchComponent">
<group>
<flexbox style="min-height:40px;border-bottom:1px solid #5E9AFE;padding:0 0.1rem;padding:0 10px;">
<div style="width:50px;text-align:center;font-size:12px;">时间纬度</div>
<flexbox-item class="padding-left-15 btns">
<!-- <group style="margin-top:0 !important;"> -->
<div class="Content gradient" v-if="typeList.input || typeList.select">
<div class="selector" v-if="typeList.select">
<select :multiple="multiple" v-model="selectValue" @change="changeSelect($event)">
<option v-for="(item,index) in status" :key="index" :value="item.sStatus">{{item.sStatus || '全部'}}</option>
</select>
</div>
<div class="_input" v-if="typeList.input">
<input class="input" v-model="inputValue" :placeholder="placeholder" v-on:input="changeInput"/>
<i class='iconfont icon-close' id="close" v-if="inputValue" @click='clearInputValue'></i>
</div>
</div>
<div class="Content">
<div class="Title">时间纬度</div>
<div class="padding-left-15 btns">
<button @click="changeDate(index)" v-for="(item,index) in btns" :key="index" :class="index == active ? 'active' : ''">
{{item}}
</button>
</flexbox-item>
</flexbox>
<flexbox style="min-height:40px;padding:0 10px;">
<div style="width:50px;text-align:center;font-size:12px;">日期范围</div>
<flexbox-item class="padding-left-15">
<datetime v-model="search.dBeginDate" format="YYYY-MM-DD" @on-change="searchData($event,1)"></datetime>
</flexbox-item>
<flexbox-item class="padding-right-15">
<datetime :start-date="search.dBeginDate" v-model="search.dEndDate" format="YYYY-MM-DD" @on-change="searchData($event,2)"></datetime>
</flexbox-item>
</flexbox>
</group>
</div>
</div>
<div class="Content" >
<div class="Title">日期范围</div>
<div style="flex:1;display:flex;">
<div class="padding-left-15 dateTime" style="flex:1;justify-content:flex-end;align-items:center;display:flex;">
<datetime v-model="search.dBeginDate" format="YYYY-MM-DD" @on-change="searchData($event,1)"></datetime>
<!-- <i class='iconfont icon-right'></i> -->
</div>
<div class="padding-right-15 dateTime" style="flex:1;justify-content:flex-end;align-items:center;display:flex;">
<datetime :start-date="search.dBeginDate" v-model="search.dEndDate" format="YYYY-MM-DD" @on-change="searchData($event,2)"></datetime>
<!-- <i class='iconfont icon-right'></i> -->
</div>
</div>
</div>
<!-- </group> -->
</div>
</template>
......@@ -31,10 +47,44 @@ export default {
data () {
return {
btns:['本日','本周','本月','本年'],
active:2
active:2,
inputValue:'',
selectValue:'全部'
}
},
props:{
search: {
type: Object,
default:function(){
return {}
}
},
status: {
type: Array,
default:function(){
return []
}
},
typeList:{
type:Object,
default:function(){
return {
input:false,
select:false,
btns:true,
time:true
}
}
},
multiple:{
type:Boolean,
default:false
},
placeholder:{
type:String,
default:'请输入...'
}
},
props:['search'],
methods:{
searchData(e,type){
let dateList = this.btns.map(x=>Util.getDate(x));
......@@ -58,8 +108,25 @@ export default {
this.active = index;
this.search.dEndDate = Util.dateFormat(new Date(),'yyyy-MM-dd');
this.search.dBeginDate = Util.getDate(this.btns[index]);
},
changeSelect(e){
this.selectValue = this.status[e.target.selectedIndex].sStatus;
this.search.sStatus = this.selectValue;
this.global.$emit('searchData');
},
changeInput(e){
this.search.serachvalue = this.inputValue;
this.global.$emit('searchData');
},
clearInputValue(e){
this.inputValue = "";
this.search.serachvalue = this.inputValue;
this.global.$emit('searchData');
}
},
mounted(){
window.d = this;
},
components: {
Search,
Selector,
......@@ -77,24 +144,112 @@ export default {
<style lang="less">
.searchComponent{
.Content{
min-height:40px;padding:0 10px;background:white;
display: flex;
align-items: center;
.Title{
width:50px;text-align:center;font-size:12px;
}
}
.gradient{
background: linear-gradient(90deg,#8470FF, #2d8cf0, #00B2EE)
}
.btns{
text-align: right;
font-size:12px;
flex:1;
button{
height: 20px;
width: 50px;
border: 1px solid grey;
border-radius: 50px;
margin-left:10px;
box-sizing: border-box;
}
.active{
color:#5E9AFE;
border:1px solid #5E9AFE;
box-sizing: border-box;
}
}
.dateTime{
a{
display: flex;
align-items: center;
}
}
/deep/ .vux-cell-value{
font-size:12px !important;
}
/deep/ .weui-cell__ft{
display: flex;
justify-content: flex-end;
align-items: center;
}
.selector{
select{
width:100%;
}
border-radius: 0;
font-size: 12px;
padding: 5px 20px 5px 10px;
width: 100px;
// background: #ddd;
background:rgba(255,255,525,0.3);
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
height:30px;
position: relative;
transition: all 0.3ms;
display: flex;
align-items: center;
border-right:0.5px solid #8a8a8a;
}
.selector:after{
content:'';
position: absolute;
top:12px;
right:5px;
width: 5px;
height: 5px;
border: 5px solid;
border-color: #666 transparent transparent transparent;
box-sizing: border-box;
}
._input {
flex: 1;
// border: 1px solid #ccc;
box-sizing: border-box;
border-left: 0;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
padding: 0 25px 0 5px;
height:30px;
font-size:12px;
position: relative;
box-sizing: border-box;
background:rgba(255,255,525,0.3);
input{
height:100%;
width:100%;
}
input::-webkit-input-placeholder {
/* placeholder颜色 */
color: black;
}
.iconfont{
position: absolute;
right:0;
width:25px;
height:100%;
top: 0;
font-size: 15px;
display: flex;
justify-content: center;
align-items: center;
color:red;
}
}
}
</style>
let url = 'https://weixin.huansi.net/apiproxy/huansi/Mall'
import apiURL from './host.js'
const methodMap = {
/**
* 产品颜色销售排行TOP50
*/
getMmcolorsaletop:{url:url+'/bianalysis/mmcolorsaletop/',method:'get'},
getMmcolorsaledtltop:{url:url+'/bianalysis/mmcolorsaledtltop/',method:'get'},
getMmcolorsaletop:{url:apiURL('sales')+'/bianalysis/mmcolorsaletop/',method:'get'},
getMmcolorsaledtltop:{url:apiURL('sales')+'/bianalysis/mmcolorsaledtltop/',method:'get'},
/**
* 产品销售排行TOP25
*/
getMmsaletop:{url:url+'/bianalysis/mmsaletop/',method:'get'},
getMmsaledtltop:{url:url+'/bianalysis/mmsaledtltop/',method:'get'},
getMmsaletop:{url:apiURL('sales')+'/bianalysis/mmsaletop/',method:'get'},
getMmsaledtltop:{url:apiURL('sales')+'/bianalysis/mmsaledtltop/',method:'get'},
/**
* 客户
*/
getPbcustomer:{url:url+'/bianalysis/pbcustomer/',method:'get'},
getPbcustomerDtl:{url:url+'/bianalysis/pbcustomerdtl/',method:'get'},
getPbcustomer:{url:apiURL('sales')+'/bianalysis/pbcustomer/',method:'get'},
getPbcustomerDtl:{url:apiURL('sales')+'/bianalysis/pbcustomerdtl/',method:'get'},
/**
* 销售员
*/
getPbsales:{url:url+'/bianalysis/pbsales/',method:'get'},
getPbsalesDtl:{url:url+'/bianalysis/pbsalesdtl/',method:'get'},
getPbsales:{url:apiURL('sales')+'/bianalysis/pbsales/',method:'get'},
getPbsalesDtl:{url:apiURL('sales')+'/bianalysis/pbsalesdtl/',method:'get'},
/**
* 应收应付 || 实收实付
*/
getPayable:{url:url+'/bianalysis/payable/',method:'get'},
getReceivepay:{url:url+'/bianalysis/receivepay/',method:'get'},
getPayable:{url:apiURL('sales')+'/bianalysis/payable/',method:'get'},
getReceivepay:{url:apiURL('sales')+'/bianalysis/receivepay/',method:'get'},
/**
* 销售统计
*/
sellinfo:{url:`${url}/bianalysis/sellinfo/`,method:'get'},
sellinfo:{url:`${apiURL('sales')}/bianalysis/sellinfo/`,method:'get'},
/**
* 样品信息
*/
getSpeciminHdr:{url:url+'/mmmaterial/getlist/',method:'post'},
getSpeciminDtl:{url:url+'/mmmaterial/getdetail/',method:'post'},
getSpeciminHdr:{url:apiURL('sales')+'/mmmaterial/getlist/',method:'post'},
getSpeciminDtl:{url:apiURL('sales')+'/mmmaterial/getdetail/',method:'post'},
/**
* tiip小程序
*/
//面料主档
getTiipSpeciminHdr:{url:apiURL('default')+'/mmmaterial/getlist/',method:'post'},
//订单明细查询
getTiipPbcontract:{url:apiURL('default')+'/pbcontracthdr/',method:'post'}, //采购
getTiipFipayable:{url:apiURL('default')+'/fipayablehdr/',method:'post'}, //应付
getTiipFireceivable:{url:apiURL('default')+'/fireceivablehdr/',method:'post'}, //应收
getTiipFabric:{url:apiURL('default')+'/mmFabric/',method:'post'}, //验布
};
export default methodMap;
import store from '@/store/modules/app.js'
function urlFun(name){
let userID = store.state.userId;
var url={
/**
* 门市域名
*/
// sales:`http://192.168.4.40:5000`,
// sales:`http://122.224.36.54:18005`,//测试服务器
sales:`https://weixin.huansi.net/apiproxy/huansi/Mall`,
/**
* 默认公司
*/
// default:`http://192.168.4.37:5001`,
default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
/**
* 基本地址
*/
// app:`http://192.168.4.31:5002`,
app:`https://weixin.huansi.net/apiproxy/huansi/service`,
/**
* 内部公司
*/
// inside:`http://192.168.4.39:5003`,
inside:`https://weixin.huansi.net/apiproxy/huansi/ERP`,
}
return url[name]
}
export default urlFun;
......@@ -73,6 +73,7 @@ Http.install = function (Vue) {
console.log('Customize Notice', error);
}
} else if (error.status === 500) {
resolve(response.data);
console.log('Customize Notice', error);
} else {
console.log('Customize Notice', error);
......@@ -109,6 +110,7 @@ Http.install = function (Vue) {
console.log('Customize Notice', error);
}
} else if (error.status === 500) {
resolve(response.data);
console.log('Customize Notice', error);
} else {
console.log('Customize Notice', error);
......
......@@ -11,13 +11,15 @@ import store from './store';
import VueWechatTitle from 'vue-wechat-title';
import Toast from './libs/toast/';
// import 'lib-flexible';
// import 'layui-src/dist/css/layui.css'
// import 'layui-src/dist/layui.js'
import 'layui-src/dist/css/layui.css'
import 'layui-src/dist/layui.js'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css' // Ensure you are using css-loader
import 'babel-polyfill'
import echarts from 'echarts'
import { ConfirmPlugin } from 'vux'
import F2 from '@antv/f2';
import { ConfirmPlugin,ToastPlugin } from 'vux'
import urlFun from './libs/host.js'
Vue.use(Vuetify)
Vue.use(VueWechatTitle);
......@@ -25,10 +27,15 @@ Vue.use(VueRouter);
Vue.use(Http);
Vue.use(Toast)
Vue.use(ConfirmPlugin);
Vue.use(ToastPlugin);
Vue.prototype.global = new Vue({});
Vue.prototype.util = Util;
Vue.prototype.$echarts = echarts
Vue.prototype.$F2 = F2
Vue.prototype.$url = urlFun
function getAbsolutePath () {
let path = location.pathname
......
......@@ -100,6 +100,136 @@ let routes = [
}
}
]
},
{
name:'main',
component: () => import('@/view/main.vue'),
path:'/main',
children:[
{
path:'/tiip/specimen/:userId/:uGuid',
name:'specimen',
component:()=> import('@/view/tiip/specimen/index.vue'),
meta:{
title: '样品信息'
}
}
]
},
{
name:'main',
component: () => import('@/view/main.vue'),
path:'/main',
children:[
{
path:'/tiip/searchOrder/list/:userId',
name:'searchOrderList',
component:()=> import('@/view/tiip/searchOrder/index.vue'),
meta:{
title: '订单查询'
}
},
{
path:'/tiip/searchOrder/detail',
name:'searchOrderDetail',
component:()=> import('@/view/tiip/searchOrder/detail.vue'),
meta:{
title: '订单详情'
}
},
{
path:'/tiip/searchOrder/materialDetail',
name:'searchOrderMaterialDetail',
component:()=> import('@/view/tiip/searchOrder/materialDetail.vue'),
meta:{
title: '产品详情'
}
},
{
path:'/tiip/searchOrder/track',
name:'searchOrderTrack',
component:()=> import('@/view/tiip/searchOrder/track.vue'),
meta:{
title: '订单全程跟踪'
}
}
]
},
{
name:'main',
component: () => import('@/view/main.vue'),
path:'/main',
children:[
{
path:'/tiip/profitAnalysis/list/:userId',
name:'profitAnalysisList',
component:()=> import('@/view/tiip/profitAnalysis/index.vue'),
meta:{
title: '订单利润分析'
}
},
{
path:'/tiip/profitAnalysis/detail',
name:'profitAnalysisDetail',
component:()=> import('@/view/tiip/profitAnalysis/detail.vue'),
meta:{
title: '订单明细'
}
},
{
path:'/tiip/profitAnalysis/track',
name:'profitAnalysisTrack',
component:()=> import('@/view/tiip/profitAnalysis/track.vue'),
meta:{
title: '订单全程跟踪'
}
}
]
},
{
name:'main',
component: () => import('@/view/main.vue'),
path:'/main',
children:[
{
path:'/tiip/orderDetails/list/:type',
name:'orderDetailsIndex',
component:()=> import('@/view/tiip/orderDetails/index.vue'),
meta:{
title: '采购信息'
}
},
]
},
{
name:'main',
component: () => import('@/view/main.vue'),
path:'/main',
children:[
{
path:'/common/customField',
name:'customField',
component:()=> import('@/view/common/customField.vue'),
meta:{
title: '自定义列表'
}
},
]
},
{
name:'main',
component: () => import('@/view/main.vue'),
path:'/main',
children:[
{
path:'/tiip/chart/inventory/:userId',
name:'tiipChartInventory',
component:()=> import('@/view/tiip/chart/inventory.vue'),
meta:{
title: '库存金额分析'
}
},
]
}
];
......
......@@ -2,6 +2,8 @@ import Vue from 'vue';
import Vuex from 'vuex';
import app from './modules/app';
import searchOrder from './modules/searchOrder';
import profitAnalysis from './modules/profitAnalysis';
Vue.use(Vuex);
......@@ -14,7 +16,9 @@ const store = new Vuex.Store({
},
actions: {},
modules: {
app
app,
searchOrder,
profitAnalysis
}
});
......
......@@ -5,9 +5,13 @@ const app = {
state: {
userInfo:{},
chartHearData:{},
iProjectId:5599
iProjectId:5599,
userId:'1115442959606779905'
},
mutations: {
saveUserId(state,data){
state.userId = data;
},
getUserInfo(state,obj){
state.userInfo = obj;
},
......@@ -19,6 +23,9 @@ const app = {
}
},
actions: {
saveUserId({commit},obj){
commit('saveUserId',obj);
},
getUserInfo({commit},obj){
commit('getUserInfo',obj);
},
......
import Util from '@/libs/util';
import Vue from 'vue';
const obj = {
state: {
hdr:{},
dtl:{},
},
mutations: {
profitAnalysisSaveHdr(state,data){
state.hdr = data;
},
profitAnalysisSaveDtl(state,data){
state.dtl = data;
}
},
actions: {
profitAnalysisSaveHdr({commit},data){
commit('profitAnalysisSaveHdr',data);
},
profitAnalysisSaveDtl({commit},data){
commit('profitAnalysisSaveDtl',data);
}
}
};
export default obj;
import Util from '@/libs/util';
import Vue from 'vue';
const app = {
state: {
hdr:{},
dtl:{},
},
mutations: {
searchOrderSaveHdr(state,data){
state.hdr = data;
},
searchOrderSaveDtl(state,data){
state.dtl = data;
}
},
actions: {
searchOrderSaveHdr({commit},data){
commit('searchOrderSaveHdr',data);
},
searchOrderSaveDtl({commit},data){
commit('searchOrderSaveDtl',data);
}
}
};
export default app;
.iCard{
font-size:12px;
overflow:hidden;
background:#fff;
border-radius:5px;
margin:8px 8px 0;
box-shadow:0 1px 3px #bababa;
width:auto;
.cardHeader{
display:flex;
align-items:center;
padding:6px 11px 6px 16px;
border-bottom: 2px solid #EDF4FF;
height:25px;
.content{
flex:1;
text-align: left;
font-size:14px;
color:#000;
}
.extra{
text-align:right;
padding:5px 10px;
box-sizing:border-box;
background:#5cadff;
color:white;
border-radius:8px;
font-size:12px;
height:25px;
display:flex;
align-items:center;
}
}
.cardBody,.cardFooter{
margin-top:13px;
color:#80848f;
padding:0 16px;
display: flex;
view{
flex:1
}
}
.cardFooter{
margin-bottom:13px;
}
}
\ No newline at end of file
@font-face{
font-family:'iconfont';
src:url("https://weixin.huansi.net/apiproxy/dingding/BXPC/font/icon.ttf") format('truetype');
font-weight: normal;
font-style: normal;
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-weifenxiaopcjiemianzhuanhuan:before {
content: "\e637";
}
.icon-weixin:before {
content: "\e66c";
}
.icon-keshangguanli:before {
content: "\e611";
}
.icon-youjiantou1:before {
content: "\e644";
}
.icon-caidan:before {
content: "\e63c";
}
.icon-back:before {
content: "\e66a";
}
.icon-zhuanfa:before {
content: "\d727";
}
.icon-02:before {
content: "\e64e";
}
.icon-caidan1:before {
content: "\e64d";
}
.icon-baobiao:before {
content: "\e618";
}
.icon-gerenyonghuzhuce:before {
content: "\e699";
}
.icon-shangpinyangpinku:before {
content: "\e673";
}
.icon-ceng:before {
content: "\e669";
}
.icon-xiaoshoutongji:before {
content: "\e661";
}
.icon-jia1:before {
content: "\e61f";
}
.icon-zidongshengji:before {
content: "\e662";
}
.icon-wenjian:before {
content: "\e614";
}
.icon-piliangluru-copy:before {
content: "\e683";
}
.icon-shidianyincang:before {
content: "\e6b7";
}
.icon-jinxiaocun:before {
content: "\e602";
}
.icon-xiugai:before {
content: "\e650";
}
.icon-icon-text-fi-delete:before {
content: "\e65d";
}
.icon-qiankuan:before {
content: "\e65b";
}
.icon-shuzibiaoqian:before {
content: "\e68b";
}
.icon-manual:before {
content: "\d705";
}
.icon-mianliao:before {
content: "\e642";
}
.icon-fangdajing:before {
content: "\e609";
}
.icon-danweiguanli:before {
content: "\e719";
}
.icon-bi:before {
content: "\e615";
}
.icon-zuzhi:before {
content: "\e622";
}
.icon-calendar:before {
content: "\e7d6";
}
.icon-zhuanzhang:before {
content: "\e7d8";
}
.icon-kucun-:before {
content: "\e624";
}
.icon-ccgl-rukuguanli-1:before {
content: "\e61d";
}
.icon-ccgl-rukucaozuo-1:before {
content: "\e631";
}
.icon-icon_user-defined:before {
content: "\e613";
}
.icon-Warehouse_01:before {
content: "\e6f5";
}
.icon--:before {
content: "\e667";
}
.icon-fukuan3:before {
content: "\e638";
}
.icon-bumenfeiyongfenxi:before {
content: "\e61a";
}
.icon-kefu:before {
content: "\e70a";
}
.icon-zuoyouqiehuan:before {
content: "\e64a";
}
.icon-fuliao:before {
content: "\e71a";
}
.icon-qita:before {
content: "\e65c";
}
.icon-youjiantou:before {
content: "\e647";
}
.icon-caigou:before {
content: "\e649";
}
.icon-tongbu:before {
content: "\e990";
}
.icon-wentifankui1:before {
content: "\e632";
}
.icon-yuntongbu:before {
content: "\e625";
}
.icon-shebei:before {
content: "\e61c";
}
.icon-fukuandan:before {
content: "\e691";
}
.icon-icons-:before {
content: "\e60d";
}
.icon-location:before {
content: "\e61e";
}
.icon-fukuan:before {
content: "\f627";
}
.icon-yaoqingyoujiang:before {
content: "\e6a5";
}
.icon-shouzhi:before {
content: "\e62e";
}
.icon-chanpinfuwu:before {
content: "\e612";
}
.icon-BIfenxi:before {
content: "\e7e5";
}
.icon-wenbenx:before {
content: "\e737";
}
.icon-shoukuandan:before {
content: "\e648";
}
.icon-qiehuan:before {
content: "\e74b";
}
.icon-xiala:before {
content: "\e663";
}
.icon-zhuye:before {
content: "\e62a";
}
.icon-caidan3:before {
content: "\e657";
}
.icon-shenqingdan:before {
content: "\e62d";
}
.icon-jiagongdanguanli:before {
content: "\e64f";
}
.icon-yuangongguanli:before {
content: "\e623";
}
.icon-tuihuo:before {
content: "\e630";
}
.icon-qiehuangongsi:before {
content: "\e73d";
}
.icon-yingfu:before {
content: "\e633";
}
.icon-lianxiwomen:before {
content: "\e666";
}
.icon-zhanghu:before {
content: "\e664";
}
.icon-fahuo:before {
content: "\e608";
}
.icon-shuqian:before {
content: "\e600";
}
.icon-fukuan1:before {
content: "\e81f";
}
.icon-dianhua:before {
content: "\e616";
}
.icon-zhongyao:before {
content: "\e698";
}
.icon-yunzhu:before {
content: "\e660";
}
.icon-baobiao1:before {
content: "\e626";
}
.icon-quanxianguanli:before {
content: "\d627";
}
.icon-kucunjineicon:before {
content: "\e617";
}
.icon-mianliao1:before {
content: "\e605";
}
.icon-gouwuche:before {
content: "\e601";
}
.icon-kucunchaxun:before {
content: "\d621";
}
.icon-baobiao2:before {
content: "\e628";
}
.icon-yaoqing:before {
content: "\e6d1";
}
.icon-xiaoshoupaihang:before {
content: "\e651";
}
.icon-bitian:before {
content: "\e63e";
}
.icon-yangpin:before {
content: "\e634";
}
.icon-zhongduanweihu:before {
content: "\e60b";
}
.icon-database:before {
content: "\e6bc";
}
.icon-dingdan:before {
content: "\e629";
}
.icon-chuku:before {
content: "\e620";
}
.icon-jian:before {
content: "\e640";
}
.icon-address-book:before {
content: "\ef12";
}
.icon-tongxun:before {
content: "\e62b";
}
.icon-yuyin:before {
content: "\e6ae";
}
.icon-daijiagong:before {
content: "\e604";
}
.icon-rili:before {
content: "\e78f";
}
.icon-wuliaofahuo:before {
content: "\e610";
}
.icon-baojia:before {
content: "\c681";
}
.icon-yincang:before {
content: "\e60f";
}
.icon-dingwei:before {
content: "\e73a";
}
.icon-xiaoxitixing:before {
content: "\e62f";
}
.icon-fuzhai:before {
content: "\e60e";
}
.icon-shoukuan:before {
content: "\e655";
}
.icon-bumenyuangong:before {
content: "\e8c9";
}
.icon-zhichu:before {
content: "\e603";
}
.icon-shezhi:before {
content: "\e60a";
}
.icon-saomiao:before {
content: "\e636";
}
.icon-xiugai-:before {
content: "\e6b0";
}
.icon-jiaosequanxian:before {
content: "\e643";
}
.icon-icon-test:before {
content: "\e606";
}
.icon-Play:before {
content: "\eb78";
}
.icon-tupian:before {
content: "\e6cf";
}
.icon-liebiao:before {
content: "\e689";
}
.icon-shoukuan1:before {
content: "\e635";
}
.icon-shenpi:before {
content: "\e6da";
}
.icon-yitusoutu:before {
content: "\d636";
}
.icon-yuyin1:before {
content: "\e61b";
}
.icon-wangzhan:before {
content: "\e621";
}
.icon-chacha:before {
content: "\e641";
}
.icon-jianpan:before {
content: "\e619";
}
.icon-dacang-chukudan:before {
content: "\e607";
}
.icon-xiazai:before {
content: "\e665";
}
.icon-kaidan:before {
content: "\e62c";
}
.icon-zhinengyuyinguanli:before {
content: "\e60c";
}
.icon-zhaoxiangji:before {
content: "\e675";
}
.icon-gonggao:before {
content: "\c67a";
}
.icon-banben:before {
content: "\c627";
}
.icon-icon_daiban:before{
content: "\d654";
}
.icon-fenxiang:before{
content: "\d713";
}
.icon-miaogao:before{
content: "\d628";
}
.icon-caozuo1:before{
content: "\d639";
}
.icon-dayin:before{
content: "\d629";
}
.icon-kehuguanli:before{
content: "\d630";
}
.icon-dingdanchaxun:before{
content: "\d63b";
}
.icon-lirunfenxi:before{
content: "\d676";
}
\ No newline at end of file
<style lang="less" scoped>
#chartCustomDetail{
font-size:12px;
height:100%;
h2{
text-align: center;
height:40px;
line-height: 40px;
background: #19be6b;
color:white;
position: fixed;
top:0;
left:0;
width:100%;
z-index:999;
}
.center{
text-align: center;
......@@ -31,14 +40,39 @@
img{
width:100%;
}
.vux_table{
margin-top:40px;
}
.noData{
margin-top:120px;
}
}
</style>
<template>
<div id="chartCustomDetail">
<div id="chartCustomDetail" :style="value.length <= 0 ? 'background:white;' : ''">
<h2>{{title}}</h2>
<div ref='chart' :style="{width: '100vw', height: '100vh',display:value.length> 0 ? 'block' : 'none'}"></div>
<img v-if="value.length<= 0" src="@/assets/noData.jpg" class="_img" alt="">
<div class="vux_table" v-if="value.length > 0">
<x-table :cell-bordered="true" style="background-color:#fff;">
<thead>
<tr style="background-color: #F7F7F7">
<th>日期</th>
<th>金额</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in value" :key="index">
<td>{{item.sYearMonth}}</td>
<td>{{item.nAmount || 0}}</td>
</tr>
</tbody>
</x-table>
</div>
<div class="noData" v-else>
<img src="@/assets/noData.jpg" class="_img" alt="">
</div>
<!-- <div ref='chart' :style="{width: '100vw', height: '100vh',display:value.length> 0 ? 'block' : 'none'}"></div>
<img v-if="value.length<= 0" src="@/assets/noData.jpg" class="_img" alt=""> -->
</div>
</template>
......@@ -46,6 +80,7 @@
<script>
import Util from '@/libs/util.js'
import { mapState } from 'vuex';
import { XTable } from 'vux'
export default {
name: 'chartCustomDetail',
......@@ -63,7 +98,7 @@ export default {
this.title = '销售员';
await this.getPbsalesDtl();
}
this.setChart()
// this.setChart()
},
computed:{
...mapState({
......@@ -72,13 +107,13 @@ export default {
})
},
mounted(){
this.myChart=this.$echarts.init(this.$refs.chart)
window.addEventListener("resize",()=>{
this.myChart.resize()
var options=this.myChart.getOption()
options.dataZoom[0].end = document.documentElement.clientWidth > document.documentElement.clientHeight ? 40 : 20
this.myChart.setOption(options);
});
// this.myChart=this.$echarts.init(this.$refs.chart)
// window.addEventListener("resize",()=>{
// this.myChart.resize()
// var options=this.myChart.getOption()
// options.dataZoom[0].end = document.documentElement.clientWidth > document.documentElement.clientHeight ? 40 : 20
// this.myChart.setOption(options);
// });
},
methods:{
async getPbcustomerDtl(){
......@@ -86,12 +121,15 @@ export default {
params:this.chartHearData
},true,{iProjectId:this.iProjectId})
this.value=typeof result=='object'&&result.length>0&&result||[]
this.value = this.value.filter(x=>x.nAmount > 0)
},
async getPbsalesDtl(){
let result= await this.request('getPbsalesDtl',{
params:this.chartHearData
},true,{iProjectId:this.iProjectId})
this.value=typeof result=='object'&&result.length>0&&result||[]
this.value = this.value.filter(x=>x.nAmount > 0)
},
setChart(){
let options = {
......@@ -167,6 +205,9 @@ export default {
this.myChart.setOption(options);
this.myChart.resize()
}
},
components: {
XTable
}
}
</script>
......
......@@ -116,7 +116,8 @@ export default {
if(charts.containPixel('grid',pointInPixel)){
let index=charts.convertFromPixel({ seriesIndex: 0 }, [param.offsetX, param.offsetY])[0]
time=setTimeout(()=>{
if(param.name=='差价')return;
console.log(index)
if(index == 2) return;
var options=charts.getOption()
options.tooltip[0].show=false
charts.setOption(options)
......
<style lang="less" scoped>
#chartMmcolorsale{
font-size:12px;
height:100%;
h2{
text-align: center;
height:40px;
line-height: 40px;
background: #19be6b;
color:white;
position: fixed;
top:0;
left:0;
width:100%;
z-index:999;
}
.center{
text-align: center;
......@@ -31,20 +41,48 @@
img{
width:100%;
}
.vux_table{
margin-top:40px;
}
.noData{
margin-top:120px;
}
}
</style>
<template>
<div id="chartMmcolorsale">
<div id="chartMmcolorsale" :style="value.length <= 0 ? 'background:white;' : ''">
<h2>{{title}}</h2>
<div ref='chart' :style="{width: '100vw', height: '100vh',display:value.length > 0 ? 'block' : 'none'}"></div>
<img v-if="value.lenght<= 0" src="@/assets/noData.jpg" class="_img" alt="">
<div class="vux_table" v-if="value.length > 0">
<x-table :cell-bordered="true" style="background-color:#fff;">
<thead>
<tr style="background-color: #F7F7F7">
<th>日期</th>
<th>金额</th>
<th>数量</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in value" :key="index">
<td>{{item.sYearMonth}}</td>
<td>{{item.nAmount || 0}}</td>
<td>{{item.nQty || 0}}</td>
</tr>
</tbody>
</x-table>
</div>
<div class="noData" v-else>
<img src="@/assets/noData.jpg" class="_img" alt="">
</div>
<!-- <div ref='chart' :style="{width: '100vw', height: '100vh',display:value.length > 0 ? 'block' : 'none'}"></div>
<img v-if="value.lenght<= 0" src="@/assets/noData.jpg" class="_img" alt=""> -->
</div>
</template>
<script>
import Util from '@/libs/util.js';
import { mapState } from 'vuex';
import { XTable } from 'vux'
export default {
name: 'chartMmcolorsaleDetail',
......@@ -58,6 +96,9 @@ export default {
myChart:null
}
},
components: {
XTable
},
async activated(){
if(this.chartHearData.type == 'mmsaletop'){
this.title = '产品销售排行';
......@@ -66,7 +107,7 @@ export default {
this.title = '产品颜色销售排行';
await this.getMmcolorsaledtltop();
}
this.setChart()
// this.setChart()
},
computed:{
...mapState({
......@@ -75,14 +116,14 @@ export default {
})
},
mounted(){
this.myChart=this.$echarts.init(this.$refs.chart)
window.addEventListener("resize",()=>{
var options=this.myChart.getOption()
options.dataZoom[0].end = document.documentElement.clientWidth > document.documentElement.clientHeight ? 40 : 20
this.myChart.setOption(options);
this.myChart.resize()
});
console.log(this.iProjectId)
// this.myChart=this.$echarts.init(this.$refs.chart)
// window.addEventListener("resize",()=>{
// var options=this.myChart.getOption()
// options.dataZoom[0].end = document.documentElement.clientWidth > document.documentElement.clientHeight ? 40 : 20
// this.myChart.setOption(options);
// this.myChart.resize()
// });
// console.log(this.iProjectId)
},
methods:{
async getMmcolorsaledtltop(){
......@@ -90,12 +131,14 @@ export default {
params:this.chartHearData
},true,{iProjectId:this.iProjectId})
this.value=typeof result=='object'&&result.length>0&&result||[]
this.value = this.value.filter(x=>x.nAmount > 0 || x.nQty > 0)
},
async getMmsaledtltop(){
let result= await this.request('getMmsaledtltop',{
params:this.chartHearData
},true,{iProjectId:this.iProjectId})
this.value=typeof result=='object'&&result.length>0&&result||[]
this.value = this.value.filter(x=>x.nAmount > 0 || x.nQty > 0)
},
setChart(){
let options = {
......
......@@ -224,7 +224,6 @@ export default {
});
myChart.on('mouseup', (param)=> {
console.log(this.timer)
window.clearTimeout(this.timer);
});
......@@ -243,10 +242,9 @@ export default {
let index = param.dataIndex;
let data = {};
if(id == 'myChart1'){
console.log(that.pbcustomer)
data = Object.assign(that.pbcustomer[index],{type:'pbcustomer'})
data = Object.assign(that.mmcolorsaletop[index],{type:'pbcustomer'})
}else{
data = Object.assign(that.pbsales[index],{type:'pbsales'});
data = Object.assign(that.mmsaletop[index],{type:'pbsales'});
}
that.$store.dispatch('setChartHearData',data).then(()=>{
that.$router.push({name:'chartCustomDetail'});
......
This diff is collapsed.
This diff is collapsed.
<style lang="less" >
.slide-fade-enter-active {
transition: opacity .5s ease;
}
.slide-fade-leave-active {
transition: opacity .5s ease;
}
.slide-fade-enter, .slide-fade-leave-active {
opacity: 0;
}
h1, h2 {
margin: 0;
padding: 0;
}
img {
display: block;
max-width: 100%;
}
#imageView .imageBox li img{
height:auto !important;
}
#imageView .imageBox li{
display:flex;
align-items:center;
justify-content:center;
}
#specimen{
height:100%;
background: white;
h3{
height:40px;
line-height:40px;
text-align: center;
background:white;
}
.header{
.hdrImg{
width:100%;
height:200px;
display: flex;
justify-content: center;
align-items: center;
background: #eef4fe;
// position: relative;
}
img{
height:200px;
width:100%;
}
// img:after {
// content: "";
// display: inline-block;
// position: absolute;
// z-index: 2;
// top: 0;
// left: calc(50% - 100px);
// width: 200px;
// height: 200px;
// background: url("../../assets/imgErr.png") no-repeat;
// background-position: center;
// background-size: contain;
// background-color: #fff;
// }
}
.info{
.content{
display:flex;
background:white;
padding:16px;
>div{
flex:1
}
}
}
.detail{
background: white;
border-top:1px solid #eef4fe;
.img{
// position: relative;
display: flex;
justify-content: center;
align-items: center;
img{
width: 100%;
max-height:50px;
}
}
// img:after {
// content: "";
// display: inline-block;
// position: absolute;
// z-index: 2;
// top: 0;
// left: 0;
// width: 100%;
// height: 50px;
// background: url("../../assets/imgErr.png") no-repeat;
// background-position: center;
// background-size: contain;
// background-color: #fff;
// }
}
}
</style>
<template>
<div id="specimen">
<div class="header">
<transition name="slide-fade" class="fadeView">
<div v-if="showHdr">
<image-view :imgArr="hdr_src"
:showImageView="true"
:imageIndex="imageHdrIndex"
v-on:hideImage="hideImageView('hdr')"></image-view>
</div>
<div v-if="showDtl">
<image-view :imgArr="dtl_src"
:showImageView="true"
:imageIndex="imageDtlIndex"
v-on:hideImage="hideImageView('dtl')"></image-view>
</div>
</transition>
<div class="hdrImg">
<img v-for="(item, index) in hdr_src" v-if="!hdr.isErr" @error="error(item,index,'hdr')" :src="item" @click="selectImg('hdr',index)" :key="index"/>
<img v-else src="../../assets/imgErr.png"/>
</div>
<div class="info">
<h3>参数</h3>
<div class="content">
<div class="left">
<p>产品编号:{{hdr.sMaterialNo}}</p>
<p>产品名称:{{hdr.sMaterialName}}</p>
<p>规格:{{hdr.sSpecification}}</p>
<p>成分:{{hdr.sComponent}}</p>
</div>
<div class="right">
<p>幅宽:{{hdr.sWidth}}</p>
<p>克重:{{hdr.sGMWT}}</p>
</div>
</div>
</div>
</div>
<div class="detail">
<h3>颜色明细</h3>
<div class="detailImg">
<v-container grid-list-md text-xs-center>
<v-layout row wrap>
<v-flex xs3 v-for="(item, index) in dtl_src" :key="index">
<div class="img">
<img :src="item" @error="error(item,index,'dtl')" v-if="!dtl[index].isErr" @click="selectImg('dtl',index)" />
<img v-else src="../../assets/imgErr.png"/>
</div>
<div style="border:1px solid #ddd;border-top:0;height:20px;font-size:12px;">
{{dtl[index].sColorNo}}
</div>
</v-flex>
</v-layout>
</v-container>
</div>
</div>
</div>
</template>
<script>
import imageView from 'vue-imageview'
import Util from '@/libs/util.js'
export default {
name: 'specimen',
data () {
return {
showHdr:false,
showDtl:false,
imageHdrIndex:0,
imageDtlIndex:0,
hdr_src:[],
dtl_src:[],
iProjectId:'',
sMaterialNo:'',
hdr:{},
dtl:[]
}
},
async mounted(){
this.iProjectId = this.$route.params.iProjectId;
this.$route.params.sMaterialNo.split('.').map((x,y) => {
this.sMaterialNo += String.fromCharCode(x)
})
await this.getSpeciminHdr();
await this.getSpeciminDtl();
},
components:{
'image-view': imageView
},
methods:{
error(item,index,type){
if(type == 'hdr'){
this.$set(this.hdr,'isErr',true)
}else{
this.$set(this.dtl[index],'isErr',true)
}
},
async getSpeciminHdr(){
let result = await this.request('getSpeciminHdr',{
data:[
{key: "url", value: "sMaterialName"},
{key: "searchname", value: this.sMaterialNo}
]
},true,{iProjectId:this.iProjectId,sUserName:'huansi'});
if(this.hdr.length <= 0) return false;
this.hdr = result[0];
this.hdr.isErr = false;
this.hdr_src.push(`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=${this.iProjectId}&iIden=${this.hdr.iIden}&m=${Math.random() / 9999}`)
},
async getSpeciminDtl(){
let result = await this.request('getSpeciminDtl',{
data:[
{key: "url", value: "getDetail"},
{key: "iIden", value: this.hdr.iIden}
]
},true,{iProjectId:this.iProjectId});
result.map(x=>{
x.tCreateTime = x.tCreateTime.replace(/-/g,'/').split('.')[0];
})
let data = result.sort((x,y)=>{
return new Date(x.tCreateTime).getTime() - new Date(y.tCreateTime).getTime();
})
data.map(x=>{
x.isErr = false;
this.dtl_src.push(`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=${this.iProjectId}&iIden=${x.iIden}&m=${Math.random() / 9999}`)
})
this.dtl = data;
},
showImgView (type) {
if(type == 'hdr'){
this.showHdr = true;
}else{
this.showDtl = true;
}
},
hideImageView (type) {
if(type == 'hdr'){
this.showHdr = false;
}else{
this.showDtl = false;
}
},
selectImg (type,index) {
if(type == 'hdr'){
this.showHdr = true;
this.imageHdrIndex = index;
}else{
this.showDtl = true;
this.imageDtlIndex = index;
}
},
}
}
</script>
This diff is collapsed.
module.exports = [
{
bAmend:false,
bDisabled:false,
bHome:false,
bPrint:false,
bRequired:true,
bUsable:true,
bVisible:true,
iRowNo:"1",
iType:"1",
sFieldCaption:"采购合同号",
sFieldName:"sContractNo",
sFieldType:"1",
sTypeName:"卡片1",
rowCount:2
},
{
bAmend:false,
bDisabled:false,
bHome:false,
bPrint:false,
bRequired:true,
bUsable:true,
bVisible:true,
iRowNo:"2",
iType:"1",
sFieldCaption:"状态",
sFieldName:"sStatus",
sFieldType:"7",
sTypeName:"卡片1",
rowCount:2
},
{
bAmend:false,
bDisabled:false,
bHome:false,
bPrint:false,
bRequired:true,
bUsable:true,
bVisible:true,
iRowNo:"3",
iType:"1",
sFieldCaption:"供应商",
sFieldName:"sCustomerName",
sFieldType:"3",
sTypeName:"卡片1",
rowCount:1
},
{
bAmend:false,
bDisabled:false,
bHome:false,
bPrint:false,
bRequired:false,
bUsable:true,
bVisible:true,
iRowNo:"4",
iType:"1",
sFieldCaption:"销售员",
sFieldName:"sSalesName",
sFieldType:"6",
sTypeName:"卡片1",
rowCount:2
},
{
bAmend:false,
bDisabled:false,
bHome:false,
bPrint:false,
bRequired:false,
bUsable:true,
bVisible:true,
iRowNo:"5",
iType:"1",
sFieldCaption:"币种",
sFieldName:"sCurrency",
sFieldType:"0",
sTypeName:"卡片1",
rowCount:2
},
{
bAmend:false,
bDisabled:false,
bHome:false,
bPrint:false,
bRequired:false,
bUsable:true,
bVisible:true,
iRowNo:"6",
iType:"1",
sFieldCaption:"签约日期",
sFieldName:"dContractDate",
sFieldType:"0",
sTypeName:"卡片1",
rowCount:5
},
{
bAmend:false,
bDisabled:false,
bHome:false,
bPrint:false,
bRequired:false,
bUsable:true,
bVisible:true,
iRowNo:"7",
iType:"1",
sFieldCaption:"交货地址",
sFieldName:"sSignAddress",
sFieldType:"0",
sTypeName:"卡片1",
rowCount:1
}
]
<style lang="less" >
#orderDetailsIndex{
height:100%;
display:flex;
flex-direction: column;
background: #f2f2f2;
.CONTENT{
margin-bottom:10px;
.basic{
background: #dfe9fd;
padding-left:5px;
.Title{
height:40px;
display: flex;
align-items: center;
color:#5E9AFE;
font-weight: bold;
}
}
.Info{
border-top:1px solid #dbe9f8;
display: flex;
flex-wrap: wrap;
margin-top: 0px;
font-size:12px;
>div{
display: flex;
width: 100%;
min-height:40px;
>div{
display: flex;
width:100%;
min-height:40px;
>div{
display: flex;
align-items: center;
box-sizing: content-box;
flex:1;
height:100%;
>span{
height:100%;
min-width:80px;
text-align: center;
border-right:1px solid #dbe9f8;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
border-bottom:1px solid #dbe9f8;
color:#586e86;
font-weight: bold;
background: #eef4fe;
}
>div{
height:100%;
width:100%;
display: flex;
flex-wrap: wrap;
>div{
height:100%;
width:100%;
background:white;
align-items: center;
display:inline-flex;
// padding:0 5px 0 0;
>div:first-child{
height:100%;
border-bottom:1px solid #dbe9f8;
border-right:1px solid #dbe9f8;
box-sizing: border-box;
}
>div{
flex:1;
padding-left:5px;
display: flex;
align-items: center;
>span{
width:70px;
display: inline-block;
}
}
}
}
}
}
}
}
}
}
</style>
<template>
<div id="orderDetailsIndex">
<div class="CONTENT" v-for="(v1,i1) in list" :key='i1'>
<div class="basic">
<div class="Title">
<span>{{v1.title}}</span>
</div>
</div>
<div class="Info">
<div v-for="(v2,i2) in v1.child" :key='i2'>
<div v-for="(v3,i3) in v2.child" :key="i3">
<div>
<span>{{v3.sFieldCaption}}</span>
<div>
<div>
<div>
{{DATA[v3.sFieldName]}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
import { mapState } from 'vuex'
import hdrFields from './hdrFields'
export default {
name: 'orderDetailsIndex',
data(){
return{
list:[],
DATA:{}
}
},
computed:{
...mapState({
})
},
async mounted(){
window.d = this;
},
async activated(){
await this.getDetail();
this.filterFields(hdrFields,this.list,'采购基本合同');
},
methods:{
async getDetail(){
let apiURL;
switch(this.$route.params.type){
case 'pbcontract':
apiURL = 'getTiipPbcontract'
break;
case 'pay':
apiURL = 'getTiipFipayable'
break;
case 'receive':
apiURL = 'getTiipFireceivable'
break;
case 'fabric':
case 'inspectionReport':
apiURL = 'getTiipFabric'
break;
default:
break;
}
let hdrResult = await this.request(apiURL,{
data:[
{key:'url',value:this.$route.params.type == 'inspectionReport' ? 'Inspection Report' :'hdr'}
]
},true);
if(hdrResult.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:hdrResult.error_title,
showCancelButton:false,
})
return false;
}
hdrResult.map(x=>{
for(let y in x){
if(isNaN(x[y])&&!isNaN(Date.parse(x[y]))){
   x[y] = Util.dateFormat(x[y],'yyyy-MM-dd')
}
}
})
this.DATA = hdrResult[0];
},
filterFields(fields,arr,title){
arr.push({title:title,child:[]});
let data = arr[arr.length - 1];
for(let y of hdrFields){
let flag = false;
if(data.child.length <= 0){
data.child.push({
rowCount:y.rowCount,
child:[]
})
}
for(let x of data.child){
if(x.child.length != x.rowCount && x.rowCount == y.rowCount){
flag = true;
x.child.push(y);
}
}
if(!flag){
data.child.push({
rowCount:y.rowCount,
child:[y]
})
}
}
}
},
components:{
},
}
</script>
<style lang="less" >
#profitAnalysisDetail{
height:100%;
display:flex;
flex-direction: column;
.basic{
background: white;
padding: 0px 10px 15px 10px;
.Title{
height:40px;
display: flex;
align-items: center;
}
.items{
position: relative;
margin-bottom:10px;
}
.items:before{
content:"";
position: absolute;
left:-10px;
border:2px solid #5cadff;
height:100%;
}
.content{
display: flex;
line-height:25px;
>div>span:first-child{
color:#aaa;
display: inline-block;
width:70px;
}
>div:nth-child(odd){
flex:1;
text-align: left;
}
>div:nth-child(even){
width:40%;
text-align: right;
}
}
}
.line{
flex:1;
border:0.5px solid #5cadff;
margin-left:15px;
}
.Info{
border-top:1px solid #dbe9f8;
display: flex;
flex-wrap: wrap;
margin-top: 0px;
font-size:12px;
>div{
>span{
height:100%;
min-width:80px;
text-align: center;
border-right:1px solid #dbe9f8;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
border-bottom:1px solid #dbe9f8;
color:#586e86;
font-weight: bold;
}
display: flex;
min-height:40px;
align-items: center;
box-sizing: content-box;
width:100%;
>div{
width:100%;
display: flex;
flex-wrap: wrap;
>div{
width:100%;
background:white;
height:40px;
line-height: 40px;
display:inline-flex;
padding:0 5px 0 0;
border-bottom:1px solid #dbe9f8;
>div:first-child{
border-right:1px solid #dbe9f8;
}
>div{
flex:1;
padding-left:5px;
>span{
width:70px;
display: inline-block;
}
}
}
}
}
}
}
</style>
<template>
<div id="profitAnalysisDetail">
<div class="basic">
<div class="Title">
<span>基本信息</span>
<div class="line"></div>
</div>
<div>
<div class="content">
<div>
<span>订单号:</span>
<span @click="routerToTrack" style="color:#5cadff;text-decoration:underline;">{{hdr.sOrderNo}}</span>
</div>
<div style="color:#5cadff;font-weight:bold;">{{hdr.sStatus}}</div>
</div>
<div class="content">
<div><span>客户:</span>{{hdr.sCustomerName}}</div>
</div>
<div class="content">
<div><span>产品:</span><span style="color:black;">{{hdr.sSampleMaterialNo}}{{hdr.sSampleMaterialName ? ','+hdr.sSampleMaterialName : ''}}</span></div>
</div>
<div class="content">
<div style="width:40%;flex:none;"><span>总数量:</span><span style="color:#5cadff;">{{hdr.nQty}}</span></div>
<div style="width:40%;text-align:left;"><span>总金额:</span><span style="color:#5cadff;">{{hdr.nPlanSellAmount}}</span></div>
<div style="text-align:right;"><span style="color:black;">{{hdr.dReceivedDate}}</span></div>
</div>
</div>
</div>
<div class="Info">
<div>
<span>坯布信息</span>
<div>
<div>
<div>
<span>采购数量:</span>{{hdr.nFPQty}}
</div>
<div>
<span>采购金额:</span>{{hdr.nFPAmount}}
</div>
</div>
</div>
</div>
<div>
<span>染整信息</span>
<div>
<div>
<div>
<span>染整数量:</span>{{hdr.nDyeQty}}
</div>
<div>
<span>染费:</span>{{hdr.nDyeAmount}}
</div>
</div>
<div>
<div>
<span>后整数量:</span>{{hdr.nFNQty}}
</div>
<div>
<span>后整金额:</span>{{hdr.nFNAmount}}
</div>
</div>
</div>
</div>
<div>
<span>订单信息</span>
<div>
<div>
<div style="border:none;">
<span>其他费用:</span>{{hdr.nOrderCost}}
</div>
</div>
<div>
<div>
<span>订单转出:</span>{{hdr.nTurnPayAmount}}
</div>
<div>
<span>订单转入:</span>{{hdr.nTurnReceAmount}}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
import { mapState } from 'vuex'
export default {
name: 'profitAnalysisDetail',
data () {
return {
list:[],
}
},
computed:{
...mapState({
hdr:state => state.profitAnalysis.hdr,
userId:state => state.app.userId
})
},
async mounted(){
window.d = this;
console.log(this.hdr)
//点击表格列触发
},
async activated(){
this.clean();
// await this.getDetail();
},
methods:{
async getDetail(){
let res = await this.apiGet(`${this.host}${this.userId}/fabricorder/dtl/`,{
uGUID:this.hdr.uGUID
},true);
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
// if(res.length > 0){
this.list = res[0].child;
this.nAllAmount = res[0].nAllAmount;
this.list.map(x=>x.sMaterial = `<div><span style="text-decoration:underline;">${x.sSampleMaterialNo}</span><br><span style="color:black;">${x.sSampleMaterialName}</span></div>`)
// }
},
clean(){
this.list = [];
this.nAllAmount = 0;
},
routerToTrack(){
this.$store.dispatch('profitAnalysisSaveHdr',this.hdr);
this.$router.push({name:'profitAnalysisTrack'})
}
},
components:{
},
}
</script>
<style lang="less" >
#profitAnalysisList{
height:100%;
background:#eef4fe;
display:flex;
flex-direction: column;
/deep/ .weui-cell_access .weui-cell__ft:after{
height: 10px;
width: 10px;
margin-top: -4px;
right: 0;
}
.Table{
flex-grow: 1;
height:1px;
}
}
</style>
<template>
<div id="profitAnalysisList">
<div class="header">
<searchComponent placeholder="请输入单号/客户进行搜索" :search="search" :status="status" :typeList="typeList"/>
</div>
<div class="Table">
<customerTable :showFooter="true" :columns="columns" :list="list" :tableStyle="tableStyle"></customerTable>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
import searchComponent from '@/components/search'
import customerTable from '@/components/Table'
import customerModal from '@/components/Modal'
import { XButton } from 'vux'
export default {
name: 'profitAnalysisList',
data () {
return {
search:{
dBeginDate:Util.dateFormat(new Date(),'yyyy-MM-01'),
dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'),
page:1,
per_page:30,
sStatus:'全部'
},
list:[],
columns:[
{
width:'100px',
name:'单号',
align:'center',
field:'sOrderNoHTML',
underline:true,
color:'#2d8cf0',
fixed:true,
fixedLeftWidth:'0px'
},
{
width:'100px',
name:'客户',
align:'center',
field:'sCustomerName',
},
{
width:'100px',
name:'销售员',
align:'center',
field:'sSalesName'
},
{
width:'100px',
name:'利润',
align:'center',
field:'nFactProfit',
},
{
width:'100px',
name:'成本',
align:'center',
field:'nFactCost'
},
{
width:'100px',
name:'利润率',
align:'center',
field:'nFactProfitRate'
},
{
width:'100px',
name:'销售额',
align:'center',
field:'nSellAmount'
},
{
width:'100px',
name:'销售数量',
align:'center',
field:'nSellQty'
}
],
tableStyle:{
width:'800px',
theadBgColor:'rgba(223,238,253,1)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 200px)',
tbodyTrBorderBottom:'1px solid #5cadff'
},
status:[],
showModal:false,
row:{},
typeList:{
input:true,
select:true,
btns:true,
time:true
},
}
},
async mounted(){
window.d = this;
this.$store.dispatch('saveUserId',this.$route.params.userId);
await this.getStatus();
await this.getHdr();
},
async activated(){
this.showModal = false;
this.global.$off('searchData');
this.global.$off('scrollTable');
this.global.$off('clickTd');
//查询条件触发加载
this.global.$on('searchData',async ()=>{
this.cleanSearch();
this.getHdr();
});
//滚动加载
this.global.$on('scrollTable',async ()=>{
this.getHdr(true);
})
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
// this.showModal = res.showModal;
this.row = res.item;
this.routerToDetail();
})
},
methods:{
async getStatus(){
let res = await this.apiGet(`${this.$url('default')}/fabricorder/status/`,{},true);
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
this.status = res;
this.status.map(x=>{
x.sStatus = x.sStatus || '全部';
})
},
async getHdr(flag){
if(this.search.per_page < 30){
this.$vux.toast.text('已加载全部数据!', 'middle')
return false;
}
let data = Util.deepClone(this.search);
if(this.search.sStatus == '全部'){
let status = [];
this.status.map(x=>{
if(x.sStatus != '全部') status.push(x.sStatus);
})
data.sStatus = status.join(',');
}
data.serachvalue == '' && (delete data.serachvalue);
data.begin_date = data.dBeginDate;
data.end_date = data.dEndDate;
delete data.dBeginDate;
delete data.dEndDate;
console.log(this.search.per_page)
let res = await this.apiGet(`${this.$url('default')}/fabricorder/order_profit_analysis/`,data,'加载中')
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
if(res.length > 0){
res.map(x=>{
x.dReceivedDate = (x.dReceivedDate || '').split(' ')[0];
x.sOrderNoHTML = x.sOrderNo != '合计' ? `<div><span style="text-decoration:underline;">${x.sOrderNo}</span></div>` : '<span>合计</span>'
});
if(flag){
this.list.splice(this.list.length - 1,1);
this.list = this.list.concat(res);
}else{
this.list = res;
}
this.search.page++;
this.search.per_page = res.length - 1;
console.log(res.length)
}
},
closeModal(){
this.showModal = false;
},
cleanSearch(){
this.search.page = 1;
this.search.per_page = 30;
this.list = [];
},
routerToDetail(){
this.$store.dispatch('profitAnalysisSaveHdr',this.row);
this.$router.push({name:'profitAnalysisDetail'})
},
// routerToTarck(){
// this.$store.dispatch('searchOrderSaveHdr',this.row);
// this.$router.push({name:'searchOrderTrack'})
// }
},
components:{
searchComponent,
XButton,
customerTable,
customerModal
},
}
</script>
This diff is collapsed.
<style lang="less" >
#searchOrderDetail{
height:100%;
background:white;
display:flex;
flex-direction: column;
.header{
height:60px;
width:100%;
display: flex;
align-items:center;
flex-wrap: wrap;
background: #eef4fe;
padding-left:10px;
font-weight:bold;
margin-bottom: 10px;
div{
width:100%;
span{
display: inline-block;
width:60px;
}
}
}
.content{
flex-grow: 1;
height:1px;
overflow: auto;
.total{
height:40px;
line-height:40px;
text-align: right;
color: #2d8cf0;
padding:0 20px;
font-weight: bold;
}
}
}
</style>
<template>
<div id="searchOrderDetail">
<div class="header">
<div><span>订单号:</span>{{hdr.sOrderNo}}</div>
<div><span>客户:</span>{{hdr.sCustomerName}}</div>
</div>
<div class="content">
<customerTable :columns="columns" :list="list" :tableStyle="tableStyle">
<div class="total">合计:{{nAllAmount}}</div>
</customerTable>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
import customerTable from '@/components/Table'
import { mapState } from 'vuex'
export default {
name: 'searchOrderDetail',
data () {
return {
list:[],
columns:[
{
width:'20vw',
name:'产品名称',
align:'center',
field:'sMaterial',
underline:true,
color:'#2d8cf0'
},
{
width:'20vw',
name:'颜色',
align:'center',
field:'sColorName'
},
{
width:'20vw',
name:'单价',
align:'center',
field:'nPrice'
},
{
width:'20vw',
name:'数量',
align:'center',
field:'nQty'
},
{
width:'20vw',
name:'金额',
align:'center',
field:'nAmount'
}
],
tableStyle:{
theadBgColor:'rgba(176,226,255,0.3)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 110px)',
tbodyTrBorderBottom:'0.5px solid #5cadff'
},
host:'https://weixin.huansi.net/apiproxy/huansi/service/proxy/',
// host:'http://192.168.4.40:5001',
nAllAmount:0,
}
},
async mounted(){
window.d = this;
//点击表格列触发
},
async activated(){
this.clean();
await this.getDetail();
this.global.$off('clickTd');
this.global.$on('clickTd',async(res)=>{
this.$store.dispatch('searchOrderSaveDtl',res.item);
this.$router.push({name:'searchOrderMaterialDetail'})
})
},
computed:{
...mapState({
hdr:state => state.searchOrder.hdr,
userId:state => state.app.userId
})
},
methods:{
async getDetail(){
let res = await this.apiGet(`${this.host}${this.userId}/fabricorder/dtl/`,{
uGUID:this.hdr.uGUID
},true);
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
// if(res.length > 0){
this.list = res[0].child;
this.nAllAmount = res[0].nAllAmount;
this.list.map(x=>x.sMaterial = `<div><span style="text-decoration:underline;">${x.sSampleMaterialNo}</span><br><span style="color:black;">${x.sSampleMaterialName}</span></div>`)
// }
},
clean(){
this.list = [];
this.nAllAmount = 0;
}
},
components:{
customerTable,
},
}
</script>
<style lang="less" >
#searchOrderList{
height:100%;
background:#eef4fe;
display:flex;
flex-direction: column;
/deep/ .weui-cell_access .weui-cell__ft:after{
height: 10px;
width: 10px;
margin-top: -4px;
right: 0;
}
.Table{
flex-grow: 1;
height:1px;
overflow: auto;
// -webkit-overflow-scrolling: touch;
}
.modal>.content,.modal_active>.content{
.item{
width: 240px;
height: 180px;
background:#eef4fe;
border-radius:10px;
display: flex;
flex-direction: column;
.content{
height:1px;
flex-grow: 1;
div{
height:40px;
line-height: 40px;
text-align: center;
color:#5cadff;
}
}
}
}
}
</style>
<template>
<div id="searchOrderList">
<div class="header">
<searchComponent placeholder="请输入订单号/客户..." :search="search" :status="status" :typeList="typeList"/>
</div>
<div class="Table">
<customerTable :columns="columns" :list="list" :tableStyle="tableStyle"></customerTable>
</div>
<!-- <customerModal :showModal="showModal">
<div class="item">
<div class="content">
<div style="color:#000;font-weight:bold;">选择查看内容</div>
<div @click="routerToDetail">订单明细</div>
<div @click="routerToTarck">全流程跟踪</div>
</div>
<div class="btns">
<x-button type="primary" style="background:#6b9bf7;" @click.native="closeModal">取消</x-button>
</div>
</div>
</customerModal> -->
</div>
</template>
<script>
import Util from '@/libs/util.js'
import searchComponent from '@/components/search'
import customerTable from '@/components/Table'
import customerModal from '@/components/Modal'
import { XButton } from 'vux'
export default {
name: 'searchOrderList',
data () {
return {
search:{
dBeginDate:Util.dateFormat(new Date(),'yyyy-MM-01'),
dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'),
page:1,
per_page:30,
sStatus:'全部'
},
list:[],
columns:[
{
width:'30%',
name:'单号',
align:'center',
field:'sOrderNoHTML',
underline:true,
color:'#2d8cf0',
fixed:true,
fixedLeftWidth:'0px'
},
{
width:'40%',
name:'客户',
align:'center',
field:'sCustomerName',
},
{
width:'20%',
name:'数量',
align:'center',
field:'nQty',
},
{
width:'20%',
name:'销售员',
align:'center',
field:'sSalesName'
},
{
width:'20%',
name:'状态',
align:'center',
field:'sStatus'
}
],
tableStyle:{
theadBgColor:'rgba(223,238,253,1)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 160px)',
tbodyTrBorderBottom:'1px solid #5cadff',
width:'100%'
},
host:'https://weixin.huansi.net/apiproxy/huansi/service/proxy/',
// host:'http://192.168.4.40:5001',
status:[],
showModal:false,
row:{},
typeList:{
input:true,
select:true,
btns:true,
time:true
},
}
},
async mounted(){
window.d = this;
await this.getStatus();
await this.getHdr();
this.$store.dispatch('saveUserId',this.$route.params.userId);
},
async activated(){
this.showModal = false;
this.global.$off('searchData');
this.global.$off('scrollTable');
this.global.$off('clickTd');
//查询条件触发加载
this.global.$on('searchData',async ()=>{
this.cleanSearch();
this.getHdr();
});
//滚动加载
this.global.$on('scrollTable',async ()=>{
this.getHdr(true);
})
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
// this.showModal = res.showModal;
this.row = res.item;
this.routerToTarck();
})
},
methods:{
async getStatus(){
let res = await this.apiGet(`${this.host}${this.$route.params.userId}/fabricorder/status/`,{},true);
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
this.status = res;
this.status.map(x=>{
x.sStatus = x.sStatus || '全部';
})
},
async getHdr(flag){
if(this.search.per_page < 30){
this.$vux.toast.text('已加载全部数据!', 'middle')
return false;
}
let data = Util.deepClone(this.search);
if(this.search.sStatus == '全部'){
let status = [];
this.status.map(x=>{
if(x.sStatus != '全部') status.push(x.sStatus);
})
data.sStatus = status.join(',');
}
data.serachvalue == '' && (delete data.serachvalue);
data.begin_date = data.dBeginDate;
data.end_date = data.dEndDate;
delete data.dBeginDate;
delete data.dEndDate;
let res = await this.apiGet(`${this.host}${this.$route.params.userId}/fabricorder/hdr/`,data,'加载中')
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
if(res.table.length > 0){
res.table.map(x=>{
x.dReceivedDate = x.dReceivedDate.split(' ')[0]
x.sOrderNoHTML = `<div><span style="text-decoration:underline;">${x.sOrderNo}</span></div>`
});
if(flag){
this.list = this.list.concat(res.table);
}else{
this.list = res.table;
}
this.search.page++;
this.search.per_page = res.table.length;
}
},
closeModal(){
this.showModal = false;
},
cleanSearch(){
this.search.page = 1;
this.search.per_page = 30;
this.list = [];
},
routerToDetail(){
this.$store.dispatch('searchOrderSaveHdr',this.row);
this.$router.push({name:'searchOrderDetail'})
},
routerToTarck(){
this.$store.dispatch('searchOrderSaveHdr',this.row);
this.$router.push({name:'searchOrderTrack'})
}
},
components:{
searchComponent,
XButton,
customerTable,
customerModal
},
}
</script>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment