Browse Source

fis打印报表

branch_ccpg_220107
吴煜 4 years ago
parent
commit
dc67e71826
  1. 10
      vue/src/views/pg-fis/basedate/customerPartCfg/index.vue
  2. 6
      vue/src/views/pg-fis/basedate/m100BIll/detail.vue
  3. 567
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  4. 16
      vue/src/views/pg-fis/basedate/weldingAssembly/index.vue

10
vue/src/views/pg-fis/basedate/customerPartCfg/index.vue

@ -468,14 +468,10 @@ export default {
} */ } */
if(column.property === "partType") if(column.property === "partType")
{ {
if(row[column.property] === "1") var pl = this.partType1List.filter(u => u.dicItemCode === row[column.property]);
if(pl.length !== 0)
{ {
var vname = '门板'; var vname = pl[0].dicItemName;
return vname;
}
else if(row[column.property] === '2')
{
var vname = '柱护板';
return vname; return vname;
} }
else else

6
vue/src/views/pg-fis/basedate/m100BIll/detail.vue

@ -184,15 +184,15 @@ export default {
formTitle: "", formTitle: "",
drawer: false, drawer: false,
showExcelImport: false, showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 260, tableHeight: document.documentElement.clientHeight -30 ,
isEdit: false, isEdit: false
}; };
}, },
mounted() { mounted() {
var self = this; var self = this;
window.onresize = function () { window.onresize = function () {
var offsetHei = document.documentElement.clientHeight; var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190; self.tableHeight = offsetHei - 30;
}; };
}, },
created() { created() {

567
vue/src/views/pg-fis/basedate/m100Online/index.vue

@ -197,25 +197,28 @@
>导出(Excel) >导出(Excel)
</el-button> </el-button>
<el-button <el-button
ref='btn1'
type="primary" type="primary"
size="mini" size="mini"
style="margin-left: 15px" style="margin-left: 15px"
@click="print()" @click="print()"
>打印发货排序单 >打印门板发货排序单
</el-button> </el-button>
<el-button <el-button
ref='btn2'
type="primary" type="primary"
size="mini" size="mini"
style="margin-left: 15px" style="margin-left: 15px"
@click="rePrint()" @click="rePrint()"
>重新打印发货排序单 >重新打印门板发货排序单
</el-button> </el-button>
<el-button <el-button
ref='btn3'
type="primary" type="primary"
size="mini" size="mini"
style="margin-left: 15px" style="margin-left: 15px"
@click="makeUpPrint()" @click="makeUpPrint()"
>补打发货排序单 >补打门板发货排序单
</el-button> </el-button>
</el-form-item> </el-form-item>
<!-- </el-row> --> <!-- </el-row> -->
@ -276,6 +279,81 @@
</el-table> </el-table>
</div> </div>
<div>
<el-dialog
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
:title="formTitle"
width="700px"
@close='closeDialog'
>
<el-form
ref="form"
:inline="true"
:model="form"
:rules="rules"
size="small"
label-width="120px"
>
<el-row>
<el-col :span="24">
<el-form-item label="大众顺序号:" prop="beginHostSN" v-show="isShowHostSN">
<el-input
v-model="form.beginHostSN"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<label class = "label1" >-</label>
<el-input
v-model="form.endHostSN"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="底盘号:" prop="VIN" v-show="isShowVin">
<el-input
v-model="form.beginVin"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<label class = "label1" >-</label>
<el-input
v-model="form.endVin"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="dialogFormVisible = false"
>取消</el-button
>
<el-button v-loading="formLoading" type="primary" @click="save"
>确认</el-button
>
</div>
</el-dialog>
</div>
<div class="table-footer"> <div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> <!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
@ -386,7 +464,7 @@ export default {
listQuery: { listQuery: {
SkipCount: 0, SkipCount: 0,
MaxResultCount: 15, MaxResultCount: 15,
productType: 1, productType: 1,//1:2:
ProductLine: undefined, ProductLine: undefined,
Version:undefined, Version:undefined,
serialNumBegin:undefined, serialNumBegin:undefined,
@ -415,6 +493,33 @@ export default {
BillType: 2, BillType: 2,
//UserId: "00000000-0000-0000-0000-000000000000", //UserId: "00000000-0000-0000-0000-000000000000",
}, },
hostSNQuery:{
productLine:undefined,
},
hostCheckQuery:{
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
hostPrintQuery:{
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
vinPrintQuery:{
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
form:{ form:{
details:[] details:[]
}, },
@ -433,7 +538,11 @@ export default {
details:[], // details:[], //
PLList:[],//线 PLList:[],//线
PLChildList:[],//线 PLChildList:[],//线
productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}] productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}],
isShowHostSN : false,
isShowVin : false,
}; };
}, },
mounted() { mounted() {
@ -730,7 +839,7 @@ export default {
}); });
}, },
valueselectChange(){}, valueselectChange(){this.$forceUpdate();},
handleImportSAP(){}, handleImportSAP(){},
handleFilter() { handleFilter() {
@ -770,9 +879,384 @@ export default {
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row); this.$refs.multipleTable.toggleRowSelection(row);
}, },
print(){},
rePrint(){}, closeDialog(){
makeUpPrint(){}, },
/**打印 */
print()
{
this.hostPrintQuery = {
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
this.hostCheckQuery.printType = 0;
this.hostPrintQuery.printType = 0;
this.vinPrintQuery.printType = 0;
if(this.listQuery.productLine === "" || this.listQuery.productLine === undefined)
{
this.$message({
message: "请选择生产线",
type: "warning",
});
return;
}
this.hostSNQuery.productLine = this.listQuery.productLine;
this.hostPrintQuery.productLine = this.listQuery.productLine;
this.$axios
.gets(
"/api/newjit/bill-m100/get-print-start-hostsn",this.hostSNQuery
)
.then((response) => {
console.log("获取hostsn大众顺序号起始");
console.log(response.item);
if(response.item !== null)
{
this.form.beginHostSN = parseInt(response.item);
this.form.endHostSN = parseInt(response.item) + 11;
}
else
{
this.$message({
message: "获取不到大众顺序号",
type: "warning",
});
return;
}
})
.catch(() => {
});
this.formTitle = "打印";
this.dialogFormVisible = true;
this.form =
{
beginHostSN:"",
endHostSN:"",
};
this.isShowHostSN = true;
this.isShowVin = false;
},
/**重打 */
rePrint()
{
this.hostPrintQuery = {
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
this.hostCheckQuery.printType = 1;
this.hostPrintQuery.printType = 1;
this.vinPrintQuery.printType = 1;
if(this.listQuery.productLine === "" || this.listQuery.productLine === undefined)
{
this.$message({
message: "请选择生产线",
type: "warning",
});
return;
}
this.formTitle = "重打";
this.hostPrintQuery.productLine = this.listQuery.productLine;
this.dialogFormVisible = true;
this.form =
{
beginVin:"",
endVin:""
};
this.isShowHostSN = false;
this.isShowVin = true;
},
/**补打 */
makeUpPrint()
{
this.hostPrintQuery = {
printType: undefined,//0:;1:;2:;
productLine: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined
},
this.hostCheckQuery.printType = 2;
this.hostPrintQuery.printType = 2;
this.vinPrintQuery.printType = 2;
if(this.listQuery.productLine === "" || this.listQuery.productLine === undefined)
{
this.$message({
message: "请选择生产线",
type: "error",
});
return;
}
this.formTitle = "补打";
this.hostPrintQuery.productLine = this.listQuery.productLine;
this.dialogFormVisible = true;
this.form =
{
beginVin:"",
endVin:""
};
this.isShowHostSN = false;
this.isShowVin = true;
},
/**保存*/
save()
{
if(this.isShowHostSN === true)
{
if(this.form.beginHostSN === "" || this.form.endHostSN === "")
{
this.$message({
message: "请输入完整的底盘号起始范围",
type: "error",
});
return;
}
else
{
if(parseInt(this.form.endHostSN )-parseInt(this.form.beginHostSN) > 11)
{
this.$message({
message: "终止顺序号不能大于"+(parseInt(this.form.beginHostSN)+11),
type: "error",
});
return;
}
}
}
if(this.isShowVin === true)
{
if(this.form.beginVin === "" || this.form.endVin === "")
{
this.$message({
message: "请输入完整的底盘号起始范围",
type: "error",
});
return;
}
else
{
if(parseInt(this.form.endHostSN )-parseInt(this.form.beginHostSN) > 11)
{
this.$message({
message: "终止顺序号不能大于"+(parseInt(this.form.beginHostSN)+11),
type: "error",
});
return;
}
}
}
if(this.formTitle === "打印")
{
this.hostPrintQuery.beginHostSN = parseInt(this.form.beginHostSN );
this.hostPrintQuery.endHostSN = parseInt(this.form.endHostSN );
//
this.$axios
.posts(
"/api/newjit/bill-m100/check-hostsn-break-num",this.hostCheckQuery
)
.then((response) => {
console.log("检查hostsn大众顺序号是否断号");
console.log(response);
if(response.item.length > 0)
{
this.$confirm("本次打印存在断号是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
//productType
if(this.listQuery.productType === 1)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
}
else if(this.listQuery.productType === 2)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印柱护板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
}
})
.catch(() => {
});
}
else
{
//productType
if(this.listQuery.productType === 1)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
.catch(() => {
});
}
else if(this.listQuery.productType === 2)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印柱护板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
.catch(() => {
});
}
}
})
}
else
{
this.hostPrintQuery.beginVin = this.form.beginVin;
this.hostPrintQuery.endVin = this.form.endVin;
//productType
if(this.listQuery.productType === 1)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("重新或补打打印门板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
.catch(() => {
});
}
else if(this.listQuery.productType === 2)//
{
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",this.hostPrintQuery
)
.then((response) => {
console.log("打印柱护板装箱单");
console.log(response);
if(response.status === false)
{
this.$message({
message: response.message,
type: "error",
});
return;
}
else
{
//grid++jsonpdfstream
this.printpdf(pdfstream);//
}
})
.catch(() => {
});
}
}
},
//线 //线
getProductLine() getProductLine()
{ {
@ -797,6 +1281,20 @@ export default {
this.listQuery.productLine = ""; this.listQuery.productLine = "";
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType)); this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList) //console.log(this.PLList)
//
if(this.listQuery.productType === 1)
{
this.$refs.btn1.$el.innerText = "打印门板发货排序单";
this.$refs.btn2.$el.innerText = "重新打印门板发货排序单";
this.$refs.btn3.$el.innerText = "补打门板发货排序单";
}
else if(this.listQuery.productType === 2)
{
this.$refs.btn1.$el.innerText = "打印柱护板发货排序单";
this.$refs.btn2.$el.innerText = "重新打印柱护板发货排序单";
this.$refs.btn3.$el.innerText = "补打柱护板发货排序单";
}
}, },
/*单据状态变更 */ /*单据状态变更 */
checkedListChange(index) checkedListChange(index)
@ -811,6 +1309,53 @@ export default {
this.listQuery.state.push(this.billState[index].id); this.listQuery.state.push(this.billState[index].id);
} }
}, },
/**解析文件流 */
getUrl()
{
//dataResult.data
let pdfUrl = window.URL.createObjectURL(new Blob([dataResult.data], { type: `application/pdf` }));
const fname = item.name+str+"_"+lists[1]+lists[2]; //
const link = document.createElement('a');
link.href = pdfUrl;
link.setAttribute('download','下载的文件名');
document.body.appendChild(link);
link.click();
document.body.removeChild(link)
},
//base64dataurlbase64
dataURLtoBlob (dataurl) {
var bstr = atob(dataurl.substring(dataurl.indexOf(',') + 1));
var n = bstr.length;
var u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], { type: 'application/pdf' });
},
doPrint(val) {
var ordonnance = document.getElementById(val).contentWindow
setTimeout(() => {
// window.print()
ordonnance.print()
this.pdfLoading = false
}, 100)
},
printpdf(blob)
{
//dataResultbase64
//let blob = this.dataURLtoBlob(dataResult);
var date = (new Date()).getTime()
var ifr = document.createElement('iframe')
ifr.style.frameborder = 'no'
ifr.style.display = 'none'
ifr.style.pageBreakBefore = 'always'
ifr.setAttribute('id', 'printPdf' + date)
ifr.setAttribute('name', 'printPdf' + date)
ifr.src = window.URL.createObjectURL(blob)
document.body.appendChild(ifr)
this.doPrint('printPdf' + date)
window.URL.revokeObjectURL(ifr.src) // URL
},
}, },
}; };
</script> </script>
@ -838,5 +1383,9 @@ export default {
margin-bottom: 20px ; margin-bottom: 20px ;
width: 95%; width: 95%;
} }
.label1{
margin-left: 5px;
margin-right: 5px;
}
</style> </style>

16
vue/src/views/pg-fis/basedate/weldingAssembly/index.vue

@ -452,7 +452,7 @@ export default {
}); });
tempsTabs.push({ tempsTabs.push({
label: "R100单据状态", label: "R100单据状态",
prop: "r100BillState", prop: "r100BillStatus",
width: 150, width: 150,
}); });
tempsTabs.push({ tempsTabs.push({
@ -477,12 +477,12 @@ export default {
}); });
tempsTabs.push({ tempsTabs.push({
label: "M100流水号", label: "M100流水号",
prop: "m100Seq", prop: "serialNum",
width: 130, width: 130,
}); });
tempsTabs.push({ tempsTabs.push({
label: "M100底盘号", label: "M100底盘号",
prop: "m100Vin", prop: "Vin",
width: 130, width: 130,
}); });
tempsTabs.push({ tempsTabs.push({
@ -496,18 +496,18 @@ export default {
width: 180, width: 180,
}); });
tempsTabs.push({ tempsTabs.push({
label: "R100单据状态", label: "M100单据状态",
prop: "r100BillState", prop: "m100BillStatus",
width: 150, width: 150,
}); });
tempsTabs.push({ tempsTabs.push({
label: "总成编号", label: "总成编号",
prop: "erpAssemblyCode", prop: "r100ErpAssemblyCode",
width: 150, width: 150,
}); });
tempsTabs.push({ tempsTabs.push({
label: "总成名称", label: "总成名称",
prop: "erpAssemblyName", prop: "r100ErpAssemblyName",
width: 180, width: 180,
}); });
return tempsTabs; return tempsTabs;
@ -687,7 +687,7 @@ export default {
} }
return moment(date).format("YYYY-MM-DD HH:mm:ss"); return moment(date).format("YYYY-MM-DD HH:mm:ss");
} }
return row[column.property] || "--"; return row[column.property] ;//|| "--"m1000
}, },
roleFilter(type) { roleFilter(type) {
return projectTypeKeyValue[type]; return projectTypeKeyValue[type];

Loading…
Cancel
Save