Commit 00cd229b authored by 张锡奇's avatar 张锡奇

commit

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