Administrator 3 years ago
parent
commit
a9d7ed9b69
  1. 53
      vue/src/router/modules/fisprint.js
  2. 749
      vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue
  3. 39
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  4. 587
      vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue
  5. 32
      vue/src/views/pg-fis/basedate/select/index.vue
  6. 2
      vue/src/views/pg-fis/basedate/unknownAssembly/index.vue

53
vue/src/router/modules/fisprint.js

@ -0,0 +1,53 @@
/** 派格fis路由 */
//import Layout from '@/layout/firstLayout'
import Layout from '@/layout'
const pgfisPrint = {
path: '/pg-fis-print',
component: Layout,
redirect: 'fisprint',
name: 'pgfis',
meta: {
//requiresAuth: true,
title: '排序单打印',
index: 0,
type: 'crm',
icon: '业务',
keepAlive: false,
},
children: [
{
path: '/pg-m100normal-print',
component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),
name: 'pg-M100Online',//命名路由
meta: {
title: '日常打印M100信息',
//roles: ['SettleAccount.Reports'],
icon: '客户零件'
}
},
{
path: '/select',
component: () => import('@/views/pg-fis/basedate/select'),
name: 'select',//命名路由
meta: {
title: 'M100查询',
//roles: ['SettleAccount.Reports'],
icon: '结算对比'
}
},
{
path: '/pg-M100Online',
component: () => import('@/views/pg-fis/basedate/m100Online'),
name: 'pg-M100Online',//命名路由
meta: {
title: 'M100上线信息',
//roles: ['SettleAccount.Reports'],
icon: '售后'
}
}
]
}
export default pgfisPrint

749
vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue

@ -0,0 +1,749 @@
<!--总成模块信息管理页-->
<template>
<div class="cr-body-content">
<div ref="box">
<flexbox class="content-header">
<el-form
:model="listQuery"
ref="queryForm"
v-show="showSearch"
:inline="true"
>
<el-form-item>
<el-col :span="12">
<el-form-item prop="billNum" label="装箱单号">
<el-input
v-model="listQuery.billNum"
placeholder=""
clearable
size="small"
style="width: 140px"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="partType" label="零件类型">
<el-input
v-model="listQuery.partType"
placeholder=""
clearable
size="small"
style="width: 140px"
/>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="大众顺序号">
<el-col :span="11">
<el-form-item prop="HostSN">
<el-input
v-model="listQuery.HostSN"
placeholder=""
clearable
size="small"
style="width: 170px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<!-- <el-col class="line" :span="2">-</el-col>
<el-col :span="11">
<el-form-item prop="endHostSN">
<el-input
v-model="listQuery.endHostSN"
placeholder=""
clearable
size="small"
style="width: 170px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
-->
</el-form-item>
<el-form-item label="底盘号码">
<el-col :span="11">
<el-form-item prop="Vin">
<el-input
v-model="listQuery.Vin"
placeholder=""
clearable
size="small"
style="width: 140px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<!-- <el-col class="line" :span="2">-</el-col>
<el-col :span="11">
<el-form-item prop="endVin">
<el-input
v-model="listQuery.endVin"
placeholder=""
clearable
size="small"
style="width: 140px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
-->
</el-form-item>
<el-form-item label="打印日期">
<el-date-picker
v-model="PrintTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
></el-date-picker>
</el-form-item>
<el-form-item style="margin-top: -20px">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleFilter"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery('queryForm')"
>重置</el-button
>
<el-button
class="filter-item"
size="mini"
type="success"
icon="el-icon-s-shop"
@click="handleUpdate()"
>重打(只支持单选)</el-button
>
</el-form-item>
</el-form>
</flexbox>
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeightMB"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%; margin-top: -25px"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
:row-key="getRowKeys"
:expand-row-keys="expands"
@expand-change="exChange"
>
<el-table-column type="selection" width="44px"></el-table-column>
<el-table-column type="expand" prop="details" label="详表">
<template slot-scope="scope">
<el-table :data="scope.row.details">
<el-table-column prop="knr" label="KNR订单号"></el-table-column>
<el-table-column prop="vin" label="底盘号"></el-table-column>
<el-table-column
prop="hostSN"
label="大众顺序号"
></el-table-column>
<el-table-column
prop="vehicleModel_DoorPlankCode"
label="车型门板代码"
></el-table-column>
<el-table-column
prop="topBoxPositionNum"
label="上箱位号"
></el-table-column>
<el-table-column
prop="topSAPMaterialNum"
label="上箱位 SAP物料号"
></el-table-column>
<el-table-column
prop="topMaterialDescription"
label="上箱位 物料描述"
></el-table-column>
<el-table-column
prop="belowBoxPositionNum"
label="下箱位号"
></el-table-column>
<el-table-column
prop="belowSAPMaterialNum"
label="下箱位 SAP物料号"
></el-table-column>
<el-table-column
prop="belowMaterialDescription "
label="下箱位 物料描述"
></el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
</el-table>
<div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination
v-show="totalCount > 0"
:total="totalCount"
style="margin-bottom: -5px; float: right"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
</div>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination";
import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw";
import Lockr from "lockr";
import { mapGetters } from "vuex";
import moment from "moment";
import Detail from "./detail.vue";
import { downloadFile } from "@/utils/crmindex.js";
import qs from "qs";
export default {
name: "M100Online-MB",
components: { Pagination, CRMTableHead, importExcel, Detail },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfosMB: {
type: Array,
default: () => {
return [];
},
},
},
data() {
const validVersion = (rule, value, callback) => {
let numberReg = /^\d{6}$/;
if (!numberReg.test(value)) {
callback(new Error("只能为6位数字!"));
} else {
callback();
}
};
return {
crmType: "M100Online-MB",
getRowKeys: (row) => {
return row.id; //id
},
expands: [], //id
PrintTimeValue: [],
activeNames: ["1"],
multipleSelection: [],
valueSelect: "",
customerInfos: [],
dialogOptions: [],
versionValue: "",
searchContent: "", //
showExcelImport: false,
form: {},
drawer: false,
list: null,
totalCount: 0,
listLoading: true,
customerInfo: {
printType: "",
productLine: "",
},
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
SkipCount: 0,
MaxResultCount: 15,
billNum: undefined,
partType: undefined,
Vin: undefined,
HostSN: undefined,
beginPrintDate: undefined,
endPrintDate: undefined,
},
listPLQuery: {
BillType: 2,
//UserId: this.userinfo.UserId,
},
hostSNQuery: {
productLine: undefined,
},
hostCheckQuery: {
printType: undefined, //0:;1:;2:;
productLine: undefined,
Vin: undefined,
HostSN: undefined,
},
hostPrintQuery: {
printType: undefined, //0:;1:;2:;
productLine: undefined,
Vin: undefined,
HostSN: undefined,
},
fileQuery: {
dataname: undefined,
},
form: {
details: [],
},
page: 1,
//
showSearch: true,
drawer: false,
dialogFormVisible: false,
formTitle: "",
isEdit: false,
formLoading: false,
tableHeight: document.documentElement.clientHeight - 335,
tableHeightMB: document.documentElement.clientHeight - 300,
detailTableHeight: 250,
details: [], //
PLList: [], //线
isShowHostSN: false,
isShowVin: false,
isShowState: true,
};
},
mounted() {
this.$nextTick(() => {
var offsetHei = document.documentElement.clientHeight;
//console.log(offsetHei);
let boxH = this.$refs.box.offsetHeight;
this.tableHeight = offsetHei - boxH - 57 - 79; //57footer79
//this.tableHeight = offsetHei -260
});
},
created() {
this.getList();
},
watch: {
customerInfosMB: {
handler(newVal) {
console.log("门板-接收的父组件的值:" + JSON.stringify(newVal));
if (newVal == "" || newVal == "undefined") {
//TODO
} else {
newVal.forEach((element) => {
this.customerInfo.printType = element.PrintType;
this.customerInfo.productLine = element.ProductLine;
});
if (this.customerInfo.productLine != "") {
this.getList();
}
}
},
immediate: true,
},
},
computed: {
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "装箱单号", prop: "billNum", width: 140 });
tempsTabs.push({ label: "单据顺号", prop: "billSerialNum", width: 120 });
tempsTabs.push({
label: "左或右",
prop: "billLocation",
width: 150,
});
tempsTabs.push({
label: "供应商厂家代码",
prop: "providerCode",
width: 150,
});
tempsTabs.push({
label: "零件类型",
prop: "partType",
width: 180,
});
tempsTabs.push({
label: "器具容量",
prop: "capacity",
width: 150,
});
tempsTabs.push({
label: "打印日期",
prop: "printDate",
width: 180,
});
tempsTabs.push({
label: "打印类型",
prop: "printType",
width: 120,
});
tempsTabs.push({
label: "生产线",
prop: "productLine",
width: 120,
});
tempsTabs.push({
label: "底盘号",
prop: "Vin",
width: 160,
});
return tempsTabs;
},
...mapGetters(["userInfo"]), //
},
methods: {
//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(dataResult) {
//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
this.dialogFormVisible = false;
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
exChange(row, rowList) {
//this.listLoading = true;
var that = this;
if (rowList.length) {
that.expands = [];
if (row) {
that.expands.push(row.id); // id
}
} else {
that.expands = [];
}
},
//
getList(data) {
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;
}
if (this.listQuery.billNum != "") {
this.listQuery.billNum = this.listQuery.billNum;
}
if (this.listQuery.Vin != "") {
this.listQuery.Vin = this.listQuery.Vin;
}
if (this.listQuery.HostSN != "") {
this.listQuery.HostSN = this.listQuery.HostSN;
}
this.listQuery.partType = this.listQuery.partType;
var getdate5 = JSON.stringify(this.PrintTimeValue);
if (getdate5 != "[]") {
this.listQuery.beginPrintDate = this.PrintTimeValue
? this.PrintTimeValue[0] || undefined
: undefined;
this.listQuery.endPrintDate = this.PrintTimeValue
? this.PrintTimeValue[1] || undefined
: undefined;
} else {
this.listQuery.beginPrintDate = undefined;
this.listQuery.endPrintDate = undefined;
}
if (this.customerInfo.productLine != "") {
this.listQuery.ProductLine = this.customerInfo.productLine;
}
console.log(JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/newjit/MenBanPackingList/MenBanPackingList-List",
this.listQuery
)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
//-
handleUpdate(row) {
this.isEdit = true;
if (this.multipleSelection.length != 1) {
this.$message({
message: "重新打印必须选择单行,不能多选!",
type: "warning",
});
return;
} else {
//this.fetchData(this.multipleSelection[0].id);
//
let MBVin1 = this.multipleSelection[0].id;
let MBId = [MBVin1];
var params = {
printType: 1,
productLine: this.customerInfo.productLine,
reportIdList: MBId,
};
console.log("门板打印-主界面传过来的值:" + JSON.stringify(params));
this.$axios
.posts("/api/newjit/bill-m100/print-menban-packing-list", params)
.then((response) => {
//alert(response.status);
const index = this.list.indexOf(row);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else {
this.fileQuery.dataname = JSON.stringify(response.item);
console.log(
"门板-调用Handlers/Handler1.ashx?report=menban传的值:" +
JSON.stringify(this.fileQuery.dataname)
);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
this.printpdf(response); //
});
}
})
.catch(() => {});
}
},
//-
handleDelete(row) {
//
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
myalert = "选中项";
}
this.$confirm("是否作废" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts("/api/newjit/MenBanPackingList/delete", params)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "作废成功",
type: "success",
duration: 2000,
});
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
fetchData(id) {
//
this.$axios
.gets("/api/newjit/assembly-cfg-erp/" + id)
.then((response) => {
this.form = response.item;
//this.details = response.item.details;
//console.log(this.details);
});
},
/** 重置按钮操作 */
resetQuery(refName) {
this.$refs[refName].resetFields();
this.PrintTimeValue = [];
this.handleQuery();
this.getProductLine();
},
/** 搜索按钮操作 */
handleQuery() {
this.listQuery.SkipCount = 1;
//this.getList();
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectOptionsChange(item) {
this.getList();
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property === "billStatus") {
return { 1: "未匹配", 2: "已匹配", 3: "已打印" }[row[column.property]];
}
if (column.property == "printDate" || column.property == "receiveTime") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
roleFilter(type) {
return projectTypeKeyValue[type];
},
//
handleFilter() {
this.page = 1;
this.getList();
},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right" };
} else {
return { textAlign: "left" };
}
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
closeDialog() {},
},
};
</script>
<style lang="scss" scoped>
@import "../../../pg-fis/styles/crmtable.scss";
.divider1 {
margin: 0;
}
.divider2 {
margin: 10px;
margin-bottom: 20px;
width: 95%;
}
.label1 {
margin-left: 5px;
margin-right: 5px;
}
</style>

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

@ -47,10 +47,10 @@
<!-- <el-collapse accordion> <!-- <el-collapse accordion>
<el-collapse-item> --> <el-collapse-item> -->
<!-- <template slot="title"> <!-- <template slot="title">
其他搜索条件(单击折叠或伸展)<i class="header-icon el-icon-info"></i> 其他搜索条件(单击折叠或伸展)<i class="header-icon el-icon-info"></i>
</template> --> </template> -->
<!-- <el-form-item label="版本:" prop="Version"> <!-- <el-form-item label="版本:" prop="Version">
<el-input <el-input
v-model="listQuery.Version" v-model="listQuery.Version"
placeholder="" placeholder=""
@ -60,8 +60,8 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> --> </el-form-item> -->
<!-- </el-row> --> <!-- </el-row> -->
<!-- <el-form-item label="流水号:" prop="serialNumBegin"> <!-- <el-form-item label="流水号:" prop="serialNumBegin">
<el-input <el-input
v-model="listQuery.serialNumBegin" v-model="listQuery.serialNumBegin"
placeholder="" placeholder=""
@ -71,7 +71,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> --> </el-form-item> -->
<!-- <el-form-item label="-" prop="serialNumEnd"> <!-- <el-form-item label="-" prop="serialNumEnd">
<el-input <el-input
v-model="listQuery.serialNumEnd" v-model="listQuery.serialNumEnd"
placeholder="" placeholder=""
@ -81,8 +81,8 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> --> </el-form-item> -->
<!-- <el-row> --> <!-- <el-row> -->
<!-- <el-form-item label="大众顺序号:" prop="HostSNBegin"> <!-- <el-form-item label="大众顺序号:" prop="HostSNBegin">
<el-input <el-input
v-model="listQuery.HostSNBegin" v-model="listQuery.HostSNBegin"
placeholder="" placeholder=""
@ -103,7 +103,7 @@
/> />
</el-form-item> --> </el-form-item> -->
<!-- <el-form-item label="KNR:" prop="KNRBegin"> <!-- <el-form-item label="KNR:" prop="KNRBegin">
<el-input <el-input
v-model="listQuery.KNRBegin" v-model="listQuery.KNRBegin"
placeholder="" placeholder=""
@ -123,9 +123,9 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> --> </el-form-item> -->
<!-- </el-row> --> <!-- </el-row> -->
<!-- <el-row> --> <!-- <el-row> -->
<!-- <el-form-item label="底盘号:" prop="VINBegin"> <!-- <el-form-item label="底盘号:" prop="VINBegin">
<el-input <el-input
v-model="listQuery.VINBegin" v-model="listQuery.VINBegin"
placeholder="" placeholder=""
@ -146,7 +146,7 @@
/> />
</el-form-item> --> </el-form-item> -->
<!-- <el-form-item label="上线日期"> <!-- <el-form-item label="上线日期">
<el-date-picker <el-date-picker
v-model="listQuery.OnlineTimeValue" v-model="listQuery.OnlineTimeValue"
size="small" size="small"
@ -158,9 +158,9 @@
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> --> </el-form-item> -->
<!-- </el-row> --> <!-- </el-row> -->
<!-- <el-row> --> <!-- <el-row> -->
<!-- <el-form-item label="接收日期"> <!-- <el-form-item label="接收日期">
<el-date-picker <el-date-picker
v-model="listQuery.ReceiveTimeValue" v-model="listQuery.ReceiveTimeValue"
size="small" size="small"
@ -172,7 +172,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> --> </el-form-item> -->
<!-- <el-form-item label="单据状态" prop="State" v-show="isShowState"> <!-- <el-form-item label="单据状态" prop="State" v-show="isShowState">
<el-checkbox-group v-model="listQuery.state"> <el-checkbox-group v-model="listQuery.state">
<el-checkbox <el-checkbox
v-for="(item, index) in billState" v-for="(item, index) in billState"
@ -184,9 +184,9 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> --> </el-form-item> -->
<!-- </el-collapse-item> <!-- </el-collapse-item>
</el-collapse> --> </el-collapse> -->
<el-form-item style="margin-top: -10px"> <el-form-item style="margin-top: -5px">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -851,7 +851,7 @@ export default {
}, },
getList(data) { getList(data) {
this.listLoading = true; this.listLoading = true;
if (data != undefined) { if (data != undefined) {alert()
this.listQuery.SkipCount = (this.page - 1) * data.limit; this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else { } else {
this.listQuery.SkipCount = (this.page - 1) * 15; this.listQuery.SkipCount = (this.page - 1) * 15;
@ -867,6 +867,7 @@ export default {
if (this.listQuery.state == 1) { if (this.listQuery.state == 1) {
this.listQuery.billStatus = this.listQuery.state[0]; this.listQuery.billStatus = this.listQuery.state[0];
} }
this.$axios this.$axios
.gets("/api/newjit/bill-m100/list", this.listQuery) .gets("/api/newjit/bill-m100/list", this.listQuery)
.then((response) => { .then((response) => {

587
vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

@ -126,7 +126,7 @@
> >
<RepetitionMB v-bind:customerInfosMB="customerInfosMB"></RepetitionMB> <RepetitionMB v-bind:customerInfosMB="customerInfosMB"></RepetitionMB>
</el-drawer> </el-drawer>
<!--门板作废--> <!--门板作废-->
<el-drawer <el-drawer
title="门板作废" title="门板作废"
:visible.sync="drawerMBDelete" :visible.sync="drawerMBDelete"
@ -275,22 +275,25 @@
</el-row> </el-row>
</el-row> </el-row>
<el-form-item <el-form-item
label="大众顺序号1:" label="大众顺序号:"
prop="beginHostSN" prop="beginHostSN"
v-show="isShowHostSN" v-show="isShowHostSN"
> >
<el-input <el-input
v-model="form.beginHostSN" v-model.number="form.beginHostSN"
placeholder="" placeholder=""
clearable clearable
type="number"
size="small" size="small"
style="width: 240px" style="width: 240px"
@change="beginHostSNChange"
/> />
<label class="label1">-</label> <label class="label1">-</label>
<el-input <el-input
v-model="form.endHostSN" v-model="form.endHostSN"
placeholder="" placeholder=""
clearable clearable
:disabled="true"
size="small" size="small"
style="width: 240px" style="width: 240px"
/> />
@ -373,10 +376,10 @@ import MBDetail from "./detailMB.vue";
import ZHBDetail from "./detailZHB.vue"; import ZHBDetail from "./detailZHB.vue";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import qs from "qs"; import qs from "qs";
import RepetitionMB from './RepetitionMB.vue' import RepetitionMB from "./RepetitionMB.vue";
import RepetitionZHB from './RepetitionZHB.vue' import RepetitionZHB from "./RepetitionZHB.vue";
import ScrapMB from './ScrapMB.vue' import ScrapMB from "./ScrapMB.vue";
import ScrapZHB from './ScrapZHB.vue' import ScrapZHB from "./ScrapZHB.vue";
export default { export default {
name: "M100Online", name: "M100Online",
@ -390,7 +393,7 @@ export default {
RepetitionMB, RepetitionMB,
RepetitionZHB, RepetitionZHB,
ScrapMB, ScrapMB,
ScrapZHB ScrapZHB,
}, },
directives: { permission }, directives: { permission },
filters: { filters: {
@ -425,6 +428,9 @@ export default {
erpAssemblyName: [ erpAssemblyName: [
{ required: true, message: "必须输入!", trigger: "blur" }, { required: true, message: "必须输入!", trigger: "blur" },
], ],
beginHostSN: [
{ required: true, message: "必须输入数字!", trigger: "number" },
],
}, },
billState: [ billState: [
{ id: 2, name: "已匹配" }, { id: 2, name: "已匹配" },
@ -444,6 +450,7 @@ export default {
list: null, list: null,
totalCount: 0, totalCount: 0,
listLoading: true, listLoading: true,
listLoaddingPrint: true,
customerInfo: { customerInfo: {
bomId: "", bomId: "",
}, },
@ -477,6 +484,13 @@ export default {
billStatus: undefined, billStatus: undefined,
state: [], state: [],
}, },
listQueryList: {
SkipCount: 0,
MaxResultCount: 15,
ProductLine: undefined,
BillStatus: undefined,
CanNotPrint: false,
},
listExportQuery: { listExportQuery: {
erpAssemblyCode: undefined, erpAssemblyCode: undefined,
erpAssemblyName: undefined, erpAssemblyName: undefined,
@ -623,52 +637,113 @@ export default {
...mapGetters(["userInfo"]), // ...mapGetters(["userInfo"]), //
}, },
methods: { methods: {
//
beginHostSNChange(val) {
if (this.listQuery.productType === 1) {
this.form.endHostSN =
parseInt(this.printNum) + parseInt(this.form.beginHostSN) - 1;
} else if (this.listQuery.productType === 2) {
this.form.endHostSN =
parseInt(this.printNumZHB) + parseInt(this.form.beginHostSN) - 1;
}
},
// //
valueNumChange(val) { valueNumChange(val) {
this.printNum = val; this.printNum = val;
this.$axios if (val == 12) {
.gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery) //12
.then((response) => { this.$axios
if (response.item !== null) { .gets(
this.form.beginHostSN = parseInt(response.item); "/api/newjit/bill-m100/get-print-start-hostsn2",
if (val == 12) { this.hostSNQuery
)
.then((response) => {
if (response.item !== null) {
this.form.beginHostSN = parseInt(response.item);
// //
this.form.endHostSN = parseInt(response.item) + 11; this.form.endHostSN = parseInt(response.item) + 11;
} else { } else {
this.form.endHostSN = parseInt(response.item) + this.printNum - 1; this.$message({
message: "获取不到大众顺序号",
type: "warning",
});
return;
} }
} else { });
this.$message({ } else {
message: "获取不到大众顺序号", //12
type: "warning", this.form.endHostSN =
}); parseInt(this.printNum) + parseInt(this.form.beginHostSN) - 1;
return; }
} // this.$axios
}); // .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery)
// .then((response) => {
// if (response.item !== null) {
// this.form.beginHostSN = parseInt(response.item);
// if (val == 12) {
// //
// this.form.endHostSN = parseInt(response.item) + 11;
// } else {
// this.form.endHostSN =
// parseInt(response.item) + parseInt(this.printNum) - 1;
// }
// } else {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// });
}, },
// //
valueNumChangeZHB(val) { valueNumChangeZHB(val) {
this.printNumZHB = val; this.printNumZHB = val;
this.$axios if (val == 12) {
.gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery) //12
.then((response) => { this.$axios
if (response.item !== null) { .gets(
this.form.beginHostSN = parseInt(response.item); "/api/newjit/bill-m100/get-print-start-hostsn2",
if (val == 24) { this.hostSNQuery
// )
this.form.endHostSN = parseInt(response.item) + 23; .then((response) => {
if (response.item !== null) {
this.form.beginHostSN = parseInt(response.item);
//
this.form.endHostSN = parseInt(response.item) + 11;
} else { } else {
this.form.endHostSN = this.$message({
parseInt(response.item) + this.printNumZHB - 1; message: "获取不到大众顺序号",
type: "warning",
});
return;
} }
} else { });
this.$message({ } else {
message: "获取不到大众顺序号", //12
type: "warning", this.form.endHostSN =
}); parseInt(this.printNumZHB) + parseInt(this.form.beginHostSN) - 1;
return; }
} // this.$axios
}); // .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery)
// .then((response) => {
// if (response.item !== null) {
// this.form.beginHostSN = parseInt(response.item);
// if (val == 24) {
// //
// this.form.endHostSN = parseInt(response.item) + 23;
// } else {
// this.form.endHostSN =
// parseInt(response.item) + this.printNumZHB - 1;
// }
// } else {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// });
}, },
// //
handleDrawerOpen(param) { handleDrawerOpen(param) {
@ -811,23 +886,18 @@ export default {
getList(data) { getList(data) {
this.listLoading = true; this.listLoading = true;
if (data != undefined) { if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit; this.listQueryList.SkipCount = (this.page - 1) * data.limit;
} else { } else {
this.listQuery.SkipCount = (this.page - 1) * 15; this.listQueryList.SkipCount = (this.page - 1) * 15;
}
if (this.listQuery.OnlineTimeValue !== undefined) {
this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1];
}
if (this.listQuery.ReceiveTimeValue !== undefined) {
this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1];
}
if (this.listQuery.state !== undefined) {
this.listQuery.billStatus = this.listQuery.state[0];
} }
this.listQueryList.BillStatus = 2; //
this.listQueryList.ProductLine = this.listQuery.productLine; //线
this.listQueryList.CanNotPrint = false; //
console.log(
"日常打印M100查询条件:" + JSON.stringify(this.listQueryList)
);
this.$axios this.$axios
.gets("/api/newjit/bill-m100/list", this.listQuery) .gets("/api/newjit/bill-m100/list", this.listQueryList)
.then((response) => { .then((response) => {
this.list = response.items; this.list = response.items;
this.totalCount = response.totalCount; this.totalCount = response.totalCount;
@ -954,7 +1024,9 @@ export default {
}); });
return; return;
} }
this.hostSNQuery.productLine = this.listQuery.productLine; (this.printNum = "12"),
(this.printNumZHB = "24"),
(this.hostSNQuery.productLine = this.listQuery.productLine);
this.hostPrintQuery.productLine = this.listQuery.productLine; this.hostPrintQuery.productLine = this.listQuery.productLine;
// //
if (this.listQuery.productType === 1) { if (this.listQuery.productType === 1) {
@ -1117,8 +1189,395 @@ export default {
this.isShowHostSN = false; this.isShowHostSN = false;
this.isShowVin = true; this.isShowVin = true;
}, },
/**保存*/
save() { save() {
this.$refs.form.validate((valid) => {
if (valid) {
//this.listLoaddingPrint = true;
if (this.isShowHostSN === true) {
if (this.form.beginHostSN === "" || this.form.endHostSN === "") {
this.$message({
message: "请输入完整的顺序号起始范围",
type: "error",
});
return;
} else {
if (this.listQuery.productType === 1) {
//
if (
parseInt(this.form.endHostSN) -
parseInt(this.form.beginHostSN) <=
0
) {
this.$message({
message: "起止大众顺序号相减不能为零!",
type: "error",
});
return;
}
} else if (this.listQuery.productType === 2) {
//
if (
parseInt(this.form.endHostSN) -
parseInt(this.form.beginHostSN) >
23
) {
this.$message({
message:
"最多只能打印24个顺序号,终止顺序号不能大于" +
(parseInt(this.form.beginHostSN) + 23),
type: "error",
});
return;
}
}
}
}
if (this.isShowVin === true) {
if (this.form.beginVin === "" || this.form.endVin === "") {
this.$message({
message: "请输入完整的底盘号起始范围",
type: "error",
});
return;
}
}
/**打印时传递大众顺序号范围,接口1获取大众顺序号,接口2验证是否断号,接口3获取打印数据,接口4获得grid++模板的base64编码 */
if (
this.formTitle === "打印-门板发货排序单" ||
this.formTitle === "打印-柱护板发货排序单"
) {
this.hostPrintQuery.beginHostSN = parseInt(this.form.beginHostSN);
this.hostPrintQuery.endHostSN = parseInt(this.form.endHostSN);
if (this.listQuery.productType === 1) {
//-
this.$axios
.posts(
"/api/newjit/bill-m100/check-mb-hostsn-break-num",
this.hostCheckQuery
)
.then((response) => {
console.log("检查门板-大众顺序号是否断号");
if (response.item.length > 0) {
//
this.$confirm(
"本次打印存在断号是否继续?" + response.item,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
//
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-menban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
console.log(response.status);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
});
}
});
})
.catch(() => {});
} else {
//
//
//
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++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
}
});
} else if (this.listQuery.productType === 2) {
//
this.$axios
.posts(
"/api/newjit/bill-m100/check-zhb-hostsn-break-num",
this.hostCheckQuery
)
.then((response) => {
console.log("检查柱护板-大众顺序号是否断号");
if (response.item.length > 0) {
//
this.$confirm(
"本次打印存在断号是否继续?" + response.item,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
//
//
this.$axios
.posts(
"/api/newjit/bill-m100/print-zhuhuban-packing-list",
this.hostPrintQuery
)
.then((response) => {
console.log("打印门板装箱单");
console.log(response);
console.log(response.status);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
});
})
.catch(() => {});
} //
else {
//
//
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++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
}
});
}
} else {
/**接口1获取打印数据,接口2获得grid++模板的base64编码 */
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(
"重新或补打打印门板装箱单" +
JSON.stringify(this.hostPrintQuery)
);
console.log(response);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else {
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(response.item);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=menban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
} 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++jsonbase64
//this.fileQuery.report = "zhuhuban";
this.fileQuery.dataname = JSON.stringify(response.item);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
console.log(response);
this.printpdf(response); //
});
}
})
.catch(() => {
this.$message({
message: response.message,
type: "error",
});
return;
});
}
}
}
});
},
/**保存*/
save1() {
//this.listLoaddingPrint = true;
if (this.isShowHostSN === true) { if (this.isShowHostSN === true) {
if (this.form.beginHostSN === "" || this.form.endHostSN === "") { if (this.form.beginHostSN === "" || this.form.endHostSN === "") {
this.$message({ this.$message({
@ -1182,7 +1641,6 @@ export default {
) )
.then((response) => { .then((response) => {
console.log("检查门板-大众顺序号是否断号"); console.log("检查门板-大众顺序号是否断号");
response.item = ["断号1", "断号2"];
if (response.item.length > 0) { if (response.item.length > 0) {
// //
this.$confirm( this.$confirm(
@ -1229,14 +1687,18 @@ export default {
.then((response) => { .then((response) => {
console.log("获取文件base64编码"); console.log("获取文件base64编码");
console.log(response); console.log(response);
this.formLoading = false;
this.printpdf(response); // this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
}); });
} }
}); });
}) })
.catch(() => {}); .catch(() => {});
} // } else {
else { //
// //
// //
this.$axios this.$axios
@ -1268,7 +1730,11 @@ export default {
.then((response) => { .then((response) => {
console.log("获取文件base64编码"); console.log("获取文件base64编码");
console.log(response); console.log(response);
this.formLoading = false;
this.printpdf(response); // this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
}); });
} }
}) })
@ -1290,7 +1756,6 @@ export default {
) )
.then((response) => { .then((response) => {
console.log("检查柱护板-大众顺序号是否断号"); console.log("检查柱护板-大众顺序号是否断号");
response.item = ["断号1", "断号2"];
if (response.item.length > 0) { if (response.item.length > 0) {
// //
this.$confirm( this.$confirm(

32
vue/src/views/pg-fis/basedate/select/index.vue

@ -9,16 +9,13 @@
v-show="showSearch" v-show="showSearch"
:inline="true" :inline="true"
> >
<el-collapse accordion>
<el-form-item label="版本:" prop="Version"> <el-form-item label="版本:" prop="Version">
<el-input <el-input
v-model="listQuery.Version" v-model="listQuery.Version"
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -29,7 +26,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -39,7 +36,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -50,7 +47,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -60,7 +57,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -71,7 +68,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -81,7 +78,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -93,7 +90,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -103,7 +100,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -147,7 +144,7 @@
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-collapse>
<el-form-item style="margin-top: -10px"> <el-form-item style="margin-top: -10px">
<el-button <el-button
type="primary" type="primary"
@ -275,7 +272,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
/> />
<label class="label1">-</label> <label class="label1">-</label>
<el-input <el-input
@ -283,7 +280,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -297,7 +294,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
/> />
<label class="label1">-</label> <label class="label1">-</label>
<el-input <el-input
@ -305,7 +302,7 @@
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 200px"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -636,7 +633,6 @@ export default {
handleDrawerClose(done) { handleDrawerClose(done) {
done(); done();
}, },
fetchData(id) { fetchData(id) {
// //
this.$axios this.$axios

2
vue/src/views/pg-fis/basedate/unknownAssembly/index.vue

@ -1031,7 +1031,7 @@ export default {
} }
}, },
handleRowClick(row, column, event) { handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection(); //this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row); this.$refs.multipleTable.toggleRowSelection(row);
}, },
/* 获取车型数据源 */ /* 获取车型数据源 */

Loading…
Cancel
Save