Commit a5fb3693 authored by godwithdh's avatar godwithdh
parents 5af4bdf8 2ab781a5
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
"vue-imageview": "^1.0.5", "vue-imageview": "^1.0.5",
"vue-jest": "^1.0.2", "vue-jest": "^1.0.2",
"vue-loader": "^13.3.0", "vue-loader": "^13.3.0",
"vue-meta": "^2.3.1",
"vue-mobile-calendar": "^3.3.0", "vue-mobile-calendar": "^3.3.0",
"vue-style-loader": "^3.0.1", "vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2", "vue-template-compiler": "^2.5.2",
......
...@@ -310,9 +310,11 @@ export default { ...@@ -310,9 +310,11 @@ export default {
if(this.isLoad){ if(this.isLoad){
let thead = this.$refs['thead']; let thead = this.$refs['thead'];
let tbody = this.$refs['tbody']; let tbody = this.$refs['tbody'];
if(this.LIST.length > 0){
tbody.scrollTo(this.x,this.y); tbody.scrollTo(this.x,this.y);
thead.scrollTo(this.x,0); thead.scrollTo(this.x,0);
} }
}
this.isLoad = true; this.isLoad = true;
}, },
beforeDestroy(){ beforeDestroy(){
......
...@@ -21,7 +21,10 @@ import Calendar from 'vue-mobile-calendar/lib/install.js' ...@@ -21,7 +21,10 @@ import Calendar from 'vue-mobile-calendar/lib/install.js'
import F2 from '@antv/f2'; import F2 from '@antv/f2';
import { ConfirmPlugin,ToastPlugin } from 'vux' import { ConfirmPlugin,ToastPlugin } from 'vux'
import urlFun from './libs/host.js' import urlFun from './libs/host.js'
import Meta from 'vue-meta';
Vue.use(Meta);
Vue.use(Calendar) Vue.use(Calendar)
Vue.use(Vuetify) Vue.use(Vuetify)
Vue.use(VueWechatTitle); Vue.use(VueWechatTitle);
...@@ -61,6 +64,9 @@ FastClick.attach(document.body) ...@@ -61,6 +64,9 @@ FastClick.attach(document.body)
Vue.config.productionTip = false; Vue.config.productionTip = false;
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if(to.name != 'tiipOperateDetail'){
store.dispatch("CAHNGE_META_INFO", {title:to.meta.title})
}
next(); next();
}) })
/* eslint-disable no-new */ /* eslint-disable no-new */
...@@ -69,13 +75,25 @@ new Vue({ ...@@ -69,13 +75,25 @@ new Vue({
render: h => h(App), render: h => h(App),
router: router, router: router,
store: store, store: store,
data: { data:{},
},
mounted(){ mounted(){
}, },
created(){ created(){
},
metaInfo(){
return {
title: store.state.app.metaInfo.title,
meta: [
{
name:"keywords",
content: store.state.app.metaInfo.keywords
},{
name:"description",
content: store.state.app.metaInfo.description
}
]
} }
},
}).$mount('#app') }).$mount('#app')
...@@ -117,15 +117,15 @@ let routes = [ ...@@ -117,15 +117,15 @@ let routes = [
{ {
path:"/kanbanOperateDetail", path:"/kanbanOperateDetail",
name:"tiipOperateDetail", name:"tiipOperateDetail",
component:()=>import("@/view/kanban/operateDetail.vue"), component:()=>import("@/view/tiip/kanban/operateDetail.vue"),
meta:{ meta:{
title:"接单详情" title:"接单详情"
} }
}, },
{ {
path:"/kanbanOperateCustomDetail", path:"/kanbanOperateCustomDetail/:type",
name:"tiipOperateCustomDetail", name:"tiipOperateCustomDetail",
component:()=>import("@/view/kanban/operateCustomDetail.vue"), component:()=>import("@/view/tiip/kanban/operateCustomDetail.vue"),
meta:{ meta:{
title:"客户订单列表" title:"客户订单列表"
} }
...@@ -133,7 +133,7 @@ let routes = [ ...@@ -133,7 +133,7 @@ let routes = [
{ {
path:"/kanbanOperateSaleDetail", path:"/kanbanOperateSaleDetail",
name:"tiipOperateSaleDetail", name:"tiipOperateSaleDetail",
component:()=>import("@/view/kanban/operateSaleDetail.vue"), component:()=>import("@/view/tiip/kanban/operateSaleDetail.vue"),
meta:{ meta:{
title:"销售员接单情况" title:"销售员接单情况"
} }
......
...@@ -6,7 +6,12 @@ const app = { ...@@ -6,7 +6,12 @@ const app = {
userInfo:{}, userInfo:{},
chartHearData:{}, chartHearData:{},
iProjectId:5599, iProjectId:5599,
userId:'1115442959606779905' userId:'1115442959606779905',
metaInfo: {
title: "",
keywords: "",
description: ""
}
}, },
mutations: { mutations: {
saveUserId(state,data){ saveUserId(state,data){
...@@ -20,6 +25,9 @@ const app = { ...@@ -20,6 +25,9 @@ const app = {
}, },
setIproject(state,data){ setIproject(state,data){
state.iProjectId = data; state.iProjectId = data;
},
CAHNGE_META_INFO(state, metaInfo) {
state.metaInfo = metaInfo;
} }
}, },
actions: { actions: {
...@@ -34,6 +42,9 @@ const app = { ...@@ -34,6 +42,9 @@ const app = {
}, },
setIproject({commit},data){ setIproject({commit},data){
commit('setIproject',data) commit('setIproject',data)
},
CAHNGE_META_INFO({commit}, metaInfo) {
commit('CAHNGE_META_INFO',metaInfo)
} }
} }
}; };
......
...@@ -6,9 +6,9 @@ const obj = { ...@@ -6,9 +6,9 @@ const obj = {
hdr:{ hdr:{
begin_date:'2014-01-01', begin_date:'2014-01-01',
end_date:'2019-12-13 23:59', end_date:'2019-12-13 23:59',
sType:'面料订单' sType:'单'
}, },
orderItem:{} orderItem:{},
}, },
mutations: { mutations: {
saveKanbanHdr(state,data){ saveKanbanHdr(state,data){
......
...@@ -114,11 +114,15 @@ export default { ...@@ -114,11 +114,15 @@ export default {
} }
}, },
routerToOperateDetail(row){ routerToOperateDetail(row){
// return false;
if(row.sType == '接单' || row.sType == '销售'){
let data = util.deepClone(row); let data = util.deepClone(row);
data.begin_date = util.dateFormat(this.start,"yyyy-MM-dd"); data.begin_date = util.dateFormat(this.start,"yyyy-MM-dd");
data.end_date = (this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59'; data.end_date = (this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59';
this.$store.dispatch('saveKanbanHdr',data); this.$store.dispatch('saveKanbanHdr',data);
this.$router.push({name:'tiipOperateDetail'}) this.$router.push({name:'tiipOperateDetail',type:row.sType})
}
} }
}, },
} }
......
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
tbodyTrBorderBottom:'1px solid #5cadff', tbodyTrBorderBottom:'1px solid #5cadff',
width:'100%' width:'100%'
}, },
type:'custom'
} }
}, },
computed:{ computed:{
...@@ -80,6 +81,9 @@ export default { ...@@ -80,6 +81,9 @@ export default {
window.d = this; window.d = this;
}, },
async activated(){ async activated(){
this.type = this.$route.params.type;
this.$store.dispatch("CAHNGE_META_INFO", {title:this.type == 'custom' ? '客户' : '产品' + '订单列表'});
await this.getData(); await this.getData();
this.global.$off('clickTd'); this.global.$off('clickTd');
...@@ -90,14 +94,19 @@ export default { ...@@ -90,14 +94,19 @@ export default {
}, },
methods:{ methods:{
async getData(){ async getData(){
let res = await this.request('getBoss',{ let postData = [
data:[ {key:"url",value:this.type == 'custom' ? 'Operation gai sType-customer-sOrder' : 'Operation gai sType-material-sOrder'},
{key:"url",value:'Operation gai sType-customer-sOrder'},
{key:"upbCustomerGUID",value:this.orderItem.upbCustomerGUID},
{key:"sType",value:this.hdr.sType}, {key:"sType",value:this.hdr.sType},
{key:"begin_date",value:this.hdr.begin_date}, {key:"begin_date",value:this.hdr.begin_date},
{key:"end_date",value:this.hdr.end_date} {key:"end_date",value:this.hdr.end_date}
], ];
if(this.type == 'custom'){
postData.push({key:"upbCustomerGUID",value:this.orderItem.upbCustomerGUID})
}else{
postData.push({key:"sSampleMaterialNo",value:this.orderItem.sSampleMaterialNo})
}
let res = await this.request('getBoss',{
data:postData,
params:{}, params:{},
},'加载中',{}) },'加载中',{})
res.map(x=>{ res.map(x=>{
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
background:#fff; background:#fff;
overflow-x: auto; overflow-x: auto;
height:0rpx; height:0rpx;
border-bottom: 3px solid #eef4fe;
&.height{ height:50px; } &.height{ height:50px; }
flex-shrink: 0; flex-shrink: 0;
transition: all 0.3s; transition: all 0.3s;
...@@ -149,8 +150,8 @@ export default { ...@@ -149,8 +150,8 @@ export default {
name:'产品', name:'产品',
align:'center', align:'center',
field:'sMaterial', field:'sMaterial',
underline:true,
color:'#2d8cf0', color:'#2d8cf0',
underline:true,
}, },
{ {
width:'30%', width:'30%',
...@@ -174,18 +175,23 @@ export default { ...@@ -174,18 +175,23 @@ export default {
}, },
async mounted(){ async mounted(){
window.d = this; window.d = this;
}, },
async activated(){ async activated(){
this.$store.dispatch("CAHNGE_META_INFO", {title:this.hdr.sType + '详情'});
await this.getData(); await this.getData();
this.global.$off('clickTd');
this.global.$off('clickTd');
//点击表格列触发 //点击表格列触发
this.global.$on('clickTd',async(res)=>{ this.global.$on('clickTd',async(res)=>{
this.$store.dispatch('saveKanbanOrderItem',this.list[res.trIndex]); this.$store.dispatch('saveKanbanOrderItem',this.list[res.trIndex]);
if(res.tdIndex == 0){ if(res.tdIndex == 0){
this.$router.push({name:'tiipOperateCustomDetail'}) if(this.activeTab == 0){
this.$router.push({name:'tiipOperateCustomDetail',params:{type:'custom'}})
}else{
this.$router.push({name:'tiipOperateCustomDetail',params:{type:'material'}})
}
}else if(res.tdIndex = 3){ }else if(res.tdIndex = 3){
this.$router.push({name:'tiipOperateSaleDetail'}) this.$router.push({name:'tiipOperateSaleDetail'})
} }
......
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
//点击表格列触发 //点击表格列触发
this.global.$on('clickTd',async(res)=>{ this.global.$on('clickTd',async(res)=>{
this.$router.push({name:'tiipOperateCustomDetail'}) this.$router.push({name:'tiipOperateCustomDetail',params:{type:'custom'}})
}) })
}, },
methods:{ methods:{
......
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