abnormal.vue 6.35 KB
Newer Older
godwithdh's avatar
godwithdh committed
1 2 3 4 5 6 7 8 9 10 11 12
<style lang="less">
    .abnormal{
        >table{
            width: calc(100% - 20px);
            text-align: center;
            margin: 10px;
            background: #E6F0FE;
            border-radius: 5px;
            tr{
                >td{
                    padding:10px 0;
                    >div{
godwithdh's avatar
godwithdh committed
13 14 15 16
                        height:45px;
                        display:flex;
                        justify-content: center;
                        align-items: center;
godwithdh's avatar
godwithdh committed
17
                        background:#fff;
godwithdh's avatar
godwithdh committed
18
                        padding:5px 2px;
godwithdh's avatar
godwithdh committed
19 20 21 22 23
                    }
                    &:first-child>div{
                        border-left:2px solid #8D90FF;
                    }
                    &:nth-child(2n-1)>div{
张锡奇's avatar
张锡奇 committed
24
                        // color:#68A0FE;
godwithdh's avatar
godwithdh committed
25 26
                    }
                    &:nth-child(2n){
张锡奇's avatar
张锡奇 committed
27
                        color:#68A0FE;
godwithdh's avatar
godwithdh committed
28
                        text-align: left;
张锡奇's avatar
张锡奇 committed
29
                        text-decoration: underline;
godwithdh's avatar
godwithdh committed
30 31 32 33 34 35 36 37
                    }
                }
            }
        }
    }
</style>
<template>
    <div class="abnormal">
godwithdh's avatar
godwithdh committed
38
        <table cellspacing="0" >
godwithdh's avatar
godwithdh committed
39
            <tr>
张锡奇's avatar
张锡奇 committed
40
                <td style="width:100px;" >
godwithdh's avatar
godwithdh committed
41 42
                    <div>销售退货</div>
                </td>
张锡奇's avatar
张锡奇 committed
43
                <td @click="routerPushOperateDetail('销售退货')">
godwithdh's avatar
godwithdh committed
44
                    <div>{{Number(value['销售退货']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
45
                </td>
张锡奇's avatar
张锡奇 committed
46 47 48 49 50 51 52 53
                <td style="width:100px;">
                    <div>销售退货率</div>
                </td>
                <td style="text-decoration:none;">
                    <div>{{Number(value['销售退货率']||0).toLocaleString() * 100 + '%'}}</div>
                </td>
            </tr>
            <tr>
张锡奇's avatar
张锡奇 committed
54
                <td style="width:100px;">
godwithdh's avatar
godwithdh committed
55 56
                    <div>采购退货</div>
                </td>
张锡奇's avatar
张锡奇 committed
57
                <td @click="routerPushOperateDetail('采购退货')">
godwithdh's avatar
godwithdh committed
58
                    <div>{{Number(value['采购退货']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
59
                </td>
张锡奇's avatar
张锡奇 committed
60 61 62 63 64 65
                <td style="width:100px;">
                    <div>采购退货率</div>
                </td>
                <td style="text-decoration:none;">
                    <div>{{Number(value['采购退货率']||0).toLocaleString() * 100 + '%'}}</div>
                </td>
godwithdh's avatar
godwithdh committed
66 67
            </tr>
            <tr>
张锡奇's avatar
张锡奇 committed
68
                <td >
godwithdh's avatar
godwithdh committed
69 70
                    <div>加工回修</div>
                </td>
张锡奇's avatar
张锡奇 committed
71
                <td @click="routerPushOperateDetail('加工回修')">
godwithdh's avatar
godwithdh committed
72
                    <div>{{Number(value['加工回修']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
73
                </td>
张锡奇's avatar
张锡奇 committed
74
                <td>
godwithdh's avatar
godwithdh committed
75 76
                    <div>疵品数量</div>
                </td>
张锡奇's avatar
张锡奇 committed
77
                <td @click="routerPushOperateDetail('疵品汇总')">
godwithdh's avatar
godwithdh committed
78
                    <div>{{Number(value['疵品汇总']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
79 80 81
                </td>
            </tr>
            <tr>
godwithdh's avatar
godwithdh committed
82
                <td colspan='4' style="text-align:left;padding:0 0 0 10px;color:#68A0FE;">拖期订单:{{value['拖期订单数量']||0}}</td>
godwithdh's avatar
godwithdh committed
83 84 85 86 87
            </tr>
            <tr>
                <td>
                    <div>数量</div>
                </td>
张锡奇's avatar
张锡奇 committed
88
                <td style="text-decoration:none;">
godwithdh's avatar
godwithdh committed
89
                    <div>{{Number(value['拖期订单总数量']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
90 91 92 93
                </td>
                <td>
                    <div>金额</div>
                </td>
张锡奇's avatar
张锡奇 committed
94
                <td style="text-decoration:none;">
godwithdh's avatar
godwithdh committed
95
                    <div>{{Number(value['拖期订单总金额']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
96 97 98
                </td>
            </tr>
            <tr>
张锡奇's avatar
张锡奇 committed
99
                <td>
godwithdh's avatar
godwithdh committed
100 101
                    <div>供应商赔款</div>
                </td>
张锡奇's avatar
张锡奇 committed
102
                <td @click="routerPushOperateDetail('供应商索赔')">
godwithdh's avatar
godwithdh committed
103
                    <div>{{Number(value['供应商索赔']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
104
                </td>
张锡奇's avatar
张锡奇 committed
105
                <td>
godwithdh's avatar
godwithdh committed
106 107
                    <div>客户赔款</div>
                </td>
张锡奇's avatar
张锡奇 committed
108
                <td @click="routerPushOperateDetail('客户索赔')">
godwithdh's avatar
godwithdh committed
109
                    <div>{{Number(value['客户索赔']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
110 111 112
                </td>
            </tr>
            <tr>
张锡奇's avatar
张锡奇 committed
113
                <td>
godwithdh's avatar
godwithdh committed
114 115
                    <div>超期应收额</div>
                </td>
张锡奇's avatar
张锡奇 committed
116
                <td @click="routerPushOperateDetail('超期应收')">
godwithdh's avatar
godwithdh committed
117
                    <div>{{Number(value['超期应收']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
118
                </td>
张锡奇's avatar
张锡奇 committed
119
                <td>
godwithdh's avatar
godwithdh committed
120 121
                    <div>超期应付额</div>
                </td>
张锡奇's avatar
张锡奇 committed
122
                <td @click="routerPushOperateDetail('超期应付')">
godwithdh's avatar
godwithdh committed
123
                    <div>{{Number(value['超期应付']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
124 125 126 127 128 129
                </td>
            </tr>
        </table>
    </div>
</template>
<script>
godwithdh's avatar
godwithdh committed
130
import util from "@/libs/util.js"
godwithdh's avatar
godwithdh committed
131 132
export default {
    name:"abnormal",
godwithdh's avatar
godwithdh committed
133 134 135 136
    props:{
        start:Date,
        end:Date,
    },
godwithdh's avatar
godwithdh committed
137 138
    data(){
        return{
godwithdh's avatar
godwithdh committed
139
            value:{},
godwithdh's avatar
godwithdh committed
140
        }
godwithdh's avatar
godwithdh committed
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
    },
    watch:{
        start(n){
            this.search()
        },
        end(n){
            this.search()
        },
    },
    created(){
        this.$nextTick(()=>{
            this.search()
        })
    },
    methods:{
        async search(){
            var value= await this.request('getBoss',{
godwithdh's avatar
godwithdh committed
158 159 160 161 162
                data:[
                    {key:"url",value:"Abnormal early warning"},
                    {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'},
                ]
godwithdh's avatar
godwithdh committed
163
            },"加载中",{})
godwithdh's avatar
godwithdh committed
164 165 166 167 168 169 170 171 172 173
            if(typeof value=="object"&&value.length>0){
                this.value=value[0]
            }else{
                this.$vux.confirm.show({
                    title:"提示",
                    content:"未获取到数据",
                    showConfirmButton:false,
                })
            }
        },
张锡奇's avatar
张锡奇 committed
174 175 176 177 178 179 180 181 182
        routerPushOperateDetail(type){
            let data = {};
            data.sType = type;
            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.$store.dispatch('saveRefresh',true);
            this.$router.push({name:'tiipOperateDetail',type:type})
        }
godwithdh's avatar
godwithdh committed
183
    },
godwithdh's avatar
godwithdh committed
184 185
}
</script>