Browse Source

fish页面联调

branch_ccpg_220107
yu.wu 3 years ago
parent
commit
fa25b6e0bc
  1. 63
      vue/src/components/ImportTxt/index.vue
  2. 10
      vue/src/router/modules/fis.js
  3. 25
      vue/src/views/pg-fis/basedate/assemblyCfg/index.vue
  4. 166
      vue/src/views/pg-fis/basedate/customerPartCfg/index.vue
  5. 347
      vue/src/views/pg-fis/basedate/m100BIll/detail.vue
  6. 118
      vue/src/views/pg-fis/basedate/m100BIll/index.vue
  7. 354
      vue/src/views/pg-fis/basedate/m100Online/detail.vue
  8. 82
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  9. 6
      vue/src/views/pg-fis/basedate/productLine/index.vue
  10. 354
      vue/src/views/pg-fis/basedate/r100Online/detail.vue
  11. 106
      vue/src/views/pg-fis/basedate/r100Online/index.vue
  12. 270
      vue/src/views/pg-fis/basedate/unknownAssembly/detail.vue
  13. 1491
      vue/src/views/pg-fis/basedate/unknownAssembly/index.vue
  14. 128
      vue/src/views/pg-fis/basedate/weldingAssembly/index.vue

63
vue/src/components/ImportTxt/index.vue

@ -345,6 +345,7 @@ export default {
{ {
fis: "FIS发运数据", fis: "FIS发运数据",
settleAccount: "R3数据", settleAccount: "R3数据",
AssemblyCfgERP:"总成SAP数据",
}[this.crmType] || "" }[this.crmType] || ""
); );
}, },
@ -352,7 +353,8 @@ export default {
return ( return (
{ {
fis: "/api/settleaccount/fis/ExcelImport", fis: "/api/settleaccount/fis/ExcelImport",
settleAccount: "/api/settleaccount/SettleAccount/ExcelImport", settleAccount: "/api/settleaccount/SettleAccount/ExcelImport",
AssemblyCfgERP:"/api/newjit/assembly-cfg-erp/import",
}[this.crmType] || "" }[this.crmType] || ""
); );
}, },
@ -362,6 +364,7 @@ export default {
{ {
fis: "FIS发运数据导入模板.xlsx", fis: "FIS发运数据导入模板.xlsx",
settleAccount: "R3数据模板.xlsx", settleAccount: "R3数据模板.xlsx",
AssemblyCfgERP:"BOM-批量导入模板.txt",
}[this.crmType] || "" }[this.crmType] || ""
); );
}, },
@ -560,24 +563,48 @@ export default {
.posts(webapi, fd) .posts(webapi, fd)
.then(async (res) => { .then(async (res) => {
console.log("导入条件:" + JSON.stringify(res)); console.log("导入条件:" + JSON.stringify(res));
if (res === "Success") { if(this.crmType !== "AssemblyCfgERP"){
if (this.isLt2M === "1" && this.isFileType === "1") { if (res === "Success") {
this.$notify({ if (this.isLt2M === "1" && this.isFileType === "1") {
title: "成功", this.$notify({
message: "数据导入成功!", title: "成功",
type: "success", message: "数据导入成功!",
duration: 2000, type: "success",
}); duration: 2000,
this.stepList[1].status = "finish"; });
this.resultData.successMessage = "数据导入成功!"; this.stepList[1].status = "finish";
this.stepsActive = 4; this.resultData.successMessage = "数据导入成功!";
this.stepsActive = 4;
}
} else {
this.stepList[0].status = "wait";
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "数据导入失败!";
this.stepsActive = 3;
}
}
else{
console.log(res.status)
if (res.status === true) {
if (this.isLt2M === "1" && this.isFileType === "1") {
this.$notify({
title: "成功",
message: "数据导入成功!",
type: "success",
duration: 2000,
});
this.stepList[1].status = "finish";
this.resultData.successMessage = "数据导入成功!";
this.stepsActive = 4;
}
} else {
this.stepList[0].status = "wait";
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "数据导入失败!";
this.stepsActive = 3;
} }
} else {
this.stepList[0].status = "wait";
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "数据导入失败!";
this.stepsActive = 3;
} }
this.$emit("status", "finish"); this.$emit("status", "finish");
this.loading = false; this.loading = false;

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

@ -36,6 +36,16 @@ const pgfis = {
icon: '发货' icon: '发货'
} }
}, },
{
path: '/pg-unknownAssembly',
component: () => import('@/views/pg-fis/basedate/unknownAssembly'),
name: 'pg-unknownAssembly',//命名路由
meta: {
title: '未知总成模块管理',
roles: ['SettleAccount.Reports'],
icon: '发货'
}
},
{ {
path: '/pg-workLine', path: '/pg-workLine',
component: () => import('@/views/pg-fis/basedate/productLine'), component: () => import('@/views/pg-fis/basedate/productLine'),

25
vue/src/views/pg-fis/basedate/assemblyCfg/index.vue

@ -174,7 +174,7 @@
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.model }}</span> <span>{{ scope.row.vehicleModel }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -185,6 +185,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:title="formTitle" :title="formTitle"
width="700px" width="700px"
@close='closeDialog'
> >
<el-form <el-form
ref="form" ref="form"
@ -335,6 +336,13 @@
:limit.sync="listQuery.MaxResultCount" :limit.sync="listQuery.MaxResultCount"
@pagination="getList" @pagination="getList"
/> />
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div> </div>
<!-- 抽屉控件 --> <!-- 抽屉控件 -->
<el-drawer <el-drawer
@ -358,7 +366,7 @@
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import permission from "@/directive/permission/index.js"; import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead"; import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw"; import importExcel from "@/components/ImportTxt";
import Lockr from "lockr"; import Lockr from "lockr";
import moment from "moment"; import moment from "moment";
import Detail from "./detail.vue"; import Detail from "./detail.vue";
@ -411,7 +419,6 @@ export default {
versionValue: "", versionValue: "",
searchContent: "", // searchContent: "", //
showExcelImport: false, showExcelImport: false,
form: {},
drawer: false, drawer: false,
list: null, list: null,
totalCount: 0, totalCount: 0,
@ -697,8 +704,9 @@ export default {
}, },
importExcelData() { importExcelData() {
// //
this.listLoading = false;
this.showExcelImport = false; this.showExcelImport = false;
//this.getList(); this.getList();
}, },
/** 刷新列表 */ /** 刷新列表 */
@ -796,7 +804,11 @@ export default {
}, },
valueselectChange(){}, valueselectChange(){},
handleImportSAP(){}, handleImportSAP(){
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
handleFilter() { handleFilter() {
this.page = 1; this.page = 1;
@ -849,6 +861,9 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
closeDialog(){
//this.multipleSelection = [];//
},
}, },
}; };
</script> </script>

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

@ -22,7 +22,7 @@
<el-form-item label="零件代码:" prop="partCode"> <el-form-item label="零件代码:" prop="partCode">
<el-input <el-input
v-model="partCode" v-model="listQuery.partCode"
clearable clearable
size="small" size="small"
placeholder="" placeholder=""
@ -34,7 +34,7 @@
<el-form-item label="零件名称:" prop="partName"> <el-form-item label="零件名称:" prop="partName">
<el-input <el-input
v-model="partName" v-model="listQuery.partName"
clearable clearable
size="small" size="small"
placeholder="" placeholder=""
@ -46,29 +46,35 @@
<el-form-item label="零件类型:" prop="partType"> <el-form-item label="零件类型:" prop="partType">
<el-select <el-select
v-model="partType" v-model="listQuery.partType"
clearable clearable
placeholder="请选择" placeholder="请选择"
size="medium" size="medium"
style="margin-right: 15px" style="margin-right: 15px"
@change="valueselectChange"
> >
<el-option label="结算" value="R0003"></el-option> <!-- @change="valueselectChange" -->
<el-option label="二配" value="R0001"></el-option> <el-option
v-for="item in partType1List"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="零件子类型:" prop="partChildType"> <el-form-item label="零件子类型:" prop="partType2">
<el-select <el-select
v-model="partChildType" v-model="listQuery.partType2"
clearable clearable
placeholder="请选择" placeholder="请选择"
size="medium" size="medium"
style="margin-right: 15px" style="margin-right: 15px"
@change="valueselectChange"
> >
<el-option label="结算" value="R0003"></el-option> <!-- @change="valueselectChange" -->
<el-option label="二配" value="R0001"></el-option> <el-option
v-for="item in partType2List"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -274,12 +280,12 @@ export default {
MaxResultCount: 15, MaxResultCount: 15,
version: "", version: "",
//site: "TH", //site: "TH",
customerCode: "", customerCode: undefined,
//userId: "00000000-0000-0000-0000-000000000000", //userId: "00000000-0000-0000-0000-000000000000",
partCode:"",// partCode:"",//
partName:"",// partName:"",//
partType:"",// partType:"",//
partChildType:"",// partType2:"",//
}, },
listExportQuery: { listExportQuery: {
Filters: [ Filters: [
@ -308,26 +314,34 @@ export default {
isEdit: false, isEdit: false,
sortState:false, // sortState:false, //
partCode:'',
partName:'',
partType:'', partType1Query:{
partChildType:'', dicTypeName:"客户零件类型1",
},
partType2Query:{
dicTypeName:"客户零件类型2",
},
partType1List:[],
partType2List:[],
}; };
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
var offsetHei = document.documentElement.clientHeight; var offsetHei = document.documentElement.clientHeight;
console.log(offsetHei); //console.log(offsetHei);
let boxH = this.$refs.box.offsetHeight; let boxH = this.$refs.box.offsetHeight;
this.tableHeight = offsetHei - boxH - 57 - 79;//57footer79 this.tableHeight = offsetHei - boxH - 57 - 79;//57footer79
console.log(this.$refs.box.offsetHeight); //console.log(this.$refs.box.offsetHeight);
console.log(this.tableHeight); //console.log(this.tableHeight);
}); });
}, },
created() { created() {
//this.getVersionInfo(); //this.getVersionInfo();
//if (this.versionList == []) { //if (this.versionList == []) {
this.getPartType();
this.getList(); this.getList();
//} //}
}, },
@ -353,7 +367,7 @@ export default {
}); });
tempsTabs.push({ tempsTabs.push({
label: "零件子类型", label: "零件子类型",
prop: "partChildType", prop: "partType2",
width: 120, width: 120,
}); });
tempsTabs.push({ tempsTabs.push({
@ -452,16 +466,16 @@ export default {
//return moment(date).format("YYYY-MM-DD HH:mm:ss"); //return moment(date).format("YYYY-MM-DD HH:mm:ss");
return moment(date).format("YYYY-MM-DD"); return moment(date).format("YYYY-MM-DD");
} */ } */
if(column.property === 'customerCode') if(column.property === "partType")
{ {
if(row[column.property] === 'R0001') if(row[column.property] === "1")
{ {
var vname = '二配'; var vname = '门板';
return vname; return vname;
} }
else if(row[column.property] === 'R0003') else if(row[column.property] === '2')
{ {
var vname = '结算'; var vname = '柱护板';
return vname; return vname;
} }
else else
@ -472,7 +486,7 @@ export default {
return row[column.property] || "--"; return row[column.property] || "--";
}, },
importExcelData() { importExcelData() {
this.getVersionInfo(); //this.getVersionInfo();
this.listLoading = false; this.listLoading = false;
// //
this.showExcelImport = false; this.showExcelImport = false;
@ -480,34 +494,29 @@ export default {
// //
async handleDownload() { async handleDownload() {
this.listLoading = true; this.listLoading = true;
if (this.versionValue === "") { // if (this.versionValue === "") {
this.$message.error("必需选择版本!"); // this.$message.error("");
this.listLoading = false; // this.listLoading = false;
return; // return;
} // }
if (this.versionValue != "") { // if (this.versionValue != "") {
this.listQuery.version = this.versionValue; // this.listQuery.version = this.versionValue;
} // }
console.log("发票导出:" + JSON.stringify(this.listQuery)); console.log("发票导出:" + JSON.stringify(this.listQuery));
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/SettlementPart/Export", "/api/newjit/part-cfg/export",
this.listQuery this.listQuery
) )
.then((res) => { .then((res) => {
let fileNameOfProject = res; let filename = res.item;
this.$axios this.$axios
.BolbGets( .BolbGets("/api/newjit/exclude-part-cfg/download/" + filename)
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => { .then((response) => {
if (fileNameOfProject.indexOf("_") != -1) { if (filename.indexOf("_") != -1) {
let downName = let downName =
fileNameOfProject.slice( filename.slice(0, filename.lastIndexOf("_")) +
0, filename.slice(filename.lastIndexOf("."));
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName); downloadFile(response, downName);
this.$notify({ this.$notify({
title: "成功", title: "成功",
@ -516,7 +525,7 @@ export default {
duration: 2000, duration: 2000,
}); });
} else { } else {
downloadFile(response, fileNameOfProject); downloadFile(response, filename);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "数据-导出成功!", message: "数据-导出成功!",
@ -541,22 +550,22 @@ export default {
} }
console.log("列表查询条件:" + JSON.stringify(this.listQuery)); console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios this.$axios
.posts( .gets(
"/api/newjit/part-cfg/list", "/api/newjit/part-cfg/list",
this.listQuery this.listQuery
) )
.then((response) => { .then((response) => {
this.list = response.items; this.list = response.items;
this.list.forEach(item => { // this.list.forEach(item => {
if(item.customerCode === 'R0001') // if(item.customerCode === 'R0001')
{ // {
item.customerCode = '二配'; // item.customerCode = '';
} // }
else if(item.customerCode === 'R0003') // else if(item.customerCode === 'R0003')
{ // {
item.customerCode = '结算'; // item.customerCode = '';
} // }
}); // });
this.totalCount = response.totalCount; this.totalCount = response.totalCount;
setTimeout(() => { setTimeout(() => {
// //
@ -617,15 +626,15 @@ export default {
this.listQuery.Filters.push(filter); this.listQuery.Filters.push(filter);
} }
if (this.partChildType != "") { if (this.partType2 != "") {
var column = "partChildType"; var column = "partType2";
let filter = { let filter = {
logic: 0, logic: 0,
column: column, column: column,
action: 0, action: 0,
value: this.partChildType, value: this.partType2,
}; };
this.listQuery.Filters = this.listQuery.Filters.filter(u => u.column !== "partChildType") this.listQuery.Filters = this.listQuery.Filters.filter(u => u.column !== "partType2")
this.listQuery.Filters.push(filter); this.listQuery.Filters.push(filter);
} }
*/ */
@ -677,9 +686,12 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery(refName) { resetQuery(refName) {
this.OnlineTimeVale = []; this.listQuery.partCode = "";
this.ReceiveTimeVale = []; this.listQuery.partName = "";
this.listQuery.partType = "";
this.listQuery.partType2 = "";
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
this.getPartType()
this.handleFilter(); this.handleFilter();
}, },
sortChange(data) { sortChange(data) {
@ -723,6 +735,32 @@ export default {
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row); this.$refs.multipleTable.toggleRowSelection(row);
}, },
//
getPartType()
{
this.$axios
.gets(
"/api/newjit/dic/list",this.partType1Query
)
.then((response) => {
console.log(response);
this.partType1List = response.item;
//console.log()
})
.catch(() => {
});
this.$axios
.gets(
"/api/newjit/dic/list",this.partType2Query
)
.then((response) => {
console.log(response);
this.partType2List = response.item;
//console.log()
})
.catch(() => {
});
},
}, },
}; };
</script> </script>

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

@ -0,0 +1,347 @@
<!--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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
},
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: "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));
this.$axios
.gets("/api/newjit/bill-m100/"+ this.customerInfo.parentId)
.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 "../../../ux/styles/crmtable.scss";
</style>

118
vue/src/views/pg-fis/basedate/m100BIll/index.vue

@ -320,9 +320,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上线日期:"> <el-form-item label="上线日期:" prop="onlineTime" required>
<el-date-picker <el-date-picker
v-model="form.year" v-model="form.onlineTime"
style="width: 350px" style="width: 350px"
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -362,26 +362,26 @@
> >
<!-- <el-table-column type="selection" width="44px"></el-table-column> --> <!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column prop="erpAssemblyCode" label="ERP总成编号" width="150px" > <el-table-column prop="erpAssemblyCode" label="ERP总成编号" width="150px" >
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.erpAssemblyCode" size="mini" style="width:135px"></el-input> <el-input v-model="scope.row.erpAssemblyCode" size="mini" style="width:135px"></el-input>
</template> --> </template>
</el-table-column> </el-table-column>
<el-table-column prop="erpAssemblyName" label="ERP总成名称"> <el-table-column prop="erpAssemblyName" label="ERP总成名称">
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.erpAssemblyName" size="mini"></el-input> <el-input v-model="scope.row.erpAssemblyName" size="mini"></el-input>
</template> --> </template>
</el-table-column> </el-table-column>
<el-table-column prop="description" width="35px"> <el-table-column width="35px">
<template slot="header"> <template slot="header">
<!-- <el-button @click="handleAddDetails" icon="el-icon-plus" type="text"></el-button> --> <el-button @click="handleAddLeftDetails" icon="el-icon-plus" type="text"></el-button>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button> <el-button @click="handleLeftDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-row> </el-row>
<el-divider class="divider2" content-position="left">添加ERP总成</el-divider> <!-- <el-divider class="divider2" content-position="left">添加ERP总成</el-divider>
<el-row> <el-row>
<el-form-item label="ERP总成编码:" prop="erpAssemblyCode" > <el-form-item label="ERP总成编码:" prop="erpAssemblyCode" >
<el-input <el-input
@ -420,7 +420,7 @@
</el-row> </el-row>
<div style="text-align:center;margin: 0px;margin-bottom: 15px;"> <div style="text-align:center;margin: 0px;margin-bottom: 15px;">
<el-button type="primary" @click="leftclick">添加总成</el-button> <el-button type="primary" @click="leftclick">添加总成</el-button>
</div> </div> -->
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -454,9 +454,9 @@
<el-input v-model="scope.row.partCode" size="mini" style="width:135px"></el-input> <el-input v-model="scope.row.partCode" size="mini" style="width:135px"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="partName" label="客户零件名称"> <el-table-column prop="description" label="客户零件名称">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.partName" size="mini"></el-input> <el-input v-model="scope.row.description" size="mini"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="partNum" label="客户零件数量" width="120px" > <el-table-column prop="partNum" label="客户零件数量" width="120px" >
@ -464,17 +464,17 @@
<el-input-number v-model="scope.row.partNum" :min="1" size="mini" style="width:100px"></el-input-number> <el-input-number v-model="scope.row.partNum" :min="1" size="mini" style="width:100px"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="description" width="35px"> <el-table-column width="35px">
<template slot="header"> <template slot="header">
<!-- <el-button @click="handleAddDetails" icon="el-icon-plus" type="text"></el-button> --> <el-button @click="handleAddRightDetails" icon="el-icon-plus" type="text"></el-button>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button> <el-button @click="handleRightDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-row> </el-row>
<el-divider class="divider2" content-position="left">添加ERP结算件</el-divider> <!-- <el-divider class="divider2" content-position="left">添加ERP结算件</el-divider>
<el-row> <el-row>
<el-form-item label="客户零件代码:" prop="customerPartCode" > <el-form-item label="客户零件代码:" prop="customerPartCode" >
<el-input <el-input
@ -507,7 +507,7 @@
</el-row> </el-row>
<div style="text-align:center;margin: 0px;margin-bottom: 15px;"> <div style="text-align:center;margin: 0px;margin-bottom: 15px;">
<el-button type="primary">添加零件</el-button> <el-button type="primary">添加零件</el-button>
</div> </div> -->
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -559,6 +559,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw"; import importExcel from "@/components/ImportExcel-vw";
import Lockr from "lockr"; import Lockr from "lockr";
import moment from "moment"; import moment from "moment";
import Detail from "./detail.vue";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
// //
@ -574,7 +575,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
export default { export default {
name: "m100Bill", name: "m100Bill",
components: { Pagination, CRMTableHead, importExcel }, components: { Pagination, CRMTableHead, importExcel, Detail },
directives: { permission }, directives: { permission },
filters: { filters: {
IsCustomerSignFilter(status) { IsCustomerSignFilter(status) {
@ -652,6 +653,11 @@ export default {
//UserId: "00000000-0000-0000-0000-000000000000", //UserId: "00000000-0000-0000-0000-000000000000",
}, },
form:{ form:{
knr:"",
vehicleModelCode:"",
vin:"",
hostSN:"",
onlineTimeVale:"",
leftdetails:[], leftdetails:[],
rightdetails:[], rightdetails:[],
}, },
@ -758,11 +764,12 @@ export default {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
console.log("保存参数:" + JSON.stringify(this.form)); console.log("保存参数:" + JSON.stringify(this.form));
console.log(this.form);
this.formLoading = true; this.formLoading = true;
if (this.isEdit) { if (this.isEdit) {
// //
this.$axios this.$axios
.puts("/api/newjit/assembly-cfg-erp/" + this.form.id, this.form) .puts("/api/newjit/new-m100" + this.form.id, this.form)
.then((response) => { .then((response) => {
this.formLoading = false; this.formLoading = false;
this.$notify({ this.$notify({
@ -875,9 +882,9 @@ export default {
fetchData(id) { fetchData(id) {
// //
this.$axios this.$axios
.gets("/api/newjit/assembly-cfg-erp/" + id) .gets("/api/newjit/new-m100/" + id)
.then((response) => { .then((response) => {
this.form = response.item; this.form = response.item.m100Bill;
//this.details = response.item.details; //this.details = response.item.details;
//console.log(this.details); //console.log(this.details);
}); });
@ -889,7 +896,7 @@ export default {
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listExportQuery)); console.log(JSON.stringify(this.listExportQuery));
this.$axios this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) .posts("/api/newjit/new-m100/export", this.listExportQuery)
.then((res) => { .then((res) => {
let filename = res.item; let filename = res.item;
this.$axios this.$axios
@ -932,10 +939,10 @@ export default {
this.listQuery.KNREnd = ""; this.listQuery.KNREnd = "";
this.listQuery.VINBegin = ""; this.listQuery.VINBegin = "";
this.listQuery.VINEnd = ""; this.listQuery.VINEnd = "";
this.listQuery.OnlineTimeValue = ""; this.listQuery.OnlineTimeValue = [];
this.listQuery.OnlineTimeBegin = ""; this.listQuery.OnlineTimeBegin = "";
this.listQuery.OnlineTimeEnd = ""; this.listQuery.OnlineTimeEnd = "";
this.listQuery.ReceiveTimeValue = ""; this.listQuery.ReceiveTimeValue = [];
this.listQuery.ReceiveTimeBegin = ""; this.listQuery.ReceiveTimeBegin = "";
this.listQuery.ReceiveTimeEnd = ""; this.listQuery.ReceiveTimeEnd = "";
this.handleQuery(); this.handleQuery();
@ -968,24 +975,42 @@ export default {
} }
}, },
handleAddDetails() { handleAddLeftDetails() {
if (this.form.details === undefined) { this.$forceUpdate();
this.form.details = []; if (this.form.leftdetails === undefined) {
this.form.leftdetails = [];
//console.log(679); //console.log(679);
} }
let obj = {}; let obj = {};
obj.partCode = ""; obj.erpAssemblyCode = "";
obj.partName = ""; obj.erpAssemblyName = "";
obj.partNum = ""; obj.vehicleModel = this.form.vehicleModel;
obj.isKey = false;
obj.description = "";
console.log(this.form.details); console.log(this.form.leftdetails);
this.form.details.push(obj); this.form.leftdetails.push(obj);
//console.log(688); //console.log(688);
}, },
handleDeleteDetails(index){ handleAddRightDetails() {
this.form.details.splice(index, 1); this.$forceUpdate();
if (this.form.rightdetails === undefined) {
this.form.rightdetails = [];
//console.log(679);
}
let obj = {};
obj.customerPartCode = "";
obj.customerpartName = "";
obj.partQty= "";
console.log(this.form.rightdetails);
this.form.rightdetails.push(obj);
//console.log(688);
},
handleLeftDeleteDetails(index){
this.form.leftdetails.splice(index, 1);
//console.log(693);
},
handleRightDeleteDetails(index){
this.form.rightdetails.splice(index, 1);
//console.log(693); //console.log(693);
}, },
@ -1009,8 +1034,22 @@ export default {
getList() { getList() {
this.listLoading = true; this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10; this.listQuery.SkipCount = (this.page - 1) * 10;
console.log(1030)
if(this.listQuery.OnlineTimeValue!== undefined)
{
console.log(1033)
console.log(this.listQuery.OnlineTimeValue)
this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1];
}
console.log(this.listQuery.OnlineTimeValue)
if(this.listQuery.ReceiveTimeValue!== undefined)
{
this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1];
}
this.$axios this.$axios
.gets("/api/newjit/bill-r100/list", this.listQuery) .gets("/api/newjit/new-m100/list", this.listQuery)
.then((response) => { .then((response) => {
this.list = response.items; this.list = response.items;
this.totalCount = response.totalCount; this.totalCount = response.totalCount;
@ -1121,6 +1160,7 @@ export default {
//console.log(this.listQuery.productType) //console.log(this.listQuery.productType)
//console.log(this.PLChildList) //console.log(this.PLChildList)
}, },
//
getvehicleModel() getvehicleModel()
{ {
this.$axios this.$axios
@ -1141,7 +1181,7 @@ export default {
let obj = {}; let obj = {};
obj.erpAssemblyCode = this.form.erpAssemblyCode; obj.erpAssemblyCode = this.form.erpAssemblyCode;
obj.erpAssemblyName = this.form.erpAssemblyName; obj.erpAssemblyName = this.form.erpAssemblyName;
obj.vehicleModel = this.form.vehicleModel; obj.vehicleModel = this.form.vehicleModelCode;
if (this.form.leftdetails === undefined) { if (this.form.leftdetails === undefined) {
this.form.leftdetails = []; this.form.leftdetails = [];

354
vue/src/views/pg-fis/basedate/m100Online/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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
},
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 "../../../ux/styles/crmtable.scss";
</style>

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

@ -39,7 +39,7 @@
v-for="item in PLChildList" v-for="item in PLChildList"
:key="item.id" :key="item.id"
:label="item.productLineName" :label="item.productLineName"
:value="item.id"/> :value="item.productLineCode"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -141,7 +141,7 @@
<el-form-item label="上线日期"> <el-form-item label="上线日期">
<el-date-picker <el-date-picker
v-model="listQuery.OnlineTimeVale" v-model="listQuery.OnlineTimeValue"
size="small" size="small"
style="width: 380px" style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -155,7 +155,7 @@
<!-- <el-row> --> <!-- <el-row> -->
<el-form-item label="接收日期"> <el-form-item label="接收日期">
<el-date-picker <el-date-picker
v-model="listQuery.ReceiveTimeVale" v-model="listQuery.ReceiveTimeValue"
size="small" size="small"
style="width: 380px" style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -166,8 +166,8 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="单据状态" prop="State"> <el-form-item label="单据状态" prop="State">
<el-checkbox-group v-model="listQuery.state" > <el-checkbox-group v-model="listQuery.state">
<el-checkbox v-for="item in billState" :key="item.id" :label="item.id"> <el-checkbox v-for="(item, index) in billState" :key="item.id" :label="item.id" @change="checkedListChange(index)">
{{ item.name }} {{ item.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
@ -294,6 +294,12 @@
:visible.sync="drawer" :visible.sync="drawer"
:before-close="handleDrawerClose" :before-close="handleDrawerClose"
> >
<div>
<Detail
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div>
</el-drawer> </el-drawer>
</div> </div>
</div> </div>
@ -306,6 +312,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw"; import importExcel from "@/components/ImportExcel-vw";
import Lockr from "lockr"; import Lockr from "lockr";
import moment from "moment"; import moment from "moment";
import Detail from "./detail.vue";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
// //
@ -323,7 +330,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
export default { export default {
name: "M100Online", name: "M100Online",
components: { Pagination, CRMTableHead, importExcel }, components: { Pagination, CRMTableHead, importExcel, Detail },
directives: { permission }, directives: { permission },
filters: { filters: {
IsCustomerSignFilter(status) { IsCustomerSignFilter(status) {
@ -381,7 +388,7 @@ export default {
MaxResultCount: 15, MaxResultCount: 15,
productType: 1, productType: 1,
ProductLine: undefined, ProductLine: undefined,
version:undefined, Version:undefined,
serialNumBegin:undefined, serialNumBegin:undefined,
serialNumEnd:undefined, serialNumEnd:undefined,
HostSNBegin:undefined, HostSNBegin:undefined,
@ -390,12 +397,13 @@ export default {
KNREnd:undefined, KNREnd:undefined,
VINBegin:undefined, VINBegin:undefined,
VINEnd:undefined, VINEnd:undefined,
OnlineTimeValue:undefined, OnlineTimeValue:[],
OnlineTimeBegin:undefined, OnlineTimeBegin:undefined,
OnlineTimeEnd:undefined, OnlineTimeEnd:undefined,
ReceiveTimeValue:undefined, ReceiveTimeValue:[],
ReceiveTimeBegin:undefined, ReceiveTimeBegin:undefined,
ReceiveTimeEnd:undefined, ReceiveTimeEnd:undefined,
billStatus:undefined,
state:[], state:[],
}, },
@ -439,6 +447,12 @@ export default {
}); });
}, },
created() { created() {
this.billState.forEach((element,index) => {
if(index === 0)
{
this.listQuery.state.push(element.id);
}
});
this.getList(); this.getList();
this.getProductLine(); this.getProductLine();
}, },
@ -488,6 +502,11 @@ export default {
prop: "r100ReceiveTime", prop: "r100ReceiveTime",
width: 180, width: 180,
}); });
tempsTabs.push({
label: "产线",
prop: "productLine",
width: 120,
});
tempsTabs.push({ tempsTabs.push({
label: "备注", label: "备注",
prop: "remark", prop: "remark",
@ -500,7 +519,9 @@ export default {
// //
handleDrawerOpen(param) { handleDrawerOpen(param) {
this.drawer = true; this.drawer = true;
var parentId = param.id; //id console.log(510)
console.log(param)
var parentId = param.assemblyID; //id
this.customerInfos = [ this.customerInfos = [
{ {
ParentId: parentId, ParentId: parentId,
@ -525,9 +546,9 @@ export default {
this.listLoading = true; this.listLoading = true;
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listExportQuery)); console.log(JSON.stringify(this.listQuery));
this.$axios this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) .posts("/api/newjit/assembly-cfg-erp/export", this.listQuery)
.then((res) => { .then((res) => {
let filename = res.item; let filename = res.item;
this.$axios this.$axios
@ -563,19 +584,23 @@ export default {
//this.$refs[refName].resetFields(); //this.$refs[refName].resetFields();
this.listQuery.billType = ""; this.listQuery.billType = "";
this.listQuery.productLine = ""; this.listQuery.productLine = "";
this.listQuery.version = ""; this.listQuery.Version = "";
this.listQuery.serialNumBegin = "";
this.listQuery.serialNumEnd = "";
this.listQuery.HostSNBegin = ""; this.listQuery.HostSNBegin = "";
this.listQuery.HostSNEnd = ""; this.listQuery.HostSNEnd = "";
this.listQuery.KNRBegin = ""; this.listQuery.KNRBegin = "";
this.listQuery.KNREnd = ""; this.listQuery.KNREnd = "";
this.listQuery.VINBegin = ""; this.listQuery.VINBegin = "";
this.listQuery.VINEnd = ""; this.listQuery.VINEnd = "";
this.listQuery.OnlineTimeValue = ""; this.listQuery.OnlineTimeValue = [];
this.listQuery.OnlineTimeBegin = ""; this.listQuery.OnlineTimeBegin = "";
this.listQuery.OnlineTimeEnd = ""; this.listQuery.OnlineTimeEnd = "";
this.listQuery.ReceiveTimeValue = ""; this.listQuery.ReceiveTimeValue = [];
this.listQuery.ReceiveTimeBegin = ""; this.listQuery.ReceiveTimeBegin = "";
this.listQuery.ReceiveTimeEnd = ""; this.listQuery.ReceiveTimeEnd = "";
this.listQuery.state = [];
this.listQuery.billStatus = "";
this.handleQuery(); this.handleQuery();
this.getProductLine(); this.getProductLine();
}, },
@ -647,6 +672,20 @@ export default {
getList() { getList() {
this.listLoading = true; this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10; this.listQuery.SkipCount = (this.page - 1) * 10;
if(this.listQuery.OnlineTimeValue!== undefined)
{
this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1];
}
if(this.listQuery.ReceiveTimeValue!== undefined)
{
this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1];
}
if(this.listQuery.state!== undefined)
{
this.listQuery.billStatus = this.listQuery.state[0];
}
this.$axios this.$axios
.gets("/api/newjit/bill-m100/list", this.listQuery) .gets("/api/newjit/bill-m100/list", this.listQuery)
.then((response) => { .then((response) => {
@ -759,6 +798,19 @@ export default {
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType)); this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList) //console.log(this.PLList)
}, },
/*单据状态变更 */
checkedListChange(index)
{
if(this.listQuery.state.length <= 1)
{
this.listQuery.state.push(this.billState[index].id);
}
else
{
this.listQuery.state = [];
this.listQuery.state.push(this.billState[index].id);
}
},
}, },
}; };
</script> </script>

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

@ -394,9 +394,9 @@ export default {
version: "", version: "",
customerCode: "", customerCode: "",
//userId: "00000000-0000-0000-0000-000000000000", //userId: "00000000-0000-0000-0000-000000000000",
userName:"",// userName:undefined,//
name:"",// name:undefined,//
productLineCode:"",//线 productLineCode:undefined,//线
}, },
listExportQuery: { listExportQuery: {
Filters: [ Filters: [

354
vue/src/views/pg-fis/basedate/r100Online/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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
},
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 "../../../ux/styles/crmtable.scss";
</style>

106
vue/src/views/pg-fis/basedate/r100Online/index.vue

@ -39,7 +39,7 @@
v-for="item in PLChildList" v-for="item in PLChildList"
:key="item.id" :key="item.id"
:label="item.productLineName" :label="item.productLineName"
:value="item.id"/> :value="item.productLineCode"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -98,7 +98,7 @@
</el-form-item> </el-form-item>
<!-- </el-row> --> <!-- </el-row> -->
<!-- <el-row> --> <!-- <el-row> -->
<el-form-item label="底盘号:" prop="VINBegin"> <!-- <el-form-item label="底盘号:" prop="VINBegin">
<el-input <el-input
v-model="listQuery.VINBegin" v-model="listQuery.VINBegin"
placeholder="" placeholder=""
@ -117,11 +117,11 @@
style="width: 240px" style="width: 240px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item> -->
<el-form-item label="上线日期"> <el-form-item label="上线日期">
<el-date-picker <el-date-picker
v-model="listQuery.OnlineTimeVale" v-model="listQuery.OnlineTimeValue"
size="small" size="small"
style="width: 380px" style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -135,7 +135,7 @@
<!-- <el-row> --> <!-- <el-row> -->
<el-form-item label="接收日期"> <el-form-item label="接收日期">
<el-date-picker <el-date-picker
v-model="listQuery.ReceiveTimeVale" v-model="listQuery.ReceiveTimeValue"
size="small" size="small"
style="width: 380px" style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -147,7 +147,7 @@
</el-form-item> </el-form-item>
<el-form-item label="单据状态" prop="State"> <el-form-item label="单据状态" prop="State">
<el-checkbox-group v-model="listQuery.state" > <el-checkbox-group v-model="listQuery.state" >
<el-checkbox v-for="item in billState" :key="item.id" :label="item.id"> <el-checkbox v-for="(item, index) in billState" :key="item.id" :label="item.id" @change="checkedListChange(index)">
{{ item.name }} {{ item.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
@ -210,9 +210,9 @@
@row-click="handleRowClick" @row-click="handleRowClick"
> >
<!-- <el-table-column <el-table-column
label="底盘号" label="KNR"
prop="vin " prop="knr "
sortable="custom" sortable="custom"
align="center" align="center"
@ -220,10 +220,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{ <span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.vin scope.row.knr
}}</span> }}</span>
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column <el-table-column
v-for="(item, index) in getDefaultField" v-for="(item, index) in getDefaultField"
:key="index" :key="index"
@ -260,6 +260,12 @@
:visible.sync="drawer" :visible.sync="drawer"
:before-close="handleDrawerClose" :before-close="handleDrawerClose"
> >
<div>
<Detail
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div>
</el-drawer> </el-drawer>
</div> </div>
</div> </div>
@ -272,6 +278,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw"; import importExcel from "@/components/ImportExcel-vw";
import Lockr from "lockr"; import Lockr from "lockr";
import moment from "moment"; import moment from "moment";
import Detail from "./detail.vue";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
// //
@ -289,7 +296,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
export default { export default {
name: "M100Online", name: "M100Online",
components: { Pagination, CRMTableHead, importExcel }, components: { Pagination, CRMTableHead, importExcel , Detail},
directives: { permission }, directives: { permission },
filters: { filters: {
IsCustomerSignFilter(status) { IsCustomerSignFilter(status) {
@ -347,19 +354,20 @@ export default {
MaxResultCount: 15, MaxResultCount: 15,
productType: 1, productType: 1,
ProductLine: undefined, ProductLine: undefined,
version:undefined, Version:undefined,
HostSNBegin:undefined, HostSNBegin:undefined,
HostSNBegin:undefined, HostSNBegin:undefined,
KNRBegin:undefined, KNRBegin:undefined,
KNREnd:undefined, KNREnd:undefined,
VINBegin:undefined, //VINBegin:undefined,
VINEnd:undefined, VINEnd:undefined,
OnlineTimeValue:undefined, OnlineTimeValue:[],
OnlineTimeBegin:undefined, OnlineTimeBegin:undefined,
OnlineTimeEnd:undefined, OnlineTimeEnd:undefined,
ReceiveTimeValue:undefined, ReceiveTimeValue:[],
ReceiveTimeBegin:undefined, ReceiveTimeBegin:undefined,
ReceiveTimeEnd:undefined, ReceiveTimeEnd:undefined,
billStatus:undefined,
state:[], state:[],
}, },
@ -402,6 +410,12 @@ export default {
}); });
}, },
created() { created() {
this.billState.forEach((element,index) => {
if(index === 0)
{
this.listQuery.state.push(element.id);
}
});
this.getList(); this.getList();
this.getProductLine(); this.getProductLine();
}, },
@ -415,11 +429,11 @@ export default {
// prop: "vin", // prop: "vin",
// width: 130, // width: 130,
// }); // });
tempsTabs.push({ // tempsTabs.push({
label: "KNR", // label: "KNR",
prop: "knr", // prop: "knr",
width: 150, // width: 150,
}); // });
tempsTabs.push({ tempsTabs.push({
label: "单据状态", label: "单据状态",
prop: "billState", prop: "billState",
@ -455,6 +469,11 @@ export default {
prop: "erpAssemblyName", prop: "erpAssemblyName",
width: 180, width: 180,
}); });
tempsTabs.push({
label: "产线",
prop: "productLine",
width: 120,
});
tempsTabs.push({ tempsTabs.push({
label: "备注", label: "备注",
prop: "remark", prop: "remark",
@ -467,7 +486,7 @@ export default {
// //
handleDrawerOpen(param) { handleDrawerOpen(param) {
this.drawer = true; this.drawer = true;
var parentId = param.id; //id var parentId = param.assemblyID; //id
this.customerInfos = [ this.customerInfos = [
{ {
ParentId: parentId, ParentId: parentId,
@ -482,9 +501,9 @@ export default {
this.listLoading = true; this.listLoading = true;
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listExportQuery)); console.log(JSON.stringify(this.listQuery));
this.$axios this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) .posts("/api/newjit/bill-r100/export", this.listQuery)
.then((res) => { .then((res) => {
let filename = res.item; let filename = res.item;
this.$axios this.$axios
@ -520,19 +539,21 @@ export default {
//this.$refs[refName].resetFields(); //this.$refs[refName].resetFields();
this.listQuery.billType = ""; this.listQuery.billType = "";
this.listQuery.productLine = ""; this.listQuery.productLine = "";
this.listQuery.version = ""; this.listQuery.Version = "";
this.listQuery.HostSNBegin = ""; this.listQuery.HostSNBegin = "";
this.listQuery.HostSNEnd = ""; this.listQuery.HostSNEnd = "";
this.listQuery.KNRBegin = ""; this.listQuery.KNRBegin = "";
this.listQuery.KNREnd = ""; this.listQuery.KNREnd = "";
this.listQuery.VINBegin = ""; //this.listQuery.VINBegin = "";
this.listQuery.VINEnd = ""; this.listQuery.VINEnd = "";
this.listQuery.OnlineTimeValue = ""; this.listQuery.OnlineTimeValue = [];
this.listQuery.OnlineTimeBegin = ""; this.listQuery.OnlineTimeBegin = "";
this.listQuery.OnlineTimeEnd = ""; this.listQuery.OnlineTimeEnd = "";
this.listQuery.ReceiveTimeValue = ""; this.listQuery.ReceiveTimeValue = [];
this.listQuery.ReceiveTimeBegin = ""; this.listQuery.ReceiveTimeBegin = "";
this.listQuery.ReceiveTimeEnd = ""; this.listQuery.ReceiveTimeEnd = "";
this.listQuery.state = [];
this.listQuery.billStatus = "";
this.handleQuery(); this.handleQuery();
this.getProductLine(); this.getProductLine();
}, },
@ -604,8 +625,22 @@ export default {
getList() { getList() {
this.listLoading = true; this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10; this.listQuery.SkipCount = (this.page - 1) * 10;
if(this.listQuery.OnlineTimeValue!== undefined)
{
this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1];
}
if(this.listQuery.ReceiveTimeValue!== undefined)
{
this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1];
}
if(this.listQuery.state!== undefined)
{
this.listQuery.billStatus = this.listQuery.state[0];
}
this.$axios this.$axios
.gets("/api/newjit/bill-m100/list", this.listQuery) .gets("/api/newjit/bill-r100/list", this.listQuery)
.then((response) => { .then((response) => {
this.list = response.items; this.list = response.items;
this.totalCount = response.totalCount; this.totalCount = response.totalCount;
@ -714,6 +749,19 @@ export default {
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType)); this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList) //console.log(this.PLList)
}, },
/*单据状态变更 */
checkedListChange(index)
{
if(this.listQuery.state.length <= 1)
{
this.listQuery.state.push(this.billState[index].id);
}
else
{
this.listQuery.state = [];
this.listQuery.state.push(this.billState[index].id);
}
},
}, },
}; };
</script> </script>

270
vue/src/views/pg-fis/basedate/unknownAssembly/detail.vue

@ -0,0 +1,270 @@
<!--未知总成-明细数据-->
<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"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column
label="客户零件代码"
prop="partCode "
sortable="custom"
align="center"
width="220px"
>
<template slot-scope="scope">
<span>{{ scope.row.partCode }}</span>
</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"
: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" },
],
},
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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
},
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: "partCode ", width: 120 });
tempsTabs.push({ label: "客户零件数量", prop: "partNum", width: 95 });
tempsTabs.push({ label: "描述", prop: "description", width: 280 });
return tempsTabs;
},
},
methods: {
/** 刷新列表 */
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));
this.$axios
.gets("/api/newjit/unknown-assembly/" + this.customerInfo.parentId)
.then((response) => {
this.list = response.item.unknownAssemblyParts;
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 }) {
return { textAlign: "left" };
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
return { textAlign: "left", background: "#FAFAFA" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}

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

File diff suppressed because it is too large

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

@ -19,9 +19,11 @@
style="margin-right: 15px" style="margin-right: 15px"
@change="ptypeselectChange" @change="ptypeselectChange"
> >
<el-option label="0" value="0"></el-option> <el-option
<el-option label="1" value="1"></el-option> v-for="item in productTypeList"
<el-option label="2" value="2"></el-option> :key="item.id"
:label="item.name"
:value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="productLine"> <el-form-item label="" prop="productLine">
@ -34,10 +36,10 @@
@change="valueselectChange" @change="valueselectChange"
> >
<el-option <el-option
v-for="item in PLList" v-for="item in PLChildList"
:key="item.productLineCode" :key="item.id"
:label="item.productLineName" :label="item.productLineName"
:value="item.productLineCode"/> :value="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -139,7 +141,7 @@
<el-form-item label="上线日期"> <el-form-item label="上线日期">
<el-date-picker <el-date-picker
v-model="listQuery.OnlineTimeVale" v-model="listQuery.OnlineTimeValue"
size="small" size="small"
style="width: 380px" style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -153,7 +155,7 @@
<!-- <el-row> --> <!-- <el-row> -->
<el-form-item label="接收日期"> <el-form-item label="接收日期">
<el-date-picker <el-date-picker
v-model="listQuery.ReceiveTimeVale" v-model="listQuery.ReceiveTimeValue"
size="small" size="small"
style="width: 380px" style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -164,8 +166,8 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="对比状态" prop="State"> <el-form-item label="对比状态" prop="State">
<el-checkbox-group v-model="listQuery.state" > <el-checkbox-group v-model="listQuery.cstate" >
<el-checkbox v-for="item in billState" :key="item.id" :label="item.id"> <el-checkbox v-for="item in compareState" :key="item.id" :label="item.id">
{{ item.name }} {{ item.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
@ -192,7 +194,16 @@
size="mini" size="mini"
style="margin-left: 15px" style="margin-left: 15px"
@click="handleDownload()" @click="handleDownload()"
>导出焊装总成对比 >导出焊装总成对比(Excel)
</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
style="margin-left: 15px"
@click="handleDownloadCSV()"
>导出焊装总成对比(CSV)
</el-button> </el-button>
</el-form-item> </el-form-item>
<!-- </el-row> --> <!-- </el-row> -->
@ -328,7 +339,7 @@ export default {
{ required: true, message: "必须输入!", trigger: "blur" }, { required: true, message: "必须输入!", trigger: "blur" },
], ],
}, },
billState:[ compareState:[
{id:0,name:"有焊装无总装"}, {id:0,name:"有焊装无总装"},
{id:1,name:"有焊装有总装"} {id:1,name:"有焊装有总装"}
], ],
@ -373,7 +384,9 @@ export default {
ReceiveTimeValue:undefined, ReceiveTimeValue:undefined,
ReceiveTimeBegin:undefined, ReceiveTimeBegin:undefined,
ReceiveTimeEnd:undefined, ReceiveTimeEnd:undefined,
state:[], HasR100NotHasM100:undefined,//
HasR100HasM100:undefined,//
cstate:[],
}, },
listExportQuery: { listExportQuery: {
@ -400,6 +413,9 @@ export default {
tableHeight: document.documentElement.clientHeight - 335, tableHeight: document.documentElement.clientHeight - 335,
detailTableHeight:250, detailTableHeight:250,
details:[], // details:[], //
billStatus:[],
PLChildList:[],//线
productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}]
}; };
}, },
mounted() { mounted() {
@ -413,6 +429,10 @@ export default {
}); });
}, },
created() { created() {
this.compareState.forEach((element,index) => {
this.listQuery.cstate.push(element.id);
});
this.getProductLine();
this.getList(); this.getList();
}, },
computed: { computed: {
@ -514,7 +534,45 @@ export default {
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listExportQuery)); console.log(JSON.stringify(this.listExportQuery));
this.$axios this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) .posts("/api/newjit/r100-m100-compare/export", this.listExportQuery)
.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;
});
});
this.listLoading = false;
},
/** 导出功能 */
handleDownloadCSV() {
this.listLoading = true;
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listQuery));
this.$axios
.posts("/api/newjit/r100-m100-compare/export-CSV", this.listQuery)
.then((res) => { .then((res) => {
let filename = res.item; let filename = res.item;
this.$axios this.$axios
@ -550,7 +608,9 @@ export default {
//this.$refs[refName].resetFields(); //this.$refs[refName].resetFields();
this.listQuery.billType = ""; this.listQuery.billType = "";
this.listQuery.productLine = ""; this.listQuery.productLine = "";
this.listQuery.version = ""; this.listQuery.Version = "";
this.listQuery.serialNumBegin = "";
this.listQuery.serialNumEnd = "";
this.listQuery.HostSNBegin = ""; this.listQuery.HostSNBegin = "";
this.listQuery.HostSNEnd = ""; this.listQuery.HostSNEnd = "";
this.listQuery.KNRBegin = ""; this.listQuery.KNRBegin = "";
@ -563,6 +623,7 @@ export default {
this.listQuery.ReceiveTimeValue = ""; this.listQuery.ReceiveTimeValue = "";
this.listQuery.ReceiveTimeBegin = ""; this.listQuery.ReceiveTimeBegin = "";
this.listQuery.ReceiveTimeEnd = ""; this.listQuery.ReceiveTimeEnd = "";
this.listQuery.cstate = [];
this.handleQuery(); this.handleQuery();
this.getProductLine(); this.getProductLine();
}, },
@ -634,8 +695,38 @@ export default {
getList() { getList() {
this.listLoading = true; this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10; this.listQuery.SkipCount = (this.page - 1) * 10;
if(this.listQuery.OnlineTimeValue!== undefined)
{
this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1];
}
if(this.listQuery.ReceiveTimeValue!== undefined)
{
this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1];
}
this.listQuery.HasR100NotHasM100 = false;
this.listQuery.HasR100HasM100 = false;
if(this.listQuery.cstate!== undefined && this.listQuery.cstate.length > 0)
{
console.log(this.listQuery.cstate)
this.listQuery.cstate.forEach(element => {
console.log(element)
if(element === 0)
{
this.listQuery.HasR100NotHasM100 = true;
}
if(element === 1)
{
this.listQuery.HasR100HasM100 = true;
}
});
}
this.$axios this.$axios
.gets("/api/newjit/assembly-cfg-erp/list", this.listQuery) .gets("/api/newjit/r100-m100-compare/list", this.listQuery)
.then((response) => { .then((response) => {
this.list = response.items; this.list = response.items;
this.totalCount = response.totalCount; this.totalCount = response.totalCount;
@ -729,7 +820,7 @@ export default {
.then((response) => { .then((response) => {
//console.log(response); //console.log(response);
this.PLList = response.item; this.PLList = response.item;
//console.log(this.PLList); this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
}) })
.catch(() => { .catch(() => {
}); });
@ -738,7 +829,8 @@ export default {
ptypeselectChange() ptypeselectChange()
{ {
//console.log(this.listQuery.productType); //console.log(this.listQuery.productType);
this.PLList = this.PLList.filter(u => u.productType === this.listQuery.productType); this.listQuery.productLine = "";
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList); //console.log(this.PLList);
}, },
}, },

Loading…
Cancel
Save