abnormal.vue 4.75 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 24 25 26 27 28 29 30 31 32 33 34 35
                    }
                    &:first-child>div{
                        border-left:2px solid #8D90FF;
                    }
                    &:nth-child(2n-1)>div{
                        color:#68A0FE;
                    }
                    &:nth-child(2n){
                        text-align: left;
                    }
                }
            }
        }
    }
</style>
<template>
    <div class="abnormal">
godwithdh's avatar
godwithdh committed
36
        <table cellspacing="0" >
godwithdh's avatar
godwithdh committed
37
            <tr>
godwithdh's avatar
godwithdh committed
38
                <td style="width:100px;">
godwithdh's avatar
godwithdh committed
39 40 41
                    <div>销售退货</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
42
                    <div>{{Number(value['销售退货']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
43
                </td>
godwithdh's avatar
godwithdh committed
44
                <td style="width:100px;">
godwithdh's avatar
godwithdh committed
45 46 47
                    <div>采购退货</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
48
                    <div>{{Number(value['采购退货']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
49 50 51 52 53 54 55
                </td>
            </tr>
            <tr>
                <td>
                    <div>加工回修</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
56
                    <div>{{Number(value['加工回修']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
57 58 59 60 61
                </td>
                <td>
                    <div>疵品数量</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
62
                    <div>{{Number(value['疵品汇总']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
63 64 65
                </td>
            </tr>
            <tr>
godwithdh's avatar
godwithdh committed
66
                <td colspan='4' style="text-align:left;padding:0 0 0 10px;color:#68A0FE;">拖期订单:{{value['拖期订单数量']||0}}</td>
godwithdh's avatar
godwithdh committed
67 68 69 70 71 72
            </tr>
            <tr>
                <td>
                    <div>数量</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
73
                    <div>{{Number(value['拖期订单总数量']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
74 75 76 77 78
                </td>
                <td>
                    <div>金额</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
79
                    <div>{{Number(value['拖期订单总金额']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
80 81 82 83 84 85 86
                </td>
            </tr>
            <tr>
                <td>
                    <div>供应商赔款</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
87
                    <div>{{Number(value['供应商索赔']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
88 89 90 91 92
                </td>
                <td>
                    <div>客户赔款</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
93
                    <div>{{Number(value['客户索赔']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
94 95 96 97 98 99 100
                </td>
            </tr>
            <tr>
                <td>
                    <div>超期应收额</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
101
                    <div>{{Number(value['超期应收']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
102 103 104 105 106
                </td>
                <td>
                    <div>超期应付额</div>
                </td>
                <td>
godwithdh's avatar
godwithdh committed
107
                    <div>{{Number(value['超期应付']||0).toLocaleString()}}</div>
godwithdh's avatar
godwithdh committed
108 109 110 111 112 113
                </td>
            </tr>
        </table>
    </div>
</template>
<script>
godwithdh's avatar
godwithdh committed
114
import util from "@/libs/util.js"
godwithdh's avatar
godwithdh committed
115 116
export default {
    name:"abnormal",
godwithdh's avatar
godwithdh committed
117 118 119 120
    props:{
        start:Date,
        end:Date,
    },
godwithdh's avatar
godwithdh committed
121 122
    data(){
        return{
godwithdh's avatar
godwithdh committed
123
            value:{},
godwithdh's avatar
godwithdh committed
124
        }
godwithdh's avatar
godwithdh committed
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
    },
    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
142 143 144 145 146
                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
147
            },"加载中",{})
godwithdh's avatar
godwithdh committed
148 149 150 151 152 153 154 155 156 157 158
            if(typeof value=="object"&&value.length>0){
                this.value=value[0]
            }else{
                this.$vux.confirm.show({
                    title:"提示",
                    content:"未获取到数据",
                    showConfirmButton:false,
                })
            }
        },
    },
godwithdh's avatar
godwithdh committed
159 160
}
</script>