|
|
@ -1,20 +1,14 @@ |
|
|
|
<!--结算出库单,有条码--> |
|
|
|
<!--已结算出库查询--> |
|
|
|
<template> |
|
|
|
<div class="cr-body-content"> |
|
|
|
<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" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="handleCreate" |
|
|
|
>生成数据 |
|
|
|
>统计查询 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
@ -25,47 +19,6 @@ |
|
|
|
>导出Excel |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-select |
|
|
|
v-model="selectClient" |
|
|
|
clearable |
|
|
|
@change="SelectClient" |
|
|
|
placeholder="客户" |
|
|
|
style="width: 100px; margin-left: 8px" |
|
|
|
> |
|
|
|
<el-option label="大众" value="大众"></el-option> |
|
|
|
<el-option label="红旗" value="红旗"></el-option> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
<el-select |
|
|
|
v-model="selectType" |
|
|
|
clearable |
|
|
|
@change="SelectType" |
|
|
|
placeholder="请选择" |
|
|
|
style="width: 200px; margin-left: 8px" |
|
|
|
> |
|
|
|
<el-option label="大众准时化出库" value="大众准时化出库"></el-option> |
|
|
|
<el-option label="大众看板出库" value="大众看板出库"></el-option> |
|
|
|
<el-option |
|
|
|
label="大众备件条码出库" |
|
|
|
value="大众备件条码出库" |
|
|
|
></el-option> |
|
|
|
<el-option label="红旗看板出库" value="红旗看板出库"></el-option> |
|
|
|
<el-option label="大众无看板出库" value="大众无看板出库"></el-option> |
|
|
|
<el-option |
|
|
|
label="大众备件汇总出库" |
|
|
|
value="大众备件汇总出库" |
|
|
|
></el-option> |
|
|
|
<el-option |
|
|
|
label="红旗一轿手工出库" |
|
|
|
value="红旗一轿手工出库" |
|
|
|
></el-option> |
|
|
|
<el-option |
|
|
|
label="红旗一轿手工出库(备件)" |
|
|
|
value="红旗一轿手工出库(备件)" |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
|
|
<el-input |
|
|
|
v-model="searchContent" |
|
|
|
clearable |
|
|
@ -95,7 +48,7 @@ |
|
|
|
<!--表格渲染--> |
|
|
|
<el-table |
|
|
|
ref="multipleTable" |
|
|
|
v-loading.fullscreen.lock="listLoading" |
|
|
|
v-loading="listLoading" |
|
|
|
element-loading-text="拼命加载中..." |
|
|
|
element-loading-spinner="el-icon-loading" |
|
|
|
class="cr-table" |
|
|
@ -113,7 +66,7 @@ |
|
|
|
@row-click="handleRowClick" |
|
|
|
> |
|
|
|
<!-- <el-table-column type="selection" width="44px"></el-table-column> --> |
|
|
|
<el-table-column |
|
|
|
<!-- <el-table-column |
|
|
|
label="版本" |
|
|
|
prop="version" |
|
|
|
sortable="custom" |
|
|
@ -126,7 +79,7 @@ |
|
|
|
<span class="link-type">{{ scope.row.version }}</span> |
|
|
|
</el-tooltip> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column |
|
|
|
v-for="(item, index) in getDefaultField" |
|
|
|
:key="index" |
|
|
@ -178,24 +131,33 @@ |
|
|
|
> |
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="选择版本" required /> |
|
|
|
<el-form-item label="通用代码号" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="20" :xs="24" style="margin-left: -35px"> |
|
|
|
<el-form-item prop="sapCode"> |
|
|
|
<el-input |
|
|
|
v-model="formCount.cnumber" |
|
|
|
style="width: 450px" |
|
|
|
type="textarea" |
|
|
|
:rows="4" |
|
|
|
placeholder="必填!多个通用代码号,请以回车换行形式添加!" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :md="4" :xs="24"> |
|
|
|
<el-form-item label="厂内零件号" /> |
|
|
|
</el-col> |
|
|
|
<el-col :md="20" :xs="24"> |
|
|
|
<el-form-item prop="versionValue"> |
|
|
|
<el-select |
|
|
|
v-model="versionValue" |
|
|
|
size="medium" |
|
|
|
clearable |
|
|
|
style="width: 188px; margin-right: 15px" |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in versionList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
<el-col :md="20" :xs="24" style="margin-left: -35px"> |
|
|
|
<el-form-item prop="sapCode"> |
|
|
|
<el-input |
|
|
|
v-model="formCount.materialCode" |
|
|
|
style="width: 450px" |
|
|
|
type="textarea" |
|
|
|
:rows="4" |
|
|
|
placeholder="选填!多个厂内零件号,请以回车换行形式添加!" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -204,7 +166,6 @@ |
|
|
|
<el-button type="text" @click="dialogFormVisible = false" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
<!-- <el-button @click="resetForm('formCount')">重置</el-button> --> |
|
|
|
<el-button v-loading="formLoading" type="primary" @click="save" |
|
|
|
>确认</el-button |
|
|
|
> |
|
|
@ -221,11 +182,10 @@ import CRMTableHead from "../../components/CRMTableHead"; |
|
|
|
import moment from "moment"; |
|
|
|
import Lockr from "lockr"; |
|
|
|
import { downloadFile } from "@/utils/crmindex.js"; |
|
|
|
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "WMSOutputDetailWithCodeReport", |
|
|
|
components: { Pagination, CRMTableHead, importExcel, JobSelectVerson }, |
|
|
|
components: { Pagination, CRMTableHead, importExcel }, |
|
|
|
directives: { permission }, |
|
|
|
filters: { |
|
|
|
IsCustomerSignFilter(status) { |
|
|
@ -251,8 +211,6 @@ export default { |
|
|
|
versionValue: "", |
|
|
|
dataValue: "", |
|
|
|
versionList: [], //版本列表 |
|
|
|
selectType: "", //出库类型 |
|
|
|
JobVersionList: [], |
|
|
|
rules: { |
|
|
|
//前端定义的规则,后端也有验证 |
|
|
|
erpMaterialCode: [ |
|
|
@ -268,15 +226,14 @@ export default { |
|
|
|
customerId: "", |
|
|
|
projectId: "", |
|
|
|
}, |
|
|
|
JobversionValue: "", |
|
|
|
JobversionValueVerson: "", |
|
|
|
list: null, |
|
|
|
totalCount: 0, |
|
|
|
listLoading: true, |
|
|
|
formLoading: false, |
|
|
|
formCount: { |
|
|
|
version: undefined, |
|
|
|
accountDate: undefined, |
|
|
|
cnumber: undefined, |
|
|
|
materialCode: undefined, |
|
|
|
}, |
|
|
|
// 高级搜索 |
|
|
|
filterObj: { |
|
|
@ -306,7 +263,6 @@ export default { |
|
|
|
client: undefined, |
|
|
|
type: undefined, |
|
|
|
}, |
|
|
|
selectClient: "", |
|
|
|
listExportQuery: { |
|
|
|
Filters: [ |
|
|
|
{ |
|
|
@ -342,12 +298,7 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
//生成出库单时选择版本,从期间管理获得 |
|
|
|
this.getAllVersionList(); |
|
|
|
this.getJobVersionInfo(); |
|
|
|
if (this.versionList == []) { |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
/** 列表字段 */ |
|
|
@ -413,103 +364,33 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
SelectType(params) { |
|
|
|
this.listQuery.type = params; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
SelectClient(params) { |
|
|
|
this.listQuery.client = params; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
//版本下拉列表选择项 |
|
|
|
JobVersionValue(params) { |
|
|
|
//版本下拉选择 |
|
|
|
this.JobversionValue = params.value; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
//从期间管理中获取版本数据,生成结算出库用 |
|
|
|
getAllVersionList() { |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/CentralizedControl/openlist") |
|
|
|
.then((response) => { |
|
|
|
this.versionList = []; |
|
|
|
response.forEach((element) => { |
|
|
|
let options = {}; |
|
|
|
options.value = element.version; |
|
|
|
options.label = element.version; |
|
|
|
this.versionList.push(options); |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
//取业务版本列表信息 |
|
|
|
getJobVersionInfo() { |
|
|
|
//this.listLoading = true; |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * 1000; |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/Job/versionlist", this.listQuery) |
|
|
|
.then((response) => { |
|
|
|
let res = response.reverse(); //降序排列 |
|
|
|
this.JobVersionList = []; |
|
|
|
res.forEach((element, index) => { |
|
|
|
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; |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleCreate() { |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs["formCount"].resetFields(); |
|
|
|
// }); |
|
|
|
this.JobversionValue = ""; |
|
|
|
this.formTitle = "生成数据"; |
|
|
|
if (this.$refs["formCount"] !== undefined) { |
|
|
|
this.$refs["formCount"].resetFields(); |
|
|
|
} |
|
|
|
this.formCount = {}; |
|
|
|
this.formTitle = "统计数据"; |
|
|
|
this.isEdit = false; |
|
|
|
this.form = {}; |
|
|
|
this.dialogFormVisible = true; |
|
|
|
}, |
|
|
|
|
|
|
|
handleImportSap() { |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs["formCount"].resetFields(); |
|
|
|
// }); |
|
|
|
this.dataValue = ""; |
|
|
|
this.formTitle = "同步"; |
|
|
|
this.isEdit = false; |
|
|
|
this.form = {}; |
|
|
|
this.dialogAccounDateVisible = true; |
|
|
|
}, |
|
|
|
//生成出库单数据 |
|
|
|
//统计生成已出库查询 |
|
|
|
save() { |
|
|
|
this.$refs.formCount.validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.formLoading = true; |
|
|
|
if (this.versionValue === "") { |
|
|
|
this.$message.error("必需选择版本!"); |
|
|
|
if (this.formCount.cnumber === "") { |
|
|
|
this.$message.error("通用代码必须填写!"); |
|
|
|
this.formLoading = false; |
|
|
|
return; |
|
|
|
} |
|
|
|
this.listExportQuery.version = this.versionValue; //版本 |
|
|
|
//this.listExportQuery.accountDate = this.dataValue; //过账日期 |
|
|
|
console.log( |
|
|
|
"生成出库数据-保存条件:" + JSON.stringify(this.listExportQuery) |
|
|
|
"统计生成已出库数据-保存条件:" + JSON.stringify(this.formCount) |
|
|
|
); |
|
|
|
this.$axios |
|
|
|
.gets( |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/WMSOutputDetailWithCodeReport/Make", |
|
|
|
this.listExportQuery |
|
|
|
this.formCount |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
|
if (res == "Success") { |
|
|
@ -539,7 +420,7 @@ export default { |
|
|
|
|
|
|
|
//导出功能 |
|
|
|
async handleDownload() { |
|
|
|
this.listLoading = true; |
|
|
|
//this.listLoading = true; |
|
|
|
// if (this.versionValue === "") { |
|
|
|
// this.$message.error("必需选择版本!"); |
|
|
|
// this.listLoading = false; |
|
|
@ -633,15 +514,13 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
getList(data) { |
|
|
|
this.listLoading = true; |
|
|
|
//this.listLoading = true; |
|
|
|
if (data != undefined) { |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * data.limit; |
|
|
|
} else { |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * 15; |
|
|
|
} |
|
|
|
if (this.JobversionValue != "") { |
|
|
|
this.listQuery.version = this.JobversionValue; |
|
|
|
} |
|
|
|
|
|
|
|
console.log("列表查询条件:" + JSON.stringify(this.listQuery)); |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|