Browse Source

1,带版本的界面进行排序,2,开发结算出库SAP接口界面

branch_ccpg_220107
44673626 3 years ago
parent
commit
7cf127217e
  1. 20
      vue/src/router/modules/wms_out_order.js
  2. 3
      vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue
  3. 3
      vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue
  4. 4
      vue/src/views/ux/billManage/KanbanUnSettled/index.vue
  5. 3
      vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue
  6. 3
      vue/src/views/ux/billManage/UnSettleDiffExport/index.vue
  7. 717
      vue/src/views/ux/billManage/WMSOutputSumReport/index.vue
  8. 3
      vue/src/views/ux/billManage/kanBanWithCode/index.vue
  9. 3
      vue/src/views/ux/billManage/sparePart/index.vue
  10. 3
      vue/src/views/ux/billManage/sparePart90/index.vue
  11. 3
      vue/src/views/ux/vw/dataInput/hq_h_sparepart/index.vue
  12. 6
      vue/src/views/ux/vw/dataInput/hq_y_report/index.vue
  13. 5
      vue/src/views/ux/vw/dataInput/r3-open/index.vue
  14. 45
      vue/static/tableFieldForSearch.json

20
vue/src/router/modules/wms_out_order.js

@ -37,16 +37,16 @@ const vwsOutOrderDataRouter = {
icon: '零件'
}
},
// {
// path: '/nonDeliveryList',
// component: () => import('@/views/ux/billManage/NonDeliveryList'),
// name: 'NonDeliveryList',//命名路由
// meta: {
// title: 'WMS未出库清单',
// roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
// icon: '零件'
// }
// },
{
path: '/wmsOutputSumReport',
component: () => import('@/views/ux/billManage/WMSOutputSumReport'),
name: 'WMSOutputSumReport',//命名路由
meta: {
title: '结算出库SAP接口',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '零件'
}
},

3
vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue

@ -1148,8 +1148,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

3
vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue

@ -641,8 +641,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

4
vue/src/views/ux/billManage/KanbanUnSettled/index.vue

@ -773,8 +773,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;
@ -1043,6 +1044,7 @@ export default {
this.listLoading = true;
//
this.listQuery.name = "看板未结明细";
this.listQuery.type = this.JobversionValue;
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)
.then((response) => {

3
vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue

@ -781,8 +781,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

3
vue/src/views/ux/billManage/UnSettleDiffExport/index.vue

@ -747,8 +747,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

717
vue/src/views/ux/billManage/WMSOutputSumReport/index.vue

@ -0,0 +1,717 @@
<!--结算出库到SAP功能-->
<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-upload2"
@click="handleImportExcel()"
>导入文件Excel
</el-button> -->
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-plus"
@click="handleCreate"
>生成出库数据
</el-button>
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-download"
@click="handleDownload()"
>导出Excel
</el-button>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照结算单号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-upload2"
@click="handleImportExcel()"
>同步到SAP
</el-button>
<!--表格头组件filter查询-->
<c-r-m-table-head
ref="crmTableHead"
:crm-type="crmType"
@handle="handleHandle"
@filter="handleFilters"
>
</c-r-m-table-head>
</flexbox>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading.fullscreen.lock="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="version"
sortable="custom"
align="center"
width="100px"
fixed
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.version" placement="top">
<span class="link-type">{{ scope.row.version }}</span>
</el-tooltip>
</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"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
<!--生成任务单渲染-->
<el-dialog
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
:title="formTitle"
append-to-body
width="680px"
>
<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 />
</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-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="过账日期" required />
</el-col>
<el-col :md="20" :xs="24">
<el-form-item prop="dataValue">
<el-date-picker
v-model="dataValue"
style="width: 188px"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <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
>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import importExcel from "@/components/ImportExcel-base";
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: "WMSOutputSumReport",
components: { Pagination, CRMTableHead, importExcel, JobSelectVerson },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "wmsOutputSumReport",
versionValue: "",
dataValue: "",
versionList: [], //
JobVersionList: [],
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
formCount: {
version: undefined,
accountDate: undefined,
},
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
logic: 0,
column: "Extend",
action: 0,
value: "not90",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
fileType: 0,
userId: "",
accountDate: undefined,
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 220,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
};
},
created() {
//
this.getAllVersionList();
this.getJobVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "行号", prop: "lineNumber", width: 100 });
tempsTabs.push({ label: "版本号", prop: "version", width: 150 });
tempsTabs.push({
label: "客户",
prop: "client",
width: 120,
});
tempsTabs.push({
label: "出库类型",
prop: "type",
width: 150,
});
tempsTabs.push({
label: "结算编码",
prop: "settleCode",
width: 150,
});
tempsTabs.push({ label: "销售渠道", prop: "saleCode", width: 120 });
tempsTabs.push({ label: "客户代码", prop: "clientCode", width: 120 });
tempsTabs.push({ label: "结算单", prop: "billNum", width: 150 });
tempsTabs.push({
label: "物料号",
prop: "materialCode",
width: 150,
});
tempsTabs.push({ label: "结算数量", prop: "qty", width: 150 });
tempsTabs.push({ label: "实际出库数量", prop: "outputQty", width: 180 });
tempsTabs.push({ label: "差异数量", prop: "diffQty", width: 120 });
tempsTabs.push({
label: "开票单价",
prop: "price",
width: 150,
});
tempsTabs.push({
label: "结算金额",
prop: "amt",
width: 120,
});
tempsTabs.push({ label: "已出库金额", prop: "outPutAmt", width: 150 });
tempsTabs.push({ label: "WMS待出库金额", prop: "diffAmt", width: 180 });
tempsTabs.push({
label: "物料组编码",
prop: "materialGroupCode",
width: 150,
});
tempsTabs.push({
label: "物料组(车型)",
prop: "materialGroup",
width: 150,
});
tempsTabs.push({ label: "物料组描述", prop: "materialDesc", width: 180 });
tempsTabs.push({ label: "备注", prop: "remark1", width: 220 });
tempsTabs.push({ label: "状态", prop: "state", width: 180 });
return tempsTabs;
},
},
methods: {
//
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.formTitle = "生成结算出库数据";
this.isEdit = false;
this.form = {};
this.dialogFormVisible = true;
},
save() {
this.$refs.formCount.validate((valid) => {
if (valid) {
this.formLoading = true;
if (this.versionValue === "" || this.dataValue == "") {
this.$message.error("必需选择版本和过账日期!");
this.formLoading = false;
return;
}
this.listExportQuery.version = this.versionValue; //
this.listExportQuery.accountDate = this.dataValue; //
console.log(
"生成出库数据-保存条件:" + JSON.stringify(this.listExportQuery)
);
this.$axios
.gets(
"/api/settleaccount/WMSOutputSumReport/Make",
this.listExportQuery
)
.then((res) => {
if (res == "Success") {
this.$notify({
title: "成功",
message: "数据生成成功!",
type: "success",
duration: 2000,
});
this.getList();
this.formLoading = false;
this.dialogFormVisible = false;
} else {
this.$message({
message: "数据生成失败!",
type: "warning",
});
}
})
.catch(() => {
this.formLoading = false;
this.dialogFormVisible = false;
});
}
});
},
//
async handleDownload() {
this.listLoading = true;
// if (this.versionValue === "") {
// this.$message.error("");
// this.listLoading = false;
// return;
// }
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("大众看板导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/WMSOutputSumReport/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectOptionsChange(item) {
this.getList();
},
// handleImportExcel() {
// //
// this.showExcelImport = true;
// this.$refs.importexcel.handleImportExcelClick();
// },
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
// if (column.property === "state") {
// return { 0: "", 2: "" }[row[column.property]];
// }
if (
column.property == "settleInputDate" ||
column.property == "settleDate"
) {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
importExcelData() {
//this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/WMSOutputSumReport/WmsDetailReport",
this.listQuery
)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "billNum";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = Filter;
this.getList();
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
// if (column.property === "qty") {
// return { textAlign: "right" };
// } else {
// return { textAlign: "left" };
// }
return { textAlign: "left" };
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
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 "../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>

3
vue/src/views/ux/billManage/kanBanWithCode/index.vue

@ -1106,8 +1106,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

3
vue/src/views/ux/billManage/sparePart/index.vue

@ -1057,8 +1057,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

3
vue/src/views/ux/billManage/sparePart90/index.vue

@ -934,8 +934,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

3
vue/src/views/ux/vw/dataInput/hq_h_sparepart/index.vue

@ -1038,8 +1038,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

6
vue/src/views/ux/vw/dataInput/hq_y_report/index.vue

@ -255,7 +255,6 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
@ -289,7 +288,6 @@
</el-col>
</el-row>
<el-collapse v-model="activeNames">
<el-collapse-item name="1">
<template slot="title">
@ -300,7 +298,6 @@
</template>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="结算物料号" />
</el-col>
@ -962,8 +959,9 @@ export default {
this.$axios
.posts("/api/settleaccount/Job/versionlist", this.listQuery)
.then((response) => {
let res = response.reverse(); //
this.JobVersionList = [];
response.forEach((element) => {
res.forEach((element, index) => {
let options = {};
options.value = element;
options.label = element;

5
vue/src/views/ux/vw/dataInput/r3-open/index.vue

@ -355,6 +355,11 @@ export default {
//this.listLoading = false;
});
},
handleImportExcel() {
//
this.showExcelImport = true;

45
vue/static/tableFieldForSearch.json

@ -2971,6 +2971,51 @@
}
]
},
"wmsOutputSumReport": {
"id": "36",
"data": [
{
"fieldId": 3,
"formType": "text",
"name": "客户",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "client",
"setting": []
},
{
"fieldId": 3,
"formType": "text",
"name": "出库类型",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "type",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "物料组(车型)",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialGroup",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "状态",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "state",
"setting": []
}
]
},
"hqMPlatform": {
"id": "36",
"data": [

Loading…
Cancel
Save