Commit 1412962b authored by 张锡奇's avatar 张锡奇

commit

parents afe68c53 058f5c0a
......@@ -32,7 +32,7 @@
max-width:100vw;
overflow: visible;
._tbody{
height:100%;
height:calc(100% - 40px);
overflow: auto;
-webkit-overflow-scrolling: touch;
tr{
......@@ -152,7 +152,7 @@
'border-right':(i == columns.length - 1 && tableStyle.tbodyTdBorder) ? tableStyle.tbodyTrBorderBottom : '0px',
'border-bottom':tableStyle.tbodyTrBorderBottom
}"
@click="clickTd(x,item)"
@click="clickTd(i,index)"
v-html="item[x.field]"
>
</td>
......@@ -295,11 +295,11 @@ export default {
tbody.scrollTo(tfoot.scrollLeft,tbody.scrollTop);
thead.scrollTo(tfoot.scrollLeft,thead.scrollTop);
},
clickTd(obj,item){
if(!obj.underline) return false;
clickTd(i,index){
if(!this.columns[i].underline) return false;
this.global.$emit('clickTd',{
showModal:true,
item:item
trIndex:index,
tdIndex:i,
});
},
},
......
import Axios from 'axios';
import Qs from 'qs';
import Vue from 'vue';
import { ConfirmPlugin,ToastPlugin } from 'vux'
Vue.use(ConfirmPlugin)
let vm = new Vue()
window.d = vm;
const config = {
baseURL: '',
timeout: 300000,
......@@ -34,9 +41,17 @@ AsInst.interceptors.response.use(response => {
// }
return response;
}, (error) => {
if(error.response.data.hasOwnProperty('error_data')){
vm.$vux.confirm.show({
title:"提示",
content:error.response.data.error_title,
showCancelButton:false,
})
}
// 下面是接口回调的status ,因为我做了一些错误页面,所以都会指向对应的报错页面
if (error.response.status === 404) {
Message.error('后端服务请求404错误');
Vue.prototype.$toast('请求接口不存在!',2000)
// Message.error('后端服务请求404错误');
}
//请求错误时做些事
return Promise.reject(error);
......
......@@ -12,8 +12,9 @@ function urlFun(name){
/**
* 默认公司
*/
// default:`http://192.168.4.37:5001`,
default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
// default:`http://192.168.4.39:5001`,
default:`https://weixin.huansi.net/apiproxy/huansi/hszh_HSFabricTradeTest`,
// default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
/**
* 基本地址
......
......@@ -113,6 +113,30 @@ let routes = [
meta:{
title:"老板看板"
}
},
{
path:"/kanbanOperateDetail",
name:"tiipOperateDetail",
component:()=>import("@/view/kanban/operateDetail.vue"),
meta:{
title:"接单详情"
}
},
{
path:"/kanbanOperateCustomDetail",
name:"tiipOperateCustomDetail",
component:()=>import("@/view/kanban/operateCustomDetail.vue"),
meta:{
title:"客户订单列表"
}
},
{
path:"/kanbanOperateSaleDetail",
name:"tiipOperateSaleDetail",
component:()=>import("@/view/kanban/operateSaleDetail.vue"),
meta:{
title:"销售员接单情况"
}
}
]
},
......
......@@ -2,8 +2,9 @@ import Vue from 'vue';
import Vuex from 'vuex';
import app from './modules/app';
import searchOrder from './modules/searchOrder';
import profitAnalysis from './modules/profitAnalysis';
import searchOrder from './modules/tiip/searchOrder';
import profitAnalysis from './modules/tiip/profitAnalysis';
import kanban from './modules/tiip/kanban';
Vue.use(Vuex);
......@@ -18,7 +19,8 @@ const store = new Vuex.Store({
modules: {
app,
searchOrder,
profitAnalysis
profitAnalysis,
kanban
}
});
......
import Util from '@/libs/util';
import Vue from 'vue';
const obj = {
state: {
hdr:{
begin_date:'2014-01-01',
end_date:'2019-12-13 23:59',
sType:'面料订单'
},
orderItem:{}
},
mutations: {
saveKanbanHdr(state,data){
state.hdr = data;
},
saveKanbanOrderItem(state,data){
state.orderItem = data;
}
},
actions: {
saveKanbanHdr({commit},data){
commit('saveKanbanHdr',data);
},
saveKanbanOrderItem({commit},data){
commit('saveKanbanOrderItem',data);
}
}
};
export default obj;
......@@ -37,8 +37,8 @@
}
</style>
<template>
<div class="Finance">
<div v-for="(v,k) in list" :key='k'>
<div class="Finance" :style="list.length==0&&'background:#fff;height:100%;'">
<div v-for="(v,k) in list" :key='k' v-if="list.length>0">
<div class="title_">{{v.sName}}</div>
<div class="card">
<div>
......@@ -49,7 +49,7 @@
</div>
<XCircle
style="width: 60px;height: 60px;"
:percent="Number(v.nPercent)||70"
:percent="Number(v.nPercent)||0"
:stroke-width="7"
:stroke-color="color[k%4]"
:trail-width="5"
......@@ -59,6 +59,7 @@
</div>
</div>
</div>
<img src="@/assets/noData.jpg" style="width:100%;" v-if="list.length==0"/>
</div>
</template>
<script>
......@@ -73,7 +74,7 @@ export default {
},
data(){
return{
list:{},
list:[],
color:['#FF6633','#5E9AFE','#9966CC','#46FC43'],
}
},
......
......@@ -29,19 +29,19 @@
</style>
<template>
<div class="abnormal">
<table cellspacing="0">
<table cellspacing="0" >
<tr>
<td>
<td style="width:100px;">
<div>销售退货</div>
</td>
<td>
<div>{{value['销售退货']}}</div>
<div>{{value['销售退货']||0}}</div>
</td>
<td>
<td style="width:100px;">
<div>采购退货</div>
</td>
<td>
<div>{{value['采购退货']}}</div>
<div>{{value['采购退货']||0}}</div>
</td>
</tr>
<tr>
......@@ -49,30 +49,30 @@
<div>加工回修</div>
</td>
<td>
<div>{{value['加工回修']}}</div>
<div>{{value['加工回修']||0}}</div>
</td>
<td>
<div>疵品数量</div>
</td>
<td>
<div>{{value['疵品汇总']}}</div>
<div>{{value['疵品汇总']||0}}</div>
</td>
</tr>
<tr>
<td colspan='4' style="text-align:left;padding:0 0 0 10px;color:#68A0FE;">拖期订单:{{value['拖期订单数量']}}</td>
<td colspan='4' style="text-align:left;padding:0 0 0 10px;color:#68A0FE;">拖期订单:{{value['拖期订单数量']||0}}</td>
</tr>
<tr>
<td>
<div>数量</div>
</td>
<td>
<div>{{value['拖期订单总数量']}}</div>
<div>{{value['拖期订单总数量']||0}}</div>
</td>
<td>
<div>金额</div>
</td>
<td>
<div>{{value['拖期订单总金额']}}</div>
<div>{{value['拖期订单总金额']||0}}</div>
</td>
</tr>
<tr>
......@@ -80,13 +80,13 @@
<div>供应商赔款</div>
</td>
<td>
<div>{{value['供应商索赔']}}</div>
<div>{{value['供应商索赔']||0}}</div>
</td>
<td>
<div>客户赔款</div>
</td>
<td>
<div>{{value['客户索赔']}}</div>
<div>{{value['客户索赔']||0}}</div>
</td>
</tr>
<tr>
......@@ -94,13 +94,13 @@
<div>超期应收额</div>
</td>
<td>
<div>{{value['超期应收']}}</div>
<div>{{value['超期应收']||0}}</div>
</td>
<td>
<div>超期应付额</div>
</td>
<td>
<div>{{value['超期应付']}}</div>
<div>{{value['超期应付']||0}}</div>
</td>
</tr>
</table>
......
......@@ -16,17 +16,18 @@
}
</style>
<template>
<div class="capital">
<div class="card" v-for="(v,i) in list" :key="i">
<div class="capital" :style="list.length==0&&'background:#fff;height:100%;'">
<div class="card" v-if="list.length>0" v-for="(v,i) in list" :key="i">
<div>
<div style="font-size:13px;margin-bottom:14px;">{{v.sName}}</div>
<div style="font-size: 28px;font-weight: 600;">{{Number(v.sValue)||0}}</div>
</div>
<div style="align-self: flex-end;" >
<div>{{v.rate}}</div>
<div>{{dateModeName}}</div>
<div style="align-self: flex-end;" v-if="v.rate=0">
<div>{{v.rate>0?'↑':'↓'}}{{v.rate}}%</div>
<div>{{dateModeName}}{{v.rate>0?'上':'下'}}</div>
</div>
</div>
<img src="@/assets/noData.jpg" style="width:100%;" v-if="list.length==0"/>
</div>
</template>
<script>
......@@ -70,6 +71,8 @@ export default{
this.list=value.map(v=>{
if(v.sValued==0){
v.rate=100
}else if(v.sValue==0){
v.rate=0
}else{
v.rate=Math.round((v.sValue-v.sValued)/v.sValued*100)/100
}
......
......@@ -101,7 +101,7 @@
<span :class="{active:situation=='abnormal'}" @click="situation='abnormal'">异常预警</span>
<span :class="{active:situation=='tiipChartInventory'}" @click="situation='tiipChartInventory'">库存情况</span>
</div>
<div class="content">
<div class="content" :style="situation=='tiipChartInventory'&&'background:#fff;'">
<component :is="situation" :dateMode="dateMode" :start="DateValue[0]" :end="DateValue[1]"/>
</div>
<calendar
......
......@@ -34,8 +34,8 @@
}
</style>
<template>
<div class="operate">
<table cellspacing="0">
<div class="operate" :style="list.length==0&&'background:#fff;height:100%;'">
<table cellspacing="0" v-if="list.length>0">
<tr>
<td></td>
<td>米数</td>
......@@ -44,7 +44,7 @@
</tr>
<tr v-for="(v,i) in list" :key="i">
<td>
<div>{{v.sType}}</div>
<div @click="routerToOperateDetail(v)" style="text-decoration:underline;">{{v.sType}}</div>
</td>
<td>
<div>{{v.nQty||0}}</div>
......@@ -57,6 +57,7 @@
</td>
</tr>
</table>
<img src="@/assets/noData.jpg" style="width:100%;" v-else/>
</div>
</template>
<script>
......@@ -88,11 +89,12 @@ export default {
methods:{
async search(){
var value= await this.request('getBoss',{
data:[{key:"url",value:"Operation gai"}],
params:{
begin_date:util.dateFormat(this.start,"yyyy-MM-dd"),
end_date:(this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59',
},
data:[
{key:"url",value:"Operation gai"},
{key:"begin_date",value:util.dateFormat(this.start,"yyyy-MM-dd")},
{key:"end_date",value:(this.end?util.dateFormat(this.end,"yyyy-MM-dd"):util.dateFormat(new Date,"yyyy-MM-dd"))+' 23:59'}
],
params:{},
},true,{})
if(typeof value=='object'&&value.length>0){
this.list=value
......@@ -104,6 +106,13 @@ 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'})
}
},
}
</script>
<style lang="less" >
#tiipOperateCustomDetail{
height:100%;
background:#eef4fe;
display:flex;
flex-direction: column;
.Table{
flex-grow: 1;
height:1px;
overflow: auto;
}
}
</style>
<template>
<div id="tiipOperateCustomDetail">
<div class="Table">
<customerTable :columns="columns" :list="list" :tableStyle="tableStyle"></customerTable>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
import customerTable from '@/components/Table'
import { mapState } from 'vuex'
export default {
name: 'tiipOperateCustomDetail',
data () {
return {
list:[],
columns:[
{
width:'25%',
name:'单号',
align:'center',
field:'sOrderNoHTML',
underline:true,
color:'#2d8cf0',
},
{
width:'25%',
name:'数量',
align:'center',
field:'nAmount',
},
{
width:'25%',
name:'金额',
align:'center',
field:'nQtyHTML',
},
{
width:'25%',
name:'状态',
align:'center',
field:'sStatus'
}
],
tableStyle:{
theadBgColor:'rgba(223,238,253,1)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh)',
tbodyTrBorderBottom:'1px solid #5cadff',
width:'100%'
},
}
},
computed:{
...mapState({
hdr:state => state.kanban.hdr,
orderItem:state => state.kanban.orderItem,
})
},
async mounted(){
window.d = this;
},
async activated(){
await this.getData();
this.global.$off('clickTd');
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
})
},
methods:{
async getData(){
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}
],
params:{},
},'加载中',{})
res.map(x=>{
x.sOrderNoHTML = `<div><span style="text-decoration:underline;">${x.sOrderNo}</span></div>`;
x.nQtyHTML = `<div><span style="color:#339966;">${x.nQty}</span></div>`;
})
this.list = res;
}
},
components:{
customerTable,
},
}
</script>
<style lang="less" >
#tiipOperateDetail{
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;
}
>.page{
display:flex;
background:#fff;
overflow-x: auto;
height:0rpx;
&.height{ height:50px; }
flex-shrink: 0;
transition: all 0.3s;
>span{
padding:0 10px;
min-width:90px;
flex-grow:1;
flex-shrink:0;
text-align:center;
box-sizing:border-box;
position:relative;
transition:all 0.5s;
display:flex;
align-items:center;
justify-content:center;
&:not(:first-child):before{
content:" ";
border-left:1px solid #777;
height:20px;
width:0;
position: absolute;
left:0;
}
&:after{
content:" ";
border-top:3rpx solid #5E9AFE;
position: absolute;
bottom:0;
left:50%;
width:0;
transform: translate(-50%,0);
transition: all 0.3s;
}
&.active{
color:#659EFD;
box-shadow: 0 0 13px -4px #999;
&:after{
width:100%;
}
&:before{
border:none;
}
& + text:before{
border:none;
}
}
}
}
}
</style>
<template>
<div id="tiipOperateDetail">
<div class="page height">
<span v-for="(item,index) in tabList" :key="index" :class="[activeTab==item.key?'active':'']" @click="changeTab(item.key)">{{item.value}}</span>
</div>
<div class="Table">
<customerTable :columns="activeTab == 0 ? columns : columns1" :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 { mapState } from 'vuex'
export default {
name: 'tiipOperateDetail',
data () {
return {
list:[],
columns:[
{
width:'25%',
name:'客户',
align:'center',
field:'sCustomerNameHTML',
underline:true,
color:'#2d8cf0',
},
{
width:'25%',
name:'数量',
align:'center',
field:'nAmount',
},
{
width:'25%',
name:'金额',
align:'center',
field:'nQtyHTML',
},
{
width:'25%',
name:'销售员',
align:'center',
field:'sSalesNameHTML',
underline:true
}
],
tableStyle:{
theadBgColor:'rgba(223,238,253,1)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 50px)',
tbodyTrBorderBottom:'1px solid #5cadff',
width:'100%'
},
activeTab:0,
tabList:[
{
value:'客户信息',
key:'0'
},
{
value:'产品信息',
key:'1'
}
],
columns1:[
{
width:'40%',
name:'产品',
align:'center',
field:'sMaterial',
underline:true,
color:'#2d8cf0',
},
{
width:'30%',
name:'数量',
align:'center',
field:'nAmount',
},
{
width:'30%',
name:'金额',
align:'center',
field:'nQtyHTML',
}
],
}
},
computed:{
...mapState({
hdr:state => state.kanban.hdr
})
},
async mounted(){
window.d = this;
},
async activated(){
await this.getData();
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'})
}else if(res.tdIndex = 3){
this.$router.push({name:'tiipOperateSaleDetail'})
}
})
},
methods:{
changeTab(key){
this.activeTab = key;
this.getData();
},
async getData(){
let res = await this.request('getBoss',{
data:[
{key:"url",value:this.activeTab == '0' ? "Operation gai sType-customer" : 'Operation gai sType-material'},
{key:"sType",value:this.hdr.sType},
{key:"begin_date",value:this.hdr.begin_date},
{key:"end_date",value:this.hdr.end_date}
],
params:{},
},'加载中',{})
if(this.activeTab == 1){
res.map(x=>{
x.sMaterial = `<div><span style="color:#FF6633">${x.sSampleMaterialNo}</span><br><span style="color:black;">${x.sSampleMaterialName}</span></div>`
x.nQtyHTML = `<div><span style="color:#339966;">${x.nQty}</span></div>`;
})
}else{
res.map(x=>{
x.sCustomerNameHTML = `<div><span style="text-decoration:underline;">${x.sCustomerName}</span></div>`
x.sSalesNameHTML = `<div><span style="text-decoration:underline;">${x.sSalesName}</span></div>`
x.nQtyHTML = `<div><span style="color:#339966;">${x.nQty}</span></div>`;
})
}
this.list = res;
}
},
components:{
customerTable,
},
}
</script>
<style lang="less" >
#tiipOperateSaleDetail{
height:100%;
background:#eef4fe;
display:flex;
flex-direction: column;
.Table{
flex-grow: 1;
height:1px;
overflow: auto;
}
}
</style>
<template>
<div id="tiipOperateSaleDetail">
<div class="Table">
<customerTable :columns="columns" :list="list" :tableStyle="tableStyle"></customerTable>
</div>
</div>
</template>
<script>
import Util from '@/libs/util.js'
import customerTable from '@/components/Table'
import { mapState } from 'vuex'
export default {
name: 'tiipOperateSaleDetail',
data () {
return {
list:[],
columns:[
{
width:'40%',
name:'客户名称',
align:'center',
field:'sSalesNameHTML',
underline:true,
color:'#2d8cf0',
},
{
width:'30%',
name:'数量',
align:'center',
field:'nAmount',
},
{
width:'30%',
name:'金额',
align:'center',
field:'nQtyHTML',
}
],
tableStyle:{
theadBgColor:'rgba(223,238,253,1)',
complexTrBgColor:'white',
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh)',
tbodyTrBorderBottom:'1px solid #5cadff',
width:'100%'
},
}
},
computed:{
...mapState({
hdr:state => state.kanban.hdr,
orderItem:state => state.kanban.orderItem,
})
},
async mounted(){
window.d = this;
},
async activated(){
await this.getData();
this.global.$off('clickTd');
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
this.$router.push({name:'tiipOperateCustomDetail'})
})
},
methods:{
async getData(){
let res = await this.request('getBoss',{
data:[
{key:"url",value:'Operation gai sType-customer-sales'},
{key:"upbSalesGUID",value:this.orderItem.upbSalesGUID},
{key:"sType",value:this.hdr.sType},
{key:"begin_date",value:this.hdr.begin_date},
{key:"end_date",value:this.hdr.end_date}
],
params:{},
},'加载中',{})
res.map(x=>{
x.sSalesNameHTML = `<div><span style="text-decoration:underline;">${x.sSalesName}</span></div>`
x.nQtyHTML = `<div><span style="color:#339966;">${x.nQty}</span></div>`;
})
this.list = res;
}
},
components:{
customerTable,
},
}
</script>
......@@ -58,8 +58,8 @@
<div class="CONTENT">
<div class="iCard" v-for="(item,index) in chartData" :key="index" >
<div class="warehouse" :style="{'color':colorList[index]}">{{item.sStoreName}}</div>
<div class="piece"><span style="color:#8a8a8a;">总匹数:</span>{{item.nStockPieceQty}}</div>
<div class="qty"><span style="color:#8a8a8a;">总数量:</span>{{item.nStockQty}}</div>
<div class="piece"><span style="color:#8a8a8a;">总匹数:</span>{{Number(item.nStockPieceQty).toLocaleString()}}</div>
<div class="qty"><span style="color:#8a8a8a;">总数量:</span>{{Number(item.nStockQty).toLocaleString()}}</div>
</div>
</div>
......@@ -186,7 +186,7 @@ export default {
const data = this.chartData;
const map = {};
data.forEach(function(obj) {
map[obj.sStoreName] = obj.nAmount + '元';
map[obj.sStoreName] = Number(obj.nAmount||0).toLocaleString() + '元';
});
this.myChart = new F2.Chart({
id: 'myChart',
......@@ -290,14 +290,7 @@ export default {
let data = {};
!!sStoreNo && (data.sStoreNo = sStoreNo);
let res = await this.apiGet(`${this.$url('default')}/bianalysis/stockamountinfo/`,data,'加载中');
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
if(res.hasOwnProperty('set1')) this.chartData = res.set1;
this.chartData.map((x,y)=>{
x.a = '1';
......
......@@ -167,14 +167,6 @@ export default {
{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]))){
......
......@@ -216,14 +216,6 @@ export default {
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;
......
......@@ -146,22 +146,13 @@ export default {
})
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
// this.showModal = res.showModal;
this.row = res.item;
this.row = this.list[res.trIndex];
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 || '全部';
......@@ -187,14 +178,7 @@ export default {
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];
......
......@@ -251,14 +251,6 @@ export default {
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.dtl = res[0].child;
this.nAllAmount = res[0].nAllAmount;
......@@ -269,14 +261,7 @@ export default {
let res = await this.apiGet(`${this.host}${this.userId}/fabricorder/orderallmes/`,{
sOrderNo:this.hdr.sOrderNo
},true);
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
if(res.length > 0){
this.orderallmes = res;
for(let x of this.orderallmes){
......
......@@ -118,7 +118,7 @@ export default {
await this.getDetail();
this.global.$off('clickTd');
this.global.$on('clickTd',async(res)=>{
this.$store.dispatch('searchOrderSaveDtl',res.item);
this.$store.dispatch('searchOrderSaveDtl',this.list[res.trIndex]);
this.$router.push({name:'searchOrderMaterialDetail'})
})
},
......@@ -133,14 +133,7 @@ export default {
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;
......
......@@ -165,21 +165,13 @@ export default {
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
// this.showModal = res.showModal;
this.row = res.item;
this.row = this.list[res.trIndex];
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 || '全部';
......@@ -205,14 +197,7 @@ export default {
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]
......
......@@ -150,14 +150,7 @@ export default {
let res = await this.apiGet(`${this.host}${this.userId}/fabricorder/material/`,{
sSampleMaterialNo:this.dtl.sSampleMaterialNo
},'加载中');
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];
},
clean(){
......
......@@ -253,14 +253,7 @@ export default {
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.dtl = res[0].child;
this.nAllAmount = res[0].nAllAmount;
......@@ -271,14 +264,7 @@ export default {
let res = await this.apiGet(`${this.host}${this.userId}/fabricorder/orderallmes/`,{
sOrderNo:this.hdr.sOrderNo
},true);
if(res.hasOwnProperty('error_data')){
this.$vux.confirm.show({
title:"提示",
content:res.error_title,
showCancelButton:false,
})
return false;
}
if(res.length > 0){
this.orderallmes = res;
for(let x of this.orderallmes){
......
......@@ -206,9 +206,6 @@ export default {
},
async getList(){
this.apiGet(`${this.host}${this.$route.params.userId}/goods/onesample/${this.uGuid}/`,{},true).then(res=>{
if(res.hasOwnProperty('error_data')){
return false;
}
this.hdr = res.header;
this.dtl = res.childs;
res.childs.map(v=>{
......
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