md
This commit is contained in:
parent
8a4772ab15
commit
26127af2be
@ -272,18 +272,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initQueryParams(){
|
initQueryParams(){
|
||||||
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"scanDate");
|
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"scanDate");
|
||||||
let qParam=null;
|
return this.queryParams;
|
||||||
if(this.queryParams.billCode){
|
|
||||||
qParam={
|
|
||||||
pageNum:this.queryParams.pageNum,
|
|
||||||
pageSize:this.queryParams.pageSize,
|
|
||||||
billCode:this.queryParams.billCode,
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
qParam=this.queryParams
|
|
||||||
}
|
|
||||||
|
|
||||||
return qParam;
|
|
||||||
},
|
},
|
||||||
/** 查询扫描记录列表 */
|
/** 查询扫描记录列表 */
|
||||||
getList() {
|
getList() {
|
||||||
@ -341,51 +330,6 @@ export default {
|
|||||||
});
|
});
|
||||||
this.scanRecordDataList = newList;
|
this.scanRecordDataList = newList;
|
||||||
},
|
},
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
applySeq: null,
|
|
||||||
applyDate: getDateTimeToString(new Date()),
|
|
||||||
provideType: null,
|
|
||||||
applyName: null,
|
|
||||||
applyMan: null,
|
|
||||||
applyManCode: null,
|
|
||||||
applySite: null,
|
|
||||||
applySiteCode: null,
|
|
||||||
unitMoney: null,
|
|
||||||
applyCount: null,
|
|
||||||
sumMoney: null,
|
|
||||||
blSend: null,
|
|
||||||
sendDate: null,
|
|
||||||
sendMan: null,
|
|
||||||
sendManCode: null,
|
|
||||||
sendSite: null,
|
|
||||||
sendSiteCode: null,
|
|
||||||
blCancel: null,
|
|
||||||
cancelMan: null,
|
|
||||||
cancelManCode: null,
|
|
||||||
cancelDate: null,
|
|
||||||
cancelSite: null,
|
|
||||||
cancelSiteCode: null,
|
|
||||||
userSite: null,
|
|
||||||
userSiteCode: null,
|
|
||||||
startNo: null,
|
|
||||||
endNo: null,
|
|
||||||
curStartNo: null,
|
|
||||||
hasBillCount: null,
|
|
||||||
blAllowAllocate: null,
|
|
||||||
createSiteCode: null,
|
|
||||||
modifySiteCode: null,
|
|
||||||
delFlag: null,
|
|
||||||
createBy: null,
|
|
||||||
createTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
remark: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
@ -402,19 +346,6 @@ export default {
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
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) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
@ -432,79 +363,17 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "新增";
|
this.title = "新增";
|
||||||
|
|
||||||
// 子组件打开模式
|
|
||||||
// if(row != undefined){
|
|
||||||
// this.currentParentId = row.id
|
|
||||||
// }
|
|
||||||
// this.openEmisElectronicPagApply = true;
|
|
||||||
// this.titleEmisElectronicPagApply = "新增";
|
|
||||||
},
|
},
|
||||||
handleShowMoreInput(){
|
handleShowMoreInput(){
|
||||||
this.moreInputVisible = !this.moreInputVisible;
|
this.moreInputVisible = !this.moreInputVisible;
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate() {
|
|
||||||
// this.reset();
|
|
||||||
// const id = this.ids
|
|
||||||
if(!this.ids || this.ids.length == 0){
|
|
||||||
this.$modal.msgError("未选中数据,请先选择");
|
|
||||||
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) {
|
handleView(row) {
|
||||||
this.id=row.id;
|
this.id=row.id;
|
||||||
this.titleView="查看";
|
this.titleView="查看";
|
||||||
this.openView=true;
|
this.openView=true;
|
||||||
// this.router.push({ path: '/emis/emisElectronicPagApply/viewDetail', query: { id: row.id }})
|
// 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(){
|
handleFormChanged(){
|
||||||
this.openForm = false;
|
this.openForm = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -522,97 +391,12 @@ export default {
|
|||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
let that = this;
|
|
||||||
const loadingInstance = this.$loading({
|
|
||||||
text: '正在导出...'
|
|
||||||
})
|
|
||||||
var qParam = {...this.queryParams};
|
|
||||||
qParam.pageNum=1;
|
|
||||||
qParam.pageSize=500;
|
|
||||||
if (null != this.dateTimeRange && '' != this.dateTimeRange) {
|
|
||||||
qParam.params.beginScanDate = dateToStr(new Date(this.dateTimeRange[0]));
|
|
||||||
qParam.params.endScanDate = dateToStr(new Date(this.dateTimeRange[1]));
|
|
||||||
}else{
|
|
||||||
qParam.params.beginScanDate = null;
|
|
||||||
qParam.params.endScanDate = null;
|
|
||||||
}
|
|
||||||
qParam.params.queryType = this.queryParams.queryType;//1:yd;2:dd;
|
|
||||||
qParam.params.isSubBill = this.queryParams.isSubBill;//1:子单;0:主单
|
|
||||||
|
|
||||||
let queryType = this.queryParams.queryType;
|
|
||||||
if(queryType == "1"){
|
|
||||||
qParam.orderSN=null;
|
|
||||||
}else if(queryType == "0"){
|
|
||||||
qParam.orderSN=this.queryParams.billCode;
|
|
||||||
qParam.billCode=null;
|
|
||||||
}
|
|
||||||
|
|
||||||
listEmisTmsScanRecord(qParam).then(response => {
|
|
||||||
this.loadingInstance = false
|
|
||||||
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)
|
|
||||||
if(this.queryParams.queryType!="1"){
|
|
||||||
record.billCode = qParam.orderSN;
|
|
||||||
}
|
|
||||||
record.scanSiteName = this.queryParams.scanSiteName || record.scanSiteName;
|
|
||||||
record.preOrNextStation = this.queryParams.preOrNextStation || scanRstItem.preOrNextStation;
|
|
||||||
record.scanDate = parseTime(record.scanDate);
|
|
||||||
record.createTime = parseTime(record.createTime);
|
|
||||||
console.log(that)
|
|
||||||
record.scanType = that.dict.label.emis_scan_type[record.scanType];
|
|
||||||
curList.push(record);
|
|
||||||
}
|
|
||||||
let tHeader = [];// ['id','单号','单号类型','车牌号','扫描时间','扫描类型','扫描网点','上/下一网点','扫描员','录入时间','扫描重量'];
|
|
||||||
let filterVal = [];// ['id','billCode','orderType','carNo','scanDate','scanType','scanSite','preOrNextStation','scanMan','createTime','scanWeight'];
|
|
||||||
|
|
||||||
for(let sl = 0; sl < this.$refs.dataTable.storageList.length; sl++){
|
|
||||||
if(this.$refs.dataTable.storageList[sl].show){
|
|
||||||
tHeader.push(this.$refs.dataTable.storageList[sl].label);
|
|
||||||
filterVal.push(this.$refs.dataTable.storageList[sl].prop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
|
||||||
const data = this.formatJson(filterVal, curList, curList)
|
|
||||||
excel.export_json_to_excel({
|
|
||||||
header: tHeader,
|
|
||||||
data,
|
|
||||||
filename: '扫描记录查询',
|
|
||||||
autoWidth: true
|
|
||||||
})
|
|
||||||
loadingInstance.close()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
formatJson(filterVal, jsonData, resData) {
|
|
||||||
let index = 0
|
|
||||||
return jsonData.map(v => filterVal.map(j => {
|
|
||||||
if (j === 'index') {
|
|
||||||
return ++index
|
|
||||||
}
|
|
||||||
if (j === 'status') {
|
|
||||||
var statusStr='xxx'
|
|
||||||
if(v[j] == 10){
|
|
||||||
statusStr='xxx'
|
|
||||||
}
|
|
||||||
return statusStr;
|
|
||||||
}
|
|
||||||
return v[j]
|
|
||||||
}))
|
|
||||||
},
|
|
||||||
/** 列索引函数 */
|
/** 列索引函数 */
|
||||||
getIndex($index) {
|
getIndex($index) {
|
||||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||||
},
|
},
|
||||||
/** 时间搜索响应函数 */
|
|
||||||
// dateTimeChange(value){
|
|
||||||
// this.dateTimeRange=value;
|
|
||||||
// },
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -679,8 +679,8 @@ export default {
|
|||||||
this.$modal.msgError(scanRstItem.msg);
|
this.$modal.msgError(scanRstItem.msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(scanRstItem.waybillStatus == "50"){
|
if(scanRstItem.blSign == "1"){
|
||||||
this.$modal.msgError("已扫描");
|
this.$modal.msgError("已签收");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let record =Object.assign({}, scanRstItem);
|
let record =Object.assign({}, scanRstItem);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user