|
|
@ -1,4 +1,4 @@ |
|
|
|
<!--大众备件结算明细--> |
|
|
|
<!--大众备件结算核对--> |
|
|
|
<template> |
|
|
|
<div class="cr-body-content"> |
|
|
|
<!--功能栏--> |
|
|
@ -331,9 +331,15 @@ |
|
|
|
:close-on-click-modal="false" |
|
|
|
:title="formTitle" |
|
|
|
append-to-body |
|
|
|
width="550px" |
|
|
|
width="680px" |
|
|
|
> |
|
|
|
<el-form ref="formCount" :inline="true" :model="formCount" size="mini"> |
|
|
|
<el-form |
|
|
|
ref="formCount" |
|
|
|
:inline="true" |
|
|
|
:rules="rules" |
|
|
|
:model="formCount" |
|
|
|
size="mini" |
|
|
|
> |
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="选择版本" required /> |
|
|
@ -357,55 +363,122 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="采购订单号" /> |
|
|
|
<el-form-item label="物料组(车型)" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="20" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item prop="purchaseOrderNo"> |
|
|
|
<el-input |
|
|
|
v-model="formCount.purchaseOrderNo" |
|
|
|
style="width: 188px; margin-right: 15px" |
|
|
|
maxlength="100" |
|
|
|
/> |
|
|
|
<el-form-item prop="materialGroupValue"> |
|
|
|
<el-select |
|
|
|
v-model="formCount.materialGroupValue" |
|
|
|
size="medium" |
|
|
|
filterable |
|
|
|
clearable |
|
|
|
style="width: 188px; margin-right: 15px" |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in materialGroupList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="厂内物料号" /> |
|
|
|
<el-form-item label="CP5时间:" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="20" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item prop="sapCode"> |
|
|
|
<el-input |
|
|
|
v-model="formCount.sapCode" |
|
|
|
style="width: 188px; margin-right: 15px" |
|
|
|
maxlength="100" |
|
|
|
/> |
|
|
|
<el-form-item> |
|
|
|
<el-date-picker |
|
|
|
v-model="datetime5" |
|
|
|
type="datetimerange" |
|
|
|
:picker-options="pickerOptionsCp5" |
|
|
|
range-separator="至" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
:default-time="['00:00:00', '23:59:59']" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="物料代码" /> |
|
|
|
<el-form-item label="CP7时间:" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="20" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item prop="matialCode"> |
|
|
|
<el-input |
|
|
|
v-model="formCount.matialCode" |
|
|
|
style="width: 188px; margin-right: 15px" |
|
|
|
maxlength="100" |
|
|
|
/> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item> |
|
|
|
<el-date-picker |
|
|
|
v-model="startTime" |
|
|
|
type="datetime" |
|
|
|
size="small" |
|
|
|
:picker-options="pickerOptions0" |
|
|
|
@change="getdateValue" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
default-time="00:00:00" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -40px"> |
|
|
|
<el-form-item> |
|
|
|
<el-date-picker |
|
|
|
v-model="endTime" |
|
|
|
type="datetime" |
|
|
|
:picker-options="pickerOptions1" |
|
|
|
size="small" |
|
|
|
@change="getdateVal" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
default-time="23:59:59" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="KEEN号" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formCount.kennCode" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="底盘号" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -95px"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formCount.chassisNumber" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="客户零件号" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formCount.materialCode" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="客户零件号" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -95px"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formCount.sapMaterialCode" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> --> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<!-- <el-button type="text" @click="dialogFormVisible = false" |
|
|
@ -434,22 +507,73 @@ const cityOptions = [ |
|
|
|
]; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "IssuedUnsettled", |
|
|
|
name: "SparePartReport", |
|
|
|
components: { Pagination, CRMTableHead }, |
|
|
|
directives: { permission }, |
|
|
|
|
|
|
|
data() { |
|
|
|
return { |
|
|
|
crmType: "backJob", |
|
|
|
rules: { |
|
|
|
versionValue: [ |
|
|
|
{ required: true, message: "必须输入!", trigger: "change" }, |
|
|
|
], |
|
|
|
}, |
|
|
|
pickerOptionsCp5: { |
|
|
|
disabledDate: (time) => { |
|
|
|
let now = new Date(); |
|
|
|
let monthEndDate = new Date(now.getFullYear(), now.getMonth() + 1, 0); |
|
|
|
let timeEnd = Date.parse(monthEndDate); |
|
|
|
if (timeEnd) { |
|
|
|
return ( |
|
|
|
time.getTime() > time.getTime() > timeEnd - 8.64e7 || |
|
|
|
time.getTime() > timeEnd + 60 * 60 * 24 * 1000 |
|
|
|
); //能选上最后一天 |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
pickerOptions0: { |
|
|
|
disabledDate: (time) => { |
|
|
|
//if (this.endTime != "") { |
|
|
|
//return time.getTime() >= new Date(this.endTime).getTime(); |
|
|
|
return time.getTime() > new Date(this.endTime).getTime(); |
|
|
|
//} |
|
|
|
}, |
|
|
|
}, |
|
|
|
pickerOptions1: { |
|
|
|
disabledDate: (time) => { |
|
|
|
//return time.getTime() <= new Date(this.startTime).getTime() || time.getTime() > Date.now(); |
|
|
|
return time.getTime() <= new Date(this.startTime).getTime(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
startTime: "", |
|
|
|
endTime: "", |
|
|
|
pickerOptionsCp7: { |
|
|
|
disabledDate: (time) => { |
|
|
|
let now = new Date(); |
|
|
|
let monthEndDate = new Date(now.getFullYear(), now.getMonth() + 1, 0); |
|
|
|
let timeEnd = Date.parse(monthEndDate); |
|
|
|
if (timeEnd) { |
|
|
|
return ( |
|
|
|
time.getTime() > time.getTime() > timeEnd - 8.64e7 || |
|
|
|
time.getTime() > timeEnd + 60 * 60 * 24 * 1000 |
|
|
|
); //能选上最后一天 |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
datetime5: [], |
|
|
|
datetime7: [], |
|
|
|
checkedCities: [0], |
|
|
|
cities: cityOptions, |
|
|
|
selectValue: "", |
|
|
|
selectNameValue: "", |
|
|
|
radio: "0", //结算状态:0未结 1部分结算 |
|
|
|
versionList: [], |
|
|
|
materialGroupList: [], |
|
|
|
// 是否显示详细弹出层 |
|
|
|
openView: false, |
|
|
|
versionValue: "", |
|
|
|
materialGroupValue: "", |
|
|
|
formTitle: "", |
|
|
|
timer: null, //定时器名称 |
|
|
|
//当前位置 |
|
|
@ -476,13 +600,14 @@ export default { |
|
|
|
form: {}, |
|
|
|
formCount: { |
|
|
|
name: "未结算对比", |
|
|
|
datetime5: "", |
|
|
|
datetime7: "", |
|
|
|
state: [0], |
|
|
|
purchaseOrderNo:"", |
|
|
|
sapCode:"", |
|
|
|
matialCode:"", |
|
|
|
|
|
|
|
// datetime5: [], |
|
|
|
// datetime7: [], |
|
|
|
settledate: "", |
|
|
|
materialCode: "", |
|
|
|
sapMaterialCode: "", |
|
|
|
chassisNumber: "", |
|
|
|
kennCode: "", |
|
|
|
version: "", |
|
|
|
}, |
|
|
|
list: null, |
|
|
|
totalCount: 0, |
|
|
@ -496,11 +621,15 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
listExportQuery: { |
|
|
|
//version: "", |
|
|
|
//customerCode: "TH", |
|
|
|
state: "", |
|
|
|
begin: "", |
|
|
|
end: "", |
|
|
|
version: "", |
|
|
|
materialCode: undefined, |
|
|
|
cp7begin: undefined, |
|
|
|
cp7end: undefined, |
|
|
|
kenncode: undefined, |
|
|
|
chassisNumber: undefined, |
|
|
|
materialGroup: undefined, |
|
|
|
begin: undefined, |
|
|
|
end: undefined, |
|
|
|
}, |
|
|
|
listQuery: { |
|
|
|
taskId: "", |
|
|
@ -538,10 +667,14 @@ export default { |
|
|
|
this.$once("hook:beforeDestroy", () => { |
|
|
|
clearInterval(timer); |
|
|
|
}); |
|
|
|
//this.disabledDateCp5(); |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getAllVersionList(); |
|
|
|
this.getMaterialGroup(); |
|
|
|
this.getList(); |
|
|
|
// this.getCurrentMonthFirst(); |
|
|
|
// this.getCurrentMonthLast(); |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
clearInterval(this.timer); |
|
|
@ -586,37 +719,36 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getdateValue(val) { |
|
|
|
this.startTime = val; |
|
|
|
this.getbalanceIndexData(); |
|
|
|
}, |
|
|
|
getdateVal(val) { |
|
|
|
this.endTime = val; |
|
|
|
this.getbalanceIndexData(); |
|
|
|
}, |
|
|
|
|
|
|
|
getCurrentMonthFirst() { |
|
|
|
var date = new Date(); |
|
|
|
date.setDate(1); |
|
|
|
var month = parseInt(date.getMonth() + 1); |
|
|
|
var day = date.getDate(); |
|
|
|
if (month < 10) month = "0" + month; |
|
|
|
if (day < 10) day = "0" + day; |
|
|
|
this.startTime = date.getFullYear() + "-" + month + "-" + day; |
|
|
|
}, |
|
|
|
getCurrentMonthLast() { |
|
|
|
var date = new Date(); |
|
|
|
var year = date.getFullYear(); |
|
|
|
var month = date.getMonth() + 1; |
|
|
|
month = month < 10 ? "0" + month : month; |
|
|
|
var day = new Date(year, month, 0); |
|
|
|
this.endTime = year + "-" + month + "-" + day.getDate(); |
|
|
|
}, |
|
|
|
handleCheckedCitiesChange(value) { |
|
|
|
alert(value); |
|
|
|
}, |
|
|
|
/* 导出功能 */ |
|
|
|
handleDownloadExport() { |
|
|
|
if (this.versionValue === "") { |
|
|
|
this.$message.error("请选择版本"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.listLoading = true; |
|
|
|
this.listExportQuery.version = this.version; |
|
|
|
console.log("导出条件:" + JSON.stringify(this.listExportQuery)); |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/ReportMakeService/SettlSparePartExport", |
|
|
|
this.listExportQuery |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
|
let taskid = res; |
|
|
|
if (Number.isInteger(taskid)) { |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "任务生成成功!任务号:" + taskid, |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} |
|
|
|
this.getList(); |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
getAllVersionList() { |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/CentralizedControl/openlist") |
|
|
@ -633,32 +765,79 @@ export default { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
checkedListChange(index) { |
|
|
|
if (this.formCount.state.length === 0) { |
|
|
|
this.formCount.state.push(this.cities[index].id); |
|
|
|
} |
|
|
|
//获取物料组车型 |
|
|
|
getMaterialGroup() { |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/CodeSetting/list", { |
|
|
|
project: "物料组", |
|
|
|
maxResultCount: 1000, |
|
|
|
skipCount: 0, |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
this.materialGroupList = []; |
|
|
|
response.items.forEach((element) => { |
|
|
|
let options = {}; |
|
|
|
options.value = element.description; |
|
|
|
options.label = element.description; |
|
|
|
this.materialGroupList.push(options); |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
/* 重置 */ |
|
|
|
resetForm(formName) { |
|
|
|
//this.formCount = {}; |
|
|
|
this.formCount.datetime5 = ""; |
|
|
|
this.formCount.datetime7 = ""; |
|
|
|
this.formCount.state = [0]; |
|
|
|
this.formCount = {}; |
|
|
|
this.datetime5 = []; |
|
|
|
this.startTime = ""; |
|
|
|
this.endTime = ""; |
|
|
|
// this.datetime7 = []; |
|
|
|
}, |
|
|
|
save() { |
|
|
|
this.$refs.formCount.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
console.log("参数:" + JSON.stringify(this.formCount)); |
|
|
|
this.formLoading = true; |
|
|
|
this.listExportQuery.version = this.formCount.versionValue; |
|
|
|
// this.listExportQuery.begin = this.formCount.datetime5[0]; |
|
|
|
// this.listExportQuery.end = this.formCount.datetime5[1]; |
|
|
|
// this.listExportQuery.state = this.formCount.state.join(','); |
|
|
|
|
|
|
|
console.log("导出条件:" + JSON.stringify(this.listExportQuery)); |
|
|
|
this.listExportQuery.version = this.formCount.versionValue; //版本 |
|
|
|
if (this.formCount.materialCode != "") { |
|
|
|
this.listExportQuery.materialCode = this.formCount.materialCode; //物料号 |
|
|
|
} |
|
|
|
// if (this.formCount.sapMaterialCode != "") { |
|
|
|
// this.listExportQuery.sapMaterialCode = this.formCount.sapMaterialCode; //厂内物料号 |
|
|
|
// } |
|
|
|
if (this.formCount.kennCode != "") { |
|
|
|
this.listExportQuery.kenncode = this.formCount.kennCode; //KEEN号 |
|
|
|
} |
|
|
|
var getdate5 = JSON.stringify(this.datetime5); |
|
|
|
if (getdate5 != "[]") { |
|
|
|
alert(this.datetime5[0]); |
|
|
|
this.listExportQuery.begin = this.datetime5 |
|
|
|
? this.datetime5[0] || undefined |
|
|
|
: undefined; |
|
|
|
this.listExportQuery.end = this.datetime5 |
|
|
|
? this.datetime5[1] || undefined |
|
|
|
: undefined; |
|
|
|
} |
|
|
|
if (this.startTime != "") { |
|
|
|
this.listExportQuery.cp7begin = this.startTime; //CP7开始时间 |
|
|
|
} |
|
|
|
if (this.endTime != "") { |
|
|
|
this.listExportQuery.cp7end = this.endTime; //CP5结束日期 |
|
|
|
} |
|
|
|
if (this.formCount.chassisNumber != "") { |
|
|
|
this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //底盘号 |
|
|
|
} |
|
|
|
if (this.formCount.materialGroupValue != "") { |
|
|
|
this.listExportQuery.materialGroup = |
|
|
|
this.formCount.materialGroupValue; //物料组车型 |
|
|
|
} |
|
|
|
console.log( |
|
|
|
"大众备件结算核对-导出条件:" + |
|
|
|
JSON.stringify(this.listExportQuery) |
|
|
|
); |
|
|
|
this.$axios |
|
|
|
.gets( |
|
|
|
"/api/settleaccount/ReportMakeService/SettlSparePartExport", |
|
|
|
"/api/settleaccount/ReportMakeService/SettleDoorPanel", |
|
|
|
this.listExportQuery |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
@ -803,7 +982,7 @@ export default { |
|
|
|
getList() { |
|
|
|
this.listLoading = true; |
|
|
|
//导入界面中超链接过来的参数 |
|
|
|
this.listQuery.name = "未结算对比"; |
|
|
|
this.listQuery.name = "大众准时化结算门板价格差异比对报表"; |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/Job/list", this.listQuery) |
|
|
|
.then((response) => { |
|
|
|