@ -0,0 +1,80 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询定时任务调度列表
|
||||
|
export function listJob(query) { |
||||
|
return request({ |
||||
|
url: '/monitor/job/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询定时任务调度详细
|
||||
|
export function getJob(jobId) { |
||||
|
return request({ |
||||
|
url: '/monitor/job/' + jobId, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增定时任务调度
|
||||
|
export function addJob(data) { |
||||
|
return request({ |
||||
|
url: '/monitor/job', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改定时任务调度
|
||||
|
export function updateJob(data) { |
||||
|
return request({ |
||||
|
url: '/monitor/job', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除定时任务调度
|
||||
|
export function delJob(jobId) { |
||||
|
return request({ |
||||
|
url: '/monitor/job/' + jobId, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出定时任务调度
|
||||
|
export function exportJob(query) { |
||||
|
return request({ |
||||
|
url: '/monitor/job/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 任务状态修改
|
||||
|
export function changeJobStatus(jobId, status) { |
||||
|
const data = { |
||||
|
jobId, |
||||
|
status |
||||
|
} |
||||
|
return request({ |
||||
|
url: '/monitor/job/changeStatus', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 定时任务立即执行一次
|
||||
|
export function runJob(jobId, jobGroup) { |
||||
|
const data = { |
||||
|
jobId, |
||||
|
jobGroup |
||||
|
} |
||||
|
return request({ |
||||
|
url: '/monitor/job/run', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询调度日志列表
|
||||
|
export function listJobLog(query) { |
||||
|
return request({ |
||||
|
url: '/monitor/jobLog/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除调度日志
|
||||
|
export function delJobLog(jobLogId) { |
||||
|
return request({ |
||||
|
url: '/monitor/jobLog/' + jobLogId, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 清空调度日志
|
||||
|
export function cleanJobLog() { |
||||
|
return request({ |
||||
|
url: '/monitor/jobLog/clean', |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出调度日志
|
||||
|
export function exportJobLog(query) { |
||||
|
return request({ |
||||
|
url: '/monitor/jobLog/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询服务器详细
|
||||
|
export function getServer() { |
||||
|
return request({ |
||||
|
url: '/monitor/server', |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
Before Width: | Height: | Size: 3.5 KiB |
@ -1,64 +0,0 @@ |
|||||
<template> |
|
||||
<el-select |
|
||||
v-model="dataValue" |
|
||||
style="width: 200px" |
|
||||
placeholder="请选择版本" |
|
||||
@change="valueChange" |
|
||||
> |
|
||||
<el-option |
|
||||
v-for="item in options" |
|
||||
:key="item.value" |
|
||||
:label="item.label" |
|
||||
:value="item.value" |
|
||||
/> |
|
||||
</el-select> |
|
||||
</template> |
|
||||
<script type="text/javascript"> |
|
||||
import stringMixin from "./stringMixin"; |
|
||||
|
|
||||
export default { |
|
||||
name: "JobSelect", |
|
||||
components: {}, |
|
||||
props: { |
|
||||
options: { |
|
||||
type: Array, |
|
||||
default: () => { |
|
||||
return []; |
|
||||
}, |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
dataValue: "", |
|
||||
}; |
|
||||
}, |
|
||||
created() {}, |
|
||||
watch: { |
|
||||
options: { |
|
||||
handler(newVal) { |
|
||||
if (newVal == "" || newVal == "undefined") { |
|
||||
//TODO |
|
||||
} else { |
|
||||
//加上默认初始值 |
|
||||
this.dataValue = this.options[0].value; |
|
||||
} |
|
||||
}, |
|
||||
immediate: true, |
|
||||
}, |
|
||||
}, |
|
||||
computed: {}, |
|
||||
methods: { |
|
||||
// 输入的值 |
|
||||
valueChange(val) { |
|
||||
/** 回调筛选数据 */ |
|
||||
this.$emit("value-change", { |
|
||||
index: this.index, |
|
||||
value: val, |
|
||||
data: this.options, |
|
||||
}); |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
<style lang="scss" scoped> |
|
||||
</style> |
|
@ -1,64 +0,0 @@ |
|||||
<template> |
|
||||
<el-select |
|
||||
v-model="dataValue" |
|
||||
style="width: 200px" |
|
||||
placeholder="请选择" |
|
||||
@change="valueChange" |
|
||||
> |
|
||||
<el-option |
|
||||
v-for="item in options" |
|
||||
:key="item.value" |
|
||||
:label="item.label" |
|
||||
:value="item.value" |
|
||||
/> |
|
||||
</el-select> |
|
||||
</template> |
|
||||
<script type="text/javascript"> |
|
||||
import stringMixin from "./stringMixin"; |
|
||||
|
|
||||
export default { |
|
||||
name: "XhJSSelect", |
|
||||
components: {}, |
|
||||
props: { |
|
||||
options: { |
|
||||
type: Array, |
|
||||
default: () => { |
|
||||
return []; |
|
||||
}, |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
dataValue: "", |
|
||||
}; |
|
||||
}, |
|
||||
created() {}, |
|
||||
watch: { |
|
||||
options: { |
|
||||
handler(newVal) { |
|
||||
if (newVal == "" || newVal == "undefined") { |
|
||||
//TODO |
|
||||
} else { |
|
||||
//加上默认初始值 |
|
||||
this.dataValue = this.options[0].value; |
|
||||
} |
|
||||
}, |
|
||||
immediate: true, |
|
||||
}, |
|
||||
}, |
|
||||
computed: {}, |
|
||||
methods: { |
|
||||
// 输入的值 |
|
||||
valueChange(val) { |
|
||||
/** 回调筛选数据 */ |
|
||||
this.$emit("value-change", { |
|
||||
index: this.index, |
|
||||
value: val, |
|
||||
data: this.options, |
|
||||
}); |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
<style lang="scss" scoped> |
|
||||
</style> |
|
@ -1,67 +0,0 @@ |
|||||
<template> |
|
||||
<el-select |
|
||||
v-model="dataValue" |
|
||||
style="width: 200px" |
|
||||
placeholder="请选择" |
|
||||
@change="valueChange" |
|
||||
> |
|
||||
<el-option |
|
||||
v-for="item in options" |
|
||||
:key="item.value" |
|
||||
:label="item.label" |
|
||||
:value="item.value" |
|
||||
/> |
|
||||
</el-select> |
|
||||
</template> |
|
||||
<script type="text/javascript"> |
|
||||
import stringMixin from "./stringMixin"; |
|
||||
|
|
||||
export default { |
|
||||
name: "XhJSSelect", |
|
||||
components: {}, |
|
||||
props: { |
|
||||
options: { |
|
||||
type: Array, |
|
||||
default: () => { |
|
||||
return []; |
|
||||
}, |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
dataValue: "", |
|
||||
}; |
|
||||
}, |
|
||||
created() {}, |
|
||||
watch: { |
|
||||
options: { |
|
||||
handler(newVal) { |
|
||||
if (newVal == "" || newVal == "undefined") { |
|
||||
//TODO |
|
||||
} else { |
|
||||
//加上默认初始值 |
|
||||
this.dataValue = this.options[0].value; |
|
||||
} |
|
||||
}, |
|
||||
immediate: true, |
|
||||
}, |
|
||||
}, |
|
||||
computed: {}, |
|
||||
methods: { |
|
||||
// 输入的值 |
|
||||
valueChange(val) { |
|
||||
const obj = this.options.find((item) => { |
|
||||
return item.value == val;//传入id值 |
|
||||
}); |
|
||||
/** 回调筛选数据 */ |
|
||||
this.$emit("value-change", { |
|
||||
index: this.index, |
|
||||
value: obj.label, |
|
||||
data: this.options, |
|
||||
}); |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
<style lang="scss" scoped> |
|
||||
</style> |
|
@ -0,0 +1,752 @@ |
|||||
|
<template> |
||||
|
<el-dialog |
||||
|
:visible="show" |
||||
|
:title="'导入' + crmTypeName" |
||||
|
:append-to-body="true" |
||||
|
:close-on-click-modal="false" |
||||
|
width="600px" |
||||
|
@close="closeView" |
||||
|
> |
||||
|
<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="isEditYearMont" |
||||
|
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-select |
||||
|
v-model="FacotryValue" |
||||
|
clearable |
||||
|
:disabled="isEditFactory" |
||||
|
style="width: 188px" |
||||
|
placeholder="请选择" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in facotryList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
></el-option> |
||||
|
</el-select> |
||||
|
</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 |
||||
|
v-loading="loading" |
||||
|
v-else-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="wk wk-success result-info__icon" /> |
||||
|
<p class="result-info__detail"> |
||||
|
结果: |
||||
|
<span class="result-info__detail--all" |
||||
|
>{{ this.resultData.successMessage }} |
||||
|
</span> |
||||
|
</p> |
||||
|
|
||||
|
<el-button |
||||
|
v-if="this.resultData && this.resultData.errSize > 0" |
||||
|
class="result-info__btn--err" |
||||
|
type="text" |
||||
|
@click="downloadErrData" |
||||
|
>下载错误数据</el-button |
||||
|
> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div |
||||
|
v-loading="loading" |
||||
|
v-else-if="stepsActive == 4" |
||||
|
class="step-section" |
||||
|
> |
||||
|
<div class="result-info"> |
||||
|
<el-card style="height: 300px" shadow="always"> |
||||
|
<i class="wk wk-success result-info__icon" /> |
||||
|
<p class="result-info__detail"> |
||||
|
结果: |
||||
|
<span class="result-info__detail--all" |
||||
|
>{{ this.resultData.successMessage }} |
||||
|
</span> |
||||
|
</p> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<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, |
||||
|
fieldList: [], |
||||
|
factoryList: [], //工厂列表 |
||||
|
FacotryValue: "", //年度期间选择项 |
||||
|
facotryList: [], //年度期间 |
||||
|
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: "T51Z40", |
||||
|
}, //默认查询可用的 |
||||
|
], |
||||
|
SkipCount: 0, |
||||
|
MaxResultCount: 1000, |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
sureTitle() { |
||||
|
return { |
||||
|
1: "立即导入", |
||||
|
2: "导入中", |
||||
|
3: "确定", |
||||
|
}[this.stepsActive]; |
||||
|
}, |
||||
|
showCancel() { |
||||
|
return this.stepsActive != 2; |
||||
|
}, |
||||
|
getMoudleDisable() { |
||||
|
if (this.crmType == "btcarconsign") { |
||||
|
//只版本可用 |
||||
|
this.isEditYearMont = false; |
||||
|
this.isEditFactory = true; |
||||
|
} |
||||
|
}, |
||||
|
crmTypeName() { |
||||
|
return ( |
||||
|
{ |
||||
|
btcarseq: "奔腾-轿车车序输入表", |
||||
|
btcarkb: "奔腾-轿车看板输入表", |
||||
|
btcarconsign: "奔腾-轿车结算数据输入表", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
getWebApi() { |
||||
|
if (this.FacotryValue === "T51Z40-A") { |
||||
|
//轿车一厂 |
||||
|
return ( |
||||
|
{ |
||||
|
btcarseq: "/api/settleaccount/BTCarSeqFirst/ExcelImport", |
||||
|
btcarkb: "/api/settleaccount/BTCarKBFirst/ExcelImport", |
||||
|
btcarconsign: "/api/settleaccount/BTCarConsign/ExcelImport", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
} else if (this.FacotryValue === "T51Z40-B") { |
||||
|
//轿车二厂 |
||||
|
return ( |
||||
|
{ |
||||
|
btcarseq: "/api/settleaccount/BTCarSeqSecond/ExcelImport", |
||||
|
btcarkb: "/api/settleaccount/BTCarKBSecond/ExcelImport", |
||||
|
btcarconsign: "/api/settleaccount/BTCarConsign/ExcelImport", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
} else { |
||||
|
alert("请正确选择相关导入工厂!"); |
||||
|
} |
||||
|
}, |
||||
|
getImportTemplate() { |
||||
|
//模板名称 |
||||
|
return ( |
||||
|
{ |
||||
|
btcarseq: "奔腾-轿车车序输入表.xlsx", |
||||
|
btcarkb: "奔腾-轿车看板输入表.xlsx", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
httpHeader() { |
||||
|
//文件上传时,带token认证信息,提高安全性 |
||||
|
return { |
||||
|
Authorization: "Bearer " + getToken(), |
||||
|
}; |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
show: function (val) { |
||||
|
this.stepsActive = 1; |
||||
|
this.getAllYearMonth(); //加载版本 |
||||
|
this.getAllFactory(); //加载工厂 |
||||
|
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.listQuery.SkipCount = (this.page - 1) * 500; |
||||
|
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; |
||||
|
}); |
||||
|
}, |
||||
|
getAllFactory() { |
||||
|
this.listQueryCustom.SkipCount = (this.page - 1) * 500; |
||||
|
this.$axios |
||||
|
.posts("/api/settleaccount/Factory/list", this.listQueryCustom) |
||||
|
.then((response) => { |
||||
|
//取工厂列表信息 |
||||
|
this.facotryList = []; |
||||
|
response.items.forEach((element) => { |
||||
|
let options = {}; |
||||
|
options.value = element.code; |
||||
|
options.label = element.desc; |
||||
|
this.facotryList.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"; |
||||
|
} |
||||
|
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.fileuploadList === [] || |
||||
|
JSON.stringify(this.fileuploadList) === "[]" |
||||
|
) { |
||||
|
this.$message.error("请选择导入文件"); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
if (this.stepsActive == 1) { |
||||
|
if (this.stepList[0].status == "wait") { |
||||
|
this.stepsActive = 2; |
||||
|
let alertInfo = ""; |
||||
|
if (this.FacotryValue === "T51Z40-A") { |
||||
|
alertInfo = "轿车一厂"; |
||||
|
} else { |
||||
|
alertInfo = "轿车二厂"; |
||||
|
} |
||||
|
this.$confirm("当前导入的数据是:" + alertInfo + "请确认?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
this.saveTemplateData(); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$message({ |
||||
|
type: "info", |
||||
|
message: "已取消删除", |
||||
|
}); |
||||
|
this.stepsActive = 1; |
||||
|
}); |
||||
|
|
||||
|
// setTimeout(() => { |
||||
|
// this.saveTemplateData(); |
||||
|
// }, 1000); |
||||
|
if (this.stepList[1].status == "finish") { |
||||
|
} |
||||
|
} else { |
||||
|
if (this.fileuploadList === "[]") { |
||||
|
this.$message.error("请选择导入文件"); |
||||
|
} |
||||
|
} |
||||
|
} else { |
||||
|
this.closeView(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
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", this.FacotryValue); |
||||
|
fd.append("factory", this.FacotryValue); |
||||
|
fd.append("version", this.versionValue); |
||||
|
const webapi = this.getWebApi; |
||||
|
console.log("奔腾轿车导入条件:" + JSON.stringify(webapi)); |
||||
|
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; |
||||
|
} |
||||
|
this.$emit("status", "finish"); |
||||
|
this.loading = false; |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
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" : ""); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
@import "@/styles/xr-theme.scss"; |
||||
|
.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: 300px; |
||||
|
|
||||
|
/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; |
||||
|
padding-top: 50px; |
||||
|
|
||||
|
&__icon { |
||||
|
font-size: 40px; |
||||
|
color: $xr-color-primary; |
||||
|
} |
||||
|
|
||||
|
&__des { |
||||
|
margin-top: -15px; |
||||
|
color: #333; |
||||
|
font-size: 30px; |
||||
|
} |
||||
|
|
||||
|
&__detail { |
||||
|
margin-top: 35px; |
||||
|
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> |
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,814 @@ |
|||||
|
<template> |
||||
|
<el-dialog |
||||
|
:visible="show" |
||||
|
:title="'导入' + crmTypeName" |
||||
|
:append-to-body="true" |
||||
|
:close-on-click-modal="false" |
||||
|
width="600px" |
||||
|
@close="closeView" |
||||
|
> |
||||
|
<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-select |
||||
|
v-model="YearMonthValue" |
||||
|
clearable |
||||
|
:disabled="isEditYearMont" |
||||
|
style="width: 188px" |
||||
|
placeholder="请选择" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in yearMonthList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
></el-option> |
||||
|
</el-select> |
||||
|
</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 |
||||
|
v-loading="loading" |
||||
|
v-else-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="wk wk-success result-info__icon" /> |
||||
|
<p class="result-info__detail"> |
||||
|
结果: |
||||
|
<span class="result-info__detail--all" |
||||
|
>{{ this.resultData.successMessage }} |
||||
|
</span> |
||||
|
</p> |
||||
|
|
||||
|
<el-button |
||||
|
v-if="this.resultData && this.resultData.errSize > 0" |
||||
|
class="result-info__btn--err" |
||||
|
type="text" |
||||
|
@click="downloadErrData" |
||||
|
>下载错误数据</el-button |
||||
|
> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div |
||||
|
v-loading="loading" |
||||
|
v-else-if="stepsActive == 4" |
||||
|
class="step-section" |
||||
|
> |
||||
|
<div class="result-info"> |
||||
|
<el-card style="height: 300px" shadow="always"> |
||||
|
<i class="wk wk-success result-info__icon" /> |
||||
|
<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> |
||||
|
</div> |
||||
|
<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, |
||||
|
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, |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
sureTitle() { |
||||
|
return { |
||||
|
1: "立即导入", |
||||
|
2: "导入中", |
||||
|
3: "确定", |
||||
|
}[this.stepsActive]; |
||||
|
}, |
||||
|
showCancel() { |
||||
|
return this.stepsActive != 2; |
||||
|
}, |
||||
|
getMoudleDisable() { |
||||
|
if ( |
||||
|
this.crmType == "codeSetting" || |
||||
|
this.crmType == "factory" || |
||||
|
this.crmType == "customerStorageLocation" || |
||||
|
this.crmType == "materialRelationSupplier" || |
||||
|
this.crmType == "carMaterialConfig" || |
||||
|
this.crmType == "materialRelation" |
||||
|
) { |
||||
|
//版本和工厂都可以用 |
||||
|
this.isEditYearMont = true; |
||||
|
this.isEditFactory = true; |
||||
|
} else if ( |
||||
|
this.crmType == "secondaryPriceRatio" || |
||||
|
this.crmType == "secondaryAdjustment" || |
||||
|
this.crmType == "secondaryDiscount" || |
||||
|
this.crmType == "estimatedInventoryDetail" || |
||||
|
this.crmType == "estimatedSum" |
||||
|
) { |
||||
|
//只版本可用 |
||||
|
this.isEditYearMont = true; |
||||
|
this.isEditFactory = false; |
||||
|
} else if (this.crmType == "material") { |
||||
|
//只工厂可用 |
||||
|
this.isEditYearMont = false; |
||||
|
this.isEditFactory = true; |
||||
|
} else if (this.crmType == "prebatch") { |
||||
|
//只状态可用 |
||||
|
this.isEditYearMont = true; |
||||
|
this.isEditFactory = true; |
||||
|
this.isState = false; |
||||
|
} else { |
||||
|
this.isEditYearMont = false; |
||||
|
this.isEditFactory = false; |
||||
|
} |
||||
|
}, |
||||
|
crmTypeName() { |
||||
|
return ( |
||||
|
{ |
||||
|
bomdatabase: "产品结构BOM", |
||||
|
prebatch: "预批量", |
||||
|
secondaryPriceRatio: "二配结算价格比例", |
||||
|
factory: "工厂设置", |
||||
|
materialRelation: "零件匹配关系", |
||||
|
carMaterialConfig: "车型代码与零件匹配", |
||||
|
materialRelationSupplier: "供应商零件设置表", |
||||
|
material: "物料主数据", |
||||
|
inventorydetail: "库存明细", |
||||
|
codeSetting: "通用代码设置", |
||||
|
estimatedSum: "应付暂估汇总", |
||||
|
estimatedInventoryDetail: "应付暂估收货明细", |
||||
|
customerStorageLocation: "客户存储地点", |
||||
|
secondaryAdjustment: "二配数量调整输入", |
||||
|
secondaryDiscount: "二配折扣调整输入", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
getWebApi() { |
||||
|
return ( |
||||
|
{ |
||||
|
bomdatabase: "/api/settleaccount/bom/ExcelImport", |
||||
|
prebatch: "/api/settleaccount/Prebatch/ExcelImport", |
||||
|
secondaryPriceRatio: |
||||
|
"/api/settleaccount/SecondaryPriceRatio/ExcelImport", |
||||
|
factory: "/api/settleaccount/Factory/ExcelImport", |
||||
|
materialRelation: |
||||
|
"/api/settleaccount/MaterialRelationship/ExcelImport", |
||||
|
carMaterialConfig: "/api/settleaccount/CarMaterialConfig/ExcelImport", |
||||
|
materialRelationSupplier: |
||||
|
"/api/settleaccount/SupplierItemSetUp/ExcelImport", |
||||
|
material: "/api/settleaccount/material/ExcelImport", |
||||
|
inventorydetail: "/api/settleaccount/InventoryDetail/ExcelImport", |
||||
|
codeSetting: "/api/settleaccount/CodeSetting/ExcelImport", |
||||
|
estimatedSum: "/api/settleaccount/EstimatedSum/ExcelImport", |
||||
|
estimatedInventoryDetail: |
||||
|
"/api/settleaccount/EstimatedInventoryDetail/ExcelImport", |
||||
|
customerStorageLocation: |
||||
|
"/api/settleaccount/CustomerStorageLocation/ExcelImport", |
||||
|
secondaryAdjustment: |
||||
|
"/api/settleaccount/SecondaryAdjustment/ExcelImport", |
||||
|
secondaryDiscount: "/api/settleaccount/SecondaryDiscount/ExcelImport", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
getImportTemplate() { |
||||
|
//模板名称 |
||||
|
return ( |
||||
|
{ |
||||
|
bomdatabase: "产品结构Bom导入模板.xlsx", |
||||
|
secondaryPriceRatio: "二配价格比例导入模板.xlsx", |
||||
|
factory: "工厂设置模板.xlsx", |
||||
|
materialRelation: "零件匹配关系.xlsx", |
||||
|
carMaterialConfig: "车型代码与零件匹配.xlsx", |
||||
|
materialRelationSupplier: "供应商零件设置表.xlsx", |
||||
|
material: "物料主数据.xlsx", |
||||
|
inventorydetail: "库存明细信息.xlsx", |
||||
|
codeSetting: "通用代码设置数据.xlsx", |
||||
|
estimatedSum: "应付暂估汇总.xlsx", |
||||
|
estimatedInventoryDetail: "应付暂估收货明细.xlsx", |
||||
|
customerStorageLocation: "客户存储地点.xlsx", |
||||
|
secondaryAdjustment: "二配调整输入.xlsx", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
httpHeader() { |
||||
|
//文件上传时,带token认证信息,提高安全性 |
||||
|
return { |
||||
|
Authorization: "Bearer " + getToken(), |
||||
|
}; |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
show: function (val) { |
||||
|
this.stepsActive = 1; |
||||
|
this.getAllYearMonth(); //加载版本 |
||||
|
this.getAllFactory(); //加载工厂 |
||||
|
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.factoryList = []; |
||||
|
// //this.listQuery.SkipCount = (this.page - 1) * 500; |
||||
|
// this.$axios |
||||
|
// .posts("/api/settleaccount/CentralizedControl/openlist") |
||||
|
// .then((response) => { |
||||
|
// response.items.forEach((element) => { |
||||
|
// let options = {}; |
||||
|
// options.value = element.version; |
||||
|
// options.label = element.version; |
||||
|
// this.factoryList.push(options); |
||||
|
// }); |
||||
|
// }) |
||||
|
// .catch(() => { |
||||
|
// this.listLoading = false; |
||||
|
// }); |
||||
|
// }, |
||||
|
getAllYearMonth() { |
||||
|
//取版本列表信息 |
||||
|
// this.listQuery.SkipCount = (this.page - 1) * 500; |
||||
|
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; |
||||
|
}); |
||||
|
}, |
||||
|
getAllFactory() { |
||||
|
//取工厂列表信息 |
||||
|
this.yearMonthList = []; |
||||
|
this.listQueryCustom.SkipCount = (this.page - 1) * 500; |
||||
|
this.$axios |
||||
|
.posts("/api/settleaccount/Factory/list", this.listQueryCustom) |
||||
|
.then((response) => { |
||||
|
response.items.forEach((element) => { |
||||
|
let options = {}; |
||||
|
options.value = element.code; |
||||
|
options.label = element.desc; |
||||
|
this.yearMonthList.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"; |
||||
|
} |
||||
|
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.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(); |
||||
|
// setTimeout(() => { |
||||
|
// this.saveTemplateData(); |
||||
|
// }, 1000); |
||||
|
if (this.stepList[1].status == "finish") { |
||||
|
} |
||||
|
} else { |
||||
|
if (this.fileuploadList === "[]") { |
||||
|
this.$message.error("请选择导入文件"); |
||||
|
} |
||||
|
} |
||||
|
} else { |
||||
|
this.closeView(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
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("factory", this.YearMonthValue); |
||||
|
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; |
||||
|
} |
||||
|
this.$emit("status", "finish"); |
||||
|
// this.$nextTick(() => { |
||||
|
// this.loading = false; |
||||
|
// }); |
||||
|
this.loading = false; |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
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" : ""); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
@import "@/styles/xr-theme.scss"; |
||||
|
.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: 300px; |
||||
|
|
||||
|
/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; |
||||
|
padding-top: 50px; |
||||
|
|
||||
|
&__icon { |
||||
|
font-size: 40px; |
||||
|
color: $xr-color-primary; |
||||
|
} |
||||
|
|
||||
|
&__des { |
||||
|
margin-top: -15px; |
||||
|
color: #333; |
||||
|
font-size: 30px; |
||||
|
} |
||||
|
|
||||
|
&__detail { |
||||
|
margin-top: 35px; |
||||
|
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> |
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,766 @@ |
|||||
|
<template> |
||||
|
<el-dialog |
||||
|
:visible="show" |
||||
|
:title="'导入' + crmTypeName" |
||||
|
:append-to-body="true" |
||||
|
:close-on-click-modal="false" |
||||
|
width="600px" |
||||
|
@close="closeView" |
||||
|
> |
||||
|
<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、提供的导入模板需要.txt文本格式! |
||||
|
</div> |
||||
|
<div class="sections__tips"> |
||||
|
2、模板名称可以进行修改,但不要删除模板中设置的字段! |
||||
|
</div> |
||||
|
<div class="sections__tips">3、导入文件大小请勿超过100MB!</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-select |
||||
|
v-model="CarModekValue" |
||||
|
clearable |
||||
|
:disabled="isEditYearMont" |
||||
|
style="width: 188px" |
||||
|
placeholder="请选择" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in carModelList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
></el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
<div class="sections__tips"> |
||||
|
<span class="demonstration">开始时间:</span> |
||||
|
<el-date-picker |
||||
|
v-model="startTimeVale" |
||||
|
:disabled="isTimeUse" |
||||
|
type="datetime" |
||||
|
value-format="yyyy-MM-dd HH:mm:ss" |
||||
|
placeholder="选择日期时间" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</div> |
||||
|
<div class="sections__tips"> |
||||
|
<span class="demonstration">结束时间:</span> |
||||
|
<el-date-picker |
||||
|
v-model="endTimeVale" |
||||
|
:disabled="isTimeUse" |
||||
|
type="datetime" |
||||
|
value-format="yyyy-MM-dd HH:mm:ss" |
||||
|
placeholder="选择日期时间" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</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 |
||||
|
v-loading="loading" |
||||
|
v-else-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="wk wk-success result-info__icon" /> |
||||
|
<!-- <p class="result-info__detail"> |
||||
|
导入成功数据: |
||||
|
<span class="result-info__detail--all" |
||||
|
>{{ this.resultData.totalSize }} </span |
||||
|
>条有效数据! |
||||
|
</p> --> |
||||
|
<p class="result-info__detail"> |
||||
|
结果: |
||||
|
<span class="result-info__detail--all" |
||||
|
>{{ this.resultData.successMessage }} |
||||
|
</span> |
||||
|
</p> |
||||
|
|
||||
|
<el-button |
||||
|
v-if="this.resultData && this.resultData.errSize > 0" |
||||
|
class="result-info__btn--err" |
||||
|
type="text" |
||||
|
@click="downloadErrData" |
||||
|
>下载错误数据</el-button |
||||
|
> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div |
||||
|
v-loading="loading" |
||||
|
v-else-if="stepsActive == 4" |
||||
|
class="step-section" |
||||
|
> |
||||
|
<div class="result-info"> |
||||
|
<el-card style="height: 300px" shadow="always"> |
||||
|
<!-- <i class="wk wk-success result-info__icon" /> |
||||
|
<p class="result-info__des">数据导入结果:</p> |
||||
|
<p class="result-info__detail"> |
||||
|
导入成功数据 |
||||
|
<span class="result-info__detail--all" |
||||
|
>{{ this.resultData.totalSize }} </span |
||||
|
>条有效数据! |
||||
|
</p> --> |
||||
|
<i class="wk wk-success result-info__icon" /> |
||||
|
<p class="result-info__detail"> |
||||
|
结果: |
||||
|
<span class="result-info__detail--all" |
||||
|
>{{ this.resultData.successMessage }} |
||||
|
</span> |
||||
|
</p> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<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 |
||||
|
import { formatTimeToTimestamp } from "@/utils/index"; |
||||
|
|
||||
|
export default { |
||||
|
name: "CRMImport", // 文件导入 |
||||
|
props: { |
||||
|
show: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
// CRM类型 |
||||
|
crmType: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
loading: false, |
||||
|
fieldList: [], |
||||
|
factoryList: [], //工厂列表 |
||||
|
CarModekValue: [], //车型选择项 |
||||
|
carModelList: [], //车型列表 |
||||
|
versionValue: "", |
||||
|
config: 1, // 1 覆盖,2跳过 |
||||
|
/** 编辑控制 */ |
||||
|
isEditFactory: false, // 是否是编辑中 |
||||
|
isEditYearMont: false, // 是否是编辑中 |
||||
|
isTimeUse: false, // 是否是编辑中 |
||||
|
//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, |
||||
|
startTimeVale: "", |
||||
|
endTimeVale: "", |
||||
|
page: 1, |
||||
|
listQuery: { |
||||
|
Filters: [ |
||||
|
{ |
||||
|
logic: 0, |
||||
|
column: "version", |
||||
|
action: 0, |
||||
|
value: "", |
||||
|
}, //默认查询可用的 |
||||
|
], |
||||
|
SkipCount: 0, |
||||
|
MaxResultCount: 1000, |
||||
|
}, |
||||
|
listQueryCustom: { |
||||
|
Filters: [ |
||||
|
{ |
||||
|
logic: 0, |
||||
|
column: "project", |
||||
|
action: 0, |
||||
|
value: "生产线", |
||||
|
}, //默认查询可用的 |
||||
|
], |
||||
|
SkipCount: 0, |
||||
|
MaxResultCount: 1000, |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
sureTitle() { |
||||
|
return { |
||||
|
1: "立即导入", |
||||
|
2: "导入中", |
||||
|
3: "确定", |
||||
|
}[this.stepsActive]; |
||||
|
}, |
||||
|
showCancel() { |
||||
|
return this.stepsActive != 2; |
||||
|
}, |
||||
|
getMoudleDisable() { |
||||
|
if (this.crmType == "settleAccount") { |
||||
|
this.isEditYearMont = true; |
||||
|
//this.isEditFactory = true; |
||||
|
this.isTimeUse = true; |
||||
|
} else if (this.crmType == "material") { |
||||
|
//物料-工厂可用 |
||||
|
this.isEditYearMont = true; |
||||
|
this.isEditFactory = false; |
||||
|
} else if ( |
||||
|
this.crmType == "estimatedSum" || |
||||
|
this.crmType == "estimatedInventoryDetail" |
||||
|
) { |
||||
|
this.isEditYearMont = false; |
||||
|
this.isEditFactory = true; |
||||
|
} else { |
||||
|
this.isEditYearMont = false; |
||||
|
this.isEditFactory = false; |
||||
|
} |
||||
|
}, |
||||
|
crmTypeName() { |
||||
|
return ( |
||||
|
{ |
||||
|
fis: "FIS发运数据", |
||||
|
settleAccount: "R3数据", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
getWebApi() { |
||||
|
return ( |
||||
|
{ |
||||
|
fis: "/api/settleaccount/fis/ExcelImport", |
||||
|
settleAccount: "/api/settleaccount/SettleAccount/ExcelImport", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
getImportTemplate() { |
||||
|
//模板名称 |
||||
|
return ( |
||||
|
{ |
||||
|
fis: "FIS发运数据导入模板.xlsx", |
||||
|
settleAccount: "R3数据模板.xlsx", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
httpHeader() { |
||||
|
//文件上传时,带token认证信息,提高安全性 |
||||
|
return { |
||||
|
Authorization: "Bearer " + getToken(), |
||||
|
}; |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
show: function (val) { |
||||
|
this.stepsActive = 1; |
||||
|
this.getAllFactory(); //加载版本 |
||||
|
this.getAllCarModel(); //加载车型 |
||||
|
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: { |
||||
|
getAllFactory() { |
||||
|
//取版本列表信息 |
||||
|
this.factoryList = []; |
||||
|
// this.listQuery.SkipCount = (this.page - 1) * 500; |
||||
|
this.$axios |
||||
|
.posts("/api/settleaccount/CentralizedControl/openlist") |
||||
|
.then((response) => { |
||||
|
response.forEach((element) => { |
||||
|
let options = {}; |
||||
|
options.value = element.version; |
||||
|
options.label = element.version; |
||||
|
this.factoryList.push(options); |
||||
|
}); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.listLoading = false; |
||||
|
}); |
||||
|
}, |
||||
|
getAllCarModel() { |
||||
|
//取车型列表信息 |
||||
|
this.carModelList = []; |
||||
|
this.listQueryCustom.SkipCount = (this.page - 1) * 500; |
||||
|
console.log(JSON.stringify(this.listQueryCustom)); |
||||
|
this.$axios |
||||
|
.posts("/api/settleaccount/CodeSetting/list", this.listQueryCustom) |
||||
|
.then((response) => { |
||||
|
response.items.forEach((element) => { |
||||
|
let options = {}; |
||||
|
options.value = element.value; |
||||
|
options.label = element.description; |
||||
|
this.carModelList.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 (["txt"].indexOf(FileExt.toLowerCase()) === -1) { |
||||
|
this.$message({ |
||||
|
type: "warning", |
||||
|
message: "只支持txt文本类型文件!", |
||||
|
}); |
||||
|
this.isFileType = "0"; |
||||
|
return false; |
||||
|
} else { |
||||
|
this.isFileType = "1"; |
||||
|
} |
||||
|
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.startTimeVale && this.endTimeVale) { |
||||
|
if ( |
||||
|
formatTimeToTimestamp(this.startTimeVale) >= |
||||
|
formatTimeToTimestamp(this.endTimeVale) |
||||
|
) { |
||||
|
this.$message.error("开始时间必须小于结束时间!"); |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
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(); |
||||
|
// setTimeout(() => { |
||||
|
// this.saveTemplateData(); |
||||
|
// }, 1000); |
||||
|
if (this.stepList[1].status == "finish") { |
||||
|
} |
||||
|
} else { |
||||
|
if (this.fileuploadList === "[]") { |
||||
|
this.$message.error("请选择导入文件"); |
||||
|
} |
||||
|
} |
||||
|
} else { |
||||
|
this.closeView(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
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("factory", "03"); |
||||
|
fd.append("beginDate", this.startTimeVale); |
||||
|
fd.append("endDate", this.endTimeVale); |
||||
|
fd.append("model", this.CarModekValue); |
||||
|
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; |
||||
|
} |
||||
|
this.$emit("status", "finish"); |
||||
|
this.loading = false; |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
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" : ""); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
@import "@/styles/xr-theme.scss"; |
||||
|
.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: 300px; |
||||
|
|
||||
|
/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; |
||||
|
padding-top: 50px; |
||||
|
|
||||
|
&__icon { |
||||
|
font-size: 40px; |
||||
|
color: $xr-color-primary; |
||||
|
} |
||||
|
|
||||
|
&__des { |
||||
|
margin-top: -15px; |
||||
|
color: #333; |
||||
|
font-size: 30px; |
||||
|
} |
||||
|
|
||||
|
&__detail { |
||||
|
margin-top: 35px; |
||||
|
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> |
||||
|
|
||||
|
|
||||
|
|
@ -1,93 +0,0 @@ |
|||||
<template> |
|
||||
<el-dialog v-loading="loading" @close="hiddenView"> |
|
||||
<flexbox class="content"> |
|
||||
<div class="book"> |
|
||||
<el-input type="text" v-model="paster" @paste.native="pasteMe" /> |
|
||||
<el-table :data="tableData"> |
|
||||
<el-table-column |
|
||||
prop="name" |
|
||||
label="说明:只支持从Excel上粘贴复制,不支持手输!" |
|
||||
width="120" |
|
||||
> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
</div> |
|
||||
</flexbox> |
|
||||
<div slot="footer" class="dialog-footer"> |
|
||||
<el-button type="primary" @click="submiteBillNo()">确定录入</el-button> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</template> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
props: { |
|
||||
typeName: { |
|
||||
type: String, |
|
||||
default: "", |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
loading: false, |
|
||||
paster: "", |
|
||||
pasterValue: "", |
|
||||
tableData: [ |
|
||||
{ |
|
||||
name: "单据号", |
|
||||
}, |
|
||||
], |
|
||||
}; |
|
||||
}, |
|
||||
methods: { |
|
||||
submiteBillNo() { |
|
||||
var getbillNo = this.pasterValue.substring( |
|
||||
0, |
|
||||
this.pasterValue.length - 1 |
|
||||
); |
|
||||
this.$emit("savebillNo", { biilNo: getbillNo, billName: this.typeName }); |
|
||||
this.hiddenView(); |
|
||||
}, |
|
||||
hiddenView() { |
|
||||
this.$emit("close"); |
|
||||
}, |
|
||||
pasteMe(e) { |
|
||||
let source = e.clipboardData.getData("Text"); |
|
||||
// 首先对源头进行解析 |
|
||||
let rows = source.split("\r\n"); // 拆成很多行 |
|
||||
this.pasterValue = ""; |
|
||||
for (let i = 0; i < rows.length; i++) { |
|
||||
if (rows[i] != "") { |
|
||||
// 如果某一行不是空,再按列拆分 |
|
||||
let columns = rows[i].split("\t"); // 已经按列划分 |
|
||||
// console.log(columns); |
|
||||
let dataone = {}; // 声明一行数组 |
|
||||
for (let j = 0; j < columns.length; j++) { |
|
||||
// 读取tableData里的第j对应的key值 |
|
||||
let keys = Object.keys(this.tableData[j]); // key的名 |
|
||||
dataone[keys[j]] = columns[j]; |
|
||||
this.pasterValue += columns[j] + ","; |
|
||||
} |
|
||||
this.tableData.push(dataone); |
|
||||
console.log(this.tableData); |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
<style lang="scss" scoped> |
|
||||
.book { |
|
||||
width: 50%; |
|
||||
height: 400px; |
|
||||
border: 1px solid red; |
|
||||
margin: 0 auto; |
|
||||
margin-top: 50px; |
|
||||
overflow-y: scroll; |
|
||||
} |
|
||||
.el-input__inner { |
|
||||
height: 100px !important; |
|
||||
} |
|
||||
</style> |
|
@ -0,0 +1,594 @@ |
|||||
|
<template> |
||||
|
<el-dialog |
||||
|
:visible="show" |
||||
|
:title="'导入' + crmTypeName" |
||||
|
:append-to-body="true" |
||||
|
:close-on-click-modal="false" |
||||
|
width="600px" |
||||
|
@close="closeView" |
||||
|
> |
||||
|
<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、提供的导入模板需要文本格式,即.txt文件格式! |
||||
|
</div> |
||||
|
<div class="sections__tips"> |
||||
|
2、请勿删除模板中设置的字段! |
||||
|
</div> |
||||
|
<div class="sections__tips">3、导入文件大小请勿超过100MB!</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="sections"> |
||||
|
<div class="sections__title"> |
||||
|
二、导入条件设置(年、月,工厂,无则不用设置)。 |
||||
|
</div> |
||||
|
<div class="sections__tips"> |
||||
|
<span class="demonstration">选择年份:</span> |
||||
|
<el-date-picker |
||||
|
v-model="yeareVale" |
||||
|
style="width: 188px" |
||||
|
type="year" |
||||
|
format="yyyy 年" |
||||
|
value-format="yyyy" |
||||
|
placeholder="选择年" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
<span class="demonstration">选择月份:</span> |
||||
|
<el-date-picker |
||||
|
v-model="monthVale" |
||||
|
style="width: 188px" |
||||
|
type="month" |
||||
|
format=" MM 月" |
||||
|
value-format="MM" |
||||
|
placeholder="选择月" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</div> |
||||
|
<div class="sections__tips"> |
||||
|
<span class="demonstration">选择工厂:</span> |
||||
|
<el-select |
||||
|
v-model="selectValue" |
||||
|
clearable |
||||
|
style="width: 188px" |
||||
|
placeholder="请选择" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in factoryList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value" |
||||
|
></el-option> |
||||
|
</el-select> |
||||
|
</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="1" |
||||
|
> |
||||
|
<i class="el-icon-upload"></i> |
||||
|
<div class="el-upload__text"> |
||||
|
将文件拖到此处,或 |
||||
|
<em>点击上传</em> |
||||
|
</div> |
||||
|
</el-upload> |
||||
|
</flexbox> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div |
||||
|
v-loading="loading" |
||||
|
v-else-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="wk wk-success result-info__icon" /> |
||||
|
<p class="result-info__detail"> |
||||
|
导入成功数据: |
||||
|
<span class="result-info__detail--all" |
||||
|
>{{ this.resultData.totalSize }} </span |
||||
|
>条有效数据! |
||||
|
</p> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<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 { |
||||
|
loading: false, |
||||
|
fieldList: [], |
||||
|
factoryList: [], //工厂列表 |
||||
|
selectValue: [], //工厂选择项 |
||||
|
config: 1, // 1 覆盖,2跳过 |
||||
|
//file: { name: "" }, |
||||
|
page: 1, |
||||
|
listQuery: { |
||||
|
Filters: [ |
||||
|
{ |
||||
|
logic: 0, |
||||
|
column: "description", |
||||
|
action: 0, |
||||
|
value: "工厂", |
||||
|
}, //默认查询可用的 |
||||
|
], |
||||
|
SkipCount: 0, |
||||
|
MaxResultCount: 1000, |
||||
|
}, |
||||
|
|
||||
|
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: "", |
||||
|
}, |
||||
|
processData: { |
||||
|
count: 0, |
||||
|
status: "", |
||||
|
}, |
||||
|
messageId: null, |
||||
|
intervalTimer: null, |
||||
|
fileuploadList: [], |
||||
|
isLt2M: "", |
||||
|
isFileType: "", |
||||
|
historyPopoverShow: false, |
||||
|
yeareVale: "", |
||||
|
monthVale: "", |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
sureTitle() { |
||||
|
return { |
||||
|
1: "立即导入", |
||||
|
2: "最小化", |
||||
|
3: "确定", |
||||
|
}[this.stepsActive]; |
||||
|
}, |
||||
|
showCancel() { |
||||
|
return this.stepsActive != 2; |
||||
|
}, |
||||
|
crmTypeName() { |
||||
|
return ( |
||||
|
{ |
||||
|
fis: "FIS发运数据", |
||||
|
materialRelation: "零件匹配关系", |
||||
|
material: "物料主数据", |
||||
|
inventorydetail: "库存明细", |
||||
|
codeSetting: "通用代码设置", |
||||
|
estimatedSum: "应付暂估汇总", |
||||
|
estimatedInventoryDetail: "应付暂估收货明细", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
getWebApi() { |
||||
|
return ( |
||||
|
{ |
||||
|
fis: "/api/settleaccount/FIS/ExcelImport", |
||||
|
materialRelation: "/api/settleaccount/materialRelation/ExcelImport", |
||||
|
material: "/api/settleaccount/material/ExcelImport", |
||||
|
inventorydetail: "/api/settleaccount/InventoryDetail/ExcelImport", |
||||
|
codeSetting: "/api/settleaccount/CodeSetting/ExcelImport", |
||||
|
estimatedSum: "/api/settleaccount/EstimatedSum/ExcelImport", |
||||
|
estimatedInventoryDetail: |
||||
|
"/api/settleaccount/EstimatedInventoryDetail/ExcelImport", |
||||
|
}[this.crmType] || "" |
||||
|
); |
||||
|
}, |
||||
|
httpHeader() { |
||||
|
//文件上传时,带token认证信息,提高安全性 |
||||
|
return { |
||||
|
Authorization: "Bearer " + getToken(), |
||||
|
}; |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
show: function (val) { |
||||
|
this.getAllFactory(); |
||||
|
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: { |
||||
|
getAllFactory() { |
||||
|
//取工厂列表信息 |
||||
|
this.factoryList = []; |
||||
|
this.listQuery.SkipCount = (this.page - 1) * 500; |
||||
|
this.$axios |
||||
|
.posts("/api/settleaccount/CodeSetting/list", this.listQuery) |
||||
|
.then((response) => { |
||||
|
response.items.forEach((element) => { |
||||
|
let options = {}; |
||||
|
options.value = element.project; |
||||
|
options.label = element.value; |
||||
|
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 (["txt"].indexOf(FileExt.toLowerCase()) === -1) { |
||||
|
this.$message({ |
||||
|
type: "warning", |
||||
|
message: "只支持文本txt类型文件!", |
||||
|
}); |
||||
|
this.isFileType = "0"; |
||||
|
return false; |
||||
|
} else { |
||||
|
this.isFileType = "1"; |
||||
|
} |
||||
|
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.fileuploadList === [] || |
||||
|
JSON.stringify(this.fileuploadList) === "[]" |
||||
|
) { |
||||
|
this.$message.error("请选择导入文件"); |
||||
|
return false; |
||||
|
} |
||||
|
if (this.stepsActive == 1) { |
||||
|
if (this.stepList[0].status == "wait") { |
||||
|
this.stepsActive = 2; |
||||
|
this.loading = true; |
||||
|
setTimeout(() => { |
||||
|
this.saveTemplateData(); |
||||
|
}, 1000); |
||||
|
if (this.stepList[1].status == "finish") { |
||||
|
} |
||||
|
} else { |
||||
|
if (this.fileuploadList === "[]") { |
||||
|
this.$message.error("请选择导入文件"); |
||||
|
} |
||||
|
} |
||||
|
} else { |
||||
|
this.closeView(); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
saveTemplateData() { |
||||
|
//保存项目、合同管理、客户等信息的共用方法 |
||||
|
//--上传附件,批量或拖拽 |
||||
|
if (JSON.stringify(this.fileuploadList) != "[]") { |
||||
|
let fd = new FormData(); |
||||
|
const { fileuploadList } = this; |
||||
|
fileuploadList.forEach((file) => { |
||||
|
fd.append("files", file); // 添加文件 |
||||
|
}); |
||||
|
fd.append("yeareVale", this.yeareVale); |
||||
|
fd.append("monthVale", this.monthVale); |
||||
|
const webapi = this.getWebApi; |
||||
|
this.$axios |
||||
|
.posts(webapi, fd) |
||||
|
.then((res) => { |
||||
|
//此处,导出模板上设置的错误 |
||||
|
this.loading = false; |
||||
|
this.resultData = res; |
||||
|
this.stepList[1].status = "finish"; |
||||
|
this.resultData.totalSize = res.length; //返回导入成功的数据总数 |
||||
|
if ( |
||||
|
this.isLt2M === "1" && |
||||
|
this.isFileType === "1" && |
||||
|
res.totalSize > 0 |
||||
|
) { |
||||
|
this.$notify({ |
||||
|
title: "成功", |
||||
|
message: "数据导入成功!", |
||||
|
type: "success", |
||||
|
duration: 2000, |
||||
|
}); |
||||
|
} |
||||
|
this.stepsActive = 3; |
||||
|
this.$emit("status", "finish"); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
} else { |
||||
|
this.loading = false; |
||||
|
this.$message({ |
||||
|
message: "未上传任何附件,请查检!", |
||||
|
type: "warning", |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
// 关闭操作 |
||||
|
closeView() { |
||||
|
this.$emit("update:show", false); |
||||
|
this.$emit("close", this.stepsActive == 3 ? "finish" : ""); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style scoped lang="scss"> |
||||
|
@import "@/styles/xr-theme.scss"; |
||||
|
.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: 300px; |
||||
|
|
||||
|
/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; |
||||
|
padding-top: 50px; |
||||
|
|
||||
|
&__icon { |
||||
|
font-size: 40px; |
||||
|
color: $xr-color-primary; |
||||
|
} |
||||
|
|
||||
|
&__des { |
||||
|
margin-top: -15px; |
||||
|
color: #333; |
||||
|
font-size: 30px; |
||||
|
} |
||||
|
|
||||
|
&__detail { |
||||
|
margin-top: 35px; |
||||
|
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> |
||||
|
|
||||
|
|
||||
|
|
@ -1,136 +0,0 @@ |
|||||
|
|
||||
// 盒子滚动条拖拽
|
|
||||
import { on, off } from '@/utils/dom' |
|
||||
import Vue from 'vue' |
|
||||
import { debounce } from 'throttle-debounce' |
|
||||
|
|
||||
let targetDrag = { // 托拽
|
|
||||
isDown: false, |
|
||||
coord: { |
|
||||
x: 0, |
|
||||
y: 0 |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
let dom = null |
|
||||
let ignoreClass = [] // 忽略的类名
|
|
||||
|
|
||||
const scrollMousedown = event => { |
|
||||
dom.style.cursor = 'pointer' |
|
||||
targetDrag.isDown = true |
|
||||
targetDrag.coord.x = event.pageX |
|
||||
targetDrag.coord.y = event.pageY |
|
||||
} |
|
||||
|
|
||||
const scrollMouseup = event => { |
|
||||
dom.style.cursor = 'default' |
|
||||
targetDrag.isDown = false |
|
||||
targetDrag.coord.x = 0 |
|
||||
targetDrag.coord.y = 0 |
|
||||
} |
|
||||
|
|
||||
const scrollMousemove = event => { |
|
||||
const movX = targetDrag.coord.x - event.pageX |
|
||||
targetDrag.coord.x = event.pageX |
|
||||
if (checkDomIsIgnore(event)) { |
|
||||
dom.style.cursor = 'default' |
|
||||
targetDrag.isDown = false |
|
||||
} else if (targetDrag.isDown) { |
|
||||
dom.scrollLeft = dom.scrollLeft + movX |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
const scrollMouseout = event => { |
|
||||
dom.style.cursor = 'default' |
|
||||
targetDrag.isDown = false |
|
||||
} |
|
||||
|
|
||||
const scrollMousewheel = event => { |
|
||||
if (checkIsIgnore(event)) { |
|
||||
dom.style.cursor = 'default' |
|
||||
targetDrag.isDown = false |
|
||||
} else { |
|
||||
dom.scrollLeft += event.deltaY |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 检查dom是否忽略 |
|
||||
* @param {*} e |
|
||||
*/ |
|
||||
const checkDomIsIgnore = debounce(300, (e) => { |
|
||||
let ignore = false |
|
||||
ignoreClass.forEach(element => { |
|
||||
var items = document.getElementsByClassName(element) |
|
||||
if (items && !ignore) { |
|
||||
for (let index = 0; index < items.length; index++) { |
|
||||
const element = items[index] |
|
||||
if (element.contains(e.target)) { |
|
||||
ignore = true |
|
||||
break |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
return ignore |
|
||||
}) |
|
||||
|
|
||||
/** |
|
||||
* 忽略滚轮 |
|
||||
* @param {*} e |
|
||||
*/ |
|
||||
const checkIsIgnore = (e) => { |
|
||||
let ignore = false |
|
||||
ignoreClass.forEach(element => { |
|
||||
var items = document.getElementsByClassName(element) |
|
||||
if (items && !ignore) { |
|
||||
for (let index = 0; index < items.length; index++) { |
|
||||
const element = items[index] |
|
||||
const rect = element.getBoundingClientRect() |
|
||||
if ((e.clientY > rect.top && (e.clientY < (rect.top + rect.height))) && (e.clientX > rect.left && (e.clientX < (rect.left + rect.width)))) { |
|
||||
ignore = true |
|
||||
break |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
return ignore |
|
||||
} |
|
||||
|
|
||||
export default Vue.directive('scrollx', { |
|
||||
bind: function(el, binding, vnode) { |
|
||||
const valueData = binding.value |
|
||||
ignoreClass = valueData.ignoreClass |
|
||||
}, |
|
||||
|
|
||||
inserted: function(el) { |
|
||||
dom = el |
|
||||
|
|
||||
// 鼠标按下
|
|
||||
on(el, 'mousedown', scrollMousedown) |
|
||||
on(el, 'mouseout', scrollMouseout) |
|
||||
on(el, 'wheel', scrollMousewheel) |
|
||||
// 鼠标释放
|
|
||||
on(el, 'mouseup', scrollMouseup) |
|
||||
// 鼠标托拽
|
|
||||
on(el, 'mousemove', scrollMousemove) |
|
||||
}, |
|
||||
|
|
||||
unbind: function(el) { |
|
||||
off(el, 'mousedown', scrollMousedown) |
|
||||
off(el, 'mouseup', scrollMouseup) |
|
||||
off(el, 'mouseout', scrollMouseout) |
|
||||
off(el, 'wheel', scrollMousewheel) |
|
||||
off(el, 'mousemove', scrollMousemove) |
|
||||
|
|
||||
// 清空
|
|
||||
targetDrag = { // 托拽
|
|
||||
isDown: false, |
|
||||
coord: { |
|
||||
x: 0, |
|
||||
y: 0 |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 820 B |
Before Width: | Height: | Size: 2.7 KiB |
@ -0,0 +1,116 @@ |
|||||
|
<template> |
||||
|
<div class="navbar"> |
||||
|
<img |
||||
|
:src="logo" |
||||
|
class="logo" > |
||||
|
<div class="nav-title"> |
||||
|
系统设置 |
||||
|
</div> |
||||
|
<div |
||||
|
class="back-home" |
||||
|
@click="enterHome">返回首页</div> |
||||
|
<div |
||||
|
class="go-out" |
||||
|
@click="enterLogin">退出系统</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { Loading } from 'element-ui' |
||||
|
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
export default { |
||||
|
components: {}, |
||||
|
props: { |
||||
|
navIndex: { |
||||
|
type: Number, |
||||
|
default: 0 |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return {} |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapGetters(['logo']) |
||||
|
}, |
||||
|
mounted() {}, |
||||
|
methods: { |
||||
|
enterHome() { |
||||
|
this.$router.replace({ |
||||
|
path: '/' |
||||
|
}) |
||||
|
}, |
||||
|
enterLogin() { |
||||
|
this.$confirm('退出登录?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}) |
||||
|
.then(() => { |
||||
|
var loading = Loading.service({ |
||||
|
target: document.getElementById('#app') |
||||
|
}) |
||||
|
this.$store |
||||
|
.dispatch('user/logout') |
||||
|
.then(() => { |
||||
|
loading.close() |
||||
|
this.$router.push('/login') |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
.navbar { |
||||
|
height: 45px; |
||||
|
min-height: 45px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding: 0 90px 0 30px; |
||||
|
background-color: white; |
||||
|
.logo { |
||||
|
width: 150px; |
||||
|
height: 40px; |
||||
|
display: block; |
||||
|
flex-shrink: 0; |
||||
|
margin-right: 60px; |
||||
|
} |
||||
|
.nav-title { |
||||
|
flex: 1; |
||||
|
font-size: 16px; |
||||
|
color: #333333; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.back-home { |
||||
|
width: 94px; |
||||
|
height: 36px; |
||||
|
line-height: 36px; |
||||
|
background-color: #3e84e9; |
||||
|
border-radius: 3px; |
||||
|
text-align: center; |
||||
|
color: #fff; |
||||
|
font-size: 14px; |
||||
|
margin-right: 10px; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.go-out { |
||||
|
width: 94px; |
||||
|
height: 36px; |
||||
|
line-height: 36px; |
||||
|
background-color: #c2c2c2; |
||||
|
border-radius: 3px; |
||||
|
text-align: center; |
||||
|
color: #fff; |
||||
|
font-size: 14px; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
</style> |
||||
|
|
@ -0,0 +1,350 @@ |
|||||
|
<template> |
||||
|
<div class="container"> |
||||
|
<el-popover |
||||
|
v-if="createButtonTitle != ''" |
||||
|
:offset="addOffset" |
||||
|
:visible-arrow="false" |
||||
|
placement="right" |
||||
|
popper-class="no-padding-popover" |
||||
|
trigger="hover"> |
||||
|
<slot name="add"/> |
||||
|
<div |
||||
|
slot="reference" |
||||
|
:style="{ 'background-color': createButtonBackgroundColor }" |
||||
|
class="create-button" |
||||
|
@click="quicklyCreate"> |
||||
|
<div |
||||
|
v-show="!buttonNameCollapse" |
||||
|
class="button-name">{{ createButtonTitle }}</div> |
||||
|
<div |
||||
|
v-show="!buttonNameCollapse" |
||||
|
class="button-line"/> |
||||
|
<i |
||||
|
:class="createButtonIcon" |
||||
|
class="button-mark"/> |
||||
|
</div> |
||||
|
</el-popover> |
||||
|
<el-menu |
||||
|
:default-active="activeIndex" |
||||
|
:style="{'border-right-color': backgroundColor}" |
||||
|
:text-color="textColor" |
||||
|
:background-color="backgroundColor" |
||||
|
:active-text-color="activeTextColor" |
||||
|
:collapse="isCollapse()" |
||||
|
class="el-menu-vertical" |
||||
|
:unique-opened="false" |
||||
|
:collapse-transition="false" |
||||
|
@select="handleselect" |
||||
|
> |
||||
|
<template |
||||
|
v-for="(item, index) in getShowMenu(items)"> |
||||
|
<router-link |
||||
|
v-if="!item.children" |
||||
|
:key="index" |
||||
|
:to="getFullPath(item.path)"> |
||||
|
<el-menu-item |
||||
|
:index="getFullPath(item.path)" |
||||
|
:class="{'menu-item-select': activeIndex == getFullPath(item.path)}" |
||||
|
class="menu-item-defalt"> |
||||
|
<i class="iconfont" :class="item.meta.icon" :style="{ 'color': activeIndex == getFullPath(item.path) ? activeTextColor : textColor, fontSize: item.meta.fontSize || '16px'}"/> |
||||
|
<span slot="title">{{ item.meta.title }}</span> |
||||
|
<el-badge |
||||
|
v-if="item.meta.num && item.meta.num > 0" |
||||
|
:max="99" |
||||
|
:value="item.meta.num"/> |
||||
|
</el-menu-item> |
||||
|
</router-link> |
||||
|
<el-submenu |
||||
|
v-else |
||||
|
:key="index" |
||||
|
:index="getFullPath(item.path)"> |
||||
|
<template |
||||
|
v-if="!item.hidden" |
||||
|
slot="title"> |
||||
|
<i |
||||
|
:class="item.meta.icon" |
||||
|
:style="{fontSize: item.meta.fontSize || '16px'}" |
||||
|
class="iconfont"/> |
||||
|
<span slot="title">{{ item.meta.title }}</span> |
||||
|
</template> |
||||
|
<router-link |
||||
|
v-for="(subitem, subindex) in getShowMenu(item.children)" |
||||
|
:key="subindex" |
||||
|
:to="getFullPath(subitem.path)"> |
||||
|
<el-menu-item |
||||
|
:index="getFullPath(subitem.path)" |
||||
|
:class="{'menu-item-select': activeIndex == getFullPath(subitem.path) }" |
||||
|
class="menu-item-defalt"> |
||||
|
{{ subitem.meta.title }} |
||||
|
</el-menu-item> |
||||
|
</router-link> |
||||
|
</el-submenu> |
||||
|
</template> |
||||
|
</el-menu> |
||||
|
<div |
||||
|
:style="{ 'background-color':backgroundColor }" |
||||
|
class="sidebar-bottom"> |
||||
|
<div class="sidebar-container"> |
||||
|
<img |
||||
|
:style="{ 'right': buttonNameCollapse ? '3px' : '0' }" |
||||
|
class="collapse-button" |
||||
|
src="@/assets/img/collapse_white.png" |
||||
|
alt="" |
||||
|
@click="toggleSideBarClick"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import variables from '@/styles/variables.scss' |
||||
|
import Logo from './Sidebar/Logo' |
||||
|
export default { |
||||
|
inject: ['reload'], // 注入重载的功能(注入依赖) |
||||
|
name: 'Sidebar', |
||||
|
components: { Logo }, |
||||
|
props: { |
||||
|
mainRouter: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
addOffset: { |
||||
|
type: Number, |
||||
|
default: 70 |
||||
|
}, |
||||
|
/** 选择项目 */ |
||||
|
items: { |
||||
|
type: Array, |
||||
|
default: () => { |
||||
|
return [] |
||||
|
} |
||||
|
}, |
||||
|
backgroundColor: { |
||||
|
type: String, |
||||
|
default: '#2D3037' |
||||
|
}, |
||||
|
activeTextColor: { |
||||
|
type: String, |
||||
|
default: '#fff' |
||||
|
}, |
||||
|
textColor: { |
||||
|
type: String, |
||||
|
default: '#bebec0' |
||||
|
}, |
||||
|
selectLineColor: { |
||||
|
type: String, |
||||
|
default: '#3E84E9' |
||||
|
}, |
||||
|
selectBackgroundColor: { |
||||
|
type: String, |
||||
|
default: '#454E57' |
||||
|
}, |
||||
|
createButtonTitle: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
createButtonBackgroundColor: { |
||||
|
type: String, |
||||
|
default: '#3E84E9' |
||||
|
}, |
||||
|
createButtonIcon: { |
||||
|
type: String, |
||||
|
default: 'el-icon-arrow-right' |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
collapse: false, // 菜单开关 |
||||
|
buttonNameCollapse: false, |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapGetters(['activeIndex', |
||||
|
'sidebar']) |
||||
|
}, |
||||
|
watch: { |
||||
|
// collapse: function(val) { |
||||
|
// if (val) { |
||||
|
// this.buttonNameCollapse = val |
||||
|
// } else { |
||||
|
// setTimeout(() => { |
||||
|
// this.buttonNameCollapse = val |
||||
|
// }, 300) |
||||
|
// } |
||||
|
// } |
||||
|
'$route': function(){ |
||||
|
// this.reload(); |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
mounted() { |
||||
|
}, |
||||
|
methods: { |
||||
|
variables() { |
||||
|
return variables |
||||
|
}, |
||||
|
isCollapse() { |
||||
|
return !this.sidebar.opened |
||||
|
}, |
||||
|
showLogo() { |
||||
|
return this.$store.state.settings.sidebarLogo |
||||
|
}, |
||||
|
toggleSideBarClick() { |
||||
|
this.$store.dispatch('toggleSideBar') |
||||
|
}, |
||||
|
|
||||
|
// 快速创建 |
||||
|
quicklyCreate() { |
||||
|
this.$emit('quicklyCreate') |
||||
|
}, |
||||
|
|
||||
|
getFullPath(path) { |
||||
|
return `/${this.mainRouter}/${path}` |
||||
|
}, |
||||
|
|
||||
|
getShowMenu(array) { |
||||
|
return array.filter(item => { |
||||
|
return !item.hidden |
||||
|
}) |
||||
|
}, |
||||
|
handleselect: function (a, b) { |
||||
|
this.reload() // 点击侧边栏重新载入页面 |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.container { |
||||
|
position: relative; |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.el-menu-vertical:not(.el-menu--collapse) { |
||||
|
width: 200px; |
||||
|
min-height: 200px; |
||||
|
} |
||||
|
|
||||
|
.el-menu-vertical { |
||||
|
height: 100%; |
||||
|
overflow: auto; |
||||
|
padding-bottom: 48px; |
||||
|
.el-submenu.is-active { |
||||
|
.el-submenu__title { |
||||
|
.wukong { |
||||
|
color: white; |
||||
|
} |
||||
|
span { |
||||
|
color: white; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.menu-item-icon-container { |
||||
|
display: inline-block; |
||||
|
margin-right: 10px; |
||||
|
.menu-item-icon-flex { |
||||
|
width: 22px; |
||||
|
height: 22px; |
||||
|
position: relative; |
||||
|
.menu-item-icon { |
||||
|
display: block; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.menu-item-defalt { |
||||
|
border-left: 2px solid transparent; |
||||
|
height: 46px; |
||||
|
line-height: 46px; |
||||
|
} |
||||
|
|
||||
|
.menu-item-select { |
||||
|
border-left: 2px solid #3e84e9; |
||||
|
background-color: #454e57 !important; |
||||
|
} |
||||
|
|
||||
|
.create-button-container { |
||||
|
padding: 15px 12px 15px 12px; |
||||
|
color: white; |
||||
|
font-size: 14px; |
||||
|
cursor: pointer; |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
z-index: 2; |
||||
|
|
||||
|
.create-button { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
box-sizing: border-box; |
||||
|
padding: 0 15px; |
||||
|
height: 36px; |
||||
|
border-radius: 4px; |
||||
|
|
||||
|
.button-name { |
||||
|
flex: 1; |
||||
|
} |
||||
|
|
||||
|
.button-line { |
||||
|
height: 10px; |
||||
|
background-color: white; |
||||
|
width: 1px; |
||||
|
margin: 0 20px 0 10px; |
||||
|
opacity: 0.3; |
||||
|
} |
||||
|
|
||||
|
.button-mark { |
||||
|
width: 12px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.side-bar { |
||||
|
height: 32px; |
||||
|
padding: 0 16px 16px; |
||||
|
position: absolute; |
||||
|
bottom: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
background: #eee; |
||||
|
} |
||||
|
|
||||
|
.sidebar-bottom { |
||||
|
position: absolute; |
||||
|
bottom: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
height: 48px; |
||||
|
|
||||
|
.sidebar-container { |
||||
|
position: relative; |
||||
|
height: 48px; |
||||
|
/*display: none;*/ |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.collapse-button { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
padding: 18px 20px; |
||||
|
} |
||||
|
|
||||
|
.wukong { |
||||
|
margin-right: 8px; |
||||
|
} |
||||
|
|
||||
|
// 消息数 |
||||
|
.el-badge { |
||||
|
position: absolute; |
||||
|
right: 15px; |
||||
|
top: 5px; |
||||
|
/deep/ .el-badge__content { |
||||
|
border-width: 0; |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,154 @@ |
|||||
|
<template> |
||||
|
<el-container> |
||||
|
<el-header class="nav-container"> |
||||
|
<navbar :nav-index="0" @nav-items-click="navClick" /> |
||||
|
</el-header> |
||||
|
<el-container> |
||||
|
<el-aside width="auto" class="aside-container"> |
||||
|
<sidebar :items="sidebarItems" main-router="first"> </sidebar> |
||||
|
</el-aside> |
||||
|
<el-main id="workbench-main-container"> |
||||
|
<div :class="{ 'fixed-header': fixedHeader }"> |
||||
|
<tags-view v-if="needTagsView" /> |
||||
|
</div> |
||||
|
<app-main /> |
||||
|
</el-main> |
||||
|
</el-container> |
||||
|
</el-container> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapGetters, mapState } from "vuex"; |
||||
|
import { Navbar, Sidebar, AppMain, TagsView } from "./components"; |
||||
|
import { vueTestRouterMenu } from "@/router/modules/first"; |
||||
|
import Lockr from "lockr"; |
||||
|
|
||||
|
export default { |
||||
|
name: "Layout", |
||||
|
components: { |
||||
|
Navbar, |
||||
|
Sidebar, |
||||
|
AppMain, |
||||
|
TagsView, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
addDialog: false, |
||||
|
list: [ |
||||
|
{ |
||||
|
label: "日志", |
||||
|
icon: "log", |
||||
|
}, |
||||
|
{ |
||||
|
label: "审批", |
||||
|
icon: "examine", |
||||
|
}, |
||||
|
{ |
||||
|
label: "任务", |
||||
|
icon: "task", |
||||
|
}, |
||||
|
{ |
||||
|
label: "日程", |
||||
|
icon: "schedule", |
||||
|
}, |
||||
|
{ |
||||
|
label: "公告", |
||||
|
icon: "notice", |
||||
|
}, |
||||
|
], |
||||
|
// 新建 |
||||
|
showCategorySelect: false, |
||||
|
isCreate: false, // 是创建 |
||||
|
createInfo: {}, // 创建所需要的id 标题名信息 |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
computed: { |
||||
|
...mapGetters(["first", "firstRouters", "roles"]), |
||||
|
...mapState({ |
||||
|
sidebar: (state) => state.app.sidebar, |
||||
|
device: (state) => state.app.device, |
||||
|
showSettings: (state) => state.settings.showSettings, |
||||
|
needTagsView: (state) => state.settings.tagsView, |
||||
|
fixedHeader: (state) => state.settings.fixedHeader, |
||||
|
}), |
||||
|
sidebarItems() { |
||||
|
// const workbenchMenus = this.firstRouters.children |
||||
|
// console.log(this.firstRouters) |
||||
|
// return workbenchMenus |
||||
|
let currentUserRoles = Lockr.get("userRoles"); |
||||
|
for (let index = 0; index < vueTestRouterMenu.length; index++) { |
||||
|
const routerMenuItem = vueTestRouterMenu[index]; |
||||
|
for (let j = 0; j < routerMenuItem.children.length; j++) { |
||||
|
if (routerMenuItem.children[j].meta.roles) |
||||
|
routerMenuItem.children[j].hidden = !this.in_array( |
||||
|
routerMenuItem.children[j].meta.roles, |
||||
|
this.roles |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
return vueTestRouterMenu; |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
created() {}, |
||||
|
|
||||
|
methods: { |
||||
|
navClick(index) {}, |
||||
|
// 新增跳转 |
||||
|
addSkip(val) { |
||||
|
switch (val.label) { |
||||
|
case "日志": |
||||
|
// this.$router.push({ path: 'journal', query: { routerKey: 1 }}) |
||||
|
break; |
||||
|
case "审批": |
||||
|
this.showCategorySelect = true; |
||||
|
break; |
||||
|
case "任务": |
||||
|
// this.$router.push({ path: 'task', query: { routerKey: 1 }}) |
||||
|
break; |
||||
|
case "日程": |
||||
|
//this.$router.push({ path: 'schedule-new', query: { routerKey: 1 }}) |
||||
|
break; |
||||
|
case "公告": |
||||
|
//this.$router.push({ path: 'notice-new', query: { routerKey: 1 }}) |
||||
|
break; |
||||
|
} |
||||
|
}, |
||||
|
in_array(stringToSearch, arrayToSearch) { |
||||
|
for (let s = 0; s < arrayToSearch.length; s++) { |
||||
|
const thisEntry = arrayToSearch[s].toString(); |
||||
|
if (thisEntry == stringToSearch) { |
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
|
return false; |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
@import "./styles/common.scss"; |
||||
|
.el-container { |
||||
|
min-height: 0; |
||||
|
} |
||||
|
.aside-container { |
||||
|
position: relative; |
||||
|
background-color: #2d3037; |
||||
|
box-sizing: border-box; |
||||
|
border-right: solid 1px #e6e6e6; |
||||
|
overflow: visible; |
||||
|
} |
||||
|
|
||||
|
.nav-container { |
||||
|
padding: 0; |
||||
|
/*box-shadow: 0px 1px 2px #dbdbdb;*/ |
||||
|
z-index: 100; |
||||
|
min-width: 1200px; |
||||
|
height: 45px !important; |
||||
|
} |
||||
|
.quick-add { |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,173 @@ |
|||||
|
/** 车轮数据比对路由 */ |
||||
|
//import Layout from '@/layout/firstLayout'
|
||||
|
import Layout from '@/layout' |
||||
|
|
||||
|
const BTOutDataRouter = { |
||||
|
path: '/bt', |
||||
|
component: Layout, |
||||
|
redirect: 'bt', |
||||
|
name: '奔腾-数据输出', |
||||
|
meta: { |
||||
|
requiresAuth: true, |
||||
|
title: '奔腾-数据输出', |
||||
|
index: 0, |
||||
|
type: 'crm', |
||||
|
icon: '奔腾', |
||||
|
keepAlive: false, |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/bt-stockUnsettledDiffReport', |
||||
|
component: () => import('@/views/ux/benteng-out-data/stockUnsettledDiffReport'), |
||||
|
name: 'stockUnsettledDiffReport',//命名路由
|
||||
|
meta: { |
||||
|
title: '看板未结数与期末库存差异', |
||||
|
roles: ['SettleAccount.StockUnsettledDiffReports'], |
||||
|
icon: '调整' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/bt-stockSettledDiffReport', |
||||
|
component: () => import('@/views/ux/benteng-out-data/stockSettledDiffReport'), |
||||
|
name: 'stockSettledDiffReport', |
||||
|
meta: { |
||||
|
title: '结算数据对比', |
||||
|
roles: ['SettleAccount.StockSettledDiffReports'], |
||||
|
icon: '结算对比' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/bt-kb-not-consign', |
||||
|
component: () => import('@/views/ux/benteng-out-data/btNotConsignReport'), |
||||
|
name: 'btkbnotconsign', |
||||
|
meta: { |
||||
|
|
||||
|
title: '发出未结算', |
||||
|
roles: ['SettleAccount.BTNotConsignReports'], |
||||
|
icon: '未结算' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/bt-stockFisDiffReport', |
||||
|
component: () => import('@/views/ux/benteng-out-data/stockFisDiffReport'), |
||||
|
name: 'stockFisDiffReport', |
||||
|
meta: { |
||||
|
|
||||
|
title: '看板发运对比', |
||||
|
roles: ['SettleAccount.StockFisDiffReports'], |
||||
|
icon: '库存对比' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/bt-seq-kb-diff', |
||||
|
component: () => import('@/views/ux/benteng-out-data/btSeqKBDiffReport'), |
||||
|
name: 'btseqkbdiff', |
||||
|
meta: { |
||||
|
title: '车序与看板差异', |
||||
|
roles: ['SettleAccount.BTNotConsignReports'], |
||||
|
icon: '发运对比' |
||||
|
} |
||||
|
} |
||||
|
, |
||||
|
{ |
||||
|
path: '/bt-secondaryActuralDiffReport', |
||||
|
component: () => import('@/views/ux/benteng-out-data/secondaryActuralDiffReport'), |
||||
|
name: 'btsecondaryActuralDiffReport', |
||||
|
meta: { |
||||
|
title: '轿车二配相关', |
||||
|
roles: ['SettleAccount.SecondaryReports'], |
||||
|
icon: '二配' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default BTOutDataRouter |
||||
|
|
||||
|
|
||||
|
// /** 车轮数据比对路由 */
|
||||
|
// //import Layout from '@/layout/firstLayout'
|
||||
|
// import Layout from '@/layout'
|
||||
|
|
||||
|
// const BTOutDataRouter = {
|
||||
|
// path: '/bt-stockUnsettledDiffReport',
|
||||
|
// component: Layout,
|
||||
|
// redirect: '/bt-stockUnsettledDiffReport',
|
||||
|
// name: '奔腾-数据输出',
|
||||
|
// meta: {
|
||||
|
// requiresAuth: true,
|
||||
|
// title: '奔腾-数据输出',
|
||||
|
// index: 0,
|
||||
|
// type: 'crm',
|
||||
|
// icon: '奔腾',
|
||||
|
// keepAlive: false,
|
||||
|
// },
|
||||
|
// children: [
|
||||
|
// {
|
||||
|
// path: 'bt-stockUnsettledDiffReport',
|
||||
|
// component: () => import('@/views/ux/benteng-out-data/stockUnsettledDiffReport'),
|
||||
|
// name: 'stockUnsettledDiffReport',//命名路由
|
||||
|
// meta: {
|
||||
|
// title: '看板未结数与期末库存差异',
|
||||
|
// roles: ['SettleAccount.StockUnsettledDiffReports'],
|
||||
|
// icon: '调整'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'bt-stockSettledDiffReport',
|
||||
|
// component: () => import('@/views/ux/benteng-out-data/stockSettledDiffReport'),
|
||||
|
// name: 'stockSettledDiffReport',
|
||||
|
// meta: {
|
||||
|
// title: '结算数据对比',
|
||||
|
// roles: ['SettleAccount.StockSettledDiffReports'],
|
||||
|
// icon: '结算对比'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'bt-kb-not-consign',
|
||||
|
// component: () => import('@/views/ux/benteng-out-data/btNotConsignReport'),
|
||||
|
// name: 'btkbnotconsign',
|
||||
|
// meta: {
|
||||
|
|
||||
|
// title: '发出未结算',
|
||||
|
// roles: ['SettleAccount.BTNotConsignReports'],
|
||||
|
// icon: '未结算'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'bt-stockFisDiffReport',
|
||||
|
// component: () => import('@/views/ux/benteng-out-data/stockFisDiffReport'),
|
||||
|
// name: 'stockFisDiffReport',
|
||||
|
// meta: {
|
||||
|
|
||||
|
// title: '看板发运对比',
|
||||
|
// roles: ['SettleAccount.StockFisDiffReports'],
|
||||
|
// icon: '库存对比'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'bt-seq-kb-diff',
|
||||
|
// component: () => import('@/views/ux/benteng-out-data/btSeqKBDiffReport'),
|
||||
|
// name: 'btseqkbdiff',
|
||||
|
// meta: {
|
||||
|
// title: '车序与看板差异',
|
||||
|
// roles: ['SettleAccount.BTNotConsignReports'],
|
||||
|
// icon: '发运对比'
|
||||
|
// }
|
||||
|
// }
|
||||
|
// ,
|
||||
|
// {
|
||||
|
// path: 'bt-secondaryActuralDiffReport',
|
||||
|
// component: () => import('@/views/ux/benteng-out-data/secondaryActuralDiffReport'),
|
||||
|
// name: 'btsecondaryActuralDiffReport',
|
||||
|
// meta: {
|
||||
|
// title: '轿车二配相关',
|
||||
|
// roles: ['SettleAccount.SecondaryReports'],
|
||||
|
// icon: '二配'
|
||||
|
// }
|
||||
|
// }
|
||||
|
// ]
|
||||
|
// }
|
||||
|
|
||||
|
// export default BTOutDataRouter
|
||||
|
|
@ -0,0 +1,63 @@ |
|||||
|
/** 车轮数据比对路由 */ |
||||
|
//import Layout from '@/layout/firstLayout'
|
||||
|
import Layout from '@/layout' |
||||
|
|
||||
|
const bentengdataRouter = { |
||||
|
path: '/bt-car-seq', |
||||
|
component: Layout, |
||||
|
redirect: 'bt-car-seq', |
||||
|
name: '奔腾-数据输入', |
||||
|
meta: { |
||||
|
//requiresAuth: true,
|
||||
|
title: '奔腾-数据输入', |
||||
|
index: 0, |
||||
|
type: 'crm', |
||||
|
icon: '奔腾', |
||||
|
keepAlive: false, |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/bt-car-seq', |
||||
|
component: () => import('@/views/ux/benteng/BTCarSeq'), |
||||
|
name: 'btcarseq',//命名路由
|
||||
|
meta: { |
||||
|
title: '轿车车序', |
||||
|
roles: ['SettleAccount.BTCarSeqFirsts'], |
||||
|
icon: '轿车车序' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/bt-car-kb', |
||||
|
component: () => import('@/views/ux/benteng/BTCarKB'), |
||||
|
name: 'BTCarKB', |
||||
|
meta: { |
||||
|
title: '轿车看板', |
||||
|
roles: ['SettleAccount.BTCarKBFirsts'], |
||||
|
icon: '看板' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/bt-car-consign', |
||||
|
component: () => import('@/views/ux/benteng/BTCarConsign'), |
||||
|
name: 'BTCarConsign', |
||||
|
meta: { |
||||
|
title: '轿车结算数据', |
||||
|
roles: ['SettleAccount.BTCarConsigns'], |
||||
|
icon: '轿车结算数据' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/secondaryAdjustmentBT', |
||||
|
component: () => import('@/views/ux/benteng/secondaryAdjustment'), |
||||
|
name: 'SecondaryAdjustmentBT',//命名路由
|
||||
|
meta: { |
||||
|
title: '奔腾-二配数量调整', |
||||
|
roles: ['SettleAccount.BTCarConsigns'], |
||||
|
icon: '二配' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default bentengdataRouter |
||||
|
|
@ -1,44 +0,0 @@ |
|||||
//大众-FIS结算-路由
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const btcarDataRouter = { |
|
||||
path: '/cpat', |
|
||||
component: Layout, |
|
||||
redirect: 'pg', |
|
||||
name: 'btcar', |
|
||||
//hidden: true,
|
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: '一轿奔腾', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon: '单据导入', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'hq-car-platform', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_bt'), |
|
||||
name: 'ERPEI',//命名路由
|
|
||||
meta: { |
|
||||
title: '一轿奔腾导入', |
|
||||
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'hq-car-platform-export', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_m'), |
|
||||
name: 'ERPEI',//命名路由
|
|
||||
meta: { |
|
||||
title: '一轿奔腾结算核对输出', |
|
||||
//roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default btcarDataRouter |
|
||||
|
|
@ -1,153 +0,0 @@ |
|||||
/** 派格fis路由 */ |
|
||||
//import Layout from '@/layout/firstLayout'
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const pgfis = { |
|
||||
path: '/pg-fis', |
|
||||
component: Layout, |
|
||||
redirect: 'fis', |
|
||||
name: 'pgfis', |
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: 'JIT数据管理', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon: '业务', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: '/customerPartCfg', |
|
||||
component: () => import('@/views/pg-fis/basedate/customerPartCfg'), |
|
||||
name: 'customerPartCfg',//命名路由
|
|
||||
meta: { |
|
||||
title: '客户零件管理', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '发货' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/pg-assemblyCfg', |
|
||||
component: () => import('@/views/pg-fis/basedate/assemblyCfg'), |
|
||||
name: 'pg-assemblyCfg',//命名路由
|
|
||||
meta: { |
|
||||
title: '总成模块管理', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '发货' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/pg-partSwitch', |
|
||||
component: () => import('@/views/pg-fis/basedate/partSwitch'), |
|
||||
name: 'pg-partSwitch',//命名路由
|
|
||||
meta: { |
|
||||
title: '零件切换管理', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '发货' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/pg-unknownAssembly', |
|
||||
component: () => import('@/views/pg-fis/basedate/unknownAssembly'), |
|
||||
name: 'pg-unknownAssembly',//命名路由
|
|
||||
meta: { |
|
||||
title: '未知总成模块管理', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '发货' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/pg-workLine', |
|
||||
component: () => import('@/views/pg-fis/basedate/productLine'), |
|
||||
name: 'pg-workLine', |
|
||||
meta: { |
|
||||
title: '生产线权限', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '供货' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/pg-M100BIll', |
|
||||
component: () => import('@/views/pg-fis/basedate/m100BIll'), |
|
||||
name: 'pg-M100BIll',//命名路由
|
|
||||
meta: { |
|
||||
title: 'M100单据信息维护', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '客户零件' |
|
||||
} |
|
||||
}, |
|
||||
// {
|
|
||||
// path: '/pg-M100Online',
|
|
||||
// component: () => import('@/views/pg-fis/basedate/m100Online'),
|
|
||||
// name: 'pg-M100Online',//命名路由
|
|
||||
// meta: {
|
|
||||
// title: 'M100上线信息',
|
|
||||
// roles: ['SettleAccount.Reports'],
|
|
||||
// icon: '客户零件'
|
|
||||
// }
|
|
||||
// },
|
|
||||
// {
|
|
||||
// path: '/pg-m100normal-print',
|
|
||||
// component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),
|
|
||||
// name: 'pg-M100Online',//命名路由
|
|
||||
// meta: {
|
|
||||
// title: '日常打印M100信息',
|
|
||||
// //roles: ['SettleAccount.Reports'],
|
|
||||
// icon: '客户零件'
|
|
||||
// }
|
|
||||
// },
|
|
||||
// {
|
|
||||
// path: '/select',
|
|
||||
// component: () => import('@/views/pg-fis/basedate/select'),
|
|
||||
// name: 'select',//命名路由
|
|
||||
// meta: {
|
|
||||
// title: 'M100查询',
|
|
||||
// roles: ['SettleAccount.Reports'],
|
|
||||
// icon: '客户零件'
|
|
||||
// }
|
|
||||
// },
|
|
||||
{ |
|
||||
path: '/pg-R100Online', |
|
||||
component: () => import('@/views/pg-fis/basedate/r100Online'), |
|
||||
name: 'pg-R100Online',//命名路由
|
|
||||
meta: { |
|
||||
title: 'R100上线信息', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '客户零件' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/pg-weldingAssembly', |
|
||||
component: () => import('@/views/pg-fis/basedate/weldingAssembly'), |
|
||||
name: 'pg-weldingAssembly',//命名路由
|
|
||||
meta: { |
|
||||
title: '焊装总装对比', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '客户零件' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/pg-logRemind', |
|
||||
component: () => import('@/views/pg-fis/basedate/logRemind'), |
|
||||
name: 'pg-logRemind',//命名路由
|
|
||||
meta: { |
|
||||
title: '系统内通知', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '客户零件' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/pg-repeatR100', |
|
||||
component: () => import('@/views/pg-fis/basedate/repeatR100'), |
|
||||
name: 'pg-repeatR100',//命名路由
|
|
||||
meta: { |
|
||||
title: '重复报文', |
|
||||
roles: ['SettleAccount.Reports'], |
|
||||
icon: '客户零件' |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default pgfis |
|
||||
|
|
@ -1,44 +0,0 @@ |
|||||
/** 派格fis路由 */ |
|
||||
//import Layout from '@/layout/firstLayout'
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const pgfisPrint = { |
|
||||
path: '/pg-fis-print', |
|
||||
component: Layout, |
|
||||
redirect: 'fisprint', |
|
||||
name: 'pgfis', |
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: '排序单打印', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon: '业务', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: '/pg-m100normal-print', |
|
||||
component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'), |
|
||||
name: 'pg-M100Online',//命名路由
|
|
||||
meta: { |
|
||||
title: '日常打印M100信息', |
|
||||
//roles: ['SettleAccount.Reports'],
|
|
||||
icon: '客户零件' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/select', |
|
||||
component: () => import('@/views/pg-fis/basedate/select'), |
|
||||
name: 'select',//命名路由
|
|
||||
meta: { |
|
||||
title: 'M100查询', |
|
||||
//roles: ['SettleAccount.Reports'],
|
|
||||
icon: '结算对比' |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default pgfisPrint |
|
||||
|
|
@ -0,0 +1,88 @@ |
|||||
|
/** 车轮数据比对路由 */ |
||||
|
//import Layout from '@/layout/firstLayout'
|
||||
|
import Layout from '@/layout' |
||||
|
|
||||
|
const HQOutDataRouter = { |
||||
|
path: '/hq', |
||||
|
component: Layout, |
||||
|
redirect: 'hq', |
||||
|
name: 'HQ', |
||||
|
meta: { |
||||
|
//requiresAuth: true,
|
||||
|
title: '红旗-数据输出', |
||||
|
index: 0, |
||||
|
type: 'crm', |
||||
|
icon: '红旗', |
||||
|
keepAlive: false, |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/hq-standardUnConsign', |
||||
|
component: () => import('@/views/ux/hq-out-data/standardUnConsign'), |
||||
|
name: 'StandardUnConsign',//命名路由
|
||||
|
meta: { |
||||
|
|
||||
|
title: '标准看板发出未结算', |
||||
|
roles: ['SettleAccount.HQNotConsignReports'], |
||||
|
icon: '未结算' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/hq-specialUnConsign', |
||||
|
component: () => import('@/views/ux/hq-out-data/specialUnConsign'), |
||||
|
name: 'SpecialUnConsign', |
||||
|
meta: { |
||||
|
|
||||
|
title: '特殊看板发出未结算', |
||||
|
roles: ['SettleAccount.HQSPNotConsignReports'], |
||||
|
icon: '结算对比' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/hq-stockFisDiffReport', |
||||
|
component: () => import('@/views/ux/hq-out-data/stockFisDiffReport'), |
||||
|
name: 'StockFisDiffReport', |
||||
|
meta: { |
||||
|
|
||||
|
title: '看板发运对比', |
||||
|
roles: ['SettleAccount.HQNotConsignReports'], |
||||
|
icon: '发运对比' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/hq-stockSettledDiffReport', |
||||
|
component: () => import('@/views/ux/hq-out-data/stockSettledDiffReport'), |
||||
|
name: 'StockFisDiffReport', |
||||
|
meta: { |
||||
|
|
||||
|
title: '结算数据对比', |
||||
|
roles: ['SettleAccount.HQSPNotConsignReports'], |
||||
|
icon: '结算对比' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/hq-stockUnsettledDiffReport', |
||||
|
component: () => import('@/views/ux/hq-out-data/stockUnsettledDiffReport'), |
||||
|
name: 'stockUnsettledDiffReport',//命名路由
|
||||
|
meta: { |
||||
|
title: '看板未结数与期末库存差异', |
||||
|
roles: ['SettleAccount.HQSPNotConsignReports'], |
||||
|
icon: '调整' |
||||
|
} |
||||
|
} |
||||
|
, |
||||
|
{ |
||||
|
path: '/bt-secondaryActuralDiffReportHQ', |
||||
|
component: () => import('@/views/ux/hq-out-data/secondaryActuralDiffReport'), |
||||
|
name: 'SecondaryActuralDiffReportHQ', |
||||
|
meta: { |
||||
|
title: '红旗二配相关', |
||||
|
roles: ['SettleAccount.HQSPNotConsignReports'], |
||||
|
icon: '二配' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default HQOutDataRouter |
||||
|
|
@ -1,125 +0,0 @@ |
|||||
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const hqMenudataRouter = { |
|
||||
path: '/capt-hq', |
|
||||
component: Layout, |
|
||||
redirect: 'ux/vw/dataInput/hq_h', |
|
||||
name: 'HQData', |
|
||||
meta: { |
|
||||
title: '红旗工厂', |
|
||||
icon: '红旗', |
|
||||
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns', 'SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
|
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: '/import-h-data', |
|
||||
name: 'import-h-data',//命名路由-二级
|
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_h'), |
|
||||
redirect: 'ux/vw/dataInput/hq_h', |
|
||||
meta: { |
|
||||
title: 'H平台', |
|
||||
// roles: ['SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
|
|
||||
icon: '看板' |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'hq-H-platform', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_h'), |
|
||||
name: 'ERPEI',//命名路由
|
|
||||
meta: { |
|
||||
title: '红旗H平台导入', |
|
||||
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'hq-H-platform-export', |
|
||||
component: () => import('@/views/ux/vw/dataInput/ScrapClaims'), |
|
||||
name: 'ScrapClaims', |
|
||||
meta: { |
|
||||
title: 'H平台结算差异输出', |
|
||||
roles: ['SettleAccount.FISs'], |
|
||||
icon: '文件' |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
path: '/export-m-data', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_m'), |
|
||||
name: 'export-m-data',//命名路由
|
|
||||
redirect: '/ux/vw/dataInput/hq_m', |
|
||||
meta: { |
|
||||
title: 'M平台', |
|
||||
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'],
|
|
||||
icon: '结算' |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'hq-M-platform', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_m'), |
|
||||
name: 'ERPEI',//命名路由
|
|
||||
meta: { |
|
||||
title: '红旗M平台导入', |
|
||||
//roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
{ |
|
||||
path: 'hq-M-platform-export', |
|
||||
component: () => import('@/views/ux/billManage/sparePart'), |
|
||||
name: 'SparePartReport',//命名路由
|
|
||||
meta: { |
|
||||
title: 'H平台结算差异输出', |
|
||||
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '二配' |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
path: '/export-f-data', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_f'), |
|
||||
name: 'export-f-data',//命名路由
|
|
||||
redirect: '/ux/vw/dataInput/hq_f', |
|
||||
meta: { |
|
||||
title: 'F平台', |
|
||||
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'],
|
|
||||
icon: '结算' |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'hq-F-platform', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_f'), |
|
||||
name: 'ERPEI',//命名路由
|
|
||||
meta: { |
|
||||
title: '红旗F平台导入', |
|
||||
//roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
{ |
|
||||
path: 'hq-F-platform-export', |
|
||||
component: () => import('@/views/ux/billManage/sparePart'), |
|
||||
name: 'SparePartReport',//命名路由
|
|
||||
meta: { |
|
||||
title: 'F平台结算差异输出', |
|
||||
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '二配' |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default hqMenudataRouter |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
@ -1,64 +0,0 @@ |
|||||
//大众-FIS结算-路由
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const hqOutOrderDataRouter = { |
|
||||
path: '/cpat-order', |
|
||||
component: Layout, |
|
||||
redirect: 'pg', |
|
||||
name: '业务数据', |
|
||||
//hidden: true,
|
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: '红旗出库单管理', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon: '单据导入', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'hq-h-outorder', |
|
||||
component: () => import('@/views/ux/billManage/vwOutOrder/index'), |
|
||||
name: 'SettleAccount',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众准时化出库单', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'hq-m-outorder', |
|
||||
component: () => import('@/views/ux/billManage/kanbanOutOrder/index'), |
|
||||
name: 'SettleAccount',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众看板出库单', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'hq-f-withoutorder', |
|
||||
component: () => import('@/views/ux/billManage/kanbanWithOutOrder/index'), |
|
||||
name: 'SettleAccount',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众无条码看板出库单', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'hq-car-outorder', |
|
||||
component: () => import('@/views/ux/billManage/sparepartOutOrder/index'), |
|
||||
name: 'Invoices',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众备件出库单', |
|
||||
roles: ['SettleAccount.Invoices'], |
|
||||
icon: '对比' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default hqOutOrderDataRouter |
|
||||
|
|
@ -0,0 +1,286 @@ |
|||||
|
// /** 车轮数据比对路由 */
|
||||
|
// //import Layout from '@/layout/firstLayout'
|
||||
|
// import Layout from '@/layout'
|
||||
|
|
||||
|
// const HQdataRouter = {
|
||||
|
// path: '/qh-car',
|
||||
|
// component: Layout,
|
||||
|
// redirect: 'hq-car',
|
||||
|
// name: '红旗-数据输入',
|
||||
|
// meta: {
|
||||
|
// //requiresAuth: true,
|
||||
|
// title: '红旗-数据输入',
|
||||
|
// // index: 0,
|
||||
|
// // type: 'crm',
|
||||
|
// icon: '红旗',
|
||||
|
// keepAlive: false,
|
||||
|
// },
|
||||
|
// children: [
|
||||
|
// {
|
||||
|
// path: 'kanban',
|
||||
|
// name: 'hqcarkb',//命名路由
|
||||
|
// component: () => import('@/views/ux/hqdata/index'),
|
||||
|
// redirect: 'kanban',
|
||||
|
// meta: {
|
||||
|
// title: '看板输入表',
|
||||
|
// icon: '看板'
|
||||
|
// },
|
||||
|
// children: [
|
||||
|
// {
|
||||
|
// path: 'standardKanban',
|
||||
|
// component: () => import('@/views/ux/hqdata/standardKanban'),
|
||||
|
// name: 'StandardKanban',
|
||||
|
// meta: {
|
||||
|
// title: '标准看板',
|
||||
|
// roles: ['SettleAccount.HQKBs'],
|
||||
|
// icon: '标准看板'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'specialKanban',
|
||||
|
// component: () => import('@/views/ux/hqdata/specialKanban'),
|
||||
|
// name: 'SpecialKanban',
|
||||
|
// meta: {
|
||||
|
// title: '特殊看板',
|
||||
|
// roles: ['SettleAccount.HQSpecKBs'],
|
||||
|
// icon: '特殊看板'
|
||||
|
// }
|
||||
|
// }
|
||||
|
// ]
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'jiesuan',
|
||||
|
// component: () => import('@/views/ux/hqdata/index'),
|
||||
|
// name: 'hqcarjs',//命名路由
|
||||
|
// redirect: 'jiesuan',
|
||||
|
// meta: {
|
||||
|
// title: '结算输入表',
|
||||
|
// icon: '结算'
|
||||
|
// },
|
||||
|
// children: [
|
||||
|
// {
|
||||
|
// path: 'consign',
|
||||
|
// component: () => import('@/views/ux/hqdata/standardConsign'),
|
||||
|
// name: 'StandardConsign',
|
||||
|
// meta: {
|
||||
|
// title: '标准结算数据',
|
||||
|
// roles: ['SettleAccount.HQConsigns'],
|
||||
|
// icon: '标准看板'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'spec-consign',
|
||||
|
// component: () => import('@/views/ux/hqdata/specialConsign'),
|
||||
|
// name: 'SpecialConsign',
|
||||
|
// meta: {
|
||||
|
// title: '特殊结算数据',
|
||||
|
// roles: ['SettleAccount.HQSpecConsigns'],
|
||||
|
// icon: '特殊看板'
|
||||
|
// }
|
||||
|
// }
|
||||
|
// ]
|
||||
|
// }
|
||||
|
// ]
|
||||
|
// }
|
||||
|
|
||||
|
// export default HQdataRouter
|
||||
|
|
||||
|
import Layout from '@/layout' |
||||
|
// 嵌套路由的使用:第一层
|
||||
|
import FirstIndex from '@/views/ux/hqdata/index' |
||||
|
// 嵌套路由的使用:第二层
|
||||
|
import SecondJSIndex from '@/views/ux/hqdata/jiesuan/index' |
||||
|
import SecondKBIndex from '@/views/ux/hqdata/kanban/index' |
||||
|
|
||||
|
|
||||
|
const HQdataRouter = { |
||||
|
path: '/ux/hqdata', |
||||
|
component: Layout, |
||||
|
redirect: 'ux/hqdata/kanban/standardKanban', |
||||
|
name: 'HQData', |
||||
|
meta: { |
||||
|
//requiresAuth: true,
|
||||
|
title: '红旗-数据输入', |
||||
|
//index: 0,
|
||||
|
// type: 'crm',
|
||||
|
icon: '红旗', |
||||
|
roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns', 'SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'], |
||||
|
keepAlive: false, |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/kanban', |
||||
|
name: 'Kanban',//命名路由-二级
|
||||
|
component: () => import('@/views/ux/hqdata/index'), |
||||
|
redirect: 'ux/hqdata/kanban/standardKanban', |
||||
|
meta: { |
||||
|
title: '看板输入表', |
||||
|
roles: ['SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'], |
||||
|
icon: '看板' |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/standardKanban', |
||||
|
component: () => import('@/views/ux/hqdata/kanban/standardKanban'), |
||||
|
name: 'StandardKanban', |
||||
|
meta: { |
||||
|
title: '标准看板', |
||||
|
roles: ['SettleAccount.HQKBs'], |
||||
|
icon: '标准看板' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/specialKanban', |
||||
|
component: () => import('@/views/ux/hqdata/kanban/specialKanban'), |
||||
|
name: 'SpecialKanban', |
||||
|
meta: { |
||||
|
title: '特殊看板', |
||||
|
roles: ['SettleAccount.HQSpecKBs'], |
||||
|
icon: '特殊看板' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
path: '/jiesuan', |
||||
|
component: () => import('@/views/ux/hqdata/index'), |
||||
|
name: 'Jiesuan',//命名路由
|
||||
|
redirect: '/ux/hqdata/jiesuan/standardConsign', |
||||
|
meta: { |
||||
|
title: '结算输入表', |
||||
|
roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'], |
||||
|
icon: '结算' |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/standardConsign', |
||||
|
component: () => import('@/views/ux/hqdata/jiesuan/standardConsign'), |
||||
|
name: 'StandardConsign', |
||||
|
meta: { |
||||
|
title: '标准结算数据', |
||||
|
roles: ['SettleAccount.HQConsigns'], |
||||
|
icon: '标准看板' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/specialConsign', |
||||
|
component: () => import('@/views/ux/hqdata/jiesuan/specialConsign'), |
||||
|
name: 'SpecialConsign', |
||||
|
meta: { |
||||
|
title: '特殊结算数据', |
||||
|
roles: ['SettleAccount.HQSpecConsigns'], |
||||
|
icon: '特殊看板' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
path: '/secondaryAdjustmentHQ', |
||||
|
component: () => import('@/views/ux/hqdata/secondaryAdjustment'), |
||||
|
name: 'SecondaryAdjustmentHQ',//命名路由
|
||||
|
meta: { |
||||
|
title: '红旗-二配数量调整', |
||||
|
roles: ['SettleAccount.HQSpecKBs'], |
||||
|
icon: '二配' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default HQdataRouter |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
// /** 车轮数据比对路由 */
|
||||
|
// //import Layout from '@/layout/firstLayout'
|
||||
|
// import Layout from '@/layout'
|
||||
|
|
||||
|
|
||||
|
// const HQdataRouter = {
|
||||
|
// path: '/hqdata',
|
||||
|
// component: Layout,
|
||||
|
// redirect: 'qh-car',
|
||||
|
// name: 'qh-car',
|
||||
|
// meta: {
|
||||
|
// //requiresAuth: true,
|
||||
|
// title: '红旗-数据输入',
|
||||
|
// //index: 0,
|
||||
|
// // type: 'crm',
|
||||
|
// icon: '红旗',
|
||||
|
// keepAlive: false,
|
||||
|
// },
|
||||
|
// children: [
|
||||
|
// {
|
||||
|
// path: '/qh-car/kanban',
|
||||
|
// name: 'hqcarKB',//命名路由
|
||||
|
// component: () => import('@/views/ux/hqdata/kanban/index'),
|
||||
|
// redirect: 'kanban',
|
||||
|
// meta: {
|
||||
|
// title: '看板输入表',
|
||||
|
// icon: '看板'
|
||||
|
// },
|
||||
|
// children: [
|
||||
|
// {
|
||||
|
// path: '/standardKanban',
|
||||
|
// component: () => import('@/views/ux/hqdata/kanban/standardKanban'),
|
||||
|
// name: 'StandardKanban',
|
||||
|
// meta: {
|
||||
|
// title: '标准看板',
|
||||
|
// roles: ['SettleAccount.HQKBs'],
|
||||
|
// icon: '标准看板'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: '/specialKanban',
|
||||
|
// component: () => import('@/views/ux/hqdata/kanban/specialKanban'),
|
||||
|
// name: '/SpecialKanban',
|
||||
|
// meta: {
|
||||
|
// title: '特殊看板',
|
||||
|
// roles: ['SettleAccount.HQSpecKBs'],
|
||||
|
// icon: '特殊看板'
|
||||
|
// }
|
||||
|
// }
|
||||
|
// ]
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: '/qh-car/jiesuan',
|
||||
|
// component: () => import('@/views/ux/hqdata/jiesuan/index'),
|
||||
|
// name: 'hqcarjs',//命名路由
|
||||
|
// redirect: 'jiesuan',
|
||||
|
// meta: {
|
||||
|
// title: '结算输入表',
|
||||
|
// icon: '结算'
|
||||
|
// },
|
||||
|
// children: [
|
||||
|
// {
|
||||
|
// path: '/consign',
|
||||
|
// component: () => import('@/views/ux/hqdata/jiesuan/standardConsign'),
|
||||
|
// name: 'StandardConsign',
|
||||
|
// meta: {
|
||||
|
// title: '标准结算数据',
|
||||
|
// roles: ['SettleAccount.HQConsigns'],
|
||||
|
// icon: '标准看板'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: '/spec-consign',
|
||||
|
// component: () => import('@/views/ux/hqdata/jiesuan/specialConsign'),
|
||||
|
// name: 'SpecialConsign',
|
||||
|
// meta: {
|
||||
|
// title: '特殊结算数据',
|
||||
|
// roles: ['SettleAccount.HQSpecConsigns'],
|
||||
|
// icon: '特殊看板'
|
||||
|
// }
|
||||
|
// }
|
||||
|
// ]
|
||||
|
// }
|
||||
|
// ]
|
||||
|
// }
|
||||
|
|
||||
|
// export default HQdataRouter
|
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,133 @@ |
|||||
|
// /** 车轮数据比对路由 */
|
||||
|
// //import Layout from '@/layout/firstLayout'
|
||||
|
// import Layout from '@/layout'
|
||||
|
|
||||
|
// const JFOutDataRouter = {
|
||||
|
// path: '/jf-out',
|
||||
|
// component: Layout,
|
||||
|
// redirect: '/jf-out',
|
||||
|
// name: '解放-数据输出',
|
||||
|
// meta: {
|
||||
|
// //requiresAuth: true,
|
||||
|
// title: '解放-数据输出',
|
||||
|
// index: 0,
|
||||
|
// type: 'crm',
|
||||
|
// icon: '一汽',
|
||||
|
// keepAlive: false,
|
||||
|
// },
|
||||
|
// children: [
|
||||
|
// {
|
||||
|
// path: 'jf-stockUnsettledDiffReport',
|
||||
|
// component: () => import('@/views/ux/faw-out-data/stockUnsettledDiffReport'),
|
||||
|
// name: 'stockUnsettledDiffReport',//命名路由
|
||||
|
// meta: {
|
||||
|
|
||||
|
// title: '未结与期末库存对比',
|
||||
|
// roles: ['SettleAccount.StockUnsettledDiffReports'],
|
||||
|
// icon: '库存对比'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'jf-stockSettledDiffReport',
|
||||
|
// component: () => import('@/views/ux/faw-out-data/stockSettledDiffReport'),
|
||||
|
// name: 'stockSettledDiffReport',
|
||||
|
// meta: {
|
||||
|
|
||||
|
// title: '结算数据对比',
|
||||
|
// roles: ['SettleAccount.StockSettledDiffReports'],
|
||||
|
// icon: '结算对比'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'jf-stockFisDiffReport',
|
||||
|
// component: () => import('@/views/ux/faw-out-data/stockFisDiffReport'),
|
||||
|
// name: 'stockFisDiffReport',
|
||||
|
// meta: {
|
||||
|
|
||||
|
// title: '发运数据对比',
|
||||
|
// roles: ['SettleAccount.StockFisDiffReports'],
|
||||
|
// icon: '发运对比'
|
||||
|
// }
|
||||
|
// },
|
||||
|
// {
|
||||
|
// path: 'jf-kb-not-consign',
|
||||
|
// component: () => import('@/views/ux/faw-out-data/jfNotConsignReport'),
|
||||
|
// name: 'jfkbnotconsign',
|
||||
|
// meta: {
|
||||
|
// title: '看板发出未结算',
|
||||
|
// roles: ['SettleAccount.JFNotConsignReports'],
|
||||
|
// icon: '未结算'
|
||||
|
// }
|
||||
|
// }
|
||||
|
// ]
|
||||
|
// }
|
||||
|
|
||||
|
// export default JFOutDataRouter
|
||||
|
|
||||
|
/** 车轮数据比对路由 */ |
||||
|
//import Layout from '@/layout/firstLayout'
|
||||
|
import Layout from '@/layout' |
||||
|
|
||||
|
const JFOutDataRouter = { |
||||
|
path: '/jf-out', |
||||
|
component: Layout, |
||||
|
redirect: 'jf-out', |
||||
|
name: '解放-数据输出', |
||||
|
meta: { |
||||
|
//requiresAuth: true,
|
||||
|
title: '解放-数据输出', |
||||
|
index: 0, |
||||
|
type: 'crm', |
||||
|
icon: '一汽', |
||||
|
keepAlive: false, |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/jf-stockUnsettledDiffReport', |
||||
|
component: () => import('@/views/ux/faw-out-data/stockUnsettledDiffReport'), |
||||
|
name: 'stockUnsettledDiffReport',//命名路由
|
||||
|
meta: { |
||||
|
|
||||
|
title: '未结与期末库存对比', |
||||
|
roles: ['SettleAccount.StockUnsettledDiffReports'], |
||||
|
icon: '库存对比' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/jf-stockSettledDiffReport', |
||||
|
component: () => import('@/views/ux/faw-out-data/stockSettledDiffReport'), |
||||
|
name: 'stockSettledDiffReport', |
||||
|
meta: { |
||||
|
|
||||
|
title: '结算数据对比', |
||||
|
roles: ['SettleAccount.StockSettledDiffReports'], |
||||
|
icon: '结算对比' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/jf-stockFisDiffReport', |
||||
|
component: () => import('@/views/ux/faw-out-data/stockFisDiffReport'), |
||||
|
name: 'stockFisDiffReport', |
||||
|
meta: { |
||||
|
|
||||
|
title: '发运数据对比', |
||||
|
roles: ['SettleAccount.StockFisDiffReports'], |
||||
|
icon: '发运对比' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/jf-kb-not-consign', |
||||
|
component: () => import('@/views/ux/faw-out-data/jfNotConsignReport'), |
||||
|
name: 'jfkbnotconsign', |
||||
|
meta: { |
||||
|
title: '看板发出未结算', |
||||
|
roles: ['SettleAccount.JFNotConsignReports'], |
||||
|
icon: '未结算' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default JFOutDataRouter |
||||
|
|
||||
|
|
@ -0,0 +1,43 @@ |
|||||
|
/** 车轮数据比对路由 */ |
||||
|
//import Layout from '@/layout/firstLayout'
|
||||
|
import Layout from '@/layout' |
||||
|
|
||||
|
const JFdataRouter = { |
||||
|
path: '/jf-in', |
||||
|
component: Layout, |
||||
|
redirect: 'jf-in', |
||||
|
name: '解放-数据输入', |
||||
|
meta: { |
||||
|
//requiresAuth: true,
|
||||
|
title: '解放-数据输入', |
||||
|
index: 0, |
||||
|
type: 'crm', |
||||
|
icon: '一汽', |
||||
|
keepAlive: false, |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/jf-car-kb', |
||||
|
component: () => import('@/views/ux/fawdata/JFCarKB'), |
||||
|
name: 'jfcarkb',//命名路由
|
||||
|
meta: { |
||||
|
title: '解放看板', |
||||
|
roles: ['SettleAccount.JFCarKBs'], |
||||
|
icon: '看板' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/jf-car-consign', |
||||
|
component: () => import('@/views/ux/fawdata/JFCarConsign'), |
||||
|
name: 'JFCarConsign', |
||||
|
meta: { |
||||
|
title: '解放结算数据', |
||||
|
roles: ['SettleAccount.JFCarConsigns'], |
||||
|
icon: '结算' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default JFdataRouter |
||||
|
|
@ -1,95 +0,0 @@ |
|||||
/** jit路由 */ |
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const newjitRouter = { |
|
||||
path: '/newjit-basedata', |
|
||||
component: Layout, |
|
||||
redirect: 'newjit-basedata', |
|
||||
name: 'Newjit', |
|
||||
//hidden: true,
|
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: 'FIS数据管理', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon: '基础数据', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
// {
|
|
||||
// path: '/excludePartCfgs',
|
|
||||
// component: () => import('@/views/newJit/baseData/excludePartCfgs/index'),
|
|
||||
// name: 'ExcludePartCfgs',//命名路由
|
|
||||
// meta: {
|
|
||||
// title: '排除零件配置',
|
|
||||
// //roles: [],
|
|
||||
// icon: '客户零件'
|
|
||||
// }
|
|
||||
// },
|
|
||||
{ |
|
||||
path: '/repeatM100', |
|
||||
component: () => import('@/views/newJit/baseData/repeatR100/index'), |
|
||||
name: 'RepeatM100',//命名路由
|
|
||||
meta: { |
|
||||
title: '重复报文查询', |
|
||||
//roles: [],
|
|
||||
icon: '期间' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/billM100', |
|
||||
component: () => import('@/views/newJit/baseData/billM100/index'), |
|
||||
name: 'BillM100',//命名路由
|
|
||||
meta: { |
|
||||
title: 'M100上线信息', |
|
||||
//roles: [],
|
|
||||
icon: '工厂' |
|
||||
} |
|
||||
}, |
|
||||
// {
|
|
||||
// path: '/billM100Manager',
|
|
||||
// component: () => import('@/views/newJit/baseData/billM100Manager/index'),
|
|
||||
// name: 'BillM100Manager',//命名路由
|
|
||||
// meta: {
|
|
||||
// title: 'M100信息管理',
|
|
||||
// //roles: [],
|
|
||||
// icon: '输入'
|
|
||||
// }
|
|
||||
// },
|
|
||||
{ |
|
||||
path: '/assemblyCfg', |
|
||||
component: () => import('@/views/newJit/baseData/assemblyCfg/index'), |
|
||||
name: 'AssemblyCfg',//命名路由
|
|
||||
meta: { |
|
||||
title: '总成模块管理', |
|
||||
//roles: [],
|
|
||||
icon: '批量' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/unknownAssembly', |
|
||||
component: () => import('@/views/newJit/baseData/unknownAssembly/index'), |
|
||||
name: 'UnknownAssembly',//命名路由
|
|
||||
meta: { |
|
||||
title: '未知总成管理', |
|
||||
//roles: [],
|
|
||||
icon: '未结算' |
|
||||
} |
|
||||
} |
|
||||
, |
|
||||
{ |
|
||||
path: '/logRemind', |
|
||||
component: () => import('@/views/newJit/baseData/logRemind/index'), |
|
||||
name: 'LogRemind',//命名路由
|
|
||||
meta: { |
|
||||
title: '系统内通知', |
|
||||
//roles: [],
|
|
||||
icon: 'log', |
|
||||
num: 0 |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default newjitRouter |
|
||||
|
|
@ -0,0 +1,72 @@ |
|||||
|
/** 大众-数据输出-路由 */ |
||||
|
//import Layout from '@/layout/firstLayout'
|
||||
|
import Layout from '@/layout' |
||||
|
|
||||
|
const vwoutdataRouter = { |
||||
|
path: '/vwout', |
||||
|
component: Layout, |
||||
|
redirect: 'vwout', |
||||
|
name: 'vw-out', |
||||
|
meta: { |
||||
|
title: '大众-数据输出', |
||||
|
index: 0, |
||||
|
icon: '大众' |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/sendUnsettledDiffReport', |
||||
|
component: () => import('@/views/ux/vw/dataOut/sendUnsettledDiffReport'), |
||||
|
name: 'sendUnsettledDiffReport',//命名路由
|
||||
|
meta: { title: 'FIS发出未结算', roles: ['SettleAccount.SendUnsettledDiffReports'], icon: '未结算' } |
||||
|
}, |
||||
|
{ |
||||
|
path: '/stockFisDiffReport', |
||||
|
component: () => import('@/views/ux/vw/dataOut/stockFisDiffReport'), |
||||
|
name: 'stockFisDiffReport',//命名路由
|
||||
|
meta: { title: 'FIS发运数据对比', roles: ['SettleAccount.StockFisDiffReports'], icon: '发运对比' } |
||||
|
}, |
||||
|
{ |
||||
|
path: '/stockUnsettledDiffReport', |
||||
|
component: () => import('@/views/ux/vw/dataOut/stockUnsettledDiffReport'), |
||||
|
name: 'stockUnsettledDiffReport',//命名路由
|
||||
|
meta: { title: 'FIS未结数量与期末对比', roles: ['SettleAccount.StockUnsettledDiffReports'], icon: '库存对比' } |
||||
|
}, |
||||
|
{ |
||||
|
path: '/stockSettledDiffReport', |
||||
|
component: () => import('@/views/ux/vw/dataOut/stockSettledDiffReport'), |
||||
|
name: 'stockSettledDiffReport',//命名路由
|
||||
|
meta: { title: 'R3结算数据对比', roles: ['SettleAccount.StockSettledDiffReports'], icon: '结算对比' } |
||||
|
}, |
||||
|
{ |
||||
|
path: '/secondaryActuralAdjustmentReport', |
||||
|
component: () => import('@/views/ux/vw/dataOut/secondaryActuralAdjustmentReport'), |
||||
|
hidden: false, |
||||
|
name: 'secondaryActuralAdjustmentReport', |
||||
|
meta: { |
||||
|
title: '实际二配调整后', |
||||
|
roles: ['SettleAccount.SecondaryReports'], |
||||
|
type: 'crm', icon: '调整' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/secondaryActuralDiffReport', |
||||
|
component: () => import('@/views/ux/vw/dataOut/secondaryActuralDiffReport'), |
||||
|
hidden: false, |
||||
|
name: 'secondaryActuralDiffReport', |
||||
|
meta: { |
||||
|
title: '二配对比', |
||||
|
roles: ['SettleAccount.SecondaryReports'], |
||||
|
type: 'crm',icon:'二配对比' |
||||
|
} |
||||
|
}, |
||||
|
// {
|
||||
|
// path: 'r32',
|
||||
|
// component: () => import('@/views/ux/vw/dataOut/fis'),
|
||||
|
// name: 'R3',//命名路由
|
||||
|
// meta: { title: '二配对比输出表', icon: 'gongyingshang' }
|
||||
|
// }
|
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default vwoutdataRouter |
||||
|
|
@ -1,106 +0,0 @@ |
|||||
//大众-FIS结算-路由
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const vwFisDataRouter = { |
|
||||
path: '/cpat', |
|
||||
component: Layout, |
|
||||
redirect: 'pg', |
|
||||
name: '业务数据', |
|
||||
//hidden: true,
|
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: '大众结算与开票导入', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon: '单据导入', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'unsettle-account', |
|
||||
component: () => import('@/views/ux/vw/dataInput/r3-open'), |
|
||||
name: 'SettleAccount',//命名路由
|
|
||||
meta: { |
|
||||
title: 'FIS未结算数据导入', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'settle-account-finish', |
|
||||
component: () => import('@/views/ux/vw/dataInput/r3'), |
|
||||
name: 'SettleAccount',//命名路由
|
|
||||
meta: { |
|
||||
title: 'FIS已结算数据导入', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'invoice', |
|
||||
component: () => import('@/views/ux/basedata/Invoice/index'), |
|
||||
name: 'Invoices',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众发票汇总导入', |
|
||||
roles: ['SettleAccount.Invoices'], |
|
||||
icon: '对比' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'kan-ban', |
|
||||
component: () => import('@/views/ux/vw/dataInput/vwKanBan/index'), |
|
||||
name: 'VWKanBan',//命名路由
|
|
||||
meta: { |
|
||||
title: '看板结算明细导入', |
|
||||
//roles: ['SettleAccount.ItemInvoicePrices'],
|
|
||||
icon: '发运' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'scrap-claims', |
|
||||
component: () => import('@/views/ux/vw/dataInput/ScrapClaims'), |
|
||||
name: 'ScrapClaims', |
|
||||
meta: { |
|
||||
title: 'CP7报废和索赔导入', |
|
||||
roles: ['SettleAccount.FISs'], |
|
||||
icon: '文件' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
{ |
|
||||
path: 'spare-part', |
|
||||
component: () => import('@/views/ux/vw/dataInput/SparePart'), |
|
||||
name: 'SparePart',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众备件结算明细导入', |
|
||||
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
{ |
|
||||
path: 'hq-H-platform', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_h'), |
|
||||
name: 'ERPEI',//命名路由
|
|
||||
meta: { |
|
||||
title: '红旗H平台导入', |
|
||||
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'hq-M-platform', |
|
||||
component: () => import('@/views/ux/vw/dataInput/hq_m'), |
|
||||
name: 'ERPEI',//命名路由
|
|
||||
meta: { |
|
||||
title: '红旗M平台导入', |
|
||||
//roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default vwFisDataRouter |
|
||||
|
|
@ -1,56 +0,0 @@ |
|||||
//FIS结算
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const vwNoBarcodeRouter = { |
|
||||
path: '/vwnobarcodedata', |
|
||||
component: Layout, |
|
||||
redirect: 'vwnobarcodedata', |
|
||||
name: 'basedata', |
|
||||
//hidden: true,
|
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: '大众看板结算(无条码)', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon:'单据导入', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: '/vwr3-js', |
|
||||
component: () => import('@/views/ux/billManage/FisUnSettledDiff'), |
|
||||
name: 'R3js',//命名路由
|
|
||||
meta: { title: '发出未结算数据', |
|
||||
//roles: ['abpvnext_master.Customer'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '销售' } |
|
||||
}, |
|
||||
{ |
|
||||
path: '/settlement', |
|
||||
component: () => import('@/views/ux/billManage/FisUnSettledDiff'), |
|
||||
name: 'FisUnSettledDiff',//命名路由
|
|
||||
meta: { title: '定价与结算单价对比', |
|
||||
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '客户零件' } |
|
||||
}, |
|
||||
{ |
|
||||
path: '/claimDemage', |
|
||||
component: () => import('@/views/ux/billManage/claimDemage'), |
|
||||
name: 'ClaimDemage', |
|
||||
meta: { |
|
||||
title: '库存与开票数据比对', |
|
||||
icon: '索赔授权' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/settlement', |
|
||||
component: () => import('@/views/ux/billManage/FisUnSettledDiff'), |
|
||||
name: 'FisUnSettledDiff',//命名路由
|
|
||||
meta: { title: '开票汇总数据', |
|
||||
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '客户零件' } |
|
||||
}, |
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default vwNoBarcodeRouter |
|
||||
|
|
@ -1,104 +0,0 @@ |
|||||
//FIS结算
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const billdataRouter = { |
|
||||
path: '/cpat-report', |
|
||||
component: Layout, |
|
||||
redirect: 'vw-car-kb', |
|
||||
name: 'basedata', |
|
||||
//hidden: true,
|
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: '大众结算与开票报表', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon: '销售', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'unsettled-detail',//大众准时化未结明细表(包含漏结,漏结要有标识)
|
|
||||
component: () => import('@/views/ux/billManage/IssuedUnsettled/index'), |
|
||||
name: 'UnsettledDetail',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众准时化未结明细', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '报表' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'unsettled-diff', |
|
||||
component: () => import('@/views/ux/billManage/UnSettledDiff/index'), |
|
||||
name: 'UnSettledDiff',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众准时化未结比对', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'unsettle-diff/export', |
|
||||
component: () => import('@/views/ux/billManage/UnSettleDiffExport'), |
|
||||
name: 'UnSettleDiffExport',//命名路由
|
|
||||
meta: { |
|
||||
title: '准时化未结差异比对', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '售后' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'invoice-settled/diff', |
|
||||
component: () => import('@/views/ux/billManage/InvoiceSettledDiff'), |
|
||||
name: 'InvoiceSettledDiff',//命名路由
|
|
||||
meta: { |
|
||||
title: '发票与结算核对汇总', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算对比' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'invoice-settled/detaildiff', |
|
||||
component: () => import('@/views/ux/billManage/InvoiceSettledDetailDiff'), |
|
||||
name: 'InvoiceSettledDetailDiff',//命名路由
|
|
||||
meta: { |
|
||||
title: '发票与结算核对明细', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算对比' |
|
||||
} |
|
||||
}, |
|
||||
// {
|
|
||||
// path: 'FisUnSettledDiff',
|
|
||||
// component: () => import('@/views/ux/billManage/FisUnSettledDiff'),
|
|
||||
// name: 'FisUnSettledDiff',//命名路由
|
|
||||
// meta: {
|
|
||||
// title: '准时化交货与结算核对',
|
|
||||
// roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
// icon: '看板'
|
|
||||
// }
|
|
||||
// },
|
|
||||
{ |
|
||||
path: 'unInvoice-settled/detailDiff', |
|
||||
component: () => import('@/views/ux/billManage/UnInvoiceSettledDetailDiff'), |
|
||||
name: 'UnInvoiceSettledDetailDiff',//命名路由
|
|
||||
meta: { |
|
||||
title: '准时化结算数量差异比对', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '售后' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'settle-doorPanel', |
|
||||
component: () => import('@/views/ux/billManage/SettleDoorPanel'), |
|
||||
name: 'SettleDoorPanel',//命名路由
|
|
||||
meta: { |
|
||||
title: '准时化结算门板价格差异', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '售后' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default billdataRouter |
|
||||
|
|
@ -1,181 +0,0 @@ |
|||||
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const vwMenudataRouter = { |
|
||||
path: '/capt-vw', |
|
||||
component: Layout, |
|
||||
redirect: 'ux/basedata/Invoice/index', |
|
||||
name: 'HQData', |
|
||||
meta: { |
|
||||
title: '大众工厂', |
|
||||
icon: 'vw', |
|
||||
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns', 'SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
|
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: '/import-data', |
|
||||
name: 'import-data',//命名路由-二级
|
|
||||
component: () => import('@/views/ux/billManage/index'), |
|
||||
redirect: 'ux/basedata/Invoice/index', |
|
||||
meta: { |
|
||||
title: '数据导入', |
|
||||
// roles: ['SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
|
|
||||
icon: '看板' |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'invoice', |
|
||||
component: () => import('@/views/ux/basedata/Invoice/index'), |
|
||||
name: 'Invoices', |
|
||||
meta: { |
|
||||
title: '发票汇总', |
|
||||
roles: ['SettleAccount.Invoices'], |
|
||||
icon: '对比' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'settle-account-finish', |
|
||||
component: () => import('@/views/ux/vw/dataInput/r3'), |
|
||||
name: 'SettleAccount', |
|
||||
meta: { |
|
||||
title: 'FIS结算明细', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '库存' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'unsettle-account', |
|
||||
component: () => import('@/views/ux/vw/dataInput/r3'), |
|
||||
name: 'SettleAccount', |
|
||||
meta: { |
|
||||
title: 'FIS未结明细', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'kan-ban', |
|
||||
component: () => import('@/views/ux/vw/dataInput/vwKanBan/index'), |
|
||||
name: 'VWKanBan',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众看板结算导入', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '看板' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'spare-part', |
|
||||
component: () => import('@/views/ux/vw/dataInput/SparePart'), |
|
||||
name: 'SparePart',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众备件结算导入', |
|
||||
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '工厂' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'scrap-claims', |
|
||||
component: () => import('@/views/ux/vw/dataInput/ScrapClaims'), |
|
||||
name: 'ScrapClaims', |
|
||||
meta: { |
|
||||
title: 'CP7报废和索赔导入', |
|
||||
roles: ['SettleAccount.FISs'], |
|
||||
icon: '文件' |
|
||||
} |
|
||||
}, |
|
||||
] |
|
||||
}, |
|
||||
{ |
|
||||
path: '/export-data', |
|
||||
component: () => import('@/views/ux/billManage/index'), |
|
||||
name: 'export-data',//命名路由
|
|
||||
redirect: 'export-data', |
|
||||
meta: { |
|
||||
title: '数据输出', |
|
||||
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'],
|
|
||||
icon: '结算' |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: '/invoice-settled/diff', |
|
||||
component: () => import('@/views/ux/billManage/InvoiceSettledDiff'), |
|
||||
name: 'InvoiceSettledDiff',//命名路由
|
|
||||
meta: { |
|
||||
title: '发票与结算核对汇总', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/invoice-settled/detaildiff', |
|
||||
component: () => import('@/views/ux/billManage/InvoiceSettledDetailDiff'), |
|
||||
name: 'InvoiceSettledDetailDiff',//命名路由
|
|
||||
meta: { |
|
||||
title: '准时化结算核对明细', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算对比' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/unInvoice-settled/detailDiff', |
|
||||
component: () => import('@/views/ux/billManage/UnInvoiceSettledDetailDiff'), |
|
||||
name: 'UnInvoiceSettledDetailDiff',//命名路由
|
|
||||
meta: { |
|
||||
title: '准时化量差价差输出', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '售后' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/unsettle-diff/export', |
|
||||
component: () => import('@/views/ux/billManage/UnSettleDiffExport'), |
|
||||
name: 'UnSettleDiffExport',//命名路由
|
|
||||
meta: { |
|
||||
title: '准时化未结核对', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '器具' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/unsettled-detail',//大众准时化未结明细表(包含漏结,漏结要有标识)
|
|
||||
component: () => import('@/views/ux/billManage/IssuedUnsettled/index'), |
|
||||
name: 'UnsettledDetail',//命名路由
|
|
||||
meta: { |
|
||||
title: '准时化未结明细', |
|
||||
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '报表' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: '/kbwithcode', |
|
||||
component: () => import('@/views/ux/billManage/kanBanWithCode'), |
|
||||
name: 'KanBanWithCode',//命名路由
|
|
||||
meta: { |
|
||||
title: '看板结算输出', |
|
||||
//roles: ['SettleAccount.EstimatedStockDiffReports'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '看板' |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
{ |
|
||||
path: '/vwsparepart', |
|
||||
component: () => import('@/views/ux/billManage/sparePart'), |
|
||||
name: 'SparePartReport',//命名路由
|
|
||||
meta: { |
|
||||
title: '备件结算输出', |
|
||||
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '供货' |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default vwMenudataRouter |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
@ -1,54 +0,0 @@ |
|||||
//大众-FIS结算-路由
|
|
||||
import Layout from '@/layout' |
|
||||
|
|
||||
const vwOutOrderDataRouter = { |
|
||||
path: '/cpat-order', |
|
||||
component: Layout, |
|
||||
redirect: 'pg', |
|
||||
name: '业务数据', |
|
||||
//hidden: true,
|
|
||||
meta: { |
|
||||
//requiresAuth: true,
|
|
||||
title: '大众出库单管理', |
|
||||
index: 0, |
|
||||
type: 'crm', |
|
||||
icon: '单据导入', |
|
||||
keepAlive: false, |
|
||||
}, |
|
||||
children: [ |
|
||||
{ |
|
||||
path: 'vw-out-order', |
|
||||
component: () => import('@/views/ux/billManage/vwOutOrder/index'), |
|
||||
name: 'SettleAccount',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众准时化出库单', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
path: 'kanban-out-order', |
|
||||
component: () => import('@/views/ux/billManage/kanbanOutOrder/index'), |
|
||||
name: 'SettleAccount',//命名路由
|
|
||||
meta: { |
|
||||
title: '大众看板出库单', |
|
||||
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
|
|
||||
icon: '结算' |
|
||||
} |
|
||||
}, |
|
||||
// {
|
|
||||
// path: 'invoice',
|
|
||||
// component: () => import('@/views/ux/basedata/Invoice/index'),
|
|
||||
// name: 'Invoices',//命名路由
|
|
||||
// meta: {
|
|
||||
// title: '大众发票汇总导入',
|
|
||||
// roles: ['SettleAccount.Invoices'],
|
|
||||
// icon: '对比'
|
|
||||
// }
|
|
||||
// },
|
|
||||
|
|
||||
] |
|
||||
} |
|
||||
|
|
||||
export default vwOutOrderDataRouter |
|
||||
|
|
@ -0,0 +1,74 @@ |
|||||
|
//import Layout from '@/layout/firstLayout'
|
||||
|
import Layout from '@/layout' |
||||
|
|
||||
|
const vwdataRouter = { |
||||
|
path: '/vw-in', |
||||
|
component: Layout, |
||||
|
redirect: 'vw-in', |
||||
|
name: '大众-数据输入', |
||||
|
meta: { |
||||
|
//requiresAuth: true,
|
||||
|
title: '大众-数据输入', |
||||
|
index: 0, |
||||
|
type: 'crm', |
||||
|
icon: '大众', |
||||
|
keepAlive: false, |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/prebatch', |
||||
|
component: () => import('@/views/ux/vw/dataInput/prebatch'), |
||||
|
name: 'Prebatch', |
||||
|
meta: { |
||||
|
title: '预批量输入表',//名称显示 在侧边栏
|
||||
|
roles: ['SettleAccount.Prebatchs'],//控制页面角色(可以设置多个角色)
|
||||
|
icon: '批量'//图标显示在侧边栏
|
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/fis', |
||||
|
component: () => import('@/views/ux/vw/dataInput/fis'), |
||||
|
name: 'FIS', |
||||
|
meta: { |
||||
|
title: 'FIS文件输入表', |
||||
|
roles: ['SettleAccount.FISs'], |
||||
|
icon: '文件' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/r3', |
||||
|
component: () => import('@/views/ux/vw/dataInput/r3'), |
||||
|
name: 'R3',//命名路由
|
||||
|
meta: { |
||||
|
title: 'R3文件输入表', |
||||
|
roles: ['SettleAccount.SettleAccounts'], |
||||
|
icon: 'R3' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/secondaryAdjustment', |
||||
|
component: () => import('@/views/ux/vw/dataInput/secondaryAdjustment'), |
||||
|
name: 'SecondaryAdjustment',//命名路由
|
||||
|
meta: { |
||||
|
title: '二配数量调整', |
||||
|
roles: ['SettleAccount.SecondaryAdjustments'], |
||||
|
icon: '二配' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/secondaryDiscount', |
||||
|
component: () => import('@/views/ux/vw/dataInput/secondaryDiscount'), |
||||
|
name: 'SecondaryDiscount',//命名路由
|
||||
|
meta: { |
||||
|
title: '二配折扣调整', |
||||
|
roles: ['SettleAccount.SecondaryAdjustments'], |
||||
|
icon: '折扣' |
||||
|
} |
||||
|
}, |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default vwdataRouter |
||||
|
|
||||
|
|
||||
|
|
@ -1,59 +0,0 @@ |
|||||
|
|
||||
import axiosMethods from '../../axios/index.js' |
|
||||
|
|
||||
/** |
|
||||
* 消息记录 |
|
||||
*/ |
|
||||
const app = { |
|
||||
state: { |
|
||||
// 待办事项消息
|
|
||||
messageNum: { |
|
||||
todayCustomer: 0, |
|
||||
followLeads: 0, |
|
||||
followCustomer: 0, |
|
||||
checkContract: 0, |
|
||||
checkReceivables: 0, |
|
||||
remindReceivablesPlan: 0, |
|
||||
endContract: 0, |
|
||||
totalCount: 0 |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
mutations: { |
|
||||
/** |
|
||||
* 更改待办事项 |
|
||||
*/ |
|
||||
SET_MESSAGENUM: (state, messageNum) => { |
|
||||
let totalCount = 0 |
|
||||
for (const key in messageNum) { |
|
||||
if (key != 'totalCount') { |
|
||||
totalCount += (messageNum[key] || 0) |
|
||||
} |
|
||||
} |
|
||||
messageNum.totalCount = totalCount |
|
||||
state.messageNum = messageNum |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
actions: { |
|
||||
// 登录
|
|
||||
GetMessageNum({ |
|
||||
commit |
|
||||
}) { |
|
||||
return new Promise((resolve, reject) => { |
|
||||
axiosMethods.gets("/api/newjit/log-remind/getlist") |
|
||||
.then(response => { |
|
||||
commit('SET_MESSAGENUM', response.totalCount) |
|
||||
//commit('SET_CRMROUTERSNUM', response.totalCount)
|
|
||||
resolve(response) |
|
||||
}) |
|
||||
.catch(error => { |
|
||||
reject(error) |
|
||||
}) |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
export default app |
|
@ -1,45 +0,0 @@ |
|||||
/** |
|
||||
* 功能:dom绑定事件 |
|
||||
* 参数:element(dom节点) |
|
||||
* event(事件名称) |
|
||||
* handler(回调) |
|
||||
*返回:无 |
|
||||
* */ |
|
||||
export const on = (function() { |
|
||||
if (document.addEventListener) { |
|
||||
return function(element, event, handler) { |
|
||||
if (element && event && handler) { |
|
||||
element.addEventListener(event, handler, false) |
|
||||
} |
|
||||
} |
|
||||
} else { |
|
||||
return function(element, event, handler) { |
|
||||
if (element && event && handler) { |
|
||||
element.attachEvent('on' + event, handler) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
})() |
|
||||
|
|
||||
/** |
|
||||
* 功能:移除dom绑定的事件 |
|
||||
* 参数:element(dom节点) |
|
||||
* event(事件名称) |
|
||||
* handler(回调函数) |
|
||||
* 返回:无 |
|
||||
* */ |
|
||||
export const off = (function() { |
|
||||
if (document.removeEventListener) { |
|
||||
return function(element, event, handler) { |
|
||||
if (element && event) { |
|
||||
element.removeEventListener(event, handler, false) |
|
||||
} |
|
||||
} |
|
||||
} else { |
|
||||
return function(element, event, handler) { |
|
||||
if (element && event) { |
|
||||
element.detachEvent('on' + event, handler) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
})() |
|
@ -1,642 +0,0 @@ |
|||||
<!--总成模块信息管理页--> |
|
||||
<template> |
|
||||
<div class="cr-body-content"> |
|
||||
<flexbox class="content-header"> |
|
||||
<el-form |
|
||||
:model="listQuery" |
|
||||
ref="queryForm" |
|
||||
v-show="showSearch" |
|
||||
:inline="true" |
|
||||
> |
|
||||
<!-- <el-form-item> |
|
||||
<el-button |
|
||||
class="filter-item" |
|
||||
size="mini" |
|
||||
type="primary" |
|
||||
icon="el-icon-plus" |
|
||||
@click="handleCreate" |
|
||||
>新增 |
|
||||
</el-button> |
|
||||
</el-form-item> --> |
|
||||
|
|
||||
<el-form-item label="总成名称" prop="ErpAssemblyName "> |
|
||||
<el-input |
|
||||
v-model="listQuery.ErpAssemblyName" |
|
||||
placeholder="请输入总成名称" |
|
||||
clearable |
|
||||
size="small" |
|
||||
style="width: 240px" |
|
||||
@keyup.enter.native="handleQuery" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item label="总成编码" prop="ErpAssemblyCode "> |
|
||||
<el-input |
|
||||
v-model="listQuery.ErpAssemblyCode" |
|
||||
placeholder="请输入总成编码" |
|
||||
clearable |
|
||||
size="small" |
|
||||
style="width: 240px" |
|
||||
@keyup.enter.native="handleQuery" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item> |
|
||||
<el-button |
|
||||
type="primary" |
|
||||
icon="el-icon-search" |
|
||||
size="mini" |
|
||||
@click="handleFilter" |
|
||||
>搜索</el-button |
|
||||
> |
|
||||
<el-button |
|
||||
icon="el-icon-refresh" |
|
||||
size="mini" |
|
||||
@click="resetQuery('queryForm')" |
|
||||
>重置</el-button |
|
||||
> |
|
||||
<el-button |
|
||||
type="warning" |
|
||||
plain |
|
||||
icon="el-icon-download" |
|
||||
size="mini" |
|
||||
style="margin-left: 15px" |
|
||||
@click="handleDownload()" |
|
||||
>导出(Excel) |
|
||||
</el-button> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</flexbox> |
|
||||
<div class="l-table"> |
|
||||
<!--表格渲染--> |
|
||||
<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%" |
|
||||
@sort-change="sortChange" |
|
||||
@selection-change="handleSelectionChange" |
|
||||
@row-click="handleRowClick" |
|
||||
> |
|
||||
<!-- <el-table-column |
|
||||
label="ERP总成名称" |
|
||||
prop="erpAssemblyName" |
|
||||
sortable="custom" |
|
||||
align="center" |
|
||||
width="420px" |
|
||||
> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{ |
|
||||
scope.row.erpAssemblyName |
|
||||
}}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column |
|
||||
label="ERP总成编码" |
|
||||
prop="erpAssemblyCode " |
|
||||
sortable="custom" |
|
||||
align="center" |
|
||||
> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.erpAssemblyCode }}</span> |
|
||||
</template> |
|
||||
</el-table-column> --> |
|
||||
|
|
||||
<el-table-column |
|
||||
label="ERP总成编码" |
|
||||
prop="erpAssemblyCode" |
|
||||
sortable="custom" |
|
||||
align="center" |
|
||||
width="420px" |
|
||||
> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{ |
|
||||
scope.row.erpAssemblyCode |
|
||||
}}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column |
|
||||
label="ERP总成名称" |
|
||||
prop="erpAssemblyName " |
|
||||
sortable="custom" |
|
||||
align="center" |
|
||||
> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.erpAssemblyName }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column |
|
||||
label="ERP总成版本" |
|
||||
prop="erpAssemblyVersion " |
|
||||
sortable="custom" |
|
||||
align="center" |
|
||||
> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.erpAssemblyVersion }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
|
|
||||
<!--表单渲染--> |
|
||||
<el-dialog |
|
||||
:visible.sync="dialogFormVisible" |
|
||||
:close-on-click-modal="false" |
|
||||
:title="formTitle" |
|
||||
width="700px" |
|
||||
> |
|
||||
<el-form |
|
||||
ref="form" |
|
||||
:inline="true" |
|
||||
:model="form" |
|
||||
:rules="rules" |
|
||||
size="small" |
|
||||
label-width="120px" |
|
||||
> |
|
||||
<el-row> |
|
||||
<el-col :md="4" :xs="24"> |
|
||||
<el-form-item label="ERP总成名称" required /> |
|
||||
</el-col> |
|
||||
<el-col :md="8" :xs="24"> |
|
||||
<el-form-item prop="erpAssemblyName "> |
|
||||
<el-input |
|
||||
style="width: 150px" |
|
||||
v-model="form.erpAssemblyName" |
|
||||
:disabled="isEdit" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
</el-col> |
|
||||
<el-col :md="4" :xs="24"> |
|
||||
<el-form-item |
|
||||
style="width: 150px" |
|
||||
label="是否覆盖原版本" |
|
||||
required |
|
||||
/> |
|
||||
</el-col> |
|
||||
<el-col :md="8" :xs="24"> |
|
||||
<el-form-item prop="isCover "> |
|
||||
<el-switch |
|
||||
v-model="form.isCover" |
|
||||
active-color="#409EFF" |
|
||||
inactive-color="#F56C6C" |
|
||||
/> |
|
||||
</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 v-loading="formLoading" type="primary" @click="save" |
|
||||
>确认</el-button |
|
||||
> |
|
||||
</div> |
|
||||
</el-dialog> |
|
||||
</div> |
|
||||
|
|
||||
<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" |
|
||||
/> |
|
||||
<!-- 抽屉控件 --> |
|
||||
<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"; |
|
||||
import permission from "@/directive/permission/index.js"; |
|
||||
import CRMTableHead from "../../components/CRMTableHead"; |
|
||||
import importExcel from "@/components/ImportExcel-vw"; |
|
||||
import Lockr from "lockr"; |
|
||||
import moment from "moment"; |
|
||||
import Detail from "./detail.vue"; |
|
||||
import { downloadFile } from "@/utils/crmindex.js"; |
|
||||
|
|
||||
//组件计量单位 |
|
||||
const bomUnit = [ |
|
||||
{ key: 0, display_name: "PC" }, |
|
||||
{ key: 1, display_name: "TON" }, |
|
||||
{ key: 2, display_name: "Other" }, |
|
||||
]; |
|
||||
const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { |
|
||||
acc[cur.key] = cur.display_name; |
|
||||
return acc; |
|
||||
}, {}); |
|
||||
|
|
||||
export default { |
|
||||
name: "AssemblyCfg", |
|
||||
components: { Pagination, CRMTableHead, importExcel, Detail }, |
|
||||
directives: { permission }, |
|
||||
filters: { |
|
||||
IsCustomerSignFilter(status) { |
|
||||
//翻译是否签字 |
|
||||
const statusMap = { |
|
||||
true: "是", |
|
||||
false: "否", |
|
||||
}; |
|
||||
return statusMap[status]; |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
const validVersion = (rule, value, callback) => { |
|
||||
let numberReg = /^\d{6}$/; |
|
||||
if (!numberReg.test(value)) { |
|
||||
callback(new Error("只能为6位数字!")); |
|
||||
} else { |
|
||||
callback(); |
|
||||
} |
|
||||
}; |
|
||||
return { |
|
||||
crmType: "bomdatabase", |
|
||||
rules: { |
|
||||
erpAssemblyName: [ |
|
||||
{ required: true, message: "必须输入!", trigger: "blur" }, |
|
||||
], |
|
||||
}, |
|
||||
valueSelect: "", |
|
||||
customerInfos: [], |
|
||||
dialogOptions: [], |
|
||||
versionValue: "", |
|
||||
searchContent: "", // 输入内容 |
|
||||
showExcelImport: false, |
|
||||
form: {}, |
|
||||
drawer: false, |
|
||||
list: null, |
|
||||
totalCount: 0, |
|
||||
listLoading: true, |
|
||||
customerInfo: { |
|
||||
bomId: "", |
|
||||
}, |
|
||||
// 高级搜索 |
|
||||
filterObj: { |
|
||||
type: Object, |
|
||||
default: () => { |
|
||||
return {}; |
|
||||
}, |
|
||||
}, |
|
||||
listQuery: { |
|
||||
SkipCount: 0, |
|
||||
MaxResultCount: 15, |
|
||||
ErpAssemblyName: undefined, |
|
||||
ErpAssemblyCode: undefined, |
|
||||
}, |
|
||||
listExportQuery: { |
|
||||
erpAssemblyCode: undefined, |
|
||||
erpAssemblyName: undefined, |
|
||||
}, |
|
||||
page: 1, |
|
||||
// 显示搜索条件 |
|
||||
showSearch: true, |
|
||||
bomUnit, |
|
||||
multipleSelection: [], |
|
||||
drawer: false, |
|
||||
dialogFormVisible: false, |
|
||||
formTitle: "", |
|
||||
isEdit: false, |
|
||||
formLoading: false, |
|
||||
dialogFormVisible: false, |
|
||||
tableHeight: document.documentElement.clientHeight - 280, |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
var self = this; |
|
||||
window.onresize = function () { |
|
||||
var offsetHei = document.documentElement.clientHeight; |
|
||||
self.tableHeight = offsetHei - 190; |
|
||||
}; |
|
||||
}, |
|
||||
created() { |
|
||||
this.getList(); |
|
||||
}, |
|
||||
computed: { |
|
||||
getDefaultField() { |
|
||||
var tempsTabs = []; |
|
||||
// tempsTabs.push({ |
|
||||
// label: "ERP总成名称", |
|
||||
// prop: "erpAssemblyName ", |
|
||||
// width: 220, |
|
||||
// }); |
|
||||
tempsTabs.push({ |
|
||||
label: "ERP总成版本", |
|
||||
prop: "erpAssemblyVersion ", |
|
||||
width: 100, |
|
||||
}); |
|
||||
return tempsTabs; |
|
||||
}, |
|
||||
}, |
|
||||
methods: { |
|
||||
//抽屉 |
|
||||
handleDrawerOpen(param) { |
|
||||
this.drawer = true; |
|
||||
var parentId = param.id; //主键id |
|
||||
this.customerInfos = [ |
|
||||
{ |
|
||||
ParentId: parentId, |
|
||||
}, |
|
||||
]; |
|
||||
}, |
|
||||
handleDrawerClose(done) { |
|
||||
done(); |
|
||||
}, |
|
||||
save() { |
|
||||
this.$refs.form.validate((valid) => { |
|
||||
if (valid) { |
|
||||
console.log("保存参数:" + JSON.stringify(this.form)); |
|
||||
this.formLoading = true; |
|
||||
if (this.isEdit) { |
|
||||
this.$axios |
|
||||
.puts("/api/newjit/assembly-cfg-erp/" + this.form.id, this.form) |
|
||||
.then((response) => { |
|
||||
this.formLoading = false; |
|
||||
this.$notify({ |
|
||||
title: "成功", |
|
||||
message: "更新成功", |
|
||||
type: "success", |
|
||||
duration: 2000, |
|
||||
}); |
|
||||
this.dialogFormVisible = false; |
|
||||
this.getList(); |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.formLoading = false; |
|
||||
}); |
|
||||
} else { |
|
||||
//insert添加 |
|
||||
console.log(JSON.stringify(this.form)); |
|
||||
this.$axios |
|
||||
.posts("/api/newjit/assembly-cfg-erp", this.form) |
|
||||
.then((response) => { |
|
||||
this.formLoading = false; |
|
||||
this.$notify({ |
|
||||
title: "成功", |
|
||||
message: "新增成功", |
|
||||
type: "success", |
|
||||
duration: 2000, |
|
||||
}); |
|
||||
this.dialogFormVisible = false; |
|
||||
this.getList(); |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.formLoading = false; |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
}, |
|
||||
/** 新增 */ |
|
||||
handleCreate() { |
|
||||
this.$nextTick(() => { |
|
||||
this.$refs["form"].resetFields(); |
|
||||
}); |
|
||||
this.formTitle = "新增"; |
|
||||
this.isEdit = false; |
|
||||
this.form = {}; |
|
||||
this.dialogFormVisible = true; |
|
||||
}, |
|
||||
/** 修改 */ |
|
||||
handleUpdate(row) { |
|
||||
this.formTitle = "修改"; |
|
||||
this.isEdit = true; |
|
||||
if (row) { |
|
||||
this.fetchData(row.id); |
|
||||
this.dialogFormVisible = true; |
|
||||
} else { |
|
||||
if (this.multipleSelection.length != 1) { |
|
||||
this.$message({ |
|
||||
message: "编辑必须选择单行", |
|
||||
type: "warning", |
|
||||
}); |
|
||||
return; |
|
||||
} else { |
|
||||
this.fetchData(this.multipleSelection[0].id); |
|
||||
this.dialogFormVisible = true; |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
/** 删除 */ |
|
||||
handleDelete(row) { |
|
||||
if (row) { |
|
||||
this.$confirm("是否删除" + row.name + "?", "提示", { |
|
||||
confirmButtonText: "确定", |
|
||||
cancelButtonText: "取消", |
|
||||
type: "warning", |
|
||||
}) |
|
||||
.then(() => { |
|
||||
this.$axios |
|
||||
.deletes("/api/newjit/assembly-cfg-erp/" + row.id) |
|
||||
.then((response) => { |
|
||||
const index = this.list.indexOf(row); |
|
||||
this.list.splice(index, 1); |
|
||||
this.$notify({ |
|
||||
title: "成功", |
|
||||
message: "删除成功", |
|
||||
type: "success", |
|
||||
duration: 2000, |
|
||||
}); |
|
||||
}); |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.$message({ |
|
||||
type: "info", |
|
||||
message: "已取消删除", |
|
||||
}); |
|
||||
}); |
|
||||
} else { |
|
||||
this.$alert("暂时不支持批量删除", "提示", { |
|
||||
confirmButtonText: "确定", |
|
||||
callback: (action) => { |
|
||||
// |
|
||||
}, |
|
||||
}); |
|
||||
} |
|
||||
}, |
|
||||
fetchData(id) { |
|
||||
//循环动态 |
|
||||
this.$axios |
|
||||
.gets("/api/newjit/assembly-cfg-erp/" + id) |
|
||||
.then((response) => { |
|
||||
this.form = response.item; |
|
||||
}); |
|
||||
}, |
|
||||
/** 导出功能 */ |
|
||||
handleDownload() { |
|
||||
this.listLoading = true; |
|
||||
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; |
|
||||
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; |
|
||||
console.log(JSON.stringify(this.listExportQuery)); |
|
||||
this.$axios |
|
||||
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) |
|
||||
.then((res) => { |
|
||||
let filename = res.item; |
|
||||
this.$axios |
|
||||
.BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) |
|
||||
.then((response) => { |
|
||||
if (filename.indexOf("_") != -1) { |
|
||||
let downName = |
|
||||
filename.slice(0, filename.lastIndexOf("_")) + |
|
||||
filename.slice(filename.lastIndexOf(".")); |
|
||||
downloadFile(response, downName); |
|
||||
this.$notify({ |
|
||||
title: "成功", |
|
||||
message: "数据-导出成功!", |
|
||||
type: "success", |
|
||||
duration: 2000, |
|
||||
}); |
|
||||
} else { |
|
||||
downloadFile(response, filename); |
|
||||
this.$notify({ |
|
||||
title: "成功", |
|
||||
message: "数据-导出成功!", |
|
||||
type: "success", |
|
||||
duration: 2000, |
|
||||
}); |
|
||||
} |
|
||||
this.listLoading = false; |
|
||||
}); |
|
||||
}); |
|
||||
this.listLoading = false; |
|
||||
}, |
|
||||
/** 重置按钮操作 */ |
|
||||
resetQuery(refName) { |
|
||||
//this.$refs[refName].resetFields(); |
|
||||
this.listQuery.ErpAssemblyName = ""; |
|
||||
this.listQuery.ErpAssemblyCode = ""; |
|
||||
this.handleQuery(); |
|
||||
}, |
|
||||
/** 搜索按钮操作 */ |
|
||||
handleQuery() { |
|
||||
this.listQuery.SkipCount = 1; |
|
||||
this.getList(); |
|
||||
}, |
|
||||
selectValue(params) { |
|
||||
//版本下拉选择 |
|
||||
this.versionValue = params.value; |
|
||||
this.getList(); |
|
||||
}, |
|
||||
|
|
||||
selectOptionsChange(item) { |
|
||||
this.getList(); |
|
||||
}, |
|
||||
importExcelData() { |
|
||||
//关闭导入窗体时调用 |
|
||||
this.showExcelImport = false; |
|
||||
//this.getList(); |
|
||||
}, |
|
||||
|
|
||||
/** 刷新列表 */ |
|
||||
handleHandle(data) { |
|
||||
if (data.type !== "edit") { |
|
||||
this.getList(); |
|
||||
} |
|
||||
}, |
|
||||
/** 格式化字段 */ |
|
||||
fieldFormatter(row, column) { |
|
||||
if (column.property === "billStatus") { |
|
||||
return { 0: "未生效", 2: "已生效", 3: "已发布" }[row[column.property]]; |
|
||||
} |
|
||||
if (column.property == "onlineTime" || column.property == "receiveTime") { |
|
||||
var date = row[column.property]; |
|
||||
if (date == undefined) { |
|
||||
return ""; |
|
||||
} |
|
||||
return moment(date).format("YYYY-MM-DD HH:mm:ss"); |
|
||||
} |
|
||||
return row[column.property] || "--"; |
|
||||
}, |
|
||||
roleFilter(type) { |
|
||||
return projectTypeKeyValue[type]; |
|
||||
}, |
|
||||
getList() { |
|
||||
this.listLoading = true; |
|
||||
this.listQuery.SkipCount = (this.page - 1) * 10; |
|
||||
this.$axios |
|
||||
.gets("/api/newjit/assembly-cfg-erp/list", 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(); |
|
||||
}, |
|
||||
|
|
||||
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 === "qty") { |
|
||||
return { textAlign: "right" }; |
|
||||
} else { |
|
||||
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 "../../../ux/styles/crmtable.scss"; |
|
||||
</style> |
|
||||
|
|
@ -1,354 +0,0 @@ |
|||||
<!--M100上线信息-明细数据--> |
|
||||
<template> |
|
||||
<div class="cr-body-content"> |
|
||||
<!--表格渲染--> |
|
||||
<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%" |
|
||||
@sort-change="sortChange" |
|
||||
@selection-change="handleSelectionChange" |
|
||||
@row-click="handleRowClick" |
|
||||
:row-key="getRowKeys" |
|
||||
:expand-row-keys="expands" |
|
||||
@expand-change="exChange" |
|
||||
> |
|
||||
<!-- <el-table-column type="selection" width="44px"></el-table-column> --> |
|
||||
<!-- <el-table-column |
|
||||
prop="总成名称" |
|
||||
label="erpAssemblyName" |
|
||||
sortable |
|
||||
width="180" |
|
||||
> |
|
||||
</el-table-column> |
|
||||
<el-table-column |
|
||||
prop="erpAssemblyVersion" |
|
||||
label="总成版本号" |
|
||||
sortable |
|
||||
width="180" |
|
||||
> |
|
||||
style="width: calc(100% - 47px)" |
|
||||
class="two-list" |
|
||||
</el-table-column> --> |
|
||||
|
|
||||
<el-table-column type="expand" prop="details"> |
|
||||
<template slot-scope="scope"> |
|
||||
<el-table :data="scope.row.details"> |
|
||||
<el-table-column |
|
||||
prop="partCode" |
|
||||
label="客户零件代码" |
|
||||
></el-table-column> |
|
||||
<el-table-column |
|
||||
prop="partNum" |
|
||||
label="客户零件数量" |
|
||||
></el-table-column> |
|
||||
<el-table-column prop="description" label="描述"></el-table-column> |
|
||||
<el-table-column prop="isKey" label="是否Key件"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span v-if="scope.row.isKey == true"> |
|
||||
<span style="color: #00b46d">是</span> |
|
||||
</span> |
|
||||
<span v-else> |
|
||||
<span style="color: #d75c89">否</span> |
|
||||
</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
</el-table> |
|
||||
</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-column |
|
||||
prop="erpAssemblyVersion" |
|
||||
label="总成版本号" |
|
||||
sortable |
|
||||
width="360" |
|
||||
> |
|
||||
</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 Detail from "./detail"; |
|
||||
|
|
||||
export default { |
|
||||
name: "sendUnsettledDiffReport", |
|
||||
components: { Pagination, CRMTableHead, Detail }, |
|
||||
directives: { permission }, |
|
||||
filters: { |
|
||||
IsCustomerSignFilter(status) { |
|
||||
//翻译是否签字 |
|
||||
const statusMap = { |
|
||||
true: "是", |
|
||||
false: "否", |
|
||||
}; |
|
||||
return statusMap[status]; |
|
||||
}, |
|
||||
}, |
|
||||
props: { |
|
||||
customerInfos: { |
|
||||
type: Array, |
|
||||
default: () => { |
|
||||
return []; |
|
||||
}, |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
crmType: "stockFisDiffReport", |
|
||||
rules: { |
|
||||
//前端定义的规则,后端也有验证 |
|
||||
erpMaterialCode: [ |
|
||||
{ required: true, message: "必须输入!", trigger: "blur" }, |
|
||||
], |
|
||||
}, |
|
||||
expands: [], //只展开一行放入当前行id |
|
||||
getRowKeys: (row) => { |
|
||||
return row.id; //这里看这一行中需要根据哪个属性值是id |
|
||||
}, |
|
||||
searchContent: "", // 输入内容 |
|
||||
customerInfo: { |
|
||||
parentId: "", |
|
||||
}, |
|
||||
form: { |
|
||||
dicDetailID: "", |
|
||||
customerId: "", |
|
||||
projectId: "", |
|
||||
}, |
|
||||
list: null, |
|
||||
totalCount: 0, |
|
||||
listLoading: true, |
|
||||
formLoading: false, |
|
||||
// 高级搜索 |
|
||||
filterObj: { |
|
||||
type: Object, |
|
||||
default: () => { |
|
||||
return {}; |
|
||||
}, |
|
||||
}, |
|
||||
listQuery: { |
|
||||
Filters: [ |
|
||||
{ |
|
||||
logic: 0, |
|
||||
column: "Enabled", |
|
||||
action: 0, |
|
||||
value: "true", |
|
||||
}, //默认查询可用的 |
|
||||
], |
|
||||
SkipCount: 0, |
|
||||
MaxResultCount: 15, |
|
||||
id: "", |
|
||||
}, |
|
||||
page: 1, |
|
||||
dialogFormVisible: false, |
|
||||
multipleSelection: [], |
|
||||
formTitle: "", |
|
||||
drawer: false, |
|
||||
showExcelImport: false, |
|
||||
tableHeight: document.documentElement.clientHeight - 260, |
|
||||
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: "erpAssemblyCode", |
|
||||
width: 160, |
|
||||
}); |
|
||||
tempsTabs.push({ |
|
||||
label: "总成名称", |
|
||||
prop: "erpAssemblyName", |
|
||||
width: 160, |
|
||||
}); |
|
||||
// tempsTabs.push({ |
|
||||
// label: "总成版本号", |
|
||||
// prop: "erpAssemblyName", |
|
||||
// width: 160, |
|
||||
// }); |
|
||||
return tempsTabs; |
|
||||
}, |
|
||||
}, |
|
||||
methods: { |
|
||||
exChange(row, rowList) { |
|
||||
this.loading = true; |
|
||||
|
|
||||
var that = this; |
|
||||
if (rowList.length) { |
|
||||
that.expands = []; |
|
||||
if (row) { |
|
||||
that.expands.push(row.id); // 只展开当前行id |
|
||||
} |
|
||||
} else { |
|
||||
that.expands = []; |
|
||||
} |
|
||||
}, |
|
||||
/** 刷新列表 */ |
|
||||
handleHandle(data) { |
|
||||
if (data.type !== "edit") { |
|
||||
this.getList(); |
|
||||
} |
|
||||
}, |
|
||||
/** 格式化字段 */ |
|
||||
fieldFormatter(row, column) { |
|
||||
return row[column.property] || "--"; |
|
||||
}, |
|
||||
importExcelData() { |
|
||||
//关闭导入窗体时调用 |
|
||||
this.showExcelImport = false; |
|
||||
this.getList(); |
|
||||
}, |
|
||||
getList() { |
|
||||
this.listLoading = true; |
|
||||
console.log("详表条件:" + JSON.stringify(this.customerInfo.parentId)); |
|
||||
//alert("详表条件:" + JSON.stringify(this.customerInfo.parentId)); |
|
||||
let vehicleAssemblyId = { vehicleAssemblyId: this.customerInfo.parentId }; |
|
||||
this.$axios |
|
||||
.gets("/api/newjit/assembly-cfg-vehicle/list", vehicleAssemblyId) |
|
||||
.then((response) => { |
|
||||
this.list = response; |
|
||||
setTimeout(() => { |
|
||||
//大数据量加载时 |
|
||||
this.listLoading = false; |
|
||||
}, 500); |
|
||||
}) |
|
||||
.catch(() => { |
|
||||
this.listLoading = false; |
|
||||
}); |
|
||||
}, |
|
||||
/** 筛选操作 */ |
|
||||
handleFilter() { |
|
||||
this.page = 1; |
|
||||
this.getList(); |
|
||||
this.listQuery.Filters = []; |
|
||||
if (this.searchContent != "") { |
|
||||
var column = "partCode"; |
|
||||
let filter = { |
|
||||
logic: 0, |
|
||||
column: column, |
|
||||
action: 6, |
|
||||
value: this.searchContent, |
|
||||
}; |
|
||||
this.listQuery.Filters.push(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 "../../../ux/styles/crmtable.scss"; |
|
||||
</style> |
|
||||
|
|
@ -1,571 +0,0 @@ |
|||||
<!--M100上线信息页--> |
|
||||
<template> |
|
||||
<div class="cr-body-content"> |
|
||||
<flexbox class="content-header"> |
|
||||
<el-form |
|
||||
:model="listQuery" |
|
||||
ref="queryForm" |
|
||||
v-show="showSearch" |
|
||||
:inline="true" |
|
||||
> |
|
||||
<el-form-item label="起始顺序号" prop="HostSNBegin"> |
|
||||
<el-input |
|
||||
v-model="listQuery.HostSNBegin" |
|
||||
placeholder="起始顺序号" |
|
||||
clearable |
|
||||
size="small" |
|
||||
style="width: 120px" |
|
||||
@keyup.enter.native="handleQuery" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="结束顺序号" prop="HostSNEnd"> |
|
||||
<el-input |
|
||||
v-model="listQuery.HostSNEnd" |
|
||||
placeholder="结束顺序号" |
|
||||
clearable |
|
||||
size="small" |
|
||||
style="width: 120px" |
|
||||
@keyup.enter.native="handleQuery" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="KNR" prop="KNR"> |
|
||||
<el-input |
|
||||
v-model="listQuery.KNR" |
|
||||
placeholder="请输入KNR号" |
|
||||
clearable |
|
||||
size="small" |
|
||||
style="width: 240px" |
|
||||
@keyup.enter.native="handleQuery" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="底盘号" prop="VIN"> |
|
||||
<el-input |
|
||||
v-model="listQuery.VIN" |
|
||||
placeholder="请输入底盘号" |
|
||||
clearable |
|
||||
size="small" |
|
||||
style="width: 240px" |
|
||||
@keyup.enter.native="handleQuery" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item label="车型代码" prop="VehicleModelCode"> |
|
||||
<el-input |
|
||||
v-model="listQuery.VehicleModelCode" |
|
||||
placeholder="请输入车型代码" |
|
||||
clearable |
|
||||
size="small" |
|
||||
style="width: 240px" |
|
||||
@keyup.enter.native="handleQuery" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item label="版本" prop="Version"> |
|
||||
<el-input |
|
||||
v-model="listQuery.Version" |
|
||||
placeholder="请输入版本" |
|
||||
clearable |
|
||||
size="small" |
|
||||
style="width: 240px" |
|
||||
@keyup.enter.native="handleQuery" |
|
||||
/> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<el-form-item label="上线日期"> |
|
||||
<el-date-picker |
|
||||
v-model="OnlineTimeVale" |
|
||||
size="small" |
|
||||
style="width: 380px" |
|
||||
value-format="yyyy-MM-dd HH:mm:ss" |
|
||||
type="datetimerange" |
|
||||
range-separator="-" |
|
||||
start-placeholder="开始日期" |
|
||||
end-placeholder="结束日期" |
|
||||
></el-date-picker> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="接收日期"> |
|
||||
<el-date-picker |
|
||||
v-model="ReceiveTimeVale" |
|
||||
size="small" |
|
||||
style="width: 380px" |
|
||||
value-format="yyyy-MM-dd HH:mm:ss" |
|
||||
type="datetimerange" |
|
||||
range-separator="-" |
|
||||
start-placeholder="开始日期" |
|
||||
end-placeholder="结束日期" |
|
||||
></el-date-picker> |
|
||||
</el-form-item> |
|
||||
|
|
||||
<!-- <el-form-item label="单据状态" prop="BillStatus"> |
|
||||
<el-select |
|
||||
v-model="listQuery.BillStatus" |
|
||||
placeholder="请选择" |
|
||||
style="width: 200px" |
|
||||
> |
|
||||
<el-option label="未领取生产任务" :value="1"></el-option> |
|
||||
<el-option label="已领取生产任务" :value="2"></el-option> |
|
||||
<el-option label="完成生产任务" :value="3"></el-option> |
|
||||
</el-select> |
|
||||
</el-form-item> --> |
|
||||
|
|
||||
<el-form-item> |
|
||||
<el-button |
|
||||
type="primary" |
|
||||
icon="el-icon-search" |
|
||||
size="mini" |
|
||||
@click="handleFilter" |
|
||||
>搜索</el-button |
|
||||
> |
|
||||
<el-button |
|
||||
icon="el-icon-refresh" |
|
||||
size="mini" |
|
||||
@click="resetQuery('queryForm')" |
|
||||
>重置</el-button |
|
||||
> |
|
||||
<el-button |
|
||||
type="warning" |
|
||||
plain |
|
||||
icon="el-icon-download" |
|
||||
size="mini" |
|
||||
style="margin-left: 15px" |
|
||||
@click="handleDownload()" |
|
||||
>导出(Excel)查询信息 |
|
||||
</el-button> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</flexbox> |
|
||||
<div class="l-table"> |
|
||||
<!--表格渲染--> |
|
||||
<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%" |
|
||||
@sort-change="sortChange" |
|
||||
@selection-change="handleSelectionChange" |
|
||||
@row-click="handleRowClick" |
|
||||
> |
|
||||
<el-table-column |
|
||||
label="底盘号" |
|
||||
prop="vin " |
|
||||
sortable="custom" |
|
||||
align="center" |
|
||||
fixed |
|
||||
width="180px" |
|
||||
> |
|
||||
<template slot-scope="scope"> |
|
||||
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{ |
|
||||
scope.row.vin |
|
||||
}}</span> |
|
||||
</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> |
|
||||
|
|
||||
<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" |
|
||||
/> |
|
||||
<!-- 抽屉控件 --> |
|
||||
<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"; |
|
||||
import permission from "@/directive/permission/index.js"; |
|
||||
import CRMTableHead from "../../components/CRMTableHead"; |
|
||||
import importExcel from "@/components/ImportExcel-vw"; |
|
||||
import Lockr from "lockr"; |
|
||||
import moment from "moment"; |
|
||||
import Detail from "./detail.vue"; |
|
||||
import { downloadFile } from "@/utils/crmindex.js"; |
|
||||
|
|
||||
//组件计量单位 |
|
||||
const bomUnit = [ |
|
||||
{ key: 0, display_name: "PC" }, |
|
||||
{ key: 1, display_name: "TON" }, |
|
||||
{ key: 2, display_name: "Other" }, |
|
||||
]; |
|
||||
const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { |
|
||||
acc[cur.key] = cur.display_name; |
|
||||
return acc; |
|
||||
}, {}); |
|
||||
|
|
||||
export default { |
|
||||
name: "BillM100", |
|
||||
components: { Pagination, CRMTableHead, importExcel, Detail }, |
|
||||
directives: { permission }, |
|
||||
filters: { |
|
||||
IsCustomerSignFilter(status) { |
|
||||
//翻译是否签字 |
|
||||
const statusMap = { |
|
||||
true: "是", |
|
||||
false: "否", |
|
||||
}; |
|
||||
return statusMap[status]; |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
crmType: "bomdatabase", |
|
||||
OnlineTimeVale: [], |
|
||||
ReceiveTimeVale: [], |
|
||||
customerInfos: [], |
|
||||
versionValue: "", |
|
||||
versionList: [], //版本列表 |
|
||||
searchContent: "", // 输入内容 |
|
||||
showExcelImport: false, |
|
||||
form: {}, |
|
||||
drawer: false, |
|
||||
list: null, |
|
||||
totalCount: 0, |
|
||||
listLoading: true, |
|
||||
customerInfo: { |
|
||||
bomId: "", |
|
||||
}, |
|
||||
// 高级搜索 |
|
||||
filterObj: { |
|
||||
type: Object, |
|
||||
default: () => { |
|
||||
return {}; |
|
||||
}, |
|
||||
}, |
|
||||
listQuery: { |
|
||||
SkipCount: 0, |
|
||||
MaxResultCount: 15, |
|
||||
HostSNBegin: undefined, |
|
||||
HostSNEnd: undefined, |
|
||||
VIN: undefined, |
|
||||
OnlineTimeBegin: undefined, |
|
||||
OnlineTimeEnd: undefined, |
|
||||
ReceiveTimeBegin: undefined, |
|
||||
ReceiveTimeEnd: undefined, |
|
||||
VehicleModelCode: undefined, |
|
||||
Version: undefined, |
|
||||
KNR: undefined, |
|
||||
}, |
|
||||
page: 1, |
|
||||
// 显示搜索条件 |
|
||||
showSearch: true, |
|
||||
bomUnit, |
|
||||
multipleSelection: [], |
|
||||
drawer: false, |
|
||||
tableHeight: document.documentElement.clientHeight - 280, |
|
||||
}; |
|
||||
}, |
|
||||
mounted() { |
|
||||
var self = this; |
|
||||
window.onresize = function () { |
|
||||
var offsetHei = document.documentElement.clientHeight; |
|
||||
self.tableHeight = offsetHei - 280; |
|
||||
}; |
|
||||
}, |
|
||||
created() { |
|
||||
this.getList(); |
|
||||
}, |
|
||||
computed: { |
|
||||
getDefaultField() { |
|
||||
var tempsTabs = []; |
|
||||
tempsTabs.push({ label: "流水号", prop: "serialNum", width: 100 }); |
|
||||
tempsTabs.push({ label: "大众顺序号", prop: "hostSN", width: 120 }); |
|
||||
tempsTabs.push({ |
|
||||
label: "KNR", |
|
||||
prop: "knr", |
|
||||
width: 120, |
|
||||
}); |
|
||||
// tempsTabs.push({ |
|
||||
// label: "底盘号", |
|
||||
// prop: "vin", |
|
||||
// width: 130, |
|
||||
// }); |
|
||||
tempsTabs.push({ |
|
||||
label: "上线时间", |
|
||||
prop: "onlineTime", |
|
||||
width: 150, |
|
||||
}); |
|
||||
tempsTabs.push({ |
|
||||
label: "接收时间", |
|
||||
prop: "receiveTime", |
|
||||
width: 180, |
|
||||
}); |
|
||||
tempsTabs.push({ |
|
||||
label: "车型代码", |
|
||||
prop: "vehicleModelCode", |
|
||||
width: 120, |
|
||||
}); |
|
||||
tempsTabs.push({ |
|
||||
label: "版本", |
|
||||
prop: "version", |
|
||||
width: 150, |
|
||||
}); |
|
||||
tempsTabs.push({ label: "单据状态", prop: "billStatus", width: 120 }); |
|
||||
tempsTabs.push({ |
|
||||
label: "车型名称", |
|
||||
prop: "vehicleModelName", |
|
||||
width: 120, |
|
||||
}); |
|
||||
return tempsTabs; |
|
||||
}, |
|
||||
}, |
|
||||
methods: { |
|
||||
//抽屉 |
|
||||
handleDrawerOpen(param) { |
|
||||
this.drawer = true; |
|
||||
var parentId = param.assemblyID; //传入的是总成id |
|
||||
this.customerInfos = [ |
|
||||
{ |
|
||||
ParentId: parentId, |
|
||||
}, |
|
||||
]; |
|
||||
}, |
|
||||
handleDrawerClose(done) { |
|
||||
done(); |
|
||||
}, |
|
||||
/** 导出功能 */ |
|
||||
handleDownload() { |
|
||||
this.listLoading = true; |
|
||||
// if (this.OnlineTimeVale != []) { |
|
||||
// this.listQuery.OnlineTimeBegin = this.OnlineTimeVale |
|
||||
// ? this.OnlineTimeVale[0] || "" |
|
||||
// : ""; |
|
||||
// this.listQuery.OnlineTimeEnd = this.OnlineTimeVale |
|
||||
// ? this.OnlineTimeVale[1] || "" |
|
||||
// : ""; |
|
||||
// } |
|
||||
// if (this.ReceiveTimeVale != []) { |
|
||||
// this.listQuery.ReceiveTimeBegin = this.ReceiveTimeVale[0]; |
|
||||
// this.listQuery.ReceiveTimeEnd = this.ReceiveTimeVale[1]; |
|
||||
// } |
|
||||
if (this.OnlineTimeVale != []) { |
|
||||
this.listQuery.OnlineTimeBegin = this.OnlineTimeVale |
|
||||
? this.OnlineTimeVale[0] || undefined |
|
||||
: undefined |
|
||||
this.listQuery.OnlineTimeEnd = this.OnlineTimeVale |
|
||||
? this.OnlineTimeVale[1] || undefined |
|
||||
: undefined |
|
||||
} |
|
||||
if (this.ReceiveTimeVale != []) { |
|
||||
this.listQuery.ReceiveTimeBegin = this.ReceiveTimeVale |
|
||||
? this.ReceiveTimeVale[0] || undefined |
|
||||
: undefined |
|
||||
|
|
||||
this.listQuery.ReceiveTimeEnd = this.ReceiveTimeVale |
|
||||
? this.ReceiveTimeVale[1] || undefined |
|
||||
: undefined |
|
||||
} |
|
||||
console.log("M100上线信息导出条件:"+JSON.stringify(this.listQuery)) |
|
||||
this.$axios |
|
||||
.posts("/api/newjit/bill-m100/export", this.listQuery) |
|
||||
.then((res) => { |
|
||||
let filename = res.item; |
|
||||
this.$axios |
|
||||
.BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) |
|
||||
.then((response) => { |
|
||||
if (filename.indexOf("_") != -1) { |
|
||||
let downName = |
|
||||
filename.slice(0, filename.lastIndexOf("_")) + |
|
||||
filename.slice(filename.lastIndexOf(".")); |
|
||||
downloadFile(response, downName); |
|
||||
this.$notify({ |
|
||||
title: "成功", |
|
||||
message: "数据-导出成功!", |
|
||||
type: "success", |
|
||||
duration: 2000, |
|
||||
}); |
|
||||
} else { |
|
||||
downloadFile(response, filename); |
|
||||
this.$notify({ |
|
||||
title: "成功", |
|
||||
message: "数据-导出成功!", |
|
||||
type: "success", |
|
||||
duration: 2000, |
|
||||
}); |
|
||||
} |
|
||||
this.listLoading = false; |
|
||||
}); |
|
||||
}); |
|
||||
}, |
|
||||
/** 重置按钮操作 */ |
|
||||
resetQuery(refName) { |
|
||||
this.OnlineTimeVale = []; |
|
||||
this.ReceiveTimeVale = []; |
|
||||
this.$refs[refName].resetFields(); |
|
||||
this.handleQuery(); |
|
||||
}, |
|
||||
/** 搜索按钮操作 */ |
|
||||
handleQuery() { |
|
||||
this.listQuery.SkipCount = 1; |
|
||||
this.getList(); |
|
||||
}, |
|
||||
selectValue(params) { |
|
||||
//版本下拉选择 |
|
||||
this.versionValue = params.value; |
|
||||
this.getList(); |
|
||||
}, |
|
||||
|
|
||||
selectOptionsChange(item) { |
|
||||
this.getList(); |
|
||||
}, |
|
||||
importExcelData() { |
|
||||
//关闭导入窗体时调用 |
|
||||
this.showExcelImport = false; |
|
||||
//this.getList(); |
|
||||
}, |
|
||||
|
|
||||
/** 刷新列表 */ |
|
||||
handleHandle(data) { |
|
||||
if (data.type !== "edit") { |
|
||||
this.getList(); |
|
||||
} |
|
||||
}, |
|
||||
/** 格式化字段 */ |
|
||||
fieldFormatter(row, column) { |
|
||||
if (column.property === "billStatus") { |
|
||||
return { 0: "未生效", 2: "已生效", 3: "已发布" }[row[column.property]]; |
|
||||
} |
|
||||
if (column.property == "onlineTime" || column.property == "receiveTime") { |
|
||||
var date = row[column.property]; |
|
||||
if (date == undefined) { |
|
||||
return ""; |
|
||||
} |
|
||||
return moment(date).format("YYYY-MM-DD HH:mm:ss"); |
|
||||
} |
|
||||
return row[column.property] || "--"; |
|
||||
}, |
|
||||
roleFilter(type) { |
|
||||
return projectTypeKeyValue[type]; |
|
||||
}, |
|
||||
getList() { |
|
||||
this.listLoading = true; |
|
||||
this.listQuery.SkipCount = (this.page - 1) * 15; |
|
||||
if (this.OnlineTimeVale != []) { |
|
||||
this.listQuery.OnlineTimeBegin = this.OnlineTimeVale |
|
||||
? this.OnlineTimeVale[0] || "" |
|
||||
: ""; |
|
||||
this.listQuery.OnlineTimeEnd = this.OnlineTimeVale |
|
||||
? this.OnlineTimeVale[1] || "" |
|
||||
: ""; |
|
||||
} |
|
||||
if (this.ReceiveTimeVale != []) { |
|
||||
this.listQuery.ReceiveTimeBegin = this.ReceiveTimeVale |
|
||||
? this.ReceiveTimeVale[0] || "" |
|
||||
: ""; |
|
||||
|
|
||||
this.listQuery.ReceiveTimeEnd = this.ReceiveTimeVale |
|
||||
? this.ReceiveTimeVale[1] || "" |
|
||||
: ""; |
|
||||
} |
|
||||
console.log("billM100查询条件:" + JSON.stringify(this.listQuery)); |
|
||||
this.$axios |
|
||||
.gets("/api/newjit/bill-m100/list", 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(); |
|
||||
}, |
|
||||
|
|
||||
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 === "qty") { |
|
||||
return { textAlign: "right" }; |
|
||||
} else { |
|
||||
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 "../../../ux/styles/crmtable.scss"; |
|
||||
</style> |
|
||||
|
|