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

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