Browse Source

开发客户端-计划管理E007

HQ
刘云峰 4 months ago
parent
commit
66b75dabd3
  1. 6
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/V2Dtos/ImportNoteInputDto.cs
  2. 10
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
  3. 4
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportNoteAppService.cs
  4. 13
      vue/src/router/modules/fis.js
  5. 614
      vue/src/views/pg-fis/basedate/planControl_V2/index.vue

6
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/EdiReceive/V2Dtos/ImportNoteInputDto.cs

@ -19,6 +19,10 @@ namespace WY.NewJit.EdiReceive.Dtos
/// </summary>
public virtual string VehicleModelCode { get; set; }
/// <summary>
/// 车型名称
/// </summary>
public virtual string VehicleModelName { get; set; }
/// <summary>
/// 涂装下线时间起
/// </summary>
@ -62,7 +66,7 @@ namespace WY.NewJit.EdiReceive.Dtos
/// <summary>
/// 生产线:A/B
/// </summary>
public virtual string ProductLine { get; set; }
//public virtual string ProductLine { get; set; }
/// <summary>
/// 创建时间起

10
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml

@ -814,6 +814,11 @@
车型代码
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportNoteInputDto.VehicleModelName">
<summary>
车型名称
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportNoteInputDto.PaintOfflineTimeBegin">
<summary>
涂装下线时间起
@ -854,11 +859,6 @@
流水号止
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportNoteInputDto.ProductLine">
<summary>
生产线:A/B
</summary>
</member>
<member name="P:WY.NewJit.EdiReceive.Dtos.ImportNoteInputDto.CreateTimeBegin">
<summary>
创建时间起

4
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/EdiReceive/ImportNoteAppService.cs

@ -124,6 +124,10 @@ namespace WY.NewJit.EdiReceive
{
where += string.Format(" and VehicleModelCode = '{0}'", input.VehicleModelCode);
}
if (input.VehicleModelName.HasValue())
{
where += string.Format(" and VehicleModelName like '%{0}%'", input.VehicleModelName);
}
if (input.PaintOfflineTimeBegin.HasValue())
{
where += string.Format(" and PaintOfflineTime >= '{0}'", input.PaintOfflineTimeBegin?.ToString("yyyy-MM-dd HH:mm:ss"));

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

@ -21,11 +21,22 @@ const pgfis = {
component: () => import('@/views/pg-fis/basedate/planControl/index.vue'),
name: 'pg-planControl',//命名路由
meta: {
title: '计划管理',
title: '计划管理(E001车型)',
//roles: ['SettleAccount.Reports'],
icon: '客户零件'
}
},
{
path: '/pg-planControl_V2',
component: () => import('@/views/pg-fis/basedate/planControl_V2/index.vue'),
name: 'pg-planControl_V2', //命名路由
meta: {
title: '计划管理(D077-E007车型)',
//roles: ['SettleAccount.Reports'],
icon: '客户零件'
}
},
// {
// path: '/customerPartCfg',
// component: () => import('@/views/pg-fis/basedate/customerPartCfg'),

614
vue/src/views/pg-fis/basedate/planControl_V2/index.vue

@ -0,0 +1,614 @@
<!--计划管理信息页-->
<template>
<div class="cr-body-content">
<div ref="box">
<flexbox class="content-header" id="planControl-content-header">
<el-form
:model="listQuery"
ref="searchForm"
v-show="showSearch"
:inline="true">
<el-form-item label="底盘号" prop="vin" >
<el-input
v-model="listQuery.vin"
clearable
size="small"
style="width: 120px"
/>
</el-form-item>
<el-form-item label="车型代码" prop="vehicleModelCode" >
<el-input
v-model="listQuery.vehicleModelCode"
clearable
size="small"
style="width: 120px"
/>
</el-form-item>
<el-form-item label="车型名称" prop="vehicleModelName">
<el-input v-model="listQuery.vehicleModelName" clearable size="small" style="width: 120px" />
</el-form-item>
<el-form-item label="涂装下线时间" prop="paintOfflineTimeBegin">
<el-date-picker
v-model="listQuery.paintOfflineTimeBegin"
size="small"
style="width: 200px"
type="datetime"
></el-date-picker>
</el-form-item>
<el-form-item label="-" prop="paintOfflineTimeEnd">
<el-date-picker
v-model="listQuery.paintOfflineTimeEnd"
size="small"
style="width: 200px"
type="datetime"
></el-date-picker>
</el-form-item>
<el-form-item label="总装上线时间" prop="onlineTimeBegin">
<el-date-picker
v-model="listQuery.onlineTimeBegin"
size="small"
style="width: 200px"
type="datetime"
></el-date-picker>
</el-form-item>
<el-form-item label="-" prop="onlineTimeEnd">
<el-date-picker
v-model="listQuery.onlineTimeEnd"
size="small"
style="width: 200px"
type="datetime"
></el-date-picker>
</el-form-item>
<el-form-item label="序列号" prop="serialNumBegin">
<el-input
v-model="listQuery.serialNumBegin"
clearable
size="small"
style="width: 120px"
/>
</el-form-item>
<el-form-item label="-" prop="serialNumEnd">
<el-input
v-model="listQuery.serialNumEnd"
clearable
size="small"
style="width: 120px"
/>
</el-form-item>
<el-form-item label="物流配货顺序号" prop="hostSNBegin">
<el-input
v-model="listQuery.hostSNBegin"
clearable
size="small"
style="width: 120px"
/>
</el-form-item>
<el-form-item label="-" prop="hostSNEnd">
<el-input
v-model="listQuery.hostSNEnd"
clearable
size="small"
style="width: 120px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTimeBegin">
<el-date-picker
v-model="listQuery.createTimeBegin"
size="small"
style="width: 200px"
type="datetime"
></el-date-picker>
</el-form-item>
<el-form-item label="-" prop="createTimeEnd">
<el-date-picker
v-model="listQuery.createTimeEnd"
size="small"
style="width: 200px"
type="datetime"
></el-date-picker>
</el-form-item>
<el-form-item label="导入时间" prop="importTimeBegin">
<el-date-picker
v-model="listQuery.importTimeBegin"
size="small"
style="width: 200px"
type="datetime"
></el-date-picker>
</el-form-item>
<el-form-item label="-" prop="importTimeEnd">
<el-date-picker
v-model="listQuery.importTimeEnd"
size="small"
style="width: 200px"
type="datetime"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleFilter"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery('searchForm')"
>重置</el-button
>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
style="margin-left: 15px"
@click="handleDownload()"
>导出(Excel)查询信息
</el-button>
<el-button
class="filter-item"
size="mini"
type="success"
icon="el-icon-plus"
@click="handleImport"
>导入
</el-button>
</el-form-item>
<el-form-item>
<div class="tipper" v-if="tipper != ''" v-html="tipper"></div>
</el-form-item>
</el-form>
</flexbox>
</div>
<div class="l-table">
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<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"
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
</el-table>
</div>
<!-- show-overflow-tooltip -->
<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"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:importURL="importExcelURL"
@close="importClose"
/>
</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-normal";
import { mapGetters } from "vuex";
import Lockr from "lockr";
import moment from "moment";
import message_table from "../../components/mixins/message_table";
import { downloadFile } from "@/utils/crmindex.js";
//
// const bomUnit = [
// { key: 0, display_name: "PC" },
// { key: 1, display_name: "TON" },
// { key: 2, display_name: "Other" },
// ];
// const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
// acc[cur.key] = cur.display_name;
// return acc;
// }, {});
export default {
name: "RepeatM100",
components: { Pagination, CRMTableHead, importExcel },
directives: { permission },
mixins: [message_table],
data() {
return {
importExcelURL:'/api/newjit/import-note/import',
tipper:"",
showExcelImport: false,
form: {},
list: null,
totalCount: 0,
listLoading: true,
listQuery: {
factory:undefined,
vin:undefined,
vehicleModelCode:undefined,
paintOfflineTimeBegin:undefined,
paintOfflineTimeEnd:undefined,
onlineTimeBegin:undefined,
onlineTimeEnd:undefined,
serialNumBegin:undefined,
serialNumEnd:undefined,
hostSNBegin:undefined,
hostSNEnd:undefined,
productLine:undefined,
createTimeBegin:undefined,
createTimeEnd:undefined,
importTimeBegin:undefined,
importTimeEnd:undefined,
SkipCount: 0,
MaxResultCount: 15,
},
page: 1,
showSearch: true,
//bomUnit,
multipleSelection: [],
tableHeight: document.documentElement.clientHeight - 260,
};
},
mounted() {
this.getTipper();
let timer = setInterval(() => {
this.getTipper();
}, 60000);
// var offsetHei = document.documentElement.clientHeight;
// let boxH = this.$refs.box.offsetHeight;
// this.tableHeight = offsetHei - boxH - 57 - 79;//57footer79
},
created() {
this.getList();
},
computed: {
getDefaultField() {
var tempsTabs = [{
label: "底盘号",
prop: "vin",
width: 180
},
{
label: "序列号",
prop: "serialNum",
width: 120
},
{
label: "物流配货顺序号",
prop: "hostSN",
width: 120
},
//{ label: "线", prop: "productLine", width: 130 },
//{ label: "", prop: "factory", width: 120 },
//{ label: "", prop: "workLocation", width: 120 },
//{ label: "", prop: "vehicleLocation", width: 120 },
//{ label: "", prop: "vehicleBodyCode", width: 120 },
{
label: "车型代码",
prop: "vehicleModelCode",
width: 180
},
{
label: "车型名称",
prop: "vehicleModelName",
width: 320
},
//{ label: "", prop: "vehicleModelDesc", width: 240 },
//{ label: "", prop: "spec", width: 120 },
{
label: "上级产品系列",
prop: "specDesc",
width: 120
}, //
{
label: "车型",
prop: "ehicleModel",
width: 120
}, //new
{
label: "公告车型",
prop: "AfficheVehicleModel",
width: 120
}, //new
{
label: "特殊车标识",
prop: "SpecialCarLogo",
width: 120
}, //new
{
label: "类别",
prop: "type",
width: 120
},
{
label: "涂装下线EA1",
prop: "paintOfflineTime",
width: 150
},
{
label: "总装上线EA2",
prop: "onlineTime",
width: 150
},
// { label: "", prop: "interiorColor", width: 120 },
// { label: "", prop: "exteriorTrimmingColor", width: 120 },
// { label: "", prop: "target", width: 120 },
// { label: "", prop: "remark", width: 120 },
// { label: "2", prop: "remark2", width: 120 },
// { label: "3", prop: "remark3", width: 120 },
// { label: "4", prop: "remark4", width: 120 },
// { label: "5", prop: "remark5", width: 120 },
{
label: "创建时间",
prop: "createTime",
width: 150
},
{
label: "创建人",
prop: "createPerson",
width: 120
},
{
label: "导入时间",
prop: "importTime",
width: 150
},
{
label: "导入人",
prop: "importPerson",
width: 120
},
];
return tempsTabs;
},
...mapGetters(["userInfo"]), //
},
methods: {
/** 导出功能 */
handleDownload() {
this.listLoading = true;
console.log("计划管理导出条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/newjit/import-note/export", this.listQuery)
.then((res) => {
let filename = res.item;
this.$axios
.BolbGets("/api/newjit/exclude-part-cfg/download/" + filename)
.then((response) => {
if (filename.indexOf("_") != -1) {
let downName =
filename.slice(0, filename.lastIndexOf("_")) +
filename.slice(filename.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, filename);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
})
.catch(() => {
this.listLoading = false;
});
});
},
/** 重置按钮操作 */
resetQuery(refName) {
this.$refs[refName].resetFields();
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.listQuery.SkipCount = 1;
this.getList();
},
//
importClose() {
this.showExcelImport = false;
},
//
importNormalCallback(res,fileuploadList){
// ret.Status = true ret.Message ret.Message,
// api/newjit/import-note/importforceExecute true
if(res.status && res.message && res.message.length > 0){
this.$confirm(`${res.message}, 是否确定继续导入`, '提示', {
confirmButtonText: '继续导入',
cancelButtonText: '取消导入',
type: 'warning'
})
.then(() => {
this.listLoading = true
let fd = new FormData();
fileuploadList.forEach((file) => {
fd.append("files", file); //
});
fd.append("forceExecute", true);
this.$axios.posts(this.importExcelURL, fd)
.then(async (res) => {
this.listLoading = false
this.$message({
message: "导入成功!",
type: "success",
});
this.importClose()
this.getList();
})
.catch(() => {
this.listLoading = false
this.$message({
message: res.message,
type: "error",
showClose:true
});
this.importClose()
this.getList();
});
})
.catch(() => {
this.importClose()
this.getList();
})
}else{
this.importClose()
this.getList();
}
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
return row[column.property] || "--";
},
getList(data){
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * this.listQuery.MaxResultCount;
}
this.$axios.gets("/api/newjit/import-note/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
handleFilter() {
this.page = 1;
this.getList();
},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.listQuery.Sorting = undefined
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
handleImport() {
//
this.showExcelImport = true;
},
//
changeMainTableHeight(){
this.$nextTick(()=>{
var offsetHei = document.documentElement.clientHeight;
// let boxH = this.$refs.box.offsetHeight;
let headerH = document.getElementById("planControl-content-header").clientHeight
let footerH = this.totalCount > 0 ? 67 : 0 //footer
this.tableHeight = offsetHei - headerH - 67 - 79; //79
//this.tableHeight = offsetHei -260
})
},
getTipper(){
if(this.$route.name != 'pg-planControl'){
return
}
this.$axios.posts( "/api/newjit/import-note/print-timeout-remind" ).then((res) => {
this.tipper = ""
let _item = ""
let _style = ""
if (res.timeoutMinutes >= res.configMinutes) {
//
_style = "color:red;font-weight:bold"
} else {
_style = "color:green"
}
_item = `<span style=${_style}>已经${res.timeoutMinutes}分钟没有导入计划\xa0\xa0\xa0\xa0</span>`
this.tipper += _item
this.$nextTick(() => {
this.changeMainTableHeight()
})
})
}
},
};
</script>
<style lang="scss" scoped>
@import "../../../pg-fis/styles/crmtable.scss";
.tipper{
border: solid 1px #ddd;
border-radius: 5px;
display: inline-block;
padding: 10px;
line-height: 20px;
}
</style>
Loading…
Cancel
Save