Browse Source

FIS客户端-加补打

FoShanPG
yunfeng.liu 3 years ago
parent
commit
fb285c6b6d
  1. 2
      vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue
  2. 531
      vue/src/views/pg-fis/basedate/m100Online/budaMB.vue
  3. 12
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  4. 6
      vue/src/views/pg-fis/basedate/select/index.vue

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

@ -1,4 +1,4 @@
<!--总成模块信息管理页-->
<!--重新打印门板模块-->
<template>
<div class="cr-body-content">
<div ref="box">

531
vue/src/views/pg-fis/basedate/m100Online/budaMB.vue

@ -9,36 +9,11 @@
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-form-item prop="beginHostSN">
<el-input
v-model="listQuery.HostSN"
v-model="listQuery.beginHostSN"
placeholder=""
clearable
size="small"
@ -47,7 +22,7 @@
/>
</el-form-item>
</el-col>
<!-- <el-col class="line" :span="2">-</el-col>
<el-col class="line" :span="2" style="width: 12px; text-align: center">-</el-col>
<el-col :span="11">
<el-form-item prop="endHostSN">
<el-input
@ -60,23 +35,22 @@
/>
</el-form-item>
</el-col>
-->
</el-form-item>
<!-- <el-form-item label="底盘号码">
<el-form-item label="底盘号码">
<el-col :span="11">
<el-form-item prop="Vin">
<el-form-item prop="beginVin">
<el-input
v-model="listQuery.Vin"
v-model="listQuery.beginVin"
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-form-item>
</el-col>
<el-col class="line" :span="2" style="width: 12px; text-align: center">-</el-col>
<el-col :span="11">
<el-form-item prop="endVin">
<el-input
@ -89,24 +63,23 @@
/>
</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 label="上线日期">
<el-date-picker
v-model="listQuery.onlineTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item >
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@ -125,9 +98,10 @@
size="mini"
type="success"
icon="el-icon-s-shop"
@click="handleUpdate()"
>补打</el-button
@click="handleReplenishPrint()"
>补打(支持多选)</el-button
>
</el-form-item>
</el-form>
</flexbox>
@ -152,47 +126,7 @@
: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 type="selection" width="44px" sortable="false"></el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
@ -200,7 +134,7 @@
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
@ -237,7 +171,7 @@ import { downloadFile } from "@/utils/crmindex.js";
import qs from "qs";
export default {
name: "M100Online-MB",
name: "M100Online-budaMB",
components: { Pagination, CRMTableHead, importExcel, Detail },
directives: { permission },
filters: {
@ -254,19 +188,13 @@ export default {
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) => {
@ -301,12 +229,12 @@ export default {
listQuery: {
SkipCount: 0,
MaxResultCount: 15,
billNum: undefined,
partType: undefined,
Vin: undefined,
HostSN: undefined,
beginPrintDate: undefined,
endPrintDate: undefined,
beginVin: undefined,
endVin: undefined,
beginHostSN: undefined,
endHostSN: undefined,
OnlineTimeBegin: undefined,
OnlineTimeEnd: undefined,
},
listPLQuery: {
BillType: 2,
@ -318,14 +246,18 @@ export default {
hostCheckQuery: {
printType: undefined, //0:;1:;2:;
productLine: undefined,
Vin: undefined,
HostSN: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined,
},
hostPrintQuery: {
printType: undefined, //0:;1:;2:;
productLine: undefined,
Vin: undefined,
HostSN: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginVin: undefined,
endVin: undefined,
},
fileQuery: {
dataname: undefined,
@ -366,12 +298,13 @@ export default {
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.printType = 2; //2
this.customerInfo.productLine = element.ProductLine;
});
if (this.customerInfo.productLine != "") {
@ -385,58 +318,79 @@ export default {
computed: {
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "装箱单号", prop: "billNum", width: 140 });
tempsTabs.push({ label: "单据顺号", prop: "billSerialNum", width: 120 });
tempsTabs.push({ label: "起始顺序号", prop: "beginHostSN", width: 120 });
tempsTabs.push({ label: "结束顺序号", prop: "endHostSN", width: 120 });
tempsTabs.push({ label: "大众顺序号", prop: "hostSN", width: 80 });
tempsTabs.push({
label: "左或右",
prop: "billLocation",
width: 150,
label: "底盘号",
prop: "vin",
width: 160,
});
tempsTabs.push({
label: "供应商厂家代码",
prop: "providerCode",
width: 150,
label: "KNR",
prop: "knr",
width: 100,
});
tempsTabs.push({
label: "零件类型",
prop: "partType",
width: 180,
label: "M100上线时间",
prop: "onlineTime",
width: 150,
});
tempsTabs.push({
label: "器具容量",
prop: "capacity",
label: "M100接收时间",
prop: "receiveTime",
width: 150,
});
tempsTabs.push({
label: "打印日期",
prop: "printDate",
width: 180,
label: "车型代码",
prop: "vehicleModelCode",
width: 100,
});
tempsTabs.push({
label: "打印类型",
prop: "printType",
width: 120,
label: "版本",
prop: "version",
width: 100,
});
tempsTabs.push({
label: "产线",
label: "产线",
prop: "productLine",
width: 120,
});
width: 80,
});
tempsTabs.push({
label: "起始底盘号",
prop: "beginVin",
width: 160,
label: "状态",
prop: "billStatus",
width: 80,
});
tempsTabs.push({
label: "结束底盘号",
prop: "endVin",
width: 160,
label: "备注",
prop: "remark",
width: 80,
});
tempsTabs.push({
label: "R100上线时间",
prop: "r100OnlineTime",
width: 150,
});
tempsTabs.push({
label: "R100接收时间",
prop: "r100ReceiveTime",
width: 150,
});
return tempsTabs;
},
...mapGetters(["userInfo"]), //
},
methods: {
@ -474,10 +428,12 @@ export default {
window.URL.revokeObjectURL(ifr.src); // URL
this.dialogFormVisible = false;
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
/**
* DataGrid只展开当前行
* @param {Object} row
* @param {Object} rowList
*/
exChange(row, rowList) {
//this.listLoading = true;
@ -491,65 +447,43 @@ export default {
that.expands = [];
}
},
//
/**
* 取列表数据
* @param {Object} data
*/
getList(data) {
debugger
this.listLoading = true;
let inputParam = {};
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
inputParam.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;
inputParam.SkipCount = (this.page - 1) * 15;
}
inputParam.vinBegin = this.listQuery.beginVin;
inputParam.vinEnd = this.listQuery.endVin;
inputParam.hostSNBegin = this.listQuery.beginHostSN;
inputParam.hostSNEnd = this.listQuery.endHostSN;
if (this.listQuery.onlineTimeValue !== undefined) {
inputParam.onlineTimeBegin = this.listQuery.onlineTimeValue[0];
inputParam.onlineTimeEnd = this.listQuery.onlineTimeValue[1];
}
if (this.customerInfo.productLine != "") {
this.listQuery.ProductLine = this.customerInfo.productLine;
inputParam.productLine = this.customerInfo.productLine;
}
console.log(JSON.stringify(this.listQuery));
console.log('replenish-print-list方法输入参数:' + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/newjit/MenBanPackingList/MenBanPackingList-List",
this.listQuery
.gets(
"/api/newjit/bill-m100/replenish-print-list",
inputParam
)
.then((response) => {
response.items.forEach((item)=>{
if(item.printType == 0)
{
item.printType = "正常打印";
}
else if(item.printType == 1)
{
item.printType = "重打";
}
else
{
item.printType = "补打";
}
});
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
@ -559,35 +493,36 @@ export default {
this.listLoading = false;
});
},
//-
handleUpdate(row) {
var MBVin1 = [];
let myalert = ""; //使
if (row) {
//
MBVin1.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
MBVin1.push(id);
//-
handleReplenishPrint() {
debugger
this.isEdit = true;
if (this.multipleSelection == null || this.multipleSelection.length == 0) {
this.$message({
message: "请选择要补打的单据!",
type: "warning",
});
myalert = "选中项";
}
// let MBVin1 = this.multipleSelection[0].id;
let MBId = MBVin1;
return;
} else {
//
let beginVin1 = this.multipleSelection[0].vin;
let endVin1 = this.multipleSelection[this.multipleSelection.length -1].vin;
var params = {
printType: 1,
printType: 2,
productLine: this.customerInfo.productLine,
reportIdList: MBId,
beginVin: beginVin1,
endVin: endVin1,
m100IdList: []
};
console.log("门板打印-主界面传过来的值:" + JSON.stringify(params));
this.multipleSelection.forEach(itm => {
params.m100IdList.push(itm.id);
});
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,
@ -607,148 +542,28 @@ export default {
)
.then((response) => {
this.printpdf(response); //
this.getList(); //
});
this.getList();
}
})
.catch(() => {});
// 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); //
// });
// this.getList();
// }
// })
// .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.listQuery.OnlineTimeValue = [];
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();
}
},
/** 格式化字段 */
/** DataGrid格式化显示字段 */
fieldFormatter(row, column) {
if (column.property === "billStatus") {
return { 1: "未匹配", 2: "未打印", 3: "已打印" }[row[column.property]];
@ -762,15 +577,19 @@ export default {
}
return row[column.property] || "--";
},
roleFilter(type) {
return projectTypeKeyValue[type];
},
//
/**
* 搜索按钮单击事件
*/
handleFilter() {
this.page = 1;
this.getList();
},
/**
* DataGrid列排序事件未使用
* @param {Object} data
*/
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
@ -780,10 +599,17 @@ export default {
this.listQuery.Sorting = prop + " " + order;
this.handleFilter();
},
/**
* DataGrid多选触发事件
* @param {Object} val
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
/**
* DataGrid通过回调控制style
*/
cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right" };
@ -791,7 +617,7 @@ export default {
return { textAlign: "left" };
}
},
/** 通过回调控制表头style */
/** DataGrid通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right", background: "#FAFAFA" };
@ -799,6 +625,13 @@ export default {
return { textAlign: "left", background: "#FAFAFA" };
}
},
/**
* DataGrid行单击事件
* @param {Object} row
* @param {Object} column
* @param {Object} event
*/
handleRowClick(row, column, event) {
//this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);

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

@ -1,4 +1,15 @@
<!--总成模块信息管理页-->
<!--
-->
<template>
<div class="cr-body-content">
<div ref="box">
@ -886,6 +897,7 @@ export default {
setTimeout(() => {
//
this.listLoading = false;
debugger
}, 500);
})
.catch(() => {

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

@ -1,4 +1,4 @@
<!--总成模块信息管理页-->
<!--M100查询模块-->
<template>
<div class="cr-body-content">
<div ref="box">
@ -85,7 +85,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="-" prop="HostSNEnd">
<el-form-item label="-" prop="HostSNEnd">
<el-input
v-model="listQuery.HostSNEnd"
placeholder=""
@ -94,7 +94,7 @@
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
</el-form-item>
<el-form-item label="KNR:" prop="KNRBegin">
<el-input

Loading…
Cancel
Save