Browse Source

前端代码提交

branch_ccpg_220107
44673626 3 years ago
parent
commit
6ae14acecb
  1. 3
      vue/src/components/ImportExcel-base/index.vue
  2. 85
      vue/src/components/PasteExcel/index.vue
  3. 187
      vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue
  4. 65
      vue/src/views/ux/vw/dataInput/hq_h/index.vue

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

@ -301,7 +301,7 @@ export default {
vWKanBan: "大众看板结算明细",
scrapClaims: "CP7报废和索赔",
sparePart: "大众备件结算明细",
hqHPlatform: "红旗H平台导入",
bomdatabase: "产品结构BOM",
prebatch: "预批量",
secondaryPriceRatio: "二配结算价格比例",
@ -327,6 +327,7 @@ export default {
vWKanBan: "/api/settleaccount/VWKanBan/ExcelImport", //
scrapClaims: "/api/settleaccount/ScrapClaims/ExcelImport", //CP7
sparePart: "/api/settleaccount/SparePart/ExcelImport", //
hqHPlatform: "/api/settleaccount/HQHPlatform/ExcelImport", //H
bomdatabase: "/api/settleaccount/bom/ExcelImport",
prebatch: "/api/settleaccount/Prebatch/ExcelImport",

85
vue/src/components/PasteExcel/index.vue

@ -0,0 +1,85 @@
<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="单据号" 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: [],
};
},
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++) {
// tableDatajkey
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>

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

@ -390,27 +390,6 @@
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :md="4" :xs="24">
<el-form-item label="CP5时间:" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item>
<el-date-picker
v-model="datetime5"
type="datetimerange"
:picker-options="pickerOptionsCp5"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row> -->
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="CP5时间:" />
@ -480,17 +459,30 @@
<el-col :md="4" :xs="24">
<el-form-item label="KEEN号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-col :md="18" :xs="24" style="margin-left: -80px">
<el-form-item prop="kennCode">
<el-input
type="textarea"
v-model="formCount.kennCode"
style="width: 450px"
placeholder="请输入内容"
@paste.native="pasteExcelToKennCode"
style="width: 380px"
placeholder="KEEN号用逗号分隔!"
/>
</el-form-item>
</el-col>
<el-col :md="2" :xs="24">
<el-tooltip
content="一键复制粘贴"
placement="bottom"
effect="light"
>
<el-button
type="primary"
icon="el-icon-edit"
circle
@click="showModal = true"
></el-button>
</el-tooltip>
</el-col>
</el-row>
<el-row>
@ -503,7 +495,7 @@
v-model="formCount.chassisNumber"
style="width: 450px"
type="textarea"
placeholder="请输入内容"
placeholder="只支持粘贴,不支持手输!"
@paste.native="pasteExcelTochassisNumber"
/>
</el-form-item>
@ -520,7 +512,7 @@
v-model="formCount.materialCode"
style="width: 450px"
type="textarea"
placeholder="请输入内容"
placeholder="只支持粘贴,不支持手输!"
@paste.native="pasteExcelTomaterialCode"
/>
</el-form-item>
@ -536,7 +528,7 @@
v-model="formCount.sapCode"
style="width: 450px"
type="textarea"
placeholder="请输入内容"
placeholder="只支持粘贴,不支持手输!"
@paste.native="pasteExcelTosapCode"
/>
</el-form-item>
@ -553,6 +545,36 @@
>
</div>
</el-dialog>
<el-dialog
title="批量录入KEEN号"
:visible.sync="showModal"
width="400px"
height="500px"
append-to-body
>
<flexbox class="content">
<div>
<el-input
type="textarea"
v-model="paster"
@paste.native="pasteMe"
:rows="6"
/>
<el-table :data="tableData" max-height="400">
<el-table-column
prop="name"
label="说明:只支持从Excel上粘贴复制,不支持手输!"
width="300"
>
</el-table-column>
</el-table>
</div>
</flexbox>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submiteBillNo">确定录入</el-button>
</div>
</el-dialog>
</div>
</template>
@ -562,20 +584,29 @@ import permission from "@/directive/permission/index.js";
import { downloadFile } from "@/utils/crmindex.js";
import CRMTableHead from "../../components/CRMTableHead";
import moment from "moment";
import PasteExcel from "@/components/PasteExcel/index.vue";
export default {
name: "InvoiceSettledDetailDiff",
components: { Pagination, CRMTableHead },
components: { Pagination, CRMTableHead, PasteExcel },
directives: { permission },
data() {
return {
crmType: "backJob",
tableData: [
{
name: "KEEN号",
},
],
paster: "",
pasterValue: "",
rules: {
versionValue: [
{ required: true, message: "必须输入!", trigger: "change" },
],
},
showModal: false,
pickerOptionsCp5: {
disabledDate: (time) => {
let now = new Date();
@ -780,13 +811,36 @@ export default {
},
},
methods: {
valueChange(data) {
this.getmaterialGroupValue = "";
this.getmaterialGroupValue += data + ",";
this.getmaterialGroupValue = this.getmaterialGroupValue.substring(
submiteBillNo() {
var getkeenCodeNo = this.pasterValue.substring(
0,
this.getmaterialGroupValue.length - 1
this.pasterValue.length - 1
);
this.dataKenCode = getkeenCodeNo;
this.formCount.kennCode=this.dataKenCode;
this.showModal=false;
},
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"); //
let dataone = {}; //
for (let j = 0; j < columns.length; j++) {
// tableDatajkey
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);
}
}
alert(JSON.stringify(this.pasterValue));
},
//excel
pasteExcelToKennCode(e) {
@ -806,6 +860,15 @@ export default {
}
//alert(this.dataKenCode.trimEnd(","));
},
valueChange(data) {
this.getmaterialGroupValue = "";
this.getmaterialGroupValue += data + ",";
this.getmaterialGroupValue = this.getmaterialGroupValue.substring(
0,
this.getmaterialGroupValue.length - 1
);
},
pasteExcelTochassisNumber(e) {
let source = e.clipboardData.getData("Text");
//
@ -959,11 +1022,7 @@ export default {
this.listExportQuery.sapCode = getsapCode; //
}
if (this.formCount.kennCode != "") {
var getgroupValue = this.dataKenCode.substring(
0,
this.dataKenCode.length - 1
);
this.listExportQuery.kenncode = getgroupValue; //KEEN
this.listExportQuery.kenncode = this.formCount.kennCode; //KEEN
}
this.listExportQuery.begin = this.cp5startTime
? this.cp5startTime
@ -994,31 +1053,31 @@ export default {
"大众发票与结算核对明细表-导出条件:" +
JSON.stringify(this.listExportQuery)
);
this.formLoading = false;
this.dialogFormVisible = false;
// this.$axios
// .gets(
// "/api/settleaccount/ReportMakeService/InvoiceSettledDetailDiff-Make",
// this.listExportQuery
// )
// .then((res) => {
// let taskid = res;
// if (Number.isInteger(taskid)) {
// this.$notify({
// title: "",
// message: ":" + taskid,
// type: "success",
// duration: 2000,
// });
// }
// this.getList();
// this.formLoading = false;
// this.dialogFormVisible = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.dialogFormVisible = false;
// });
// this.formLoading = false;
// this.dialogFormVisible = false;
this.$axios
.gets(
"/api/settleaccount/ReportMakeService/InvoiceSettledDetailDiff-Make",
this.listExportQuery
)
.then((res) => {
let taskid = res;
if (Number.isInteger(taskid)) {
this.$notify({
title: "成功",
message: "任务生成成功!任务号:" + taskid,
type: "success",
duration: 2000,
});
}
this.getList();
this.formLoading = false;
this.dialogFormVisible = false;
})
.catch(() => {
this.formLoading = false;
this.dialogFormVisible = false;
});
}
});
},

65
vue/src/views/ux/vw/dataInput/hq_h/index.vue

@ -1,4 +1,4 @@
<!--红旗导入功能-->
<!--红旗H平台导入功能-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
@ -149,7 +149,7 @@ import { downloadFile } from "@/utils/crmindex.js";
import XhJSSelect from "@/components/CreateCom/Xh-JS-Select-Label.vue";
export default {
name: "SparePart",
name: "HQHPlatform",
components: { Pagination, CRMTableHead, importExcel, XhJSSelect },
directives: { permission },
filters: {
@ -172,7 +172,7 @@ export default {
},
data() {
return {
crmType: "sparePart",
crmType: "hqHPlatform",
versionValue: "",
versionList: [], //
rules: {
@ -348,9 +348,9 @@ export default {
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("大众看板导出:" + JSON.stringify(this.listQuery));
console.log("红旗H平台导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/SparePart/Export", this.listQuery)
.posts("/api/settleaccount/HQHPlatform/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
@ -385,54 +385,7 @@ export default {
});
});
},
// //
// async handleDownload() {
// this.listLoading = true;
// if (this.versionValue === "") {
// this.$message.error("");
// this.listLoading = false;
// return;
// }
// if (this.versionValue != "") {
// this.listQuery.version = this.versionValue;
// }
// console.log("" + JSON.stringify(this.listQuery));
// this.$axios
// .posts("/api/settleaccount/SparePart/Export", this.listQuery)
// .then((res) => {
// let fileNameOfProject = res;
// this.$axios
// .BolbGets(
// "/api/settleaccount/getblobfile/download/" + fileNameOfProject
// )
// .then((response) => {
// if (fileNameOfProject.indexOf("_") != -1) {
// let downName =
// fileNameOfProject.slice(
// 0,
// fileNameOfProject.lastIndexOf("_")
// ) +
// fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
// downloadFile(response, downName);
// this.$notify({
// title: "",
// message: "-",
// type: "success",
// duration: 2000,
// });
// } else {
// downloadFile(response, fileNameOfProject);
// this.$notify({
// title: "",
// message: "-",
// type: "success",
// duration: 2000,
// });
// }
// this.listLoading = false;
// });
// });
// },
selectValue(params) {
//
this.versionValue = params.value;
@ -446,7 +399,7 @@ export default {
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/SparePart/listVersion", this.listQuery)
.posts("/api/settleaccount/HQHPlatform/listVersion", this.listQuery)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
@ -509,7 +462,7 @@ export default {
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/SparePart/list", this.listQuery)
.posts("/api/settleaccount/HQHPlatform/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
@ -525,7 +478,7 @@ export default {
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/SparePart/" + id)
.gets("/api/settleaccount/HQHPlatform/" + id)
.then((response) => {
this.form = response;
});

Loading…
Cancel
Save