|
|
@ -5,6 +5,12 @@ |
|
|
|
<!-- 搜索 --> |
|
|
|
<div style="float: left"> |
|
|
|
<flexbox class="content-header"> |
|
|
|
<JobSelectVerson |
|
|
|
:options="JobVersionList" |
|
|
|
style="width: 150px; margin-left: -10px" |
|
|
|
class="search-container" |
|
|
|
@value-change="JobVersionValue" |
|
|
|
></JobSelectVerson> |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
size="mini" |
|
|
@ -13,6 +19,14 @@ |
|
|
|
@click="handleCreate" |
|
|
|
>统计 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
type="danger" |
|
|
|
icon="el-icon-delete" |
|
|
|
size="mini" |
|
|
|
@click="handleDelete()" |
|
|
|
>删除(支持批量)</el-button |
|
|
|
> |
|
|
|
</flexbox> |
|
|
|
</div> |
|
|
|
<!-- 刷新 --> |
|
|
@ -54,8 +68,10 @@ |
|
|
|
highlight-current-row |
|
|
|
style="width: 100%" |
|
|
|
@row-click="handleRowClick" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
@filter-change="filterChange" |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="44px"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item, index) in getDefaultField" |
|
|
|
:key="index" |
|
|
@ -372,9 +388,12 @@ |
|
|
|
<el-select |
|
|
|
v-model="formCount.materialGroupValue" |
|
|
|
size="medium" |
|
|
|
collapse-tags |
|
|
|
multiple |
|
|
|
filterable |
|
|
|
clearable |
|
|
|
style="width: 188px; margin-right: 15px" |
|
|
|
@change="valueChange" |
|
|
|
style="width: 350px; margin-right: 15px" |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option |
|
|
@ -388,7 +407,7 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row> |
|
|
|
<!-- <el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="CP5时间:" /> |
|
|
|
</el-col> |
|
|
@ -407,6 +426,39 @@ |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> --> |
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="CP5时间:" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item> |
|
|
|
<el-date-picker |
|
|
|
v-model="cp5startTime" |
|
|
|
:picker-options="pickerOptions2" |
|
|
|
type="datetime" |
|
|
|
size="small" |
|
|
|
@change="getdateValueCp5" |
|
|
|
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="cp5endTime" |
|
|
|
:picker-options="pickerOptions3" |
|
|
|
type="datetime" |
|
|
|
size="small" |
|
|
|
@change="getdateValCp5" |
|
|
|
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"> |
|
|
@ -448,7 +500,12 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item prop="kennCode"> |
|
|
|
<el-input v-model="formCount.kennCode" /> |
|
|
|
<el-input |
|
|
|
v-model="formCount.kennCode" |
|
|
|
:rows="5" |
|
|
|
type="textarea" |
|
|
|
placeholder="多个KEEN号,请以回车换行形式添加!" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
@ -456,7 +513,12 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -95px"> |
|
|
|
<el-form-item prop="chassisNumber"> |
|
|
|
<el-input v-model="formCount.chassisNumber" /> |
|
|
|
<el-input |
|
|
|
v-model="formCount.chassisNumber" |
|
|
|
:rows="5" |
|
|
|
type="textarea" |
|
|
|
placeholder="多个底盘号,请以回车换行形式添加!" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -465,19 +527,29 @@ |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="客户零件号" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="20" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-col :md="10" :xs="24" style="margin-left: -80px"> |
|
|
|
<el-form-item prop="materialCode"> |
|
|
|
<el-input v-model="formCount.materialCode" style="width:450px"/> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
v-model="formCount.materialCode" |
|
|
|
:rows="5" |
|
|
|
placeholder="多个客户零件号,请以回车换行形式添加!" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :md="4" :xs="24"> |
|
|
|
<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 prop="sapMaterialCode"> |
|
|
|
<el-input v-model="formCount.sapMaterialCode" /> |
|
|
|
<el-input |
|
|
|
v-model="formCount.sapMaterialCode" |
|
|
|
:rows="5" |
|
|
|
type="textarea" |
|
|
|
placeholder="多个厂内零件号,请以回车换行形式添加!" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> --> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
@ -499,16 +571,11 @@ import permission from "@/directive/permission/index.js"; |
|
|
|
import { downloadFile } from "@/utils/crmindex.js"; |
|
|
|
import CRMTableHead from "../../components/CRMTableHead"; |
|
|
|
import moment from "moment"; |
|
|
|
const cityOptions = [ |
|
|
|
{ id: 0, name: "未结" }, |
|
|
|
{ id: 1, name: "部分结算" }, |
|
|
|
{ id: 2, name: "已结" }, |
|
|
|
/* { id: 3, name: "预批量" }, */ |
|
|
|
]; |
|
|
|
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "UnInvoiceSettledDetailDiff", |
|
|
|
components: { Pagination, CRMTableHead }, |
|
|
|
components: { Pagination, CRMTableHead, JobSelectVerson }, |
|
|
|
directives: { permission }, |
|
|
|
|
|
|
|
data() { |
|
|
@ -519,6 +586,7 @@ export default { |
|
|
|
{ required: true, message: "必须输入!", trigger: "change" }, |
|
|
|
], |
|
|
|
}, |
|
|
|
getmaterialGroupValue: "", |
|
|
|
pickerOptionsCp5: { |
|
|
|
disabledDate: (time) => { |
|
|
|
let now = new Date(); |
|
|
@ -546,6 +614,19 @@ export default { |
|
|
|
return time.getTime() <= new Date(this.startTime).getTime(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
pickerOptions2: { |
|
|
|
disabledDate: (time) => { |
|
|
|
//if (this.endTime != "") { |
|
|
|
return time.getTime() > new Date(this.cp5endTime).getTime(); |
|
|
|
//} |
|
|
|
}, |
|
|
|
}, |
|
|
|
pickerOptions3: { |
|
|
|
disabledDate: (time) => { |
|
|
|
return time.getTime() <= new Date(this.cp5startTime).getTime(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// startTime: "", |
|
|
|
// endTime: "", |
|
|
|
pickerOptionsCp7: { |
|
|
@ -563,7 +644,7 @@ export default { |
|
|
|
}, |
|
|
|
datetime5: [], |
|
|
|
checkedCities: [0], |
|
|
|
cities: cityOptions, |
|
|
|
JobVersionList: [], |
|
|
|
selectValue: "", |
|
|
|
selectNameValue: "", |
|
|
|
radio: "0", //结算状态:0未结 1部分结算 |
|
|
@ -600,14 +681,15 @@ export default { |
|
|
|
formCount: { |
|
|
|
startTime: "", |
|
|
|
endTime: "", |
|
|
|
// name: "未结算对比", |
|
|
|
// settledate: "", |
|
|
|
// materialCode: "", |
|
|
|
// sapMaterialCode: "", |
|
|
|
// chassisNumber: "", |
|
|
|
// kennCode: "", |
|
|
|
// version: "", |
|
|
|
cp5startTime: "", |
|
|
|
cp5endTime: "", |
|
|
|
materialCode: "", |
|
|
|
sapMaterialCode: "", |
|
|
|
chassisNumber: "", |
|
|
|
kennCode: "", |
|
|
|
}, |
|
|
|
cp5startTime: "", |
|
|
|
cp5endTime: "", |
|
|
|
list: null, |
|
|
|
totalCount: 0, |
|
|
|
listLoading: true, |
|
|
@ -629,6 +711,7 @@ export default { |
|
|
|
materialGroup: undefined, |
|
|
|
begin: undefined, |
|
|
|
end: undefined, |
|
|
|
sapCode: undefined, |
|
|
|
}, |
|
|
|
listQuery: { |
|
|
|
taskId: "", |
|
|
@ -672,6 +755,7 @@ export default { |
|
|
|
this.getAllVersionList(); |
|
|
|
this.getMaterialGroup(); |
|
|
|
this.getList(); |
|
|
|
this.getJobVersionInfo(); |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
clearInterval(this.timer); |
|
|
@ -681,7 +765,11 @@ export default { |
|
|
|
/* 主表头 */ |
|
|
|
getDefaultField() { |
|
|
|
var tempsTabs = []; |
|
|
|
|
|
|
|
tempsTabs.push({ |
|
|
|
label: "版本号", |
|
|
|
prop: "type", |
|
|
|
width: 85, |
|
|
|
}); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "单据流水号", |
|
|
|
prop: "taskId", |
|
|
@ -702,10 +790,106 @@ export default { |
|
|
|
prop: "createdAt", |
|
|
|
width: 150, |
|
|
|
}); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "说明", |
|
|
|
prop: "remark", |
|
|
|
width: 220, |
|
|
|
}); |
|
|
|
return tempsTabs; |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleSelectionChange(val) { |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
//批量删除 |
|
|
|
handleDelete(row) { |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
|
this.$message({ |
|
|
|
message: "至少选择一行!", |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
|
params.push(row.id); |
|
|
|
myalert = row.name; |
|
|
|
} else { |
|
|
|
//多选 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
params.push(id); |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.$confirm("是否删除" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/Job/delete", params) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "删除成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
valueChange(data) { |
|
|
|
this.getmaterialGroupValue = ""; |
|
|
|
this.getmaterialGroupValue += data + ","; |
|
|
|
this.getmaterialGroupValue = this.getmaterialGroupValue.substring( |
|
|
|
0, |
|
|
|
this.getmaterialGroupValue.length - 1 |
|
|
|
); |
|
|
|
}, |
|
|
|
//版本下拉列表选择项 |
|
|
|
JobVersionValue(params) { |
|
|
|
//版本下拉选择 |
|
|
|
this.JobversionValue = params.value; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
getJobVersionInfo() { |
|
|
|
//取版本列表信息 |
|
|
|
//this.listLoading = true; |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * 1000; |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/Job/versionlist", this.listQuery) |
|
|
|
.then((response) => { |
|
|
|
this.JobVersionList = []; |
|
|
|
response.forEach((element) => { |
|
|
|
let options = {}; |
|
|
|
options.value = element; |
|
|
|
options.label = element; |
|
|
|
this.JobVersionList.push(options); |
|
|
|
}); |
|
|
|
if (JSON.stringify(this.JobVersionList) != "[]") { |
|
|
|
//因版本下拉有默认值,所以详表要自动绑定子表数据 |
|
|
|
this.JobversionValue = this.JobVersionList[0].value; |
|
|
|
this.JobversionValueVerson = this.JobVersionList[0].label; |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
//this.listLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
getdateValue(val) { |
|
|
|
this.startTime = val; |
|
|
|
this.getbalanceIndexData(); |
|
|
@ -715,6 +899,16 @@ export default { |
|
|
|
this.getbalanceIndexData(); |
|
|
|
}, |
|
|
|
|
|
|
|
//cp5 |
|
|
|
getdateValueCp5(val) { |
|
|
|
this.cp5startTime = val; |
|
|
|
this.getbalanceIndexData(); |
|
|
|
}, |
|
|
|
getdateValCp5(val) { |
|
|
|
this.cp5endTime = val; |
|
|
|
this.getbalanceIndexData(); |
|
|
|
}, |
|
|
|
|
|
|
|
getCurrentMonthFirst() { |
|
|
|
var date = new Date(); |
|
|
|
date.setDate(1); |
|
|
@ -765,7 +959,7 @@ export default { |
|
|
|
response.items.forEach((element) => { |
|
|
|
let options = {}; |
|
|
|
options.value = element.description; |
|
|
|
options.label = element.description; |
|
|
|
options.label = element.description + "/" + element.value; |
|
|
|
this.materialGroupList.push(options); |
|
|
|
}); |
|
|
|
}) |
|
|
@ -779,7 +973,21 @@ export default { |
|
|
|
this.datetime5 = []; |
|
|
|
this.startTime = ""; |
|
|
|
this.endTime = ""; |
|
|
|
this.cp5startTime = ""; |
|
|
|
this.cp5endTime = ""; |
|
|
|
}, |
|
|
|
// var getdate5 = JSON.stringify(this.datetime5); |
|
|
|
// if (getdate5 != "[]") { |
|
|
|
// this.listExportQuery.begin = this.datetime5 |
|
|
|
// ? this.datetime5[0] || undefined |
|
|
|
// : undefined; |
|
|
|
// this.listExportQuery.end = this.datetime5 |
|
|
|
// ? this.datetime5[1] || undefined |
|
|
|
// : undefined; |
|
|
|
// } else { |
|
|
|
// this.listExportQuery.begin = undefined; |
|
|
|
// this.listExportQuery.end = undefined; |
|
|
|
// } |
|
|
|
save() { |
|
|
|
this.$refs.formCount.validate((valid) => { |
|
|
|
if (valid) { |
|
|
@ -788,25 +996,19 @@ export default { |
|
|
|
if (this.formCount.materialCode != "") { |
|
|
|
this.listExportQuery.materialCode = this.formCount.materialCode; //物料号 |
|
|
|
} |
|
|
|
// if (this.formCount.sapMaterialCode != "") { |
|
|
|
// this.listExportQuery.sapMaterialCode = |
|
|
|
// this.formCount.sapMaterialCode; //厂内物料号 |
|
|
|
// } |
|
|
|
if (this.formCount.sapMaterialCode != "") { |
|
|
|
this.listExportQuery.sapCode = this.formCount.sapMaterialCode; //厂内物料号 |
|
|
|
} |
|
|
|
if (this.formCount.kennCode != "") { |
|
|
|
this.listExportQuery.kenncode = this.formCount.kennCode; //KEEN号 |
|
|
|
} |
|
|
|
var getdate5 = JSON.stringify(this.datetime5); |
|
|
|
if (getdate5 != "[]") { |
|
|
|
this.listExportQuery.begin = this.datetime5 |
|
|
|
? this.datetime5[0] || undefined |
|
|
|
: undefined; |
|
|
|
this.listExportQuery.end = this.datetime5 |
|
|
|
? this.datetime5[1] || undefined |
|
|
|
: undefined; |
|
|
|
} else { |
|
|
|
this.listExportQuery.begin = undefined; |
|
|
|
this.listExportQuery.end = undefined; |
|
|
|
} |
|
|
|
//cp5 |
|
|
|
this.listExportQuery.begin = this.cp5startTime |
|
|
|
? this.cp5startTime |
|
|
|
: undefined; |
|
|
|
this.listExportQuery.end = this.cp5endTime |
|
|
|
? this.cp5endTime |
|
|
|
: undefined; |
|
|
|
this.listExportQuery.cp7begin = this.startTime |
|
|
|
? this.startTime |
|
|
|
: undefined; |
|
|
@ -815,15 +1017,12 @@ export default { |
|
|
|
this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //底盘号 |
|
|
|
} |
|
|
|
if (this.formCount.materialGroupValue != "") { |
|
|
|
this.listExportQuery.materialGroup = |
|
|
|
this.formCount.materialGroupValue; //物料组车型 |
|
|
|
this.listExportQuery.materialGroup = this.getmaterialGroupValue; //物料组车型 |
|
|
|
} |
|
|
|
console.log( |
|
|
|
"准时化结算数量差异比对-导出条件:" + |
|
|
|
JSON.stringify(this.listExportQuery) |
|
|
|
); |
|
|
|
// this.formLoading = false; |
|
|
|
// this.dialogFormVisible = false; |
|
|
|
this.$axios |
|
|
|
.gets( |
|
|
|
"/api/settleaccount/ReportMakeService/UnInvoiceSettledDetailDiff-Make", |
|
|
@ -857,9 +1056,11 @@ export default { |
|
|
|
this.formTitle = "报表统计"; |
|
|
|
this.isEdit = false; |
|
|
|
this.form = {}; |
|
|
|
this.datetime5 = []; |
|
|
|
//this.datetime5 = []; |
|
|
|
this.startTime = ""; |
|
|
|
this.endTime = ""; |
|
|
|
this.cp5startTime = ""; |
|
|
|
this.cp5endTime = ""; |
|
|
|
this.dialogFormVisible = true; |
|
|
|
}, |
|
|
|
|
|
|
@ -975,7 +1176,8 @@ export default { |
|
|
|
getList() { |
|
|
|
this.listLoading = true; |
|
|
|
//导入界面中超链接过来的参数 |
|
|
|
this.listQuery.name = "大众结算未发运核对明细表"; |
|
|
|
this.listQuery.name = "大众准时化结算数量差异比对表"; |
|
|
|
this.listQuery.type = this.JobversionValue; |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/Job/list", this.listQuery) |
|
|
|
.then((response) => { |
|
|
|