|
|
@@ -3,7 +3,6 @@
|
|
|
@section('head')
|
|
|
<link href="{{ mix('css/element-ui.css') }}" rel="stylesheet">
|
|
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
|
- <link rel="stylesheet" href="https://unpkg.com/element-ui@2.15.7/lib/theme-chalk/index.css">
|
|
|
@endsection
|
|
|
|
|
|
@section('content')
|
|
|
@@ -346,12 +345,12 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
- <div class="form-group ">
|
|
|
+ <div class="form-group">
|
|
|
<el-button type="primary" class="col-12" @click="submit" v-if="!submit_loading">提交</el-button>
|
|
|
<el-button type="primary" class="col-12" :loading="true" v-if="submit_loading">提交中</el-button>
|
|
|
</div>
|
|
|
- <div class="form-group ">
|
|
|
- <el-button type="primary" class="col-12" @click="print">打印</el-button>
|
|
|
+ <div class="form-group">
|
|
|
+ <el-button type="primary" class="col-12" @click="printLodop">打印</el-button>
|
|
|
</div>
|
|
|
@include("store.receivingTasks._receiving_task_print")
|
|
|
@include("store.receivingTasks._clodop_print")
|
|
|
@@ -364,8 +363,6 @@
|
|
|
|
|
|
<script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
|
|
|
<script type="text/javascript" src="{{ mix('js/element-ui.js') }}"></script>
|
|
|
- <script type="text/javascript" src="{{ mix('js/utilities/barcode.js') }}"></script>
|
|
|
- <script type="text/javascript" src="{{mix('js/utilities/html2canvas.js')}}"></script>
|
|
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
|
|
<script type="text/javascript" src="{{mix('js/lodop/LodopFuncs.js')}}"></script>
|
|
|
|
|
|
@@ -442,10 +439,8 @@
|
|
|
clodop:null,
|
|
|
clodopPrintDialogVisible: false,
|
|
|
printerList: [],
|
|
|
- print_size_list:[],
|
|
|
print_setting: {
|
|
|
printer_index: 0,
|
|
|
- print_size:'',
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -621,70 +616,6 @@
|
|
|
else if (this.receiving_task.driving_license_no) return true;
|
|
|
return false;
|
|
|
},
|
|
|
- setBarcode() {
|
|
|
- window.setBarcode("123123", "#receiving-task-print-code", 2, 50, true);
|
|
|
- $("#receiving-task-print-code").width("600px").height("120px");
|
|
|
- },
|
|
|
- printReceivingTask(task) {
|
|
|
- this.receiving_task_print = task;
|
|
|
- this.setBarcode();
|
|
|
- setTimeout(() => {
|
|
|
- this.printLodop();
|
|
|
- }, 500);
|
|
|
- },
|
|
|
- {{--formPrint(){--}}
|
|
|
- {{-- let iframe=document.getElementById("print-iframe");--}}
|
|
|
- {{-- this.infoShow=true;--}}
|
|
|
- {{-- if(!iframe){--}}
|
|
|
- {{-- iframe = document.createElement('IFRAME');--}}
|
|
|
- {{-- iframe.setAttribute("id", "print-iframe");--}}
|
|
|
- {{-- // iframe.setAttribute('style', 'position:absolute;width:0;height:0;left:-500px;top:-500px;');--}}
|
|
|
- {{-- iframe.setAttribute('style', 'min-height: 450px;min-width: 750px;max-height: 450px;max-width: 750px');--}}
|
|
|
- {{-- document.body.appendChild(iframe);--}}
|
|
|
- {{-- }else iframe.contentWindow.document.getElementById("iframe-content").remove();--}}
|
|
|
- {{-- let doc = iframe.contentWindow.document;--}}
|
|
|
- {{-- let el = document.getElementById("print-receiving-task");--}}
|
|
|
- {{-- doc.write('<LINK rel="stylesheet" type="text/css" href="{{ asset(mix("css/app.css")) }}">');--}}
|
|
|
- {{-- doc.write('<div id="iframe-content">' + el.innerHTML + '</div>');--}}
|
|
|
- {{-- doc.close();--}}
|
|
|
- {{-- iframe.contentWindow.focus();--}}
|
|
|
- {{-- this.infoShow=false;--}}
|
|
|
- {{-- setTimeout(function () {--}}
|
|
|
- {{-- iframe.contentWindow.print();--}}
|
|
|
- {{-- if (navigator.userAgent.indexOf("MSIE") > 0){--}}
|
|
|
- {{-- document.body.removeChild(iframe);--}}
|
|
|
- {{-- }--}}
|
|
|
- {{-- },200);--}}
|
|
|
- {{--},--}}
|
|
|
- print() {
|
|
|
- $("#receiving-task-print").removeClass("d-none");
|
|
|
- this.printReceivingTask({
|
|
|
- number: 123123123,
|
|
|
- warehouse: 123123123,
|
|
|
- for_single_member: 123123123,
|
|
|
- driver_name: 123123123,
|
|
|
- driver_phone: 123123123,
|
|
|
- plate_number: 123123123,
|
|
|
- driving_license_no: 123123123,
|
|
|
- provide_list: 123123123,
|
|
|
- receiving_type: 123123123,
|
|
|
- owner: 123123123,
|
|
|
- appointment_number: 123123123,
|
|
|
- });
|
|
|
- },
|
|
|
- transformCode() {
|
|
|
- let item = document.getElementById('receiving-task-print-code');
|
|
|
- let scale = item.scale;
|
|
|
- let height = item.offsetHeight;
|
|
|
- let width = item.offsetWidth;
|
|
|
- // style.transform = `scale(${scale},${scale})`;
|
|
|
- // style.transform = `translate(50px,100px);`;
|
|
|
- },
|
|
|
- htmlToImage() {
|
|
|
- window.html2canvas("#print-receiving-task").then((canvas) => {
|
|
|
- let imagUri = canvas.toDataURL();
|
|
|
- });
|
|
|
- },
|
|
|
scrollToTop() {
|
|
|
const c = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
if (c > 0) {
|
|
|
@@ -736,11 +667,11 @@
|
|
|
let url = "{{mix('/js/lodop/CLodop_Setup_for_Win32NT.exe')}}"
|
|
|
window.open(url, '_target');
|
|
|
},
|
|
|
- showPrintDialog() {
|
|
|
+ showPrintDialog() { //
|
|
|
this.getPrinterList();
|
|
|
this.clodopPrintDialogVisible = true;
|
|
|
},
|
|
|
- getPrinterList() {
|
|
|
+ getPrinterList() { // 获取打印机列表
|
|
|
this.printerList = [];
|
|
|
let count = this.clodop.GET_PRINTER_COUNT();
|
|
|
for (let i = 0; i < count; i++) {
|
|
|
@@ -750,13 +681,22 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- switchPrinter(){
|
|
|
- let {printer_index} = this.print_setting;
|
|
|
- let print_size_select = document.getElementById('print-size-select');
|
|
|
- this.clodop.Create_PageSize_List(print_size_select,printer_index);
|
|
|
- },
|
|
|
clodopPrint(){
|
|
|
- this.clodop.PRINT_INITA(0,0,490,285,"");
|
|
|
+ let {
|
|
|
+ number, // 收货任务号
|
|
|
+ warehouse, // 仓库
|
|
|
+ for_single_member, // 投单员
|
|
|
+ driver_name, // 司机姓名
|
|
|
+ driver_phone, // 司机电话
|
|
|
+ plate_number, // 车号牌
|
|
|
+ driving_license_no, // 驾驶证号
|
|
|
+ provide_list, // 是否提供清单
|
|
|
+ receiving_type, // 收货类型
|
|
|
+ owner, // 货主
|
|
|
+ appointment_number, // 预约号
|
|
|
+ } = this.receiving_task_print;
|
|
|
+ this.clodop.PRINT_INITA(2,0,0,0,"");
|
|
|
+ this.clodop.SET_PRINT_PAGESIZE(2,'76mm','130mm');
|
|
|
this.clodop.ADD_PRINT_BARCODE(20,70,350,50,"Code39","123456789012");
|
|
|
this.clodop.SET_PRINT_STYLEA(0,"FontSize",10);
|
|
|
this.clodop.ADD_PRINT_TEXT(100,15,100,20,"收货任务号");
|
|
|
@@ -798,53 +738,20 @@
|
|
|
this.clodop.ADD_PRINT_TEXT(250,245,100,20,"预约号");
|
|
|
this.clodop.SET_PRINT_STYLEA(0,"Alignment",2);
|
|
|
this.clodop.SET_PRINT_STYLEA(0,"Bold",1);
|
|
|
- this.clodop.ADD_PRINT_TEXT(100,115,250,20,"SH210211228001");
|
|
|
+ this.clodop.ADD_PRINT_TEXT(100,115,250,20,"1234566554646"); // number
|
|
|
this.clodop.SET_PRINT_STYLEA(0,"FontSize",10);
|
|
|
this.clodop.SET_PRINT_STYLEA(0,"Alignment",2);
|
|
|
this.clodop.SET_PRINT_STYLEA(0,"Bold",1);
|
|
|
- this.clodop.ADD_PRINT_TEXT(130,115,130,20,"新加文本15");
|
|
|
- this.clodop.ADD_PRINT_TEXT(160,115,100,20,"新加文本16");
|
|
|
- this.clodop.ADD_PRINT_TEXT(190,115,130,20,"新加文本17");
|
|
|
- this.clodop.ADD_PRINT_TEXT(220,115,100,20,"新加文本18");
|
|
|
- this.clodop.ADD_PRINT_TEXT(250,115,130,20,"新加文本19");
|
|
|
- this.clodop.ADD_PRINT_TEXT(130,345,100,20,"新加文本20");
|
|
|
- this.clodop.ADD_PRINT_TEXT(160,345,140,20,"新加文本21");
|
|
|
- this.clodop.ADD_PRINT_TEXT(190,345,140,20,"123456789012345678");
|
|
|
- this.clodop.ADD_PRINT_TEXT(220,345,100,20,"新加文本23");
|
|
|
- this.clodop.ADD_PRINT_TEXT(250,345,140,20,"新加文本24");
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // this.clodop.SET_PRINT_MODE("PRINT_NOCOLLATE",1);
|
|
|
- // this.clodop.ADD_PRINT_BARCODE(15,70,350,55,"Code39","123456789012");
|
|
|
- // this.clodop.SET_PRINT_STYLEA(0,"GroundColor","#ffffff");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(95,15,100,20,"收货任务号");
|
|
|
- // this.clodop.SET_PRINT_STYLEA(0,"SpacePatch",1);
|
|
|
- // this.clodop.ADD_PRINT_TEXT(95,116,150,20,"-收货任务号");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(125,15,100,20,"仓库");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(155,15,100,20,"司机姓名");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(190,15,100,20,"车牌号");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(225,15,100,20,"是否提供清单");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(260,15,100,20,"货主");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(125,260,100,20,"投单员");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(155,260,100,20,"司机电话");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(190,260,100,20,"驾驶证号");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(225,260,100,20,"收货类型");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(260,260,100,20,"预约号");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(125,115,130,20,"-仓库");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(155,115,130,20,"-司机姓名");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(190,115,130,20,"-车牌号");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(225,115,130,20,"-是否提供清单");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(260,115,130,20,"-货主");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(125,360,130,20,"-投单员");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(155,360,130,20,"-司机电话");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(190,361,130,20,"-驾驶证号");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(225,360,130,20,"-收货类型");
|
|
|
- // this.clodop.ADD_PRINT_TEXT(260,360,130,20,"-预约号");
|
|
|
- // this.clodop.SET_PRINTER_INDEXA(document.getElementById("print-size-select").value);
|
|
|
- // this.clodop.SET_PRINT(document.getElementById("print-size-select").value);
|
|
|
+ this.clodop.ADD_PRINT_TEXT(130,115,130,20,"-仓库号"); // warehouse
|
|
|
+ this.clodop.ADD_PRINT_TEXT(160,115,100,20,"-司机姓名"); //driver_name
|
|
|
+ this.clodop.ADD_PRINT_TEXT(190,115,130,20,"-车号牌"); //plate_number
|
|
|
+ this.clodop.ADD_PRINT_TEXT(220,115,100,20,"-是否提供清单"); //provide_list
|
|
|
+ this.clodop.ADD_PRINT_TEXT(250,115,130,20,"-货主"); // owner
|
|
|
+ this.clodop.ADD_PRINT_TEXT(130,345,100,20,"-投单员"); // for_single_member
|
|
|
+ this.clodop.ADD_PRINT_TEXT(160,345,140,20,"-司机电话"); // driver_phone
|
|
|
+ this.clodop.ADD_PRINT_TEXT(190,345,140,20,"-驾驶证号"); // driving_license_no
|
|
|
+ this.clodop.ADD_PRINT_TEXT(220,345,100,20,"-收货类型"); // receiving_type
|
|
|
+ this.clodop.ADD_PRINT_TEXT(250,345,140,20,"-预约号"); //appointment_number
|
|
|
this.clodop.PREVIEW();
|
|
|
}
|
|
|
}
|