md
This commit is contained in:
parent
14b072b6d2
commit
8476b5a79d
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xd-vue-pdf",
|
"name": "xd-vue-pdf",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "vue.js pdf viewer",
|
"description": "vue.js pdf viewer",
|
||||||
"main": "src/vuePdfNoSss.vue",
|
"main": "src/vuePdfNoSss.vue",
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
|
|||||||
@ -6,15 +6,16 @@ export default function() {
|
|||||||
|
|
||||||
this.fetch = function(query) {
|
this.fetch = function(query) {
|
||||||
|
|
||||||
// delete require.cache[require.resolve('./buffer-loader!pdfjs-dist-sign/cmaps/'+query.name+'.bcmap')];
|
|
||||||
|
|
||||||
return import('./buffer-loader!pdfjs-dist/cmaps/'+query.name+'.bcmap' /* webpackChunkName: "noprefetch-[request]" */)
|
return import('./buffer-loader!pdfjs-dist/cmaps/'+query.name+'.bcmap' /* webpackChunkName: "noprefetch-[request]" */)
|
||||||
.then(function(bcmap) {
|
.then(function(bcmap) {
|
||||||
|
|
||||||
|
delete require.cache[require.resolve('./buffer-loader!pdfjs-dist-sign/cmaps/'+query.name+'.bcmap')];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
cMapData: bcmap.default,
|
cMapData: bcmap.default,
|
||||||
compressionType: CMapCompressionType.BINARY,
|
compressionType: CMapCompressionType.BINARY,
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -106,7 +106,7 @@
|
|||||||
"vuex": "3.6.0",
|
"vuex": "3.6.0",
|
||||||
"watermark-dom": "2.3.0",
|
"watermark-dom": "2.3.0",
|
||||||
"xd-pdf": "./libs/XdPdf",
|
"xd-pdf": "./libs/XdPdf",
|
||||||
"xd-vue-pdf": "file:libs/XdVuePdf",
|
"xd-vue-pdf": "./libs/XdVuePdf",
|
||||||
"xlsx": "^0.17.5"
|
"xlsx": "^0.17.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -30,7 +30,14 @@ import { listSimpleAction } from "@/api/system/sysActionStats";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'HeaderSearch',
|
name: 'HeaderSearch',
|
||||||
|
// mixins: [setHeight],
|
||||||
|
props: {
|
||||||
|
refreshId: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
createdId:'0',
|
createdId:'0',
|
||||||
visible: false,
|
visible: false,
|
||||||
@ -51,6 +58,9 @@ watch: {
|
|||||||
routes() {
|
routes() {
|
||||||
this.searchPool = this.generateRoutes(this.routes)
|
this.searchPool = this.generateRoutes(this.routes)
|
||||||
},
|
},
|
||||||
|
refreshId() {
|
||||||
|
this.initQuickActionList();
|
||||||
|
},
|
||||||
searchPool(list) {
|
searchPool(list) {
|
||||||
this.initFuse(list)
|
this.initFuse(list)
|
||||||
},
|
},
|
||||||
@ -72,6 +82,7 @@ methods: {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
};
|
};
|
||||||
|
// console.log("===>search3==>",queryParams)
|
||||||
listSimpleAction(queryParams).then(response => {
|
listSimpleAction(queryParams).then(response => {
|
||||||
this.quickActionList = response.rows;
|
this.quickActionList = response.rows;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -31,12 +31,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<div style="width:100%;text-align: right;">
|
<div style="width:100%;text-align: right;">
|
||||||
|
<!-- <el-button title="" type="primary" v-if="isA4" @click="showSinglePage(1)">切换单页</el-button> -->
|
||||||
|
<!-- <el-button title="" type="primary" v-else @click="showA4Page(1)">切换A4</el-button> -->
|
||||||
<el-button title="" type="primary" icon="el-icon-download" size="mini" style="padding: 5px 10px;" @click="downPDF">下载</el-button>
|
<el-button title="" type="primary" icon="el-icon-download" size="mini" style="padding: 5px 10px;" @click="downPDF">下载</el-button>
|
||||||
<el-button title="" type="primary" icon="el-icon-printer" size="mini" style="padding: 5px 10px;" @click="printPDF">打印</el-button>
|
<el-button title="" type="primary" icon="el-icon-printer" size="mini" style="padding: 5px 10px;" @click="printPDF">打印</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="min-height:1600px;margin: 0 auto;overflow: auto;">
|
<div style="min-height:1600px;margin: 0 auto;overflow: auto;">
|
||||||
|
<!-- <el-scrollbar>
|
||||||
|
<div style="min-height:600px;margin: 0 auto;overflow: auto;"> -->
|
||||||
<div class="pdf-wrapper">
|
<div class="pdf-wrapper">
|
||||||
<pdf
|
<pdf
|
||||||
:src="currentPdfUrl"
|
:src="currentPdfUrl"
|
||||||
@ -46,12 +50,15 @@
|
|||||||
ref="pdf"
|
ref="pdf"
|
||||||
></pdf>
|
></pdf>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </el-scrollbar> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import printJS from 'print-js'
|
||||||
// npm i pdfjs-dist@2.5.207
|
// npm i pdfjs-dist@2.5.207
|
||||||
// npm i vue-pdf@4.2.0
|
// npm i vue-pdf@4.2.0
|
||||||
import pdf from 'xd-vue-pdf'
|
import pdf from 'xd-vue-pdf'
|
||||||
@ -62,6 +69,9 @@ export default {
|
|||||||
pdfList:{
|
pdfList:{
|
||||||
type: Array,
|
type: Array,
|
||||||
},
|
},
|
||||||
|
printOrderList:{
|
||||||
|
type: Array,
|
||||||
|
},
|
||||||
startPage: {
|
startPage: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 1
|
default: 1
|
||||||
@ -79,14 +89,17 @@ export default {
|
|||||||
loadPdfUrl:null,
|
loadPdfUrl:null,
|
||||||
|
|
||||||
// 单页模式
|
// 单页模式
|
||||||
|
sortPrintOrderList:this.printOrderList,
|
||||||
cacheFileList:this.pdfList,
|
cacheFileList:this.pdfList,
|
||||||
|
isA4:false,
|
||||||
|
|
||||||
page: 1,
|
page: 1,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageCount: this.pdfList.length,
|
pageCount: this.pdfList.length,
|
||||||
|
|
||||||
// A4 模式
|
// A4 模式
|
||||||
singlePageCount:1,
|
cacheA4FileList:[],
|
||||||
|
thisPageCount:1,
|
||||||
|
|
||||||
scale: 25,
|
scale: 25,
|
||||||
preScale: 25,
|
preScale: 25,
|
||||||
@ -110,36 +123,79 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
pdfList(){
|
pdfList(){
|
||||||
|
|
||||||
// 按照给定的数据排序
|
// 按照给定的数据排序
|
||||||
this.cacheFileList=this.pdfList;
|
this.cacheFileList=this.pdfList;
|
||||||
|
|
||||||
|
this.initA4List();
|
||||||
this.showFirstFile();
|
this.showFirstFile();
|
||||||
},
|
},
|
||||||
thisPageCount(value) {
|
thisPageCount(value) {
|
||||||
this.doScale(25);
|
if(this.isA4){
|
||||||
|
this.doScale(75);
|
||||||
|
}else{
|
||||||
|
this.doScale(25);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
isLoadComplete(newVal,oldVal){
|
isLoadComplete(newVal,oldVal){
|
||||||
// let newTmpList = this.cacheFileList.sort((one, two) => {
|
if(this.isA4){
|
||||||
// return one.seqNo - two.seqNo;
|
this.showA4Page(1);
|
||||||
// });
|
}else{
|
||||||
// this.cacheFileList=newTmpList
|
this.showSinglePage(1);
|
||||||
// that.pdfList=newTmpList;
|
}
|
||||||
console.log("===isLoadComplete that.cacheFileList====>",this.cacheFileList);
|
|
||||||
|
|
||||||
this.showSinglePage(1);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.initA4List();
|
||||||
this.showFirstFile();
|
this.showFirstFile();
|
||||||
window.addEventListener('mousewheel', this.handleScroll, { passive: false })
|
window.addEventListener('mousewheel', this.handleScroll, { passive: false })
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
initA4List(){
|
||||||
|
this.cacheA4FileList=[];
|
||||||
|
const newList = Object.assign([], this.pdfList);
|
||||||
|
if(newList&&newList.length>4){
|
||||||
|
let spliteArr = (array = [], subGroupLength = 0) => {
|
||||||
|
let index = 0;
|
||||||
|
const newArray = [];
|
||||||
|
while (index < array.length) {
|
||||||
|
newArray.push(array.slice(index, index += subGroupLength));
|
||||||
|
}
|
||||||
|
return newArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
const subPdfList=spliteArr(newList, 4);
|
||||||
|
for (let i=0; i < subPdfList.length;i++){
|
||||||
|
let fileItem={
|
||||||
|
"billCode":"page-"+(i+1),
|
||||||
|
"pdfUrl":null,
|
||||||
|
"childreen":subPdfList[i]
|
||||||
|
}
|
||||||
|
this.cacheA4FileList.push(fileItem);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
let fileItem={
|
||||||
|
"billCode":"page-"+1,
|
||||||
|
"pdfUrl":null,
|
||||||
|
"childreen":newList
|
||||||
|
}
|
||||||
|
this.cacheA4FileList.push(fileItem);
|
||||||
|
}
|
||||||
|
},
|
||||||
showFirstFile(){
|
showFirstFile(){
|
||||||
this.scale=25;
|
if(this.isA4){
|
||||||
this.preScale=25;
|
this.scale=75;
|
||||||
this.pageCount=this.cacheFileList.length;
|
this.preScale=75;
|
||||||
setTimeout( this.showSinglePage(1),2000);
|
this.pageCount=this.cacheA4FileList.length;
|
||||||
|
setTimeout( this.showA4Page(this.cacheA4FileList.length),3000);
|
||||||
|
}else{
|
||||||
|
this.scale=25;
|
||||||
|
this.preScale=25;
|
||||||
|
this.pageCount=this.cacheFileList.length;
|
||||||
|
setTimeout( this.showSinglePage(1),2000);
|
||||||
|
}
|
||||||
|
|
||||||
this.resetCountKey++;
|
this.resetCountKey++;
|
||||||
},
|
},
|
||||||
@ -160,12 +216,16 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onPageLoaded(currentPage){
|
onPageLoaded(currentPage){
|
||||||
// console.log("====>onPageLoaded==>currentPage:",currentPage)
|
|
||||||
// this.doScale(25);
|
|
||||||
// this.currentPage=1;
|
if(this.isA4){
|
||||||
|
// this.page = 1;
|
||||||
|
// this.doScale(75);
|
||||||
|
}else{
|
||||||
|
// this.currentPage=1;
|
||||||
// this.page = 1;
|
// this.page = 1;
|
||||||
// this.doScale(20);
|
// this.doScale(20);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
doScale(val){
|
doScale(val){
|
||||||
@ -199,21 +259,62 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
prePage() {
|
prePage() {
|
||||||
let fileNo = this.currentPage - 1
|
if(!this.isA4){
|
||||||
if (fileNo < 1) return
|
let fileNo = this.currentPage - 1
|
||||||
this.currentPage = fileNo
|
if (fileNo < 1) return
|
||||||
this.showSinglePage(this.currentPage)
|
this.currentPage = fileNo
|
||||||
|
this.showSinglePage(this.currentPage)
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let fileNo = this.currentPage - 1
|
||||||
|
if (fileNo < 1) return
|
||||||
|
this.currentPage = fileNo
|
||||||
|
this.showA4Page(this.currentPage)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
nextPage() {
|
nextPage() {
|
||||||
let fileNo = this.currentPage + 1
|
if(!this.isA4){
|
||||||
if (fileNo > this.pageCount) return
|
let fileNo = this.currentPage + 1
|
||||||
this.currentPage = fileNo
|
if (fileNo > this.pageCount) return
|
||||||
this.showSinglePage(this.currentPage)
|
this.currentPage = fileNo
|
||||||
|
this.showSinglePage(this.currentPage)
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
let fileNo = this.currentPage + 1
|
||||||
|
if (fileNo > this.pageCount) return
|
||||||
|
this.currentPage = fileNo
|
||||||
|
this.showA4Page(this.currentPage)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
downPDF() {
|
downPDF() {
|
||||||
// 下载所有预览的PDF文件
|
// 下载所有预览的PDF文件
|
||||||
if(this.cacheFileList&&this.cacheFileList.length>0){
|
if(this.isA4){
|
||||||
|
if(this.cacheA4FileList&&this.cacheA4FileList.length>0){
|
||||||
|
this.cacheA4FileList.forEach(async item=>{
|
||||||
|
if(!item.pdfUrl){
|
||||||
|
let thisSubList=item.childreen;
|
||||||
|
let needGenList=[];
|
||||||
|
for(let j=0;j<thisSubList.length;j++){
|
||||||
|
needGenList.push(thisSubList[j].pdfBase64)
|
||||||
|
}
|
||||||
|
item.pdfUrl=await this.pdfUtils.mergePdfToA4(needGenList);
|
||||||
|
this.downPdfFile(item.pdfUrl);
|
||||||
|
}else{
|
||||||
|
this.downPdfFile(item.pdfUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(this.cacheFileList&&this.cacheFileList.length>0){
|
||||||
|
// this.cacheFileList.forEach( item=>{
|
||||||
|
// if(!item.pdfUrl){
|
||||||
|
// item.pdfUrl = this.pdfUtils.getBlobUrl(item.pdfBase64);
|
||||||
|
// }
|
||||||
|
// this.downPdfFile(item.billCode,item.pdfUrl);
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
this.$prompt('请输入保存文件名', "提示", {
|
this.$prompt('请输入保存文件名', "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
@ -240,6 +341,7 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
downPdfFile(pdfUrl){
|
downPdfFile(pdfUrl){
|
||||||
|
|
||||||
@ -274,27 +376,60 @@ export default {
|
|||||||
},
|
},
|
||||||
// 打印
|
// 打印
|
||||||
printPDF() {
|
printPDF() {
|
||||||
this.$emit("onPrint");
|
if(this.isA4){
|
||||||
|
printJS(this.loadPdfUrl);
|
||||||
|
}else{
|
||||||
|
this.$emit("onPrint");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
showSinglePage(page){
|
showSinglePage(page){
|
||||||
|
this.isA4 = false;
|
||||||
if(!page || Object.is(page, NaN)){
|
if(!page || Object.is(page, NaN)){
|
||||||
page=1;
|
page=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.pageCount=this.cacheFileList.length;
|
this.pageCount=this.cacheFileList.length;
|
||||||
const thisPage=this.cacheFileList[page-1];
|
const thisPage=this.cacheFileList[page-1];
|
||||||
const pdfBase64 = thisPage.pdfBase64;
|
|
||||||
if(!thisPage.pdfUrl){
|
|
||||||
|
|
||||||
}
|
const pdfBase64 = thisPage.pdfBase64;
|
||||||
|
|
||||||
this.loadPdfUrl = this.pdfUtils.getBlobUrl(pdfBase64);
|
this.loadPdfUrl = this.pdfUtils.getBlobUrl(pdfBase64);
|
||||||
|
|
||||||
console.log("===isLoadComplete that.cacheFileList====>",this.cacheFileList);
|
this.doScale(20);
|
||||||
|
|
||||||
this.doScale(25);
|
|
||||||
this.resetCountKey++;
|
this.resetCountKey++;
|
||||||
},
|
},
|
||||||
|
async showA4Page(page){
|
||||||
|
this.isA4 = true
|
||||||
|
if(!page || Object.is(page, NaN)){
|
||||||
|
page=1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.cacheA4FileList || this.cacheA4FileList.length==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadingInstance = this.$loading({
|
||||||
|
text: '正在生成A4预览...'
|
||||||
|
})
|
||||||
|
|
||||||
|
this.pageCount=this.cacheA4FileList.length;
|
||||||
|
|
||||||
|
// 分页生成文件,只渲染第一页
|
||||||
|
let thisSubList=this.cacheA4FileList[1].childreen;
|
||||||
|
let needGenList=[];
|
||||||
|
for(let j=0;j<thisSubList.length;j++){
|
||||||
|
needGenList.push(thisSubList[j].pdfBase64)
|
||||||
|
}
|
||||||
|
|
||||||
|
let pdfUrl=await this.pdfUtils.mergePdfToA4(needGenList);
|
||||||
|
if(pdfUrl){
|
||||||
|
loadingInstance.close();
|
||||||
|
this.cacheA4FileList[page-1].pdfUrl=pdfUrl;
|
||||||
|
this.loadPdfUrl=this.cacheA4FileList[page-1].pdfUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.resetCountKey++;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -506,7 +506,10 @@ export default {
|
|||||||
dragColumn: {
|
dragColumn: {
|
||||||
update: function (el, binding, vnode) {
|
update: function (el, binding, vnode) {
|
||||||
var oDiv = el;
|
var oDiv = el;
|
||||||
vnode.context.setHeaderSortable();
|
vnode.context.$nextTick(() => {
|
||||||
|
vnode.context.setHeaderSortable();
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -839,31 +842,33 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
const wrapperTr = document.querySelector('#'+that.tableId+' .el-table__header-wrapper > table > thead > tr');
|
const wrapperTr = document.querySelector('#'+that.tableId+' .el-table__header-wrapper > table > thead > tr');
|
||||||
// console.log("===>wrapperTr==>",wrapperTr);
|
// console.log("===>wrapperTr==>",wrapperTr);
|
||||||
Sortable.create(wrapperTr, {
|
if(wrapperTr){
|
||||||
animation: 100,
|
Sortable.create(wrapperTr, {
|
||||||
delay: 50,
|
animation: 100,
|
||||||
dragClass: "dragClass",
|
delay: 50,
|
||||||
ghostClass: "ghostClass",
|
dragClass: "dragClass",
|
||||||
chosenClass: "chosenClass",
|
ghostClass: "ghostClass",
|
||||||
onStart: () => {
|
chosenClass: "chosenClass",
|
||||||
},
|
onStart: () => {
|
||||||
// 结束拖动事件
|
},
|
||||||
onEnd: ({ newIndex, oldIndex }) => {
|
// 结束拖动事件
|
||||||
let arr = that.storageList;
|
onEnd: ({ newIndex, oldIndex }) => {
|
||||||
const currCol = arr.splice(oldIndex-1, 1)[0];
|
let arr = that.storageList;
|
||||||
arr.splice(newIndex-1, 0, currCol);
|
const currCol = arr.splice(oldIndex-1, 1)[0];
|
||||||
|
arr.splice(newIndex-1, 0, currCol);
|
||||||
|
|
||||||
that.storageList = arr;
|
that.storageList = arr;
|
||||||
that.updateTable();
|
that.updateTable();
|
||||||
// this.refreshKeyId=Math.random().toString(36).substring(3,10);
|
// this.refreshKeyId=Math.random().toString(36).substring(3,10);
|
||||||
|
|
||||||
|
|
||||||
// const currCol = vnode.context.storageList.splice(oldIndex-1, 1)[0];
|
// const currCol = vnode.context.storageList.splice(oldIndex-1, 1)[0];
|
||||||
// vnode.context.storageList.splice(newIndex-1, 0, currCol);
|
// vnode.context.storageList.splice(newIndex-1, 0, currCol);
|
||||||
// vnode.context.updateTable();
|
// vnode.context.updateTable();
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSelectCurrentColumn(){
|
handleSelectCurrentColumn(){
|
||||||
@ -1103,7 +1108,9 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
:deep .seled{
|
:deep .seled{
|
||||||
background-color: #d9ecff7d !important;
|
// background-color: #d9ecff7d !important;
|
||||||
|
background-color: #51dd397d !important;
|
||||||
|
|
||||||
color: black;
|
color: black;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
:persistent="false"
|
:persistent="false"
|
||||||
@show="refreshId=Math.random().toString(36).substring(3,10)"
|
@show="refreshId=Math.random().toString(36).substring(3,10)"
|
||||||
>
|
>
|
||||||
<search3 id="header-search" :key="refreshId"/>
|
<search3 id="header-search" :refreshId="refreshId"/>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<i class="icon iconfont icon-icon_menhukuaijiecaidan" ></i>
|
<i class="icon iconfont icon-icon_menhukuaijiecaidan" ></i>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -371,16 +371,17 @@
|
|||||||
|
|
||||||
that.showCounter++;
|
that.showCounter++;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(code == 800){
|
else if(code == 800){
|
||||||
// 全部获取完成
|
// 全部获取完成
|
||||||
// console.log("===全部获取完成1====>");
|
console.log("===全部获取完成ADV====>");
|
||||||
// let newTmpList = that.pdfList.sort((one, two) => {
|
// let newTmpList = that.pdfList.sort((one, two) => {
|
||||||
// return one.seqNo - two.seqNo;
|
// return one.seqNo - two.seqNo;
|
||||||
// });
|
// });
|
||||||
// that.pdfList=newTmpList;
|
// that.pdfList=newTmpList;
|
||||||
|
// if(!that.openPdfView && that.showCounter==0){
|
||||||
|
// that.openPdfView = true;
|
||||||
|
// }
|
||||||
that.isLoadComplete=true;
|
that.isLoadComplete=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -94,9 +94,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sortByScanDate(obj1, obj2) {
|
sortByScanDate(obj1, obj2) {
|
||||||
let val1 = obj1.scanDate
|
let val1 = new Date(obj1.scanDate)
|
||||||
let val2 = obj2.scanDate
|
let val2 = new Date(obj2.scanDate)
|
||||||
return val1 - val2
|
return val1.getTime() - val2.getTime()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@ -443,6 +443,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('体积重量')" prop="volumeWeight" label-width="70px">
|
<el-form-item :label="$t('体积重量')" prop="volumeWeight" label-width="70px">
|
||||||
<el-input v-model="form.volumeWeight" placeholder="" disabled>
|
<el-input v-model="form.volumeWeight" placeholder="" disabled>
|
||||||
@ -458,6 +459,15 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="$t('货值')" prop="realValue" label-width="70px" >
|
||||||
|
<div style="">
|
||||||
|
<el-input v-model="form.realValue" style="text-align: right;width: 120px" placeholder="货值" >
|
||||||
|
<span slot="suffix">(USD)</span>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('包装类型')" prop="packType" label-width="70px"">
|
<el-form-item :label="$t('包装类型')" prop="packType" label-width="70px"">
|
||||||
<el-select multiple="" v-model="form.packType" placeholder="">
|
<el-select multiple="" v-model="form.packType" placeholder="">
|
||||||
@ -507,7 +517,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item :label="$t('运单备注')" prop="remark" label-width="70px">
|
<el-form-item :label="$t('运单备注')" prop="remark" label-width="70px">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="" />
|
<el-input v-model="form.remark" type="textarea" placeholder="" maxlength="150"
|
||||||
|
show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -666,7 +677,7 @@
|
|||||||
<el-input v-else v-model="form.freight" disabled placeholder="" > </el-input>
|
<el-input v-else v-model="form.freight" disabled placeholder="" > </el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('费用备注')" prop="feeRemark" label-width="70px">
|
<el-form-item :label="$t('费用备注')" prop="feeRemark" label-width="70px">
|
||||||
<el-input v-model="form.feeRemark" type="textarea" maxlength="300"
|
<el-input v-model="form.feeRemark" type="textarea" maxlength="150"
|
||||||
show-word-limit placeholder="" >
|
show-word-limit placeholder="" >
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -1712,6 +1723,7 @@ methods: {
|
|||||||
expr=expr.replace("d",row.addWeightPrice);
|
expr=expr.replace("d",row.addWeightPrice);
|
||||||
expr=expr.replace("w",this.form.settlementWeight);
|
expr=expr.replace("w",this.form.settlementWeight);
|
||||||
|
|
||||||
|
console.log("===>eval(expr):",eval(expr));
|
||||||
row.realFee=parseFloat(eval(expr)).toFixed(2);
|
row.realFee=parseFloat(eval(expr)).toFixed(2);
|
||||||
|
|
||||||
console.log("===>row.calcExp==>expr==>row.realFee:",row.calcExp,expr,row.realFee);
|
console.log("===>row.calcExp==>expr==>row.realFee:",row.calcExp,expr,row.realFee);
|
||||||
@ -1797,11 +1809,15 @@ methods: {
|
|||||||
|
|
||||||
let calcFeeType=this.form.calcFeeType;
|
let calcFeeType=this.form.calcFeeType;
|
||||||
if(calcFeeType==3){
|
if(calcFeeType==3){
|
||||||
calcFeeType=1;
|
// calcFeeType=1;
|
||||||
|
// 不要重算费用
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let postData={
|
let postData={
|
||||||
productType: this.form.productType,
|
productType: this.form.productType,
|
||||||
customerCode: this.form.customerCode,
|
customerCode: this.form.customerCode,
|
||||||
|
|||||||
@ -21,12 +21,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-form-item label="状态" prop="processStatus">
|
<el-form-item label="状态" prop="processStatus">
|
||||||
<el-select clearable="" v-model="queryParams.processStatus" placeholder="请选择">
|
<el-select clearable v-model="queryParams.params.processStatus" placeholder="请选择">
|
||||||
<el-option label="未确认" :value="1"></el-option>
|
<el-option label="未确认" :value="1"></el-option>
|
||||||
<el-option label="已确认" :value="2"></el-option>
|
<el-option label="已确认" :value="2"></el-option>
|
||||||
<el-option label="中心已审核" :value="2"></el-option>
|
<el-option label="中心已审核" :value="3"></el-option>
|
||||||
<el-option label="网点驳回" :value="2"></el-option>
|
<el-option label="网点驳回" :value="4"></el-option>
|
||||||
<el-option label="中心驳回" :value="2"></el-option>
|
<el-option label="中心驳回" :value="5"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="修改项目" prop="applyType">
|
<!-- <el-form-item label="修改项目" prop="applyType">
|
||||||
@ -271,6 +271,9 @@ export default {
|
|||||||
centerConfirmNote: null,
|
centerConfirmNote: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
delFlag: null,
|
delFlag: null,
|
||||||
|
params:{
|
||||||
|
processStatus:null,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -281,28 +284,9 @@ export default {
|
|||||||
/** 查询运单调整申请列表 */
|
/** 查询运单调整申请列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.params = {};
|
this.queryParams.applySiteCode=this.$store.getters.ownerSiteCode;
|
||||||
if (null != this.daterangeApplyDate && '' != this.daterangeApplyDate) {
|
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,'applyDate');
|
||||||
this.queryParams.params["beginApplyDate"] = this.daterangeApplyDate[0];
|
listEmisWaybillAjustApply(this.queryParams).then(response => {
|
||||||
this.queryParams.params["endApplyDate"] = this.daterangeApplyDate[1];
|
|
||||||
}
|
|
||||||
if (null != this.daterangeDestConfirmDate && '' != this.daterangeDestConfirmDate) {
|
|
||||||
this.queryParams.params["beginDestConfirmDate"] = this.daterangeDestConfirmDate[0];
|
|
||||||
this.queryParams.params["endDestConfirmDate"] = this.daterangeDestConfirmDate[1];
|
|
||||||
}
|
|
||||||
if (null != this.daterangeCenterConfirmDate && '' != this.daterangeCenterConfirmDate) {
|
|
||||||
this.queryParams.params["beginCenterConfirmDate"] = this.daterangeCenterConfirmDate[0];
|
|
||||||
this.queryParams.params["endCenterConfirmDate"] = this.daterangeCenterConfirmDate[1];
|
|
||||||
}
|
|
||||||
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];
|
|
||||||
}
|
|
||||||
listEmisWaybillAjustApply(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
|
||||||
this.emisWaybillAjustApplyList = response.rows;
|
this.emisWaybillAjustApplyList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user