detail.vue 10.2 KB
Newer Older
张锡奇's avatar
张锡奇 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
<style lang="less" >
    #tipProcurementProgressDetail{
        height:100%;
        display:flex;
        flex-direction: column;
        background: #f2f2f2;
        .CONTENT{
            .basic{
                background: #dfe9fd;
                padding-left:5px;
                .Title{
                    height:40px;
                    display: flex;
                    align-items: center;
                    color:#5E9AFE;
                    font-weight: bold;
                }
            }
            .Info{
                border-top:1px solid #dbe9f8;
                display: flex;
                flex-wrap: wrap;
                margin-top: 0px;
                font-size:12px;
                >div{
                    display: flex;
                    width: 100%;
                    min-height:40px;
                    >div{
                        display: flex;
                        width:100%;
                        min-height:40px;
                        >div{
                            display: flex;
                            align-items: center;
                            box-sizing: content-box;
                            flex:1;
                            height:100%;
                            >span{
                                height:100%;
                                min-width:80px;
                                text-align: center;
                                border-right:1px solid #dbe9f8;
                                box-sizing: border-box;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                border-bottom:1px solid #dbe9f8;
                                color:#586e86;
                                font-weight: bold;
                                background: #eef4fe;
                            }
                            >div{
                                height:100%;
                                width:100%;
                                display: flex;
                                flex-wrap: wrap;
                                >div{
                                    height:100%;
                                    width:100%;
                                    background:white;
                                    align-items: center;
                                    display:inline-flex;
                                    // padding:0 5px 0 0;
                                    >div:first-child{
                                        height:100%;
                                        border-bottom:1px solid #dbe9f8;
                                        border-right:1px solid #dbe9f8;
                                        box-sizing: border-box;
                                    }
                                    >div{
                                        flex:1;
                                        padding-left:5px;
                                        display: flex;
                                        align-items: center;
                                        >span{
                                            width:70px;
                                            display: inline-block;
                                        }
                                    }
                                }
                            }
                        }
                    } 
                }
            }
        }
        .marginBottom10{
            margin-bottom: 10px;
        }
    }
</style>

<template>
    <div id="tipProcurementProgressDetail">
        <div v-for="(item,index) in hdr.procurement.child" :key='index' class="marginBottom10">
            <div class="CONTENT" v-for="(v1,i1) in list" :key='i1'>
                <div class="basic">
                    <div class="Title">
                        <span>{{v1.title}}</span>
                    </div> 
                </div>
                <div class="Info">
                    <div v-for="(v2,i2) in v1.child" :key='i2'>
                        <div v-for="(v3,i3) in v2.child" :key="i3">
                            <div>
                                <span>{{v3.sFieldCaption}}</span>
                                <div>
                                    <div>
                                        <div>
                                            {{item[v3.sFieldName]}}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
    </div>
</template>

<script>
import Util from '@/libs/util.js'
import { mapState } from 'vuex'

export default {
    name: 'tipProcurementProgressDetail',
    data(){
        return{
            list:[],
            DATA:{}
        }
    },
    computed:{
        ...mapState({
            hdr:state => state.checkProgress.hdr,
            dtl:state => state.checkProgress.dtl.procurement
        })
    },
    async mounted(){
    },
    async activated(){
        window.d = this;

        // await this.getDetail();
        await this.formatData();
    },
    methods:{
        async getDetail(){
            let result = await this.request('getTipProcurementProgress',{
                data:[
                    {key:'url',value:'Procurement progress Dtl'},
                    {key:'uGUID',value:this.hdr.procurement.uGUID}
                ]
            },true);
            if(result && result.length > 0){
                this.$store.dispatch('saveCheckProgressDtl',{
                    type:'procurement',
                    row:result
                });
            }
        },
        formatData(){
            this.list = [
                {
                    title:'基本信息',
                    child:[
                        {
                            child:[
                                {
                                    sFieldCaption:'物料编号',
                                    sFieldName:'sMaterialNo'
                                },
                                {
                                    sFieldCaption:'物料名称',
                                    sFieldName:'sMaterialName'
                                },
                            ]
                        },
                        {
                            child:[
                                {
                                    sFieldCaption:'规格',
                                    sFieldName:'sConstruction'
                                },
                                {
                                    sFieldCaption:'坯布规格',
                                    sFieldName:'sYarnInfo'
                                },
                            ]
                        },
                        {
                            child:[
                                {
                                    sFieldCaption:'坯布组织',
                                    sFieldName:'sRawConstruction'
                                },
                                {
                                    sFieldCaption:'批次',
                                    sFieldName:'sMaterialLot'
                                },
                            ]
                        },
                        {
                            child:[
                                {
                                    sFieldCaption:'加工商物料',
                                    sFieldName:'sProviderMaterialNo'
                                },
                                {
                                    sFieldCaption:'数量',
                                    sFieldName:'nQty'
                                },
                            ]
                        },
                        {
                            child:[
                                {
                                    sFieldCaption:'单位',
                                    sFieldName:'sUnitName'
                                },
                                {
                                    sFieldCaption:'匹数',
                                    sFieldName:'nPieces'
                                },
                            ]
                        },
                        {
                            child:[
                                {
                                    sFieldCaption:'溢装',
                                    sFieldName:'nOverPercent'
                                },
                                {
                                    sFieldCaption:'短装',
                                    sFieldName:'nShortPercent'
                                },
                            ]
                        },
                        {
                            child:[
                                {
                                    sFieldCaption:'已交货数量',
                                    sFieldName:'nDeliveriedQty'
                                },
                                {
                                    sFieldCaption:'已交货匹数',
                                    sFieldName:'nDeliveriedPieces'
                                },
                            ]
                        },
                        {
                            child:[
                                {
                                    sFieldCaption:'欠数',
                                    sFieldName:'nLessQty'
                                },
                                {
                                    sFieldCaption:'落布数量',
                                    sFieldName:'nDropClothQty'
                                },
                            ]
                        },
                        {
                            child:[
                                {
                                    sFieldCaption:'最后入库日期',
                                    sFieldName:'dLastStoreInTime'
                                },
                            ]
                        }
                    ]
                }
            ]
        }
    },
    components:{
    },
}
</script>