Fixiaobai
2023-09-15 0a10eecc491cbb97d5231bd7ca0042cbd3160c0a
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
<template>
    <div>
        <div class="article-main" style="overflow: hidden;">
            <el-row>
            <el-col :span="12" style="line-height: 32px;">订单BOM</el-col>
            <el-col :span="12" style="text-align: right;">
                <el-button icon="el-icon-download" size="mini" @click="()=>{}">导出</el-button>
            </el-col>
            </el-row>
            <div>
                
                <div style="margin-top: 10px;">
                    <el-card shadow="hover" class="margin-30"> 
                            <el-form ref="form" :model="searchform" label-width="80px">
                            <el-row :gutter="30">
                                <el-col :span="4" >
                                    <el-form-item label="订单号:">
                                        <el-input v-model="searchform.orderCode" placeholder="请输入"></el-input>
                                    </el-form-item>
                                </el-col>
 
                                <el-col :span="4" >
                                    <el-form-item label="产品名称:">
                                        <el-input v-model="searchform.name" placeholder="请输入"></el-input>
                                    </el-form-item>
                                </el-col>
 
                                <el-col :span="4" >
                                    <el-form-item label="下单日期">
                                        <el-col>
                                        <el-date-picker type="date" placeholder="选择日期" v-model="searchform.time" weight="80%"></el-date-picker>
                                        </el-col>
                                    </el-form-item>
                                </el-col>
 
                                <el-col :span="4" >
                                    <el-form-item label="状态:">
                                        <el-input v-model="searchform.type" placeholder="请输入"></el-input>                      
                                    </el-form-item> 
                                </el-col> 
                                <el-col :span="4">
                                    <el-button size="default"  @click="">重置</el-button>
                                    <el-button type="primary" size="default" style="background:0, 78, 162 ;" @click="query">查询</el-button>
 
                                </el-col>        
                            </el-row>                                                 
                            </el-form>
                    </el-card> 
                </div>
                
                <div style="margin-top: 30px;">
                    <el-card shadow="hover" class="margin-30"> 
                        <el-table
                            ref="multipleTable"
                            :data="tableData"
                            tooltip-effect="dark"
                            border
                            style="width: 100%"
                            @selection-change="handleSelectionChange">
 
                            <el-table-column
                            type="selection"
                            width="55">
                            </el-table-column>
 
                            <el-table-column
                            prop="order_number"
                            label="订单号"
                            width="120">
                            <!-- <template slot-scope="scope">{{ scope.row.date }}</template> -->
                            </el-table-column>
 
                            <el-table-column
                            prop="saleman"
                            label="事业部"
                            >
                            </el-table-column>
                            <el-table-column
                            prop=""
                            label="省份"
                            show-overflow-tooltip>
                            </el-table-column>
                            <el-table-column
                            prop=""
                            label="业务员"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="proname"
                            label="客户名称"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="name"
                            label="产品名称"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="name"
                            label="规格型号"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="unit"
                            label="单位"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="number"
                            label="数量"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="下单日期"
                            label="下单日期"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="交货日期"
                            label="交货期"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="type"
                            label="状态"
                            width="120">
                            <template slot-scope="scope">
                                <span style="color:#34BD66;" v-if="scope.row.type==1">已编辑</span>
                                <span style="color:#E84738;" v-else-if="scope.row.type==0">未编辑</span>
                            </template>
                            </el-table-column>
                            <el-table-column
                            prop=""
                            label="操作"
                            width="180">
                            <template slot-scope="scope">
                            <div style="display: flex;">
                                <el-button type="text" siae="small"  size="mini">查询文件</el-button>
 
                                <el-button type="text" siae="small"  size="mini" @click="compileApi">编制</el-button>
 
                                <el-button type="text" siae="small"  size="mini" style=" color:87, 138, 193 ;" @click="">删除</el-button>
                            </div>
                            </template>
                            </el-table-column>
 
                        </el-table>
                    </el-card>
                    <el-col style="height: 50px;display: flex;align-items: center;justify-content: right;">
                        <el-pagination
                        @size-change="handleSizeChange" 
                        @current-change="handleCurrentChange"
                        :current-page="0"
                        :page-sizes="[1,5,10, 20, 30, 50]" 
                        :page-size="0" 
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="countSize">
                        </el-pagination>
                    </el-col>
                </div>           
            </div>       
        </div>
    </div>  
</template>
 
 
 
<script>
export default {
    data() {
      return {       
        searchform:{ 
            name:'',
            type:'',
            orderCode:'',
            time:'',
        },
        tableData:[],
        
        pageSize:1,
        countSize:0,
        currentPage:1,
        multipleSelection:''
      }
    },
    props:['godata'],
    created(){
        this.getDetailInfo()
    },
    methods:{
        handleSelectionChange(val) {
            // console.log(val);
        this.multipleSelection = val;
      },
        handleSizeChange(val) {
        this.pageSize = 1
        this.countSize= val
        this.getDetailInfo()
        },
        handleCurrentChange(val) {
        this.pageSize = val
        this.getDetailInfo()
        },
        getDetailInfo() {                    
 
            this.axios.get(this.$api.url.selectAllOrder,{
                params:{countSize:this.currentPage,
                    pageSize:this.pageSize,total:this.countSize,
                    productName:this.searchform.name,
                },
            }).then(res=>{
                this.tableData = res.data.row
            })
        },
        compileApi() {
            this.axios.post(this.$api.url.compile,{id})
            .then(res=>{
                console.log(res);
            })
        
 
        },
        // query() {
        //     this.tableData(this.)
        // }
 
}}
   
  
</script>
<style scoped>
.card-2{
    display: flex;
    margin-top: 30px;
}
 
.ssss{
    background-color: #fff;
}
</style>