Browse Source

代码合并

branch_ccpg_220107
44673626 3 years ago
parent
commit
b25c632d97
  1. 14
      vue/src/router/index.js
  2. 40
      vue/src/router/modules/fis.js
  3. 704
      vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue
  4. 723
      vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue
  5. 739
      vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue
  6. 1641
      vue/src/views/pg-fis/basedate/m100Online/index-old.vue
  7. 78
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  8. 1652
      vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue
  9. 354
      vue/src/views/pg-fis/basedate/select/detail.vue
  10. 765
      vue/src/views/pg-fis/basedate/select/detailMB.vue
  11. 746
      vue/src/views/pg-fis/basedate/select/detailZHB.vue
  12. 1569
      vue/src/views/pg-fis/basedate/select/index.vue
  13. 66
      vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue
  14. 2
      vue/static/config.js

14
vue/src/router/index.js

@ -18,6 +18,7 @@ import vwNoBarcodeRouter from './modules/vwKBNoBarcodedata'
import JobTimeDataRouter from './modules/jobtimedata'
//import newjitRouter from './modules/newjit-basedata'
import pgfis from './modules/fis'
import pgfisPrint from './modules/fisprint'
/**
* Note: sub-menu only appear when route children.length >= 1
@ -85,7 +86,7 @@ export const constantRoutes = [
children: [
{
path: 'dashboard',
component: () => import('@/views/pg-fis/basedate/m100Online'),
component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),
name: 'Dashboard',
meta: {
title: '系统首页',
@ -168,13 +169,14 @@ export const asyncRoutes = [
/** when your routing map is too long, you can split it into small modules **/
managerRouter,//系统首页
personRouter,//系统管理
basedataRouter,//基础数据维护
vwFisDataRouter,//结算与开票数据导入
billdataRouter,//销售结算与开票报表
//basedataRouter,//基础数据维护
//vwFisDataRouter,//结算与开票数据导入
//billdataRouter,//销售结算与开票报表
//businessdataRouter,
wheeldataRouter,//大众看板和备件
//wheeldataRouter,//大众看板和备件
pgfisPrint,//排序单打印
pgfis,//派格fis
JobTimeDataRouter,//后台作业监控
//JobTimeDataRouter,//后台作业监控
// 404 page must be placed at the end !!!
{ path: '*', redirect: '/404', hidden: true }

40
vue/src/router/modules/fis.js

@ -66,16 +66,36 @@ const pgfis = {
icon: '客户零件'
}
},
{
path: '/pg-M100Online',
component: () => import('@/views/pg-fis/basedate/m100Online'),
name: 'pg-M100Online',//命名路由
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: '客户零件'
// }
// },
// {
// 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-R100Online',
component: () => import('@/views/pg-fis/basedate/r100Online'),

704
vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue

@ -0,0 +1,704 @@
<!--总成模块信息管理页-->
<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-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-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="partCode"
label="柱护板零件号"
></el-table-column>
<el-table-column
prop="partCode2"
label="柱护板零件号2"
></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: {
customerInfosZHB: {
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: "1",
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,
HostSN: undefined,
Vin: undefined,
},
hostPrintQuery: {
printType: undefined, //0:;1:;2:;
productLine: undefined,
HostSN: undefined,
Vin: 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: {
customerInfosZHB: {
handler(newVal) {
console.log("柱护板-接收的父组件的值:" + JSON.stringify(newVal));
if (newVal == "" || newVal == "undefined") {
//TODO
} else {
newVal.forEach((element) => {
this.customerInfo.printType = "1";
this.customerInfo.productLine = element.ProductLine;
});
console.log("柱护板监控传值:" + JSON.stringify(this.customerInfo));
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);alert("ifr.src:"+JSON.stringify(ifr.src))
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.HostSN != "") {
this.listQuery.HostSN = this.listQuery.HostSN;
}
if (this.listQuery.Vin != "") {
this.listQuery.Vin = this.listQuery.Vin;
}
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/ZhuHuBanPackingList/ZhuHuBanPackingList-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 beginVin1 = this.multipleSelection[0].id;
let ZHBId = [beginVin1];
var params = {
printType: "1",
productLine: this.customerInfo.productLine,
reportIdList: ZHBId,
};
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios
.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
.then((response) => {
console.log("柱护版-打印返回的状态:" + 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=zhuhuban传的值:" +
JSON.stringify(this.fileQuery.dataname)
);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
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/ZhuHuBanPackingList/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>

723
vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue

@ -0,0 +1,723 @@
<!--总成模块信息管理页-->
<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-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-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"
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDelete()"
>作废(支持批量)</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 Vin1 = this.multipleSelection[0].Vin;
var params = {
printType: 1,
productLine: this.customerInfo.productLine,
Vin: Vin1,
};
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/scrap", 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>

739
vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue

@ -0,0 +1,739 @@
<!--总成模块信息管理页-->
<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="beginHostSN">
<el-input
v-model="listQuery.beginHostSN"
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="beginVin">
<el-input
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-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"
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDelete()"
>作废(支持批量)</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="partCode"
label="柱护板零件号"
></el-table-column>
<el-table-column
prop="partCode2"
label="柱护板零件号2"
></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: {
customerInfosZHB: {
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: "1",
productLine: "",
},
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
SkipCount: 0,
MaxResultCount: 15,
billNum: undefined,
partType: undefined,
beginVin: undefined,
endVin: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginPrintDate: undefined,
endPrintDate: undefined,
},
listPLQuery: {
BillType: 2,
//UserId: this.userinfo.UserId,
},
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,
},
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: {
customerInfosZHB: {
handler(newVal) {
console.log("柱护板-接收的父组件的值:" + JSON.stringify(newVal));
if (newVal == "" || newVal == "undefined") {
//TODO
} else {
newVal.forEach((element) => {
this.customerInfo.printType = "1";
this.customerInfo.productLine = element.ProductLine;
});
console.log("柱护板监控传值:" + JSON.stringify(this.customerInfo));
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: "beginVin",
width: 160,
});
tempsTabs.push({
label: "止底盘号",
prop: "endVin",
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);alert("ifr.src:"+JSON.stringify(ifr.src))
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;
}
this.listQuery.partType = this.listQuery.partType;
this.listQuery.beginVin = this.listQuery.beginVin;
this.listQuery.endVin = this.listQuery.endVin;
this.listQuery.beginHostSN = this.listQuery.beginHostSN;
this.listQuery.endHostSN = this.listQuery.endHostSN;
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/ZhuHuBanPackingList/ZhuHuBanPackingList-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 beginVin1 = this.multipleSelection[0].beginVin1;
let endVin1 = this.multipleSelection[0].endVin1;
var params = {
printType: "1",
productLine: this.customerInfo.productLine,
beginVin: beginVin1,
endVin: endVin1,
};
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios
.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
.then((response) => {
console.log("柱护版-打印返回的状态:" + 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=zhuhuban传的值:" +
JSON.stringify(this.fileQuery.dataname)
);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
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/ZhuHuBanPackingList/scrap", 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>

1641
vue/src/views/pg-fis/basedate/m100Online/index-old.vue

File diff suppressed because it is too large

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

@ -45,12 +45,12 @@
</el-select>
</el-form-item>
<el-collapse accordion>
<el-collapse-item>
<template slot="title">
<!-- <el-collapse accordion>
<el-collapse-item> -->
<!-- <template slot="title">
其他搜索条件(单击折叠或伸展)<i class="header-icon el-icon-info"></i>
</template>
<el-form-item label="版本:" prop="Version">
</template> -->
<!-- <el-form-item label="版本:" prop="Version">
<el-input
v-model="listQuery.Version"
placeholder=""
@ -59,9 +59,9 @@
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<!-- </el-row> -->
<el-form-item label="流水号:" prop="serialNumBegin">
<!-- <el-form-item label="流水号:" prop="serialNumBegin">
<el-input
v-model="listQuery.serialNumBegin"
placeholder=""
@ -70,8 +70,8 @@
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="-" prop="serialNumEnd">
</el-form-item> -->
<!-- <el-form-item label="-" prop="serialNumEnd">
<el-input
v-model="listQuery.serialNumEnd"
placeholder=""
@ -80,9 +80,9 @@
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<!-- <el-row> -->
<el-form-item label="大众顺序号:" prop="HostSNBegin">
<!-- <el-form-item label="大众顺序号:" prop="HostSNBegin">
<el-input
v-model="listQuery.HostSNBegin"
placeholder=""
@ -101,9 +101,9 @@
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="KNR:" prop="KNRBegin">
<!-- <el-form-item label="KNR:" prop="KNRBegin">
<el-input
v-model="listQuery.KNRBegin"
placeholder=""
@ -122,10 +122,10 @@
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<!-- </el-row> -->
<!-- <el-row> -->
<el-form-item label="底盘号:" prop="VINBegin">
<!-- <el-form-item label="底盘号:" prop="VINBegin">
<el-input
v-model="listQuery.VINBegin"
placeholder=""
@ -144,9 +144,9 @@
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="上线日期">
<!-- <el-form-item label="上线日期">
<el-date-picker
v-model="listQuery.OnlineTimeValue"
size="small"
@ -157,10 +157,10 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
</el-form-item> -->
<!-- </el-row> -->
<!-- <el-row> -->
<el-form-item label="接收日期">
<!-- <el-form-item label="接收日期">
<el-date-picker
v-model="listQuery.ReceiveTimeValue"
size="small"
@ -171,8 +171,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="单据状态" prop="State" v-show="isShowState">
</el-form-item> -->
<!-- <el-form-item label="单据状态" prop="State" v-show="isShowState">
<el-checkbox-group v-model="listQuery.state">
<el-checkbox
v-for="(item, index) in billState"
@ -183,9 +183,9 @@
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-collapse-item>
</el-collapse>
</el-form-item> -->
<!-- </el-collapse-item>
</el-collapse> -->
<el-form-item style="margin-top: -10px">
<el-button
type="primary"
@ -233,22 +233,40 @@
@click="makeUpPrint()"
>补打门板发货排序单
</el-button>
<!-- margin-left: 550px; -->
<el-button
ref="btn4"
type="primary"
v-show="this.listQuery.productType === 1"
size="mini"
style="margin-left: 15px"
@click="drawerMB = true"
>门板重打和作废
</el-button>
<el-button
ref="btn5"
type="primary"
v-show="this.listQuery.productType === 2"
size="mini"
style="margin-left: 15px"
@click="drawerMB = true"
>柱护板重打和作废
</el-button>
<!-- margin-left: 550px; -->
<!-- <el-button
type="text"
v-show="this.listQuery.productType === 1"
@click="drawerMB = true"
style="color: #e6a23c; fontweight: bold; font-size: 15pt"
>
<strong>门板重打和作废</strong></el-button
>
<el-button
> -->
<!-- <el-button
type="text"
v-show="this.listQuery.productType === 2"
@click="drawerZHB = true"
style="color: #f56c6c; fontweight: bold; font-size: 15pt"
><strong>柱护板重打和作废</strong></el-button
>
> -->
</el-form-item>
<!-- </el-row> -->
@ -543,7 +561,7 @@ export default {
ReceiveTimeValue: [],
ReceiveTimeBegin: undefined,
ReceiveTimeEnd: undefined,
billStatus: undefined,
billStatus: 1,
state: [],
},
listExportQuery: {
@ -846,7 +864,7 @@ export default {
this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1];
}
if (this.listQuery.state !== undefined) {
if (this.listQuery.state == 1) {
this.listQuery.billStatus = this.listQuery.state[0];
}
this.$axios

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

File diff suppressed because it is too large

354
vue/src/views/pg-fis/basedate/select/detail.vue

@ -0,0 +1,354 @@
<!--M100上线信息-明细数据-->
<template>
<div class="cr-body-content">
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@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
prop="总成名称"
label="erpAssemblyName"
sortable
width="180"
>
</el-table-column>
<el-table-column
prop="erpAssemblyVersion"
label="总成版本号"
sortable
width="180"
>
style="width: calc(100% - 47px)"
class="two-list"
</el-table-column> -->
<el-table-column type="expand" prop="details">
<template slot-scope="scope">
<el-table :data="scope.row.details">
<el-table-column
prop="partCode"
label="客户零件代码"
></el-table-column>
<el-table-column
prop="partNum"
label="客户零件数量"
></el-table-column>
<el-table-column prop="description" label="描述"></el-table-column>
<el-table-column prop="isKey" label="是否Key件">
<template slot-scope="scope">
<span v-if="scope.row.isKey == true">
<span style="color: #00b46d"></span>
</span>
<span v-else>
<span style="color: #d75c89"></span>
</span>
</template>
</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-column
prop="erpAssemblyVersion"
label="总成版本号"
sortable
width="360"
>
</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"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js";
import Detail from "./detail";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, CRMTableHead, Detail },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "stockFisDiffReport",
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
expands: [], //id
getRowKeys: (row) => {
return row.id; //id
},
searchContent: "", //
customerInfo: {
parentId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
SkipCount: 0,
MaxResultCount: 15,
id: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 30,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 30;
};
},
created() {
this.getList();
},
watch: {
customerInfos: {
handler(newVal) {
if (newVal == "" || newVal == "undefined") {
//TODO
} else {
newVal.forEach((element) => {
this.customerInfo.parentId = element.ParentId;
});
if (this.customerInfo.parentId != "") {
this.getList();
}
}
},
immediate: true,
},
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "总成编号",
prop: "erpAssemblyCode",
width: 160,
});
tempsTabs.push({
label: "总成名称",
prop: "erpAssemblyName",
width: 160,
});
// tempsTabs.push({
// label: "",
// prop: "erpAssemblyName",
// width: 160,
// });
return tempsTabs;
},
},
methods: {
exChange(row, rowList) {
this.loading = true;
var that = this;
if (rowList.length) {
that.expands = [];
if (row) {
that.expands.push(row.id); // id
}
} else {
that.expands = [];
}
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
getList() {
this.listLoading = true;
console.log("详表条件:" + JSON.stringify(this.customerInfo.parentId));
//alert("" + JSON.stringify(this.customerInfo.parentId));
let vehicleAssemblyId = { vehicleAssemblyId: this.customerInfo.parentId };
this.$axios
.gets("/api/newjit/assembly-cfg-vehicle/list", vehicleAssemblyId)
.then((response) => {
this.list = response;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "partCode";
let filter = {
logic: 0,
column: column,
action: 6,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
resetQuery() {},
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 === "fisQty" ||
column.property === "diffQty" ||
column.property === "stockQty"
) {
return { textAlign: "right" };
} else {
return { textAlign: "left" };
}
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (
column.property === "fisQty" ||
column.property === "diffQty" ||
column.property === "stockQty"
) {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../pg-fis/styles/crmtable.scss";
</style>

765
vue/src/views/pg-fis/basedate/select/detailMB.vue

@ -0,0 +1,765 @@
<!--总成模块信息管理页-->
<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="beginHostSN">
<el-input
v-model="listQuery.beginHostSN"
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="beginVin">
<el-input
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-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-button
class="filter-item"
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDelete()"
>作废(支持批量)</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,
beginVin: undefined,
endVin: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginPrintDate: undefined,
endPrintDate: undefined,
},
listPLQuery: {
BillType: 2,
//UserId: this.userinfo.UserId,
},
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,
},
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: "beginVin",
width: 160,
});
tempsTabs.push({
label: "止底盘号",
prop: "endVin",
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;
}
this.listQuery.partType = this.listQuery.partType;
this.listQuery.beginVin = this.listQuery.beginVin;
this.listQuery.endVin = this.listQuery.endVin;
this.listQuery.beginHostSN = this.listQuery.beginHostSN;
this.listQuery.endHostSN = this.listQuery.endHostSN;
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 beginVin1 = this.multipleSelection[0].beginVin1;
let endVin1 = this.multipleSelection[0].endVin1;
var params = {
printType: 1,
productLine: this.customerInfo.productLine,
beginVin: beginVin1,
endVin: endVin1,
};
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>

746
vue/src/views/pg-fis/basedate/select/detailZHB.vue

@ -0,0 +1,746 @@
<!--总成模块信息管理页-->
<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="beginHostSN">
<el-input
v-model="listQuery.beginHostSN"
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="beginVin">
<el-input
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-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-button
class="filter-item"
type="danger"
icon="el-icon-delete"
size="mini"
@click="handleDelete()"
>作废(支持批量)</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="partCode"
label="柱护板零件号"
></el-table-column>
<el-table-column
prop="partCode2"
label="柱护板零件号2"
></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: {
customerInfosZHB: {
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: "1",
productLine: "",
},
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
SkipCount: 0,
MaxResultCount: 15,
billNum: undefined,
partType: undefined,
beginVin: undefined,
endVin: undefined,
beginHostSN: undefined,
endHostSN: undefined,
beginPrintDate: undefined,
endPrintDate: undefined,
},
listPLQuery: {
BillType: 2,
//UserId: this.userinfo.UserId,
},
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,
},
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: {
customerInfosZHB: {
handler(newVal) {
console.log("柱护板-接收的父组件的值:" + JSON.stringify(newVal));
if (newVal == "" || newVal == "undefined") {
//TODO
} else {
newVal.forEach((element) => {
this.customerInfo.printType = "1";
this.customerInfo.productLine = element.ProductLine;
});
console.log("柱护板监控传值:" + JSON.stringify(this.customerInfo));
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: "beginVin",
width: 160,
});
tempsTabs.push({
label: "止底盘号",
prop: "endVin",
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);alert("ifr.src:"+JSON.stringify(ifr.src))
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;
}
this.listQuery.partType = this.listQuery.partType;
this.listQuery.beginVin = this.listQuery.beginVin;
this.listQuery.endVin = this.listQuery.endVin;
this.listQuery.beginHostSN = this.listQuery.beginHostSN;
this.listQuery.endHostSN = this.listQuery.endHostSN;
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/ZhuHuBanPackingList/ZhuHuBanPackingList-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 beginVin1 = this.multipleSelection[0].beginVin1;
let endVin1 = this.multipleSelection[0].endVin1;
var params = {
printType: "1",
productLine: this.customerInfo.productLine,
beginVin: beginVin1,
endVin: endVin1,
};
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios
.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
.then((response) => {
console.log("柱护版-打印返回的状态:" + 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=zhuhuban传的值:" +
JSON.stringify(this.fileQuery.dataname)
);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
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/ZhuHuBanPackingList/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>

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

File diff suppressed because it is too large

66
vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue

@ -380,12 +380,28 @@
v-model="formCount.materialCode"
type="textarea"
style="width: 450px"
:rows="4"
:rows="6"
placeholder="多个客户零件号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="厂内零件号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="sapCode">
<el-input
v-model="formCount.sapCode"
type="textarea"
style="width: 450px"
:rows="6"
placeholder="多个厂内零件号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="text" @click="dialogFormVisible = false"
@ -507,6 +523,7 @@ export default {
settledate: "",
materialCode: "",
sapMaterialCode: "",
sapCode: "",
chassisNumber: "",
kennCode: "",
version: "",
@ -532,10 +549,12 @@ export default {
materialGroup: undefined,
begin: undefined,
end: undefined,
sapCode: undefined
},
listQuery: {
taskId: "",
name: "",
type:""
},
page: 1,
JobversionValue: "",
@ -577,6 +596,7 @@ export default {
this.getAllVersionList();
this.getMaterialGroup();
this.getList();
this.getJobVersionInfo();
// this.getCurrentMonthFirst();
// this.getCurrentMonthLast();
},
@ -588,7 +608,11 @@ export default {
/* 主表头 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "版本号",
prop: "type",
width: 85,
});
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
@ -608,6 +632,11 @@ export default {
label: "创建时间",
prop: "createdAt",
width: 150,
});
tempsTabs.push({
label: "说明",
prop: "remark",
width: 220,
});
// tempsTabs.push({
// label: "",
@ -743,35 +772,10 @@ export default {
this.listExportQuery.matialCode = this.formCount.materialCode
? this.formCount.materialCode
: undefined;
// if (this.formCount.materialCode != "") {
// this.listExportQuery.matialCode = this.formCount.materialCode; //
// }
// if (this.formCount.kennCode != "") {
// this.listExportQuery.kenncode = this.formCount.kennCode; //KEEN
// }
// var getdate5 = JSON.stringify(this.datetime5);
// if (getdate5 != "[]") {
// alert(this.datetime5[0]);
// this.listExportQuery.begin = this.datetime5
// ? this.datetime5[0] || undefined
// : undefined;
// this.listExportQuery.end = this.datetime5
// ? this.datetime5[1] || undefined
// : undefined;
// }
// if (this.startTime != "") {
// this.listExportQuery.cp7begin = this.startTime; //CP7
// }
// if (this.endTime != "") {
// this.listExportQuery.cp7end = this.endTime; //CP5
// }
// if (this.formCount.chassisNumber != "") {
// this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //
// }
// if (this.formCount.materialGroupValue != "") {
// this.listExportQuery.materialGroup =
// this.formCount.materialGroupValue; //
// }
//
this.listExportQuery.sapCode = this.formCount.sapCode
? this.formCount.sapCode
: undefined;
console.log(
"发票与结算核对汇总-导出条件:" +
JSON.stringify(this.listExportQuery)

2
vue/static/config.js

@ -37,7 +37,7 @@ if (process.env.NODE_ENV === 'development') {
configJSON = {
base: {
ip: 'http://192.168.0.140',
//ip: 'http://192.168.0.214',
//ip: 'http://192.168.0.62',
//ip: 'http://149.223.116.5',
//ip: 'http://114.116.225.148',
//ip: 'http://10.123.148.162',

Loading…
Cancel
Save