| | |
| | | @keyup.enter.native="handleSearch" |
| | | ></el-input> |
| | | </div> |
| | | <!-- <div class="search-item">--> |
| | | <!-- <span class="search-label">订单编号:</span>--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="searchForm.orderNo"--> |
| | | <!-- placeholder="请输入订单编号"--> |
| | | <!-- clearable--> |
| | | <!-- style="width: 150px;"--> |
| | | <!-- @keyup.enter.native="handleSearch"--> |
| | | <!-- ></el-input>--> |
| | | <!-- </div>--> |
| | | <div class="search-item"> |
| | | <span class="search-label">状态:</span> |
| | | <el-select |
| | |
| | | style="width: 150px;" |
| | | > |
| | | <el-option label="全部" value=""></el-option> |
| | | <el-option label="正常" value="1"></el-option> |
| | | <el-option label="禁用" value="0"></el-option> |
| | | <el-option label="待处理" value="1"></el-option> |
| | | <el-option label="作业中" value="2"></el-option> |
| | | <el-option label="已取消" value="3"></el-option> |
| | | <el-option label="已完成" value="4"></el-option> |
| | | <el-option label="准备取消" value="5"></el-option> |
| | | <el-option label="已完成" value="6"></el-option> |
| | | <el-option label="上报完成" value="7"></el-option> |
| | | <el-option label="待判查询中" value="9"></el-option> |
| | | <el-option label="就绪" value="10"></el-option> |
| | | <el-option label="生成实际组货单中。请等待..." value="11"></el-option> |
| | | <el-option label="生成实际组货单成功" value="12"></el-option> |
| | | <el-option label="生成实际组货单失败" value="13"></el-option> |
| | | <el-option label="异常" value="99"></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item"> |
| | | <span class="search-label">订单编号:</span> |
| | | <el-input |
| | | v-model="searchForm.orderNo" |
| | | placeholder="请输入订单编号" |
| | | clearable |
| | | style="width: 150px;" |
| | | @keyup.enter.native="handleSearch" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search-actions"> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button> |
| | |
| | | <el-table-column prop="orderNo" label="订单编号" min-width="140" align="center"></el-table-column> |
| | | <el-table-column prop="cstmrName" label="客户名称" min-width="120" align="center"></el-table-column> |
| | | <el-table-column prop="settle" label="状态" min-width="100" align="center" :formatter="formatStatus"></el-table-column> |
| | | <el-table-column prop="totalFee" label="合计金额" min-width="100" align="center" :formatter="formatCurrency"></el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" min-width="140" align="center" sortable="custom"></el-table-column> |
| | | <!-- <el-table-column prop="totalFee" label="合计金额" min-width="100" align="center" :formatter="formatCurrency"></el-table-column>--> |
| | | <!-- <el-table-column prop="createTime" label="创建时间" min-width="140" align="center" sortable="custom"></el-table-column>--> |
| | | <el-table-column label="操作" width="150" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <div class="operation-cell"> |
| | |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="订单编号">{{ currentRow.orderNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{ currentRow.cstmrName }}</el-descriptions-item> |
| | | <el-descriptions-item label="状态">{{ formatStatus(currentRow) }}</el-descriptions-item> |
| | | <el-descriptions-item label="状态">{{ currentRow.settle$ }}</el-descriptions-item> |
| | | <el-descriptions-item label="合计金额">{{ formatCurrency(currentRow) }}</el-descriptions-item> |
| | | <el-descriptions-item label="创建时间">{{ formatDate(currentRow.createTime) }}</el-descriptions-item> |
| | | <el-descriptions-item label="备注">{{ currentRow.memo || '无' }}</el-descriptions-item> |
| | |
| | | :data="tableDataB" |
| | | style="width: 100%" |
| | | v-loading="detailLoading"> |
| | | <el-table-column prop="productName" label="产品名称" min-width="120" align="center"></el-table-column> |
| | | <el-table-column prop="quantity" label="数量" min-width="80" align="center"></el-table-column> |
| | | <el-table-column prop="price" label="单价" min-width="100" align="center" :formatter="formatCurrency"></el-table-column> |
| | | <el-table-column prop="totalPrice" label="金额" min-width="100" align="center" :formatter="formatCurrency"></el-table-column> |
| | | <el-table-column prop="matnr" label="规格" min-width="120" align="center"></el-table-column> |
| | | <el-table-column prop="batch" label="箱号" min-width="80" align="center"></el-table-column> |
| | | <el-table-column prop="model" label="卷号" min-width="100" align="center" ></el-table-column> |
| | | <!-- <el-table-column prop="totalPrice" label="金额" min-width="100" align="center" :formatter="formatCurrency"></el-table-column>--> |
| | | <el-table-column prop="origin" label="位置" min-width="100" align="center"></el-table-column> |
| | | <el-table-column prop="danger" label="待判" min-width="100" align="center"></el-table-column> |
| | | <el-table-column prop="memo" label="备注" min-width="100" align="center"></el-table-column> |
| | | <!-- 可根据实际需求添加更多子表列 --> |
| | | </el-table> |
| | | |
| | |
| | | // 搜索表单 |
| | | searchForm: { |
| | | uuid: '', |
| | | cstmrName: '', |
| | | cstmr_name: '', |
| | | settle: '', |
| | | orderNo: '' |
| | | order_no: '' |
| | | }, |
| | | // 排序相关 |
| | | orderByField: '', |
| | |
| | | // 每5秒自动刷新数据 |
| | | setInterval(() => { |
| | | this.getTableDataA(); |
| | | }, 5000); |
| | | }, 10000); |
| | | }, |
| | | |
| | | // 获取主表A数据 - 使用新的API |
| | |
| | | // 添加搜索参数 |
| | | Object.keys(that.searchForm).forEach(key => { |
| | | if (that.searchForm[key] !== '') { |
| | | params[key] = that.searchForm[key]; |
| | | if (key === 'orderNo'){ |
| | | params['order_no'] = that.searchForm[key]; |
| | | } else if (key === 'cstmrName'){ |
| | | params['cstmr_name'] = that.searchForm[key]; |
| | | } else if (key === 'settle$'){ |
| | | params['settle'] = that.searchForm[key]; |
| | | } else { |
| | | params[key] = that.searchForm[key]; |
| | | } |
| | | } |
| | | }); |
| | | |
| | |
| | | }, |
| | | |
| | | // 获取子表B数据(根据实际业务调整) |
| | | getTableDataB(uuid) { |
| | | getTableDataB(orderNo) { |
| | | let that = this; |
| | | that.detailLoading = true; |
| | | |
| | | // 构建请求参数 |
| | | let params = { |
| | | order_no: orderNo, |
| | | curr: that.detailCurrentPage, |
| | | limit: that.detailPageSize |
| | | }; |
| | | |
| | | // 模拟API调用 - 根据实际业务调整API地址 |
| | | $.ajax({ |
| | | url: baseUrl + "/api/order/detail/list", |
| | | // url: baseUrl + "/order/pakout/orderDetl/cargo/grouping/auth", |
| | | url: baseUrl + "/orderDetl/list/auth", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: { |
| | | uuid: uuid, |
| | | page: that.detailCurrentPage, |
| | | size: that.detailPageSize |
| | | }, |
| | | data: params, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'post', |
| | | method: 'get', |
| | | success: function (res) { |
| | | that.tableDataB = res.data || []; |
| | | that.detailTotal = res.total || 0; |
| | | if (res.code === 200 || res.success) { |
| | | that.tableDataB = res.data.records || []; |
| | | that.detailTotal = res.data.total || 0; |
| | | } else { |
| | | that.$message.error(res.message || '获取数据失败'); |
| | | that.tableDataB = []; |
| | | that.detailTotal = 0; |
| | | } |
| | | that.detailLoading = false; |
| | | }, |
| | | error: function() { |
| | |
| | | handleReset() { |
| | | this.searchForm = { |
| | | uuid: '', |
| | | cstmrName: '', |
| | | cstmr_name: '', |
| | | settle: '', |
| | | orderNo: '' |
| | | order_no: '' |
| | | }; |
| | | this.orderByField = ''; |
| | | this.orderByType = 'asc'; |
| | |
| | | this.currentRow = row; |
| | | this.detailDialogVisible = true; |
| | | this.detailCurrentPage = 1; |
| | | this.getTableDataB(row.uuid); |
| | | this.getTableDataB(row.orderNo); |
| | | }, |
| | | |
| | | // 关闭详情弹窗 |
| | |
| | | this.detailPageSize = val; |
| | | this.detailCurrentPage = 1; |
| | | if (this.currentRow) { |
| | | this.getTableDataB(this.currentRow.uuid); |
| | | this.getTableDataB(this.currentRow.orderNo); |
| | | } |
| | | }, |
| | | |
| | |
| | | handleDetailCurrentChange(val) { |
| | | this.detailCurrentPage = val; |
| | | if (this.currentRow) { |
| | | this.getTableDataB(this.currentRow.uuid); |
| | | this.getTableDataB(this.currentRow.orderNo); |
| | | } |
| | | }, |
| | | |
| | |
| | | return '正常'; |
| | | } else if (row.settle === 0) { |
| | | return '禁用'; |
| | | } else if (row.settle === 0) { |
| | | return '禁用'; |
| | | } else if (row.settle === 0) { |
| | | return '禁用'; |
| | | } else if (row.settle === 0) { |
| | | return '禁用'; |
| | | } else { |
| | | return row.settle || '未知'; |
| | | } |