签收异常页增加双击弹出明细的逻辑

This commit is contained in:
liuyp 2024-06-04 16:42:48 +08:00
parent 7cc67b3739
commit b6ca6fb3b0

View File

@ -34,7 +34,7 @@
</el-form-item>
</el-col>
<el-col :span="16">
<!-- <el-col :span="16">
<el-form-item :label="$t('')" prop="thisSiteScanType" label-width="70px">
<el-radio-group v-model="queryParams.params.thisSiteScanType">
<el-radio :label="20">本站发件</el-radio>
@ -42,14 +42,14 @@
<el-radio :label="40">本站派件</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-col> -->
</el-col>
</el-form>
<!-- </search-form> -->
</el-row >
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="统计数据" name="first">
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="统计数据" name="first"> -->
<xd-table v-loading="loading"
border stripe
size="small"
@ -59,18 +59,19 @@
:total="total"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
@row-dblclick="getDetailList"
v-if="tableHeight" :max-height="tableHeight + 'px'"
>
<div slot="toolbar">
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="getList"
>查询</el-button>
</el-col> -->
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
@ -96,8 +97,9 @@
</template>
</el-table-column>
</xd-table>
</el-tab-pane>
<el-tab-pane label="明细数据" name="second">
<!-- </el-tab-pane>
<el-tab-pane label="明细数据" name="second"> -->
<el-dialog :title="titleForm" :visible.sync="openForm" width="80%" v-dialogDrag :close-on-click-modal="false" append-to-body>
<xd-table v-loading="loading"
border stripe
size="small"
@ -109,26 +111,6 @@
@sort-change="handleSortChange"
v-if="tableHeight" :max-height="tableHeight + 'px'"
>
<div slot="toolbar">
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="getList"
>查询</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="getList"
>导出</el-button>
</el-col>
</el-row>
</div>
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="170" />
<el-table-column :label="$t('扫描时间')" align="center" prop="scanDate" min-width="170" >
@ -217,8 +199,9 @@
</template>
</el-table-column>
</xd-table>
</el-tab-pane>
</el-tabs>
</el-dialog>
<!-- </el-tab-pane>
</el-tabs> -->
</div>
</template>
@ -301,6 +284,7 @@ export default {
beginScanDate:null,
endScanDate:null,
},//扩展参数
tempQueryParams:{}
},
// 表单参数
form: {},
@ -329,13 +313,13 @@ export default {
this.getList();
},
methods: {
handleClick(){
if(this.activeName=="first"){
this.getList();
}else if(this.activeName=="second"){
this.getDetailList();
}
},
// handleClick(){
// if(this.activeName=="first"){
// this.getList();
// }else if(this.activeName=="second"){
// this.getDetailList();
// }
// },
/** 查询统计信息 */
getList() {
this.loading = true;
@ -348,6 +332,7 @@ export default {
this.queryParams.params.beginScanDate = null;
this.queryParams.params.endScanDate = null;
}
this.tempQueryParams = {...this.queryParams};
queryStatList(this.queryParams).then(response => {
if(!response ||response.code != 200){
this.$message.error(response && response.msg || "未知错误")
@ -359,23 +344,27 @@ export default {
});
},
/** 查询明细列表 */
getDetailList() {
getDetailList(row, column, event) {
this.loading = true;
console.log("---->this.queryParams,", this.dateTimeRange);
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
this.queryParams.params.beginScanDate = dateToStr(this.dateTimeRange[0]);
this.queryParams.params.endScanDate = dateToStr(this.dateTimeRange[1]);
}else{
this.queryParams.params.beginScanDate = null;
this.queryParams.params.endScanDate = null;
}
queryScanStatRecordList(this.queryParams).then(response => {
// console.log("---->this.queryParams,", this.dateTimeRange);
// if (null != this.dateTimeRange && '' != this.dateTimeRange) {
// this.queryParams.params.beginScanDate = dateToStr(this.dateTimeRange[0]);
// this.queryParams.params.endScanDate = dateToStr(this.dateTimeRange[1]);
// }else{
// this.queryParams.params.beginScanDate = null;
// this.queryParams.params.endScanDate = null;
// }
debugger;
this.tempQueryParams.scanSiteCode = row.scanSiteCode;
queryScanStatRecordList(this.tempQueryParams).then(response => {
if(!response ||response.code != 200){
this.$message.error(response && response.msg || "未知错误")
return;
}
this.emisStatRecordList = response.rows;
this.recordTotal = response.total;
this.openForm = true;
this.titleForm = row.scanSiteName;
this.loading = false;
});
},