完成签收记录
This commit is contained in:
parent
d08e6cf482
commit
ed98265312
@ -1,60 +1,54 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<search-form :model="queryParams" ref="queryForm" size="small" :maxShow="8" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="applySeq">
|
||||
<el-col :span="8">
|
||||
<el-select v-model="queryParams.queryType" >
|
||||
<el-option :label="$t('运单号')" value="1"></el-option>
|
||||
<el-option :label="$t('订单号')" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input
|
||||
v-model="queryParams.billCode"
|
||||
:placeholder="$t('多个流水号逗号或换行隔开')"
|
||||
clearable
|
||||
type="textarea"
|
||||
rows="9"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-col>
|
||||
<SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="8" label-width="100px" v-show="showSearch" @search="getList" @reset="resetQuery">
|
||||
<el-form-item label="" prop="billCode">
|
||||
<div slot="label">
|
||||
<el-radio-group class="query-label" v-model="queryParams.params.queryOrderType">
|
||||
<el-radio label="1">运单号</el-radio>
|
||||
<el-radio label="0">订单号</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-input
|
||||
v-model="queryParams.billCode"
|
||||
:placeholder="$t('多个流水号逗号或换行隔开')"
|
||||
clearable
|
||||
type="textarea"
|
||||
rows="2"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="签收时间" prop="dateTimeRange">
|
||||
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('录入网点')" prop="scanSiteCode" label-width="70px">
|
||||
<EmisSiteSimplePicker v-model="queryParams.scanSiteCode" @onChange="onScanSiteSelect" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('签收图片')" prop="isSignPic">
|
||||
<el-select v-model="queryParams.isSignPic" :placeholder="$t('全部')" value="0">
|
||||
<el-option :label="$t('未上传')" value="1"></el-option>
|
||||
<el-option :label="$t('已上传')" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('派件员')" prop="dispatchOrSendManCode">
|
||||
<EmisUserSimplePicker v-model="queryParams.dispatchOrSendManCode" postCode="RSD" @onChange="onStaffSelect" ></EmisUserSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="16"> -->
|
||||
<el-form-item label="签收时间" prop="dateTimeRange">
|
||||
<elDateAdvPicker clearable v-model="dateTimeRange" @dateTimeChange="onDateSelect" ></elDateAdvPicker>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="8"> -->
|
||||
<el-form-item :label="$t('录入网点')" prop="recordSiteCode" label-width="70px">
|
||||
<EmisSiteSimplePicker v-model="queryParams.recordSiteCode" @onChange="onScanSiteSelect" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="8"> -->
|
||||
<el-form-item :label="$t('签收图片')" prop="isSignPic">
|
||||
<el-select v-model="queryParams.params.isSignPic" :placeholder="$t('全部')" value="0">
|
||||
<el-option :label="$t('未上传')" value="1"></el-option>
|
||||
<el-option :label="$t('已上传')" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="8"> -->
|
||||
<el-form-item :label="$t('派件员')" prop="dispatchOrSendManCode">
|
||||
<EmisUserSimplePicker v-model="queryParams.dispatchOrSendManCode" postCode="RSD" @onChange="onStaffSelect" ></EmisUserSimplePicker>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('收件国家')" prop="countryCode" label-width="70px">
|
||||
<CountryPicker v-model="queryParams.countryCode" @onChange="onCountrySelect" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8"> -->
|
||||
<el-form-item :label="$t('收件国家')" prop="destCode" label-width="70px">
|
||||
<CountryPicker v-model="queryParams.destCode" @onChange="onCountrySelect" ></CountryPicker>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
|
||||
</search-form>
|
||||
</SearchForm>
|
||||
</el-row >
|
||||
|
||||
<xd-table v-loading="loading"
|
||||
@ -66,7 +60,6 @@
|
||||
:total="total"
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
v-if="tableHeight" :max-height="tableHeight + 'px'"
|
||||
>
|
||||
<div slot="toolbar">
|
||||
@ -128,51 +121,16 @@
|
||||
<el-table-column :label="$t('收件省份')" align="center" prop="xxx" min-width="100" />
|
||||
<el-table-column :label="$t('签收图片')" align="center" prop="picUrl" min-width="100"/>
|
||||
</xd-table>
|
||||
|
||||
<!-- 添加或修改网点电子面单申请对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body>
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('扫描网点')" prop="scanSiteCode" label-width="70px">
|
||||
<EmisSiteSimplePicker key="2" v-model="modifyParams.scanSiteCode" @onChange="onModifyScanSiteSelect" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('上/下一网点')" prop="preOrNextStationCode" label-width="90px">
|
||||
<EmisSiteSimplePicker key="3" v-model="modifyParams.preOrNextStationCode" @onChange="onModifyPreOrNextSiteSelect" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('扫描员工')" prop="scanManCode">
|
||||
<EmisUserSimplePicker key="4" v-model="modifyParams.scanManCode" postCode="RSD" @onChange="onModifyStaffSelect" ></EmisUserSimplePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisElectronicPagApply, getEmisElectronicPagApply, delEmisElectronicPagApply, addEmisElectronicPagApply, updateEmisElectronicPagApply } from "@/api/emis/emisElectronicPagApply";
|
||||
import { listEmisTmsScanRecord, delEmisTmsScanRecord, updateEmisTmsScanRecord } from "@/api/emis/emisTmsScanRecord";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
|
||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||
// import emisElectronicPagApplyView from '@/views/emis/emisElectronicPagApply/emisElectronicPagApplyView';
|
||||
// import emisElectronicPagApplyForm from '@/views/emis/emisElectronicPagApply/emisElectronicPagApplyForm';
|
||||
|
||||
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
|
||||
// import DestinationPicker from '@/views/emis/EmisBaseTools/DestinationPicker.vue';
|
||||
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||
// import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import EmisUserSimplePicker from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
||||
|
||||
import { getDateTimeToString } from '@/utils/payutils'
|
||||
@ -201,10 +159,6 @@ export default {
|
||||
total: 0,
|
||||
// 网点电子面单申请表格数据
|
||||
emisElectronicPagApplyList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
@ -262,24 +216,9 @@ export default {
|
||||
status: null,
|
||||
delFlag: null,
|
||||
remark: null,
|
||||
params:{},//扩展参数
|
||||
|
||||
// scanSite:null,
|
||||
queryType:"1",// 选择运单类型,默认为 运单号:1,订单号:2
|
||||
// scanType:"",
|
||||
isSubBill:"",
|
||||
},
|
||||
// 修改参数
|
||||
modifyParams:{
|
||||
scanSite:null,
|
||||
scanSiteCode:null,
|
||||
scanSitePhone:null,
|
||||
preOrNextStation:null,
|
||||
preOrNextStationCode:null,
|
||||
preOrNextStationPhone:null,
|
||||
scanMan:null,
|
||||
scanManCode:null,
|
||||
scanManPhone:null,
|
||||
params:{
|
||||
queryOrderType:"1"
|
||||
},//扩展参数
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -292,7 +231,6 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getList();
|
||||
this.$nextTick(function() {
|
||||
let queryFormEl = this.$refs.queryForm.$el;
|
||||
let tableH = queryFormEl.offsetHeight+190;
|
||||
@ -303,43 +241,24 @@ export default {
|
||||
/** 查询扫描记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// this.queryParams.params = {};
|
||||
console.log("---->this.queryParams,", this.queryParams);
|
||||
// debugger;
|
||||
let queryParams = Object.assign({},this.queryParams);
|
||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
||||
// this.queryParams.params["beginScanDate"] = this.dateTimeRange[0];
|
||||
// this.queryParams.params["endScanDate"] = this.dateTimeRange[1];
|
||||
this.queryParams.params.beginScanDate = this.dateTimeRange[0];
|
||||
this.queryParams.params.endScanDate = this.dateTimeRange[1];
|
||||
queryParams.params.beginSignDate = this.dateTimeRange[0];
|
||||
queryParams.params.endSignDate = this.dateTimeRange[1];
|
||||
}else{
|
||||
this.queryParams.params.beginScanDate = null;
|
||||
this.queryParams.params.endScanDate = null;
|
||||
queryParams.params.beginSignDate = null;
|
||||
queryParams.params.endSignDate = null;
|
||||
}
|
||||
if(this.queryParams.params.queryOrderType == "1"){
|
||||
queryParams.orderSN=null;
|
||||
}else if(this.queryParams.params.queryOrderType == "0"){
|
||||
queryParams.orderSN=this.queryParams.billCode;
|
||||
queryParams.billCode=null;
|
||||
}
|
||||
this.queryParams.params.queryType = this.queryParams.queryType;//1:yd;2:dd;
|
||||
this.queryParams.params.isSubBill = this.queryParams.isSubBill;//1:子单;0:主单
|
||||
|
||||
let queryType = this.queryParams.queryType;
|
||||
if(queryType == "1"){
|
||||
this.queryParams.orderSN=null;
|
||||
}else if(queryType == "2"){
|
||||
this.queryParams.orderSN=this.queryParams.billCode;
|
||||
this.queryParams.billCode=null;
|
||||
}
|
||||
// if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||
// this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
||||
// this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
||||
// }
|
||||
// if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
||||
// this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
||||
// this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
||||
// }
|
||||
// console.log(this.addDateRange(this.queryParams, this.dateTimeRange))
|
||||
// listEmisTmsScanRecord(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
listEmisTmsScanRecord(this.queryParams).then(response => {
|
||||
// this.emisElectronicPagApplyList = response.rows;
|
||||
// this.loading = false;
|
||||
listEmisTmsScanRecord(queryParams).then(response => {
|
||||
this.emisElectronicPagApplyList = [];
|
||||
// this.total = 0;
|
||||
this.loading = false;
|
||||
let rows = response.rows;
|
||||
this.total = response.total;
|
||||
@ -350,23 +269,10 @@ export default {
|
||||
for (let index = 0; index < rows.length; index++) {
|
||||
let scanRstItem = rows[index];
|
||||
console.log(scanRstItem);
|
||||
|
||||
let record =Object.assign({}, scanRstItem)
|
||||
// record.carNo=scanRstItem.carNo;
|
||||
// record.scanData=scanRstItem.scanData;
|
||||
// record.scanType=scanRstItem.scanType;
|
||||
// if(queryType == "1"){
|
||||
// this.queryParams.orderSN=null;
|
||||
// }
|
||||
record.queryType = this.queryParams.queryType;
|
||||
record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
|
||||
record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
|
||||
// record.createTime=scanRstItem.createTime;
|
||||
// record.scanWeight=scanRstItem.scanWeight;
|
||||
// console.log(record)
|
||||
// let indexBillCode=record.billCode;
|
||||
// this.dataMap[indexBillCode]=record;
|
||||
// this.emisTmsScanRecordList.push(record);
|
||||
this.emisElectronicPagApplyList.push(record);
|
||||
}
|
||||
});
|
||||
@ -379,11 +285,6 @@ export default {
|
||||
this.form.countryName=item.name;
|
||||
this.form.countryCode=item.code;
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.resetModifyParams();
|
||||
},
|
||||
onScanSiteSelect(item){
|
||||
this.queryParams.scanSite=item && item.siteName;
|
||||
this.queryParams.scanSiteCode=item && item.siteCode;
|
||||
@ -399,33 +300,6 @@ export default {
|
||||
onDateSelect(value){
|
||||
console.log("date picker---->", value)
|
||||
this.dateTimeRange=value;
|
||||
// scanDate
|
||||
},
|
||||
onModifyScanSiteSelect(item){
|
||||
this.modifyParams.scanSite=item.siteName;
|
||||
this.modifyParams.scanSiteCode = item.siteCode
|
||||
this.modifyParams.scanSitePhone = item.scanSitePhone;
|
||||
},
|
||||
onModifyPreOrNextSiteSelect(item){
|
||||
this.modifyParams.preOrNextStation=item.siteName;
|
||||
this.modifyParams.preOrNextStationCode=item.siteCode;
|
||||
this.modifyParams.preOrNextStationPhone=item.preOrNextStationPhone;
|
||||
},
|
||||
onModifyStaffSelect(item){
|
||||
this.modifyParams.scanMan=item.empName;
|
||||
this.modifyParams.scanManCode=item.empCode;
|
||||
// this.modifyParams.scanManPhone=item.scanManPhone;
|
||||
},
|
||||
//删除
|
||||
clearSelectionBatch(){
|
||||
let newList =[];
|
||||
console.log(this.ids)
|
||||
this.emisElectronicPagApplyList.forEach(item=>{
|
||||
if(this.ids.indexOf(item.id) == -1){
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
this.emisElectronicPagApplyList = newList;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@ -472,206 +346,79 @@ export default {
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
// handleQuery() {
|
||||
// this.queryParams.pageNum = 1;
|
||||
// this.getList();
|
||||
// },
|
||||
handleTypeSelect(selection){
|
||||
this.sctype = selection.value;
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
resetModifyParams(){
|
||||
this.modifyParams = {
|
||||
scanSite:null,
|
||||
scanSiteCode:null,
|
||||
scanSitePhone:null,
|
||||
preOrNextStation:null,
|
||||
preOrNextStationCode:null,
|
||||
preOrNextStationPhone:null,
|
||||
scanMan:null,
|
||||
scanManCode:null,
|
||||
scanManPhone:null,
|
||||
}
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = column.order;
|
||||
this.getList();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
|
||||
// 子组件打开模式
|
||||
// if(row != undefined){
|
||||
// this.currentParentId = row.id
|
||||
// }
|
||||
// this.openEmisElectronicPagApply = true;
|
||||
// this.titleEmisElectronicPagApply = "新增";
|
||||
},
|
||||
handleShowMoreInput(){
|
||||
this.moreInputVisible = !this.moreInputVisible;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate() {
|
||||
// this.reset();
|
||||
// const id = this.ids
|
||||
if(!this.ids || this.ids.length == 0){
|
||||
this.$message.error("未选中数据,请先选择");
|
||||
return;
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
// getEmisElectronicPagApply(id).then(response => {
|
||||
// this.form = response.data;
|
||||
// this.open = true;
|
||||
// this.title = "修改";
|
||||
// });
|
||||
|
||||
// 子组件打开模式
|
||||
// this.currentId= row.id || this.ids;
|
||||
// this.openEmisElectronicPagApply = true;
|
||||
// this.titleEmisElectronicPagApply = "修改";
|
||||
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
this.openView=true;
|
||||
// this.router.push({ path: '/emis/emisElectronicPagApply/viewDetail', query: { id: row.id }})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
for(var i=0; i<this.ids.length;i++){
|
||||
updateEmisTmsScanRecord({
|
||||
id:this.ids[i],
|
||||
...this.modifyParams
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.resetModifyParams();
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
|
||||
// this.$refs["form"].validate(valid => {
|
||||
// if (valid) {
|
||||
// if (this.form.id != null) {
|
||||
// updateEmisElectronicPagApply(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// } else {
|
||||
// addEmisElectronicPagApply(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// todo
|
||||
},
|
||||
handleFormChanged(){
|
||||
this.openForm = false;
|
||||
this.getList();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openForm = false;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete() {
|
||||
const ids = this.ids
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
return delEmisTmsScanRecord(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisElectronicPagApply/export', {
|
||||
// ...this.queryParams
|
||||
// }, `emisElectronicPagApply_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
||||
this.queryParams.params["beginScanDate"] = this.dateTimeRange[0];
|
||||
this.queryParams.params["endScanDate"] = this.dateTimeRange[1];
|
||||
let queryParams = Object.assign({},this.queryParams);
|
||||
queryParams.pageNum=1;
|
||||
queryParams.pageSize=5000;
|
||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
||||
queryParams.params.beginSignDate = this.dateTimeRange[0];
|
||||
queryParams.params.endSignDate = this.dateTimeRange[1];
|
||||
}else{
|
||||
queryParams.params.beginSignDate = null;
|
||||
queryParams.params.endSignDate = null;
|
||||
}
|
||||
this.queryParams.params["queryType"] = this.queryParams.queryType;//1:yd;2:dd;
|
||||
this.queryParams.params["isSubBill"] = this.queryParams.isSubBill;//1:子单;0:主单
|
||||
|
||||
listEmisTmsScanRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
if(this.queryParams.params.queryOrderType == "1"){
|
||||
queryParams.orderSN=null;
|
||||
}else if(this.queryParams.params.queryOrderType == "0"){
|
||||
queryParams.orderSN=this.queryParams.billCode;
|
||||
queryParams.billCode=null;
|
||||
}
|
||||
listEmisTmsScanRecord(queryParams).then(response => {
|
||||
this.downloadLoading = false
|
||||
let rows = response.rows;
|
||||
this.total = response.total;
|
||||
if(!rows || rows.length == 0){
|
||||
this.$message.error("未查到单号");
|
||||
return;
|
||||
}
|
||||
// for (let index = 0; index < rows.length; index++) {
|
||||
// let scanRstItem = rows[index];
|
||||
// console.log(scanRstItem);
|
||||
// let record =Object.assign({}, scanRstItem)
|
||||
// record.queryType = this.queryParams.queryType;
|
||||
// record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
|
||||
// record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
|
||||
// this.emisElectronicPagApplyList.push(record);
|
||||
// }
|
||||
if (response.code === 200) {
|
||||
const curList = []
|
||||
for (let index = 0; index < response.rows.length; index++) {
|
||||
let scanRstItem = response.rows[index];
|
||||
let record =Object.assign({}, scanRstItem)
|
||||
record.orderType = this.queryParams.orderType;
|
||||
record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
|
||||
record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
|
||||
curList.push(record);
|
||||
}
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['id','单号','单号类型','车牌号','扫描时间','扫描类型','扫描网点','上/下一网点','扫描员','录入时间','扫描重量'];
|
||||
const filterVal = ['id','billCode','orderType','carNo','scanDate','scanType','scanSite','preOrNextStation','scanMan','createTime','scanWeight'];
|
||||
const data = this.formatJson(filterVal, curList, curList)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '网点电子面单申请',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
const curList = []
|
||||
for (let index = 0; index < response.rows.length; index++) {
|
||||
let scanRstItem = response.rows[index];
|
||||
let record =Object.assign({}, scanRstItem)
|
||||
record.orderType = this.queryParams.orderType;
|
||||
record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
|
||||
record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
|
||||
curList.push(record);
|
||||
}
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['id','单号','单号类型','车牌号','扫描时间','扫描类型','扫描网点','上/下一网点','扫描员','录入时间','扫描重量'];
|
||||
const filterVal = ['id','billCode','orderType','carNo','scanDate','scanType','scanSite','preOrNextStation','scanMan','createTime','scanWeight'];
|
||||
const data = this.formatJson(filterVal, curList, curList)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '签收记录',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
// listEmisTmsScanRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
// this.emisElectronicPagApplyList = [];
|
||||
// this.loading = false;
|
||||
// let rows = response.rows;
|
||||
// this.total = response.total;
|
||||
// if(!rows || rows.length == 0){
|
||||
// this.$message.error("未查到单号");
|
||||
// return;
|
||||
// }
|
||||
// for (let index = 0; index < rows.length; index++) {
|
||||
// let scanRstItem = rows[index];
|
||||
// console.log(scanRstItem);
|
||||
|
||||
// let record =Object.assign({}, scanRstItem)
|
||||
// record.orderType = this.queryParams.orderType;
|
||||
// record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
|
||||
// record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
|
||||
// this.emisElectronicPagApplyList.push(record);
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
@ -693,79 +440,6 @@ export default {
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
// dateTimeChange(value){
|
||||
// this.dateTimeRange=value;
|
||||
// },
|
||||
handleQuery(){
|
||||
// this.queryParams.pageNum = 1;
|
||||
if(this.queryParams.billCode==null || this.queryParams.billCode==''){
|
||||
this.$message.error("请输入单号");
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.dataMap[this.queryParams.billCode]){
|
||||
this.$message.error("重复扫描");
|
||||
this.playNoticeTone(1);
|
||||
return;
|
||||
}
|
||||
let queryType = this.queryParams.queryType;
|
||||
if(queryType == "1"){
|
||||
this.queryParams.orderSN=null;
|
||||
}else if(queryType == "2"){
|
||||
this.queryParams.orderSN=this.queryParams.billCode;
|
||||
this.queryParams.billCode=null;
|
||||
}
|
||||
let beginSignDate=null;
|
||||
let endSignDate=null;
|
||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
||||
beginSignDate = this.dateTimeRange[0];
|
||||
endSignDate = this.dateTimeRange[1];
|
||||
}
|
||||
|
||||
// 检查
|
||||
let scanInfo = {
|
||||
scanType:"50",
|
||||
opType:1,
|
||||
scanData:[
|
||||
{
|
||||
billCode:this.queryParams.billCode,
|
||||
orderSN:this.queryParams.orderSN,
|
||||
beginSignDate:beginSignDate,
|
||||
endSignDate:endSignDate,
|
||||
scanSiteCode:this.queryParams.scanSiteCode,
|
||||
isSignPic:this.queryParams.isSignPic,
|
||||
dispatchOrSendManCode:this.queryParams.dispatchOrSendManCode,
|
||||
countryCode:this.queryParams.countryCode
|
||||
// scanWeight:this.form.scanWeight,
|
||||
// dispatchOrSendManCode:this.form.dispatchOrSendManCode
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
doScan(scanInfo).then(response => {
|
||||
console.log(response);
|
||||
let scanRstItem = response.data.scanResult[0];
|
||||
console.log(scanRstItem);
|
||||
if(scanRstItem.result != 'success'){
|
||||
this.$modal.msgError(scanRstItem.message);
|
||||
return;
|
||||
}
|
||||
|
||||
this.form.scanType = '50';
|
||||
this.form.scanDate = new Date();
|
||||
let record =Object.assign({}, this.form)
|
||||
record.billCode=scanRstItem.billCode;
|
||||
console.log(record)
|
||||
let indexBillCode=record.billCode;
|
||||
this.dataMap[indexBillCode]=record;
|
||||
this.emisElectronicPagApplyList.push(record);
|
||||
|
||||
});
|
||||
|
||||
this.form.billCode =null;
|
||||
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -780,4 +454,12 @@ export default {
|
||||
color: #0955ee;
|
||||
cursor: pointer;
|
||||
}
|
||||
.query-label {
|
||||
.el-radio{
|
||||
display: block;
|
||||
line-height: 23px;
|
||||
white-space: normal;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user