马宇豪
2023-12-19 d5f70e01396783b1d2b84b49344b6d2798eb1097
src/views/stock/components/enterprisePurchaseDetail.vue
@@ -6,7 +6,7 @@
        :append-to-body="true"
    >
        <div class="app-container">
            <div class="table_title">新疆吉庆烟花爆竹有限公司<span v-if="timeValue!==''">({{ timeValue }})</span>进货情况</div>
            <div class="table_title">{{company}}<span v-if="timeValue!==''">({{ timeValue }})</span>进货情况</div>
            <div class="table_content">
                <el-table
                    v-loading="listLoading"
@@ -50,6 +50,7 @@
            return{
                scList: [],
                timeValue: '',
                company: '',
                tableKey:'',
                listLoading:false,
                purchaseDetailVisible:false,
@@ -57,8 +58,9 @@
        },
        components: {},
        methods:{
            open(scItems,timeRange,startTime,endTime){
                this.scList = scItems;
            open(data,timeRange,startTime,endTime){
                this.scList = data.scItems
                this.company = data.pifaCompany
                for(let i of this.scList){
                    i.firecracker = i.items.filter(it=>it.type === '爆竹类').length>0?i.items.filter(it=>it.type === '爆竹类')[0].boxCount:0
                    i.spray = i.items.filter(it=>it.type === '喷花类').length>0?i.items.filter(it=>it.type === '喷花类')[0].boxCount:0
@@ -72,6 +74,7 @@
                if(timeRange){
                    this.timeValue = startTime.split(' ')[0] + '~' + endTime.split(' ')[0]
                }
            }
        }
    }