Browse Source

新界面:结算汇总出库接口

branch_ccpg_220107
44673626 3 years ago
parent
commit
a51245c42d
  1. 1
      vue/package.json
  2. 2
      vue/src/components/ImportExcel-base/index.vue
  3. 784
      vue/src/components/ImportExcel-wms/index.vue
  4. 10
      vue/src/router/modules/wms_out_order.js
  5. 461
      vue/src/views/ux/billManage/ErpSumOutput/detail.vue
  6. 451
      vue/src/views/ux/billManage/ErpSumOutput/index.vue
  7. 4
      vue/src/views/ux/billManage/FisUpdateExport/index.vue

1
vue/package.json

@ -52,6 +52,7 @@
"driver.js": "0.9.5", "driver.js": "0.9.5",
"dropzone": "5.5.1", "dropzone": "5.5.1",
"echarts": "4.2.1", "echarts": "4.2.1",
"el-table-infinite-scroll": "^1.0.10",
"el-table-transfer": "^0.1.4", "el-table-transfer": "^0.1.4",
"element-ui": "2.13.0", "element-ui": "2.13.0",
"file-saver": "2.0.1", "file-saver": "2.0.1",

2
vue/src/components/ImportExcel-base/index.vue

@ -338,6 +338,7 @@ export default {
Wms_HqKB_Output: "红旗数据调整", Wms_HqKB_Output: "红旗数据调整",
Wms_onetimesale_Output: "一次性寄售销售", Wms_onetimesale_Output: "一次性寄售销售",
wmsOutputSum: "WMS未结出库单", wmsOutputSum: "WMS未结出库单",
}[this.crmType] || "" }[this.crmType] || ""
); );
}, },
@ -399,6 +400,7 @@ export default {
Wms_onetimesale_Output: Wms_onetimesale_Output:
"/api/settleaccount/WmsOneTimeSaleOutput/ExcelImport", // "/api/settleaccount/WmsOneTimeSaleOutput/ExcelImport", //
wmsOutputSum: "/api/settleaccount/WmsOneTimeSaleOutput/ExcelImport", //WMS wmsOutputSum: "/api/settleaccount/WmsOneTimeSaleOutput/ExcelImport", //WMS
//HQ_Y_CHECKOUT: "/api/settleaccount//ExcelImport", //轿 //HQ_Y_CHECKOUT: "/api/settleaccount//ExcelImport", //轿
}[this.crmType] || "" }[this.crmType] || ""
); );

784
vue/src/components/ImportExcel-wms/index.vue

@ -0,0 +1,784 @@
<template>
<el-dialog
:visible="show"
:title="'导入' + crmTypeName"
:append-to-body="true"
:close-on-click-modal="false"
width="600px"
@close="closeView"
>
<el-tabs
v-model="activeName"
:class="stepsActive == 1 ? '' : 'el-tabs__active-go'"
@tab-click="handleClick"
>
<el-tab-pane
label="①文件上传"
name="first"
:disabled="stepsActive == 2 ? true : false"
>
<div class="dialog-body">
<div v-if="stepsActive == 1" class="step-section">
<div class="sections">
<div class="sections__title" v-loading="loading">
导入说明
<div class="sections__tips">
1提供的导入模板需要.xlsx文件格式不支持.xls文件即不支持Excel97-2003!
</div>
<div class="sections__tips">
2模板名称可以进行修改但不要删除模板中设置的字段
</div>
<div class="sections__tips">
3导入文件大小请勿超过100MB且目前只支持单个Sheet页签
</div>
</div>
</div>
<div class="sections">
<div class="sections__title">
导入条件设置没有则不用设置
</div>
<div class="sections__tips">
<span class="demonstration">选择版本</span>
<el-select
v-model="versionValue"
clearable
:disabled="isEditFactory"
style="width: 188px"
placeholder="请选择"
>
<el-option
v-for="item in factoryList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<span class="demonstration">过账日期</span>
<el-date-picker
v-model="dataValue"
style="width: 188px"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
/>
</div>
</div>
<div class="sections">
<div class="sections__title">请选择需要导入的文件</div>
<div class="content">
<flexbox class="file-select">
<el-upload
ref="upload"
class="avatar-uploader"
drag
action="#"
:http-request="httpRequestfiles"
:headers="httpHeader"
:file-list="fileuploadList"
:before-upload="beforeAvatarUpload"
:before-remove="beforeRemove"
:on-remove="handleRemove"
multiple
:limit="10"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处
<em>点击上传</em>
</div>
</el-upload>
</flexbox>
</div>
</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane
label="②导入数据"
name="second"
:disabled="stepsActive == 2 ? false : true"
>
<div
v-loading="loading"
v-if="stepsActive == 2"
element-loading-text="导入中"
element-loading-spinner="el-icon-loading"
class="step-section"
/>
<div
v-loading="loading"
v-else-if="stepsActive == 3"
class="step-section"
>
<div class="result-info">
<el-card style="height: 300px; margin-top: -20px" shadow="always">
<i class="el-icon-error" />
<p class="result-info__detail">
<span class="result-info__detail--all"
>{{ this.resultData.successMessage }}
</span>
<el-button
v-if="this.resultData && this.resultData.errSize > 0"
class="result-info__btn--err"
type="text"
@click="downloadErrData"
>下载错误数据</el-button
>
</p>
</el-card>
</div>
</div>
<div v-loading="loading" v-if="stepsActive == 4" class="step-section">
<div class="result-info">
<el-card style="height: 300px" shadow="always">
<i class="el-icon-success" />
<p class="result-info__detail">
<span class="result-info__detail--all"
>{{ this.resultData.successMessage }}
</span>
</p>
<!-- <p class="result-info__des">数据导入结果</p>
<p class="result-info__detail">
导入成功数据
<span class="result-info__detail--all"
>{{ this.resultData.totalSize }} </span
>条有效数据
</p> -->
</el-card>
</div>
</div>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-popover
v-model="historyPopoverShow"
placement="top"
width="800"
popper-class="no-padding-popover"
trigger="click"
>
</el-popover>
<!-- <el-button @click="closeView">取消</el-button> -->
<el-button :class="{ 'is-hidden': !showCancel }" @click="closeView"
>取消</el-button
>
<el-button v-if="sureTitle" type="primary" @click="sureClick">{{
sureTitle
}}</el-button>
</span>
</el-dialog>
</template>
<script>
import { downloadFile } from "@/utils/crmindex.js";
import { getToken } from "@/utils/auth"; // get token from cookie
export default {
name: "CRMImport", //
props: {
show: {
type: Boolean,
default: false,
},
// CRM
crmType: {
type: String,
default: "",
},
},
data() {
return {
options: [
{
value: "3",
label: "新增",
},
{
value: "0",
label: "修改",
},
],
loading: false,
dataValue: "",
fieldList: [],
factoryList: [], //
YearMonthValue: "", //
yearMonthList: [], //
versionValue: "",
stateValue: "",
config: 1, // 1 2
/** 编辑控制 */
isEditFactory: false, //
isEditYearMont: false, //
isState: true, //
//file: { name: "" },
stepsActive: 1,
stepList: [
{
icon: "wk wk-upload",
title: "上传文件",
status: "wait",
},
{
icon: "wk wk-data-import",
title: "导入数据",
status: "wait",
},
{
icon: "wk wk-success",
title: "导入完成",
status: "wait",
},
],
//resultData: null,
resultData: {
totalSize: 0,
errSize: 0,
errTemplate: "",
errMessage: "",
successMessage: "",
},
processData: {
count: 0,
status: "",
},
messageId: null,
intervalTimer: null,
fileuploadList: [],
isLt2M: "",
isFileType: "",
historyPopoverShow: false,
yeareVale: "",
monthVale: "",
page: 1,
listQuery: {
Filters: [
{
logic: 0,
column: "project",
action: 0,
value: "factory",
}, //
],
SkipCount: 0,
MaxResultCount: 1000,
},
listQueryCustom: {
Filters: [
{
logic: 0,
column: "customerCode",
action: 0,
value: "U22000",
}, //
],
SkipCount: 0,
MaxResultCount: 1000,
},
activeName: "first",
};
},
computed: {
sureTitle() {
return {
1: "立即导入",
// 2: "...",
// 3: "",
// 4: "",
}[this.stepsActive];
},
showCancel() {
return this.stepsActive == 1;
},
getMoudleDisable() {
if (this.crmType == "prebatch") {
//
this.isEditYearMont = true;
this.isEditFactory = true;
this.isState = false;
} else {
this.isEditYearMont = false;
this.isEditFactory = false;
}
},
crmTypeName() {
return (
{
erpSumOutput: "结算汇总出库",
}[this.crmType] || ""
);
},
getWebApi() {
return (
{
erpSumOutput: "/api/settleaccount/WmsOutputSumInterface/ExcelImport", //
}[this.crmType] || ""
);
},
getImportTemplate() {
//
return (
{
settlementCrossReference: "结算件对照关系.xlsx",
}[this.crmType] || ""
);
},
httpHeader() {
//token
return {
Authorization: "Bearer " + getToken(),
};
},
},
watch: {
show: function (val) {
this.stepsActive = 1;
this.getAllYearMonth(); //
this.getMoudleDisable(); //
if (val) {
this.stepsActive = 1;
} else {
if (this.stepsActive == 3) {
//
this.stepsActive = 1;
this.stepList = [
{
icon: "wk wk-upload",
title: "上传文件",
status: "wait",
},
{
icon: "wk wk-data-import",
title: "导入数据",
status: "wait",
},
{
icon: "wk wk-success",
title: "导入完成",
status: "wait",
},
];
this.resultData = null;
}
}
},
stepsActive() {
this.$emit(
"status",
{
1: "wait",
2: "process",
3: "finish",
}[this.stepsActive]
);
},
},
mounted() {},
methods: {
getAllYearMonth() {
this.$axios
.posts("/api/settleaccount/CentralizedControl/openlist")
.then((response) => {
this.factoryList = [];
response.forEach((element) => {
let options = {};
options.value = element.version;
options.label = element.version;
this.factoryList.push(options);
});
})
.catch(() => {
this.listLoading = false;
});
},
handleImportExcelClick() {
//
this.fileuploadList = [];
//this.$refs.upload.clearFiles();
},
httpRequestfiles(data) {
let _this = this;
let rd = new FileReader(); //
let file = data.file;
this.fileuploadList.push(file);
rd.readAsDataURL(file); // base64
},
beforeAvatarUpload(file) {
var FileExt = file.name.replace(/.+\./, "");
// if (["xlsx"].indexOf(FileExt.toLowerCase()) === -1) {
// this.$message({
// type: "warning",
// message: "xlsx",
// });
// this.isFileType = "0";
// return false;
// } else {
// this.isFileType = "1";
// }
if (
["xlsx"].indexOf(FileExt.toLowerCase()) === 0 ||
["csv"].indexOf(FileExt.toLowerCase()) === 0
) {
this.isFileType = "1";
} else {
this.$message({
type: "warning",
message: "只支持xlsx类型文件!",
});
this.isFileType = "0";
return false;
}
this.isLt2M = file.size / 1024 / 1024 < 100 ? "1" : "0";
if (this.isLt2M === "0") {
this.$message.error("上传文件大小不能超过 100MB!");
}
return this.isLt2M === "1" ? true : false;
},
beforeRemove(file, fileList) {
if (this.isLt2M === "1" && this.isFileType === "1") {
return this.$confirm(`确定移除 ${file.name}`);
}
},
handleRemove(file, fileList) {
//
const index = this.fileuploadList.indexOf(file.originFileObj);
const newFileList = this.fileuploadList.slice();
newFileList.splice(index, 1);
this.fileuploadList = newFileList;
},
//
sureClick() {
if (this.versionValue !== "" && this.dataValue !== "") {
if (
this.fileuploadList === [] ||
JSON.stringify(this.fileuploadList) === "[]"
) {
this.$message.error("请选择导入文件");
return false;
}
if (this.stepsActive == 1) {
if (this.stepList[0].status == "wait") {
this.stepsActive = 2;
this.saveTemplateData();
this.activeName = "second";
console.log(this.crmTypeName);
if (this.stepList[1].status == "finish") {
}
} else {
if (this.fileuploadList === "[]") {
this.$message.error("请选择导入文件");
}
}
} else {
this.closeView();
}
} else {
this.$message.error("版本、过账日期不能空!");
return false;
}
},
saveTemplateData() {
this.loading = true;
//
//--
if (JSON.stringify(this.fileuploadList) != "[]") {
let fd = new FormData();
const { fileuploadList } = this;
fileuploadList.forEach((file) => {
fd.append("files", file); //
});
fd.append("branchId", "3FA85F64-5717-4562-B3FC-2C963F66AFA6");
fd.append("year", "2021");
fd.append("period", "03");
fd.append("customerCode", "03");
fd.append("accountDate", this.dataValue);
fd.append("version", this.versionValue);
const webapi = this.getWebApi;
this.$axios
.posts(webapi, fd)
.then(async (res) => {
console.log("大众导入条件:" + JSON.stringify(res));
if (res === "Success") {
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;
}
console.log(this.stepsActive);
this.$emit("status", "finish");
// this.$nextTick(() => {
// this.loading = false;
// });
this.loading = false;
})
.catch(() => {
this.stepList[1].status = "finish";
this.resultData.errSize = 0;
this.resultData.successMessage = "导入模板有错误,请检查!";
this.stepsActive = 3;
this.loading = false;
});
} else {
this.loading = false;
this.$message({
message: "未上传任何附件,请查检!",
type: "warning",
});
}
},
/**
* 下载错误模板
*/
downloadErrData() {
let fileNameOfProject = this.resultData.errTemplate;
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;
})
.catch((error) => {
this.listLoading = false;
});
},
//
closeView() {
this.$emit("update:show", false);
this.$emit("close", this.stepsActive == 3 ? "finish" : "");
this.activeName = "first";
},
handleClick(tab) {
// console.log(tab.index)
// console.log(tab.name)
if (tab.name == "first") {
// console.log(tab.name)
this.fileuploadList = [];
this.stepsActive = 1;
}
},
},
};
</script>
<style scoped lang="scss">
@import "@/styles/xr-theme.scss";
/deep/.el-dialog {
margin-top: 9vh !important;
}
/deep/.el-dialog__body {
padding: 20px 20px;
}
//TabsFlex
/deep/.el-tabs__nav {
width: 100%;
display: flex;
align-items: center;
justify-content: space-around;
}
//el-tab-pane线
/deep/.el-tabs__nav-wrap::after {
height: 0 !important;
}
//Tabsel-tab-pane线
/deep/.el-tabs__active-bar {
left: 90px;
width: 90px !important;
}
//Tabsel-tab-pane线
/deep/ .el-tabs__active-go {
.el-tabs__active-bar {
transform: translateX(297px) !important;
}
}
/deep/.el-tabs__item {
padding: 0 20px;
}
.el-steps {
margin-bottom: 15px;
/deep/ .el-step__title {
font-size: 14px;
}
/deep/ .el-step.is-simple .el-step__arrow::before,
/deep/ .el-step.is-simple .el-step__arrow::after {
height: 10px;
width: 2px;
}
/deep/ .el-step.is-simple .el-step__arrow::after {
transform: rotate(45deg) translateY(3px);
}
/deep/ .el-step.is-simple .el-step__arrow::before {
transform: rotate(-45deg) translateY(-2px);
}
}
.step-section {
min-height: 250px;
/deep/ .el-loading-spinner {
top: 45%;
.el-icon-loading {
font-size: 40px;
color: #999;
}
.el-loading-text {
color: #333;
}
}
}
.sections {
font-size: 14px;
color: #333;
&__title {
font-weight: 600;
}
&__tips {
padding-left: 30px;
margin: 8px 0 15px;
color: #999;
font-size: 12px;
line-height: 1.4;
}
.download {
cursor: pointer;
color: #2362fb;
}
}
.sections__tips + .content {
padding-top: 0;
}
.content {
padding: 10px 10px 10px 30px;
.el-select {
width: 400px;
}
.user-cell {
width: 400px;
}
}
#importInputFile {
display: none;
}
.file-select {
.el-input {
width: 400px;
}
button {
margin-left: 20px;
}
}
.is-hidden {
visibility: hidden;
}
.history-btn {
float: left;
margin-left: 15px;
}
//
.result-info {
text-align: center;
.el-card {
border: none;
height: 250px !important;
}
/deep/.el-card__body {
padding: 60px 20px 20px 20px;
}
i {
font-size: 60px;
}
// icon
.el-icon-error {
color: red;
}
//icon
.el-icon-success {
color: chartreuse;
}
&__des {
margin-top: -15px;
color: #333;
font-size: 30px;
}
&__detail {
margin-top: 25px;
font-size: 20px;
color: #666;
&--all {
color: #333;
font-weight: 600;
}
&--suc {
color: $xr-color-primary;
font-weight: 600;
}
&--err {
margin-top: 25px;
color: #f94e4e;
font-weight: 600;
}
}
&__btn--err {
margin-top: 10px;
font-size: 20px;
}
}
</style>

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

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

461
vue/src/views/ux/billManage/ErpSumOutput/detail.vue

@ -0,0 +1,461 @@
<!--结算汇总出库接口-明细数据-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<el-input
v-model="listOutPutQuery.billnum"
clearable
size="small"
placeholder="输入结算单号..."
style="width: 230px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-input
v-model="listOutPutQuery.materialCode"
clearable
size="small"
placeholder="输入物料号..."
style="width: 230px"
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="info"
icon="el-icon-download"
@click="handleDownload()"
>全部导出
</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="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%"
v-el-table-infinite-scroll="load"
infinite-scroll-disabled="disabled"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
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 JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
//table
import elTableInfiniteScroll from "el-table-infinite-scroll";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, CRMTableHead, CRMTableHead, JobSelectVerson },
directives: { permission, "el-table-infinite-scroll": elTableInfiniteScroll },
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "kanbanOutOrder",
searchContent: "", //
customerInfo: {
parentId: "",
},
pageObj: {
nowPage: 0, //
pageSize: 10, //
},
disabled: false,
list: [],
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
Filters: [
{
logic: 0,
column: "state",
action: 0,
value: "0",
}, //
],
SkipCount: 0,
MaxResultCount: 15,
billNum: "",
},
listOutPutQuery: {
taskid: "",
materialCode: undefined,
billnum: undefined,
},
listExportQuery: {
taskid: "",
materialCode: undefined,
billnum: undefined,
},
page: 1,
JobversionValue: "",
JobversionValueVerson: "",
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 170,
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: "posnr",
width: 110,
});
tempsTabs.push({
label: "结算单号",
prop: "zvbeln",
width: 180,
});
tempsTabs.push({ label: "售达方", prop: "kunnr", width: 120 });
tempsTabs.push({ label: "物料组", prop: "augru", width: 220 });
tempsTabs.push({ label: "物料编码", prop: "matnr", width: 100 });
tempsTabs.push({ label: "销售价格", prop: "zpR0", width: 100 });
tempsTabs.push({ label: "数量", prop: "kwmeng", width: 100 });
tempsTabs.push({ label: "工厂", prop: "znotE1", width: 100 });
tempsTabs.push({ label: "单价", prop: "znotE5", width: 100 });
tempsTabs.push({ label: "状态", prop: "state", width: 100 });
tempsTabs.push({ label: "单号", prop: "remark", width: 150 });
return tempsTabs;
},
},
methods: {
load() {
this.getList();
// console.log("-=",this.pageObj.nowPage)
// console.log("-=",this.disabled )
},
//
handleDownload(command) {
this.listLoading = true;
this.listExportQuery.taskid = this.customerInfo.parentId;
this.listExportQuery.materialCode = this.listOutPutQuery.materialCode
? this.listOutPutQuery.materialCode || undefined
: undefined;
this.listExportQuery.billnum = this.listOutPutQuery.billnum
? this.listOutPutQuery.billnum || undefined
: undefined;
console.log("导出:" + JSON.stringify(this.listOutPutQuery));
this.$axios
.gets(
"/api/settleaccount/WmsOutputSumInterface/Export",
this.listExportQuery
)
.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;
});
})
.catch(() => {
this.listLoading = false;
});
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
getList() {
this.disabled = true;
this.listLoading = true;
this.pageObj.nowPage++;
let cnt = (this.pageObj.nowPage - 1) * this.pageObj.pageSize;
//let param = { taskid: this.customerInfo.parentId };
this.listOutPutQuery.taskid = this.customerInfo.parentId;
this.listOutPutQuery.materialCode = this.listOutPutQuery.materialCode
? this.listOutPutQuery.materialCode || undefined
: undefined;
this.listOutPutQuery.billnum = this.listOutPutQuery.billnum
? this.listOutPutQuery.billnum || undefined
: undefined;
this.list = [];
console.log("传入查询条件值:" + JSON.stringify(this.listOutPutQuery));
this.$axios
.gets(
"/api/settleaccount/WmsOutputSumInterface/WmsOutputDetailList",
this.listOutPutQuery
)
.then((res) => {
this.disabled = false;
if (!res || res.length < this.pageObj.pageSize) {
this.disabled = true;
}
this.list = res;
// if (this.pageObj.nowPage == 1) {
// this.list = res;
// } else {
// this.list = this.list.concat(res);
// }
this.listLoading = false;
console.log("数据总数:" + this.list.length);
// setTimeout(() => {
// //
// this.listLoading = false;
// }, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
// this.getList();
// this.listQuery.Filters = [];
// if (this.searchContent != "") {
// var column = "materialCode";
// let filter = {
// logic: 0,
// column: column,
// action: 6,
// 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;
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 "../../styles/crmtable.scss";
</style>

451
vue/src/views/ux/billManage/ErpSumOutput/index.vue

@ -0,0 +1,451 @@
<!--结算汇总出库接口-->
<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-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()"
>导入文件Excel
</el-button>
</flexbox>
<!--表格渲染-->
<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"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
v-el-table-infinite-scroll="load"
infinite-scroll-disabled="disabled"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
@cell-dblclick="dblhandleCurrentChange"
>
<el-table-column
label="单据号"
prop="sourceBillNum"
sortable="custom"
align="center"
width="250px"
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.sourceBillNum" placement="bottom-end">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.sourceBillNum
}}</span>
</el-tooltip>
</template>
</el-table-column>
<!-- <el-table-column type="selection" width="44px"></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 label="备注" width="400" align="center">
<template slot-scope="scope">
<el-input
ref="inputRef"
v-if="scope.row.isEditCell"
v-model="scope.row.remark"
class="el-input"
v-focus
@blur="cellBlur(scope.row, scope.column)"
/>
<span v-else>{{ scope.row.remark }}</span>
<el-button
style="margin-left: 5px"
v-if="scope.row.isEditCell"
type="success"
icon="el-icon-check"
size="small"
circle
@click="submitName(scope.row)"
></el-button>
<el-button
v-show="scope.row.isEditCell"
class="cancel-btn"
size="mini"
icon="el-icon-refresh"
type="warning"
@click.native.prevent="handleCancel(scope.row)"
>
cancel
</el-button>
</template>
</el-table-column> -->
</el-table>
<div class="table-footer">
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
<!-- 抽屉控件 -->
<el-drawer
title="信息详细页"
size="75%"
direction="rtl"
:visible.sync="drawer"
:before-close="handleDrawerClose"
>
<div>
<Detail
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div>
</el-drawer>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import Detail from "./detail";
import moment from "moment";
import importExcel from "@/components/ImportExcel-wms";
import { formatTimeToTimestamp } from "@/utils/index";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
//table
import elTableInfiniteScroll from "el-table-infinite-scroll";
export default {
name: "ErpSumOutput",
components: { Pagination, Detail, importExcel, JobSelectVerson },
directives: { permission, "el-table-infinite-scroll": elTableInfiniteScroll },
data() {
return {
crmType: "erpSumOutput",
customerInfos: [],
JobVersionList: [],
JobversionValue: "",
JobversionValueVerson: "",
searchContent: "", //
drawer: false,
versionValue: "",
versionList: [],
list: [],
totalCount: 0,
listLoading: true,
formLoading: false,
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
},
page: 1,
pageObj: {
nowPage: 0, //
pageSize: 10, //
},
disabled: false,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 200,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 200;
};
},
created() {
this.getList();
//this.getVersionInfo();
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "版本",
prop: "jsonString",
width: 120,
});
//tempsTabs.push({ label: "", prop: "sourceBillNum", width: 150 });
tempsTabs.push({ label: "过账日期", prop: "accountDate", width: 160 });
//tempsTabs.push({ label: "", prop: "remark", width: 120 });
return tempsTabs;
},
},
methods: {
getList() {
this.disabled = true;
this.pageObj.nowPage++;
let cnt = (this.pageObj.nowPage - 1) * this.pageObj.pageSize;
let param = { version: this.JobversionValueVerson };
this.list = [];
this.$axios
.gets("/api/settleaccount/WmsOutputSumInterface/WmsOutputList", param)
.then((res) => {
this.disabled = false;
this.listLoading = false;
if (!res.data || res.data.length < this.pageObj.pageSize) {
this.disabled = true;
}
if (this.pageObj.nowPage == 1) {
this.list = res;
} else {
this.list = this.list.concat(res);
}
// setTimeout(() => {
// //
// this.listLoading = false;
// }, 500);
})
.catch(() => {
this.listLoading = false;
});
},
load() {
this.getList();
// console.log("-=",this.pageObj.nowPage)
// console.log("-=",this.disabled )
},
// load() {
// this.$message.success("");
// this.tableData = this.tableData.concat(exampleData);
// },
//
JobVersionValue(params) {
//
this.JobversionValue = params.value;
this.getList();
},
getJobVersionInfo() {
//
this.$axios
.gets("/api/settleaccount/WmsOutputSumInterface/WmsOutputVersionList")
.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;
});
},
dblhandleCurrentChange(row, column, cell, event) {
if (column.label === "备注") {
row.isEditCell = true;
this.$set(row, "isEditCell", true);
this.$nextTick(() => {
this.$refs["inputRef"].focus();
});
}
this.list = this.list.filter((item) => {
return item;
});
},
//
cellBlur(row, column) {
row.isEditCell = false;
this.$set(row, "isEditCell", false);
},
// 线
submitName(row) {
let getguid = row.id;
let getremark = row.remark;
this.$axios
.gets("/api/settleaccount/wmskanbanoutput/UpdateRemark", {
id: getguid,
remark: getremark,
})
.then((response) => {
if (response == true) {
this.$notify({
title: "成功",
message: "更新成功",
type: "success",
duration: 2000,
});
this.getList();
}
})
.catch(() => {
this.listLoading = false;
});
},
//
handleCancel(row) {
row.isEditCell = false;
//row.stockQty = row.originalstockQty;
this.$set(row, "isEditCell", false);
// this.$message({
// message: "",
// type: "warning",
// });
this.getList();
},
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
getVersionInfo() {
//
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
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;
});
},
//
handleDrawerOpen(param) {
this.drawer = true;
var parentId = param.wms_seq;
this.customerInfos = [
{
ParentId: parentId,
},
];
},
handleDrawerClose(done) {
done();
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property == "accountDate") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD");
}
if (column.property == "state") {
return { 0: "已提交", 1: "已出库", 2: "不能出库" }[
row[column.property]
];
}
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "billNum";
let filter = {
logic: 0,
column: column,
action: 6,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
resetQuery() {},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
return { textAlign: "left" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>

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

@ -6,12 +6,12 @@
<!-- 搜索 --> <!-- 搜索 -->
<div style="float: left"> <div style="float: left">
<flexbox class="content-header"> <flexbox class="content-header">
<JobSelectVerson <!-- <JobSelectVerson
:options="JobVersionList" :options="JobVersionList"
style="width: 150px; margin-left: -10px" style="width: 150px; margin-left: -10px"
class="search-container" class="search-container"
@value-change="JobVersionValue" @value-change="JobVersionValue"
></JobSelectVerson> ></JobSelectVerson> -->
<el-button <el-button
class="filter-item" class="filter-item"
size="mini" size="mini"

Loading…
Cancel
Save