no message
This commit is contained in:
parent
a174e8363a
commit
10a5345fee
|
@ -86,6 +86,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newSystemPrimary2" placeholder="TOB确认收入下游主键"></el-input>
|
<el-input v-model="queryCriteria.newSystemPrimary2" placeholder="TOB确认收入下游主键"></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="chunk">
|
||||||
|
<el-input
|
||||||
|
v-model="queryCriteria.headCode"
|
||||||
|
placeholder="销售出库单号"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -149,7 +155,7 @@ export default {
|
||||||
],
|
],
|
||||||
//搜索框内容
|
//搜索框内容
|
||||||
queryCriteria: {
|
queryCriteria: {
|
||||||
businessType:"TOB_RETURN",
|
businesstype:"TOB_RETURN",
|
||||||
},
|
},
|
||||||
pageModel: {
|
pageModel: {
|
||||||
'pageSize': 100,
|
'pageSize': 100,
|
||||||
|
@ -393,7 +399,7 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.pageModel.pageNum = 1
|
this.pageModel.pageNum = 1
|
||||||
this.queryCriteria = {
|
this.queryCriteria = {
|
||||||
businessType:"TOB_RETURN",
|
businesstype:"TOB_RETURN",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//limit改变
|
//limit改变
|
||||||
|
|
|
@ -41,13 +41,22 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- TOC退货-库存 -->
|
<!-- TOC退货-库存 -->
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newPushDate3" placeholder="TOC库存推送时间"></el-input>
|
<el-input
|
||||||
|
v-model="queryCriteria.newPushDate3"
|
||||||
|
placeholder="TOC库存推送时间"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newTransmitInfo3" placeholder="TOC库存推送详情"></el-input>
|
<el-input
|
||||||
|
v-model="queryCriteria.newTransmitInfo3"
|
||||||
|
placeholder="TOC库存推送详情"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<el-select v-model="queryCriteria.newState3" placeholder="TOC出库同步成功">
|
<el-select
|
||||||
|
v-model="queryCriteria.newState3"
|
||||||
|
placeholder="TOC出库同步成功"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateOptions"
|
v-for="item in stateOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -58,20 +67,35 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newSystemNumber3" placeholder="TOC库存下游单号"></el-input>
|
<el-input
|
||||||
|
v-model="queryCriteria.newSystemNumber3"
|
||||||
|
placeholder="TOC库存下游单号"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newSystemPrimary3" placeholder="TOC库存下游主键"></el-input>
|
<el-input
|
||||||
|
v-model="queryCriteria.newSystemPrimary3"
|
||||||
|
placeholder="TOC库存下游主键"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<!-- TOC退货 - 确认收入 -->
|
<!-- TOC退货 - 确认收入 -->
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newPushDate4" placeholder="TOC确认收入推送时间"></el-input>
|
<el-input
|
||||||
|
v-model="queryCriteria.newPushDate4"
|
||||||
|
placeholder="TOC确认收入推送时间"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newTransmitInfo4" placeholder="TOC确认收入推送详情"></el-input>
|
<el-input
|
||||||
|
v-model="queryCriteria.newTransmitInfo4"
|
||||||
|
placeholder="TOC确认收入推送详情"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<el-select v-model="queryCriteria.newState4" placeholder="TOC确认收入-红-交易成功">
|
<el-select
|
||||||
|
v-model="queryCriteria.newState4"
|
||||||
|
placeholder="TOC确认收入-红-交易成功"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateOptions"
|
v-for="item in stateOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -82,10 +106,22 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newSystemNumber4" placeholder="TOC确认收入下游单号"></el-input>
|
<el-input
|
||||||
|
v-model="queryCriteria.newSystemNumber4"
|
||||||
|
placeholder="TOC确认收入下游单号"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-input v-model="queryCriteria.newSystemPrimary4" placeholder="TOC确认收入下游主键"></el-input>
|
<el-input
|
||||||
|
v-model="queryCriteria.newSystemPrimary4"
|
||||||
|
placeholder="TOC确认收入下游主键"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="chunk">
|
||||||
|
<el-input
|
||||||
|
v-model="queryCriteria.headCode"
|
||||||
|
placeholder="销售出库单号"
|
||||||
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -94,24 +130,24 @@
|
||||||
@click="query"
|
@click="query"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="small"
|
size="small"
|
||||||
style=" margin: 5px 5px"
|
style="margin: 5px 5px"
|
||||||
>查询
|
>查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- type="primary"-->
|
<!-- type="primary"-->
|
||||||
<!-- @click="downLoad"-->
|
<!-- @click="downLoad"-->
|
||||||
<!-- :loading="loading"-->
|
<!-- :loading="loading"-->
|
||||||
<!-- size="small"-->
|
<!-- size="small"-->
|
||||||
<!-- style=" margin: 5px 5px"-->
|
<!-- style=" margin: 5px 5px"-->
|
||||||
<!-- >excel导出-->
|
<!-- >excel导出-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@click="reset"
|
@click="reset"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="small"
|
size="small"
|
||||||
style="margin: 5px 5px"
|
style="margin: 5px 5px"
|
||||||
>重置
|
>重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 主体内容-->
|
<!-- 主体内容-->
|
||||||
|
@ -132,40 +168,37 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseNewTable from './baseNewTable2/index.vue'
|
import baseNewTable from "./baseNewTable2/index.vue";
|
||||||
import { authApi, downFilesBasedFileNameFileTypeAPI } from '@/api/apis/auth'
|
import { authApi, downFilesBasedFileNameFileTypeAPI } from "@/api/apis/auth";
|
||||||
import {
|
import { basePrintJS } from "@/utils/util.js";
|
||||||
basePrintJS
|
|
||||||
} from '@/utils/util.js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MachineSchedulingTable',
|
name: "MachineSchedulingTable",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
stateOptions: [
|
stateOptions: [
|
||||||
{ label: '全部', value: 'all' },
|
{ label: "全部", value: "all" },
|
||||||
{ label: '成功', value: 'Y' },
|
{ label: "成功", value: "Y" },
|
||||||
{ label: '失败', value: 'N' }
|
{ label: "失败", value: "N" },
|
||||||
],
|
],
|
||||||
//搜索框内容
|
//搜索框内容
|
||||||
queryCriteria: {
|
queryCriteria: {
|
||||||
businessType:"TOC_RETURN",
|
businesstype: "TOC_RETURN",
|
||||||
},
|
},
|
||||||
pageModel: {
|
pageModel: {
|
||||||
'pageSize': 100,
|
pageSize: 100,
|
||||||
'pageNum': 1,
|
pageNum: 1,
|
||||||
pageTotal: 0
|
pageTotal: 0,
|
||||||
},
|
},
|
||||||
options:[
|
options: [
|
||||||
{
|
{
|
||||||
label:"TOB销售",
|
label: "TOB销售",
|
||||||
value:"TOB_ORDER"
|
value: "TOB_ORDER",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label:"TOC退货-库存",
|
label: "TOC退货-库存",
|
||||||
value:"TOC_ORDER"
|
value: "TOC_ORDER",
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
//搜索按钮loading
|
//搜索按钮loading
|
||||||
loading: false,
|
loading: false,
|
||||||
|
@ -187,289 +220,297 @@ export default {
|
||||||
//生产班组
|
//生产班组
|
||||||
stateNameOption: [
|
stateNameOption: [
|
||||||
{
|
{
|
||||||
label: '甲',
|
label: "甲",
|
||||||
value: '甲'
|
value: "甲",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '乙',
|
label: "乙",
|
||||||
value: '乙'
|
value: "乙",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '丙',
|
label: "丙",
|
||||||
value: '丙'
|
value: "丙",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
// 右侧按钮
|
// 右侧按钮
|
||||||
fixedButtonList: [
|
fixedButtonList: [
|
||||||
{
|
{
|
||||||
icon: 'el-icon-printer',
|
icon: "el-icon-printer",
|
||||||
title: '打印'
|
title: "打印",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'el-icon-folder',
|
icon: "el-icon-folder",
|
||||||
title: '导出'
|
title: "导出",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
//正常表单
|
//正常表单
|
||||||
mainTableData: [],
|
mainTableData: [],
|
||||||
//缺少字段产品大类、本次生产重量
|
//缺少字段产品大类、本次生产重量
|
||||||
mainTableColumn: [
|
mainTableColumn: [
|
||||||
{
|
{
|
||||||
label: '入库明细主键',
|
label: "入库明细主键",
|
||||||
prop: 'id',
|
prop: "id",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '来源单据主键',
|
label: "来源单据主键",
|
||||||
prop: 'reforderdetailid',
|
prop: "reforderdetailid",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '货品sku',
|
label: "货品sku",
|
||||||
prop: 'skucode',
|
prop: "skucode",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '货品名称',
|
label: "货品名称",
|
||||||
prop: 'skuname',
|
prop: "skuname",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '实收数量',
|
label: "实收数量",
|
||||||
prop: 'receivedqty',
|
prop: "receivedqty",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB销售-库存-报错详情',
|
label: "TOB销售-库存-报错详情",
|
||||||
prop: 'newtransmitinfo',
|
prop: "newtransmitinfo",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 200
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB销售-库存-推送时间',
|
label: "TOB销售-库存-推送时间",
|
||||||
prop: 'newpushdate',
|
prop: "newpushdate",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 200
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB销售-库存-推送状态',
|
label: "TOB销售-库存-推送状态",
|
||||||
prop: 'newstate',
|
prop: "newstate",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 200
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB库存-下游单号',
|
label: "TOB库存-下游单号",
|
||||||
prop: 'newsystemnumber',
|
prop: "newsystemnumber",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 200
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB库存-下游主键',
|
label: "TOB库存-下游主键",
|
||||||
prop: 'newsystemprimary',
|
prop: "newsystemprimary",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB确认收入-报错详情',
|
label: "TOB确认收入-报错详情",
|
||||||
prop: 'newtransmitinfo2',
|
prop: "newtransmitinfo2",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB销售-确认收入-推送时间',
|
label: "TOB销售-确认收入-推送时间",
|
||||||
prop: 'newpushdate2',
|
prop: "newpushdate2",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB销售-确认收入红-推送状态',
|
label: "TOB销售-确认收入红-推送状态",
|
||||||
prop: 'newstate2',
|
prop: "newstate2",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB确认收入红-下游单号',
|
label: "TOB确认收入红-下游单号",
|
||||||
prop: 'newsystemnumber2',
|
prop: "newsystemnumber2",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'TOB确认收入红-下游主键',
|
label: "TOB确认收入红-下游主键",
|
||||||
prop: 'newsystemprimary2',
|
prop: "newsystemprimary2",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '业务类型',
|
label: "业务类型",
|
||||||
prop: 'businesstype',
|
prop: "businesstype",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '货主编码',
|
label: "货主编码",
|
||||||
prop: 'headCompanyCode',
|
prop: "headCompanyCode",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '仓库编码',
|
label: "仓库编码",
|
||||||
prop: 'headFacilityCode',
|
prop: "headFacilityCode",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '平台编码',
|
label: "平台编码",
|
||||||
prop: 'headSourcePlatformCode',
|
prop: "headSourcePlatformCode",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '店铺编码',
|
label: "店铺编码",
|
||||||
prop: 'headStoreCode',
|
prop: "headStoreCode",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '售后入库主键',
|
label: "售后入库主键",
|
||||||
prop: 'headCode',
|
prop: "headCode",
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
width: 150
|
width: 150,
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
//正常合并
|
//正常合并
|
||||||
tableDataMergeList: [],
|
tableDataMergeList: [],
|
||||||
dist_state: {
|
dist_state: {
|
||||||
Y: '成功',
|
Y: "成功",
|
||||||
N: '失败'
|
N: "失败",
|
||||||
|
},
|
||||||
}
|
};
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async downLoad() {
|
async downLoad() {
|
||||||
if (this.queryCriteria.business_date_start && this.queryCriteria.business_date_end) {
|
if (
|
||||||
let startDate = new Date(this.queryCriteria.business_date_start)
|
this.queryCriteria.business_date_start &&
|
||||||
let endDate = new Date(this.queryCriteria.business_date_end)
|
this.queryCriteria.business_date_end
|
||||||
let differenceInMillis = endDate - startDate
|
) {
|
||||||
let differenceInDays = differenceInMillis / (1000 * 60 * 60 * 24)
|
let startDate = new Date(this.queryCriteria.business_date_start);
|
||||||
|
let endDate = new Date(this.queryCriteria.business_date_end);
|
||||||
|
let differenceInMillis = endDate - startDate;
|
||||||
|
let differenceInDays = differenceInMillis / (1000 * 60 * 60 * 24);
|
||||||
// 判断差值是否在15天以内
|
// 判断差值是否在15天以内
|
||||||
if (!isNaN(differenceInDays) && differenceInDays < 31) {
|
if (!isNaN(differenceInDays) && differenceInDays < 31) {
|
||||||
} else {
|
} else {
|
||||||
this.$vmNews('开始时间和结束时间范围请选择在30天内')
|
this.$vmNews("开始时间和结束时间范围请选择在30天内");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$vmNews('请选择开始时间和结束时间')
|
this.$vmNews("请选择开始时间和结束时间");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
...this.queryCriteria,
|
...this.queryCriteria,
|
||||||
...this.pageModel,
|
...this.pageModel,
|
||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
pageNum: 1
|
pageNum: 1,
|
||||||
}
|
};
|
||||||
this.openLoading('detail')
|
this.openLoading("detail");
|
||||||
const res = await authApi('busidataTocsalesServiceImpl', 'busidataTocsalesServiceImpl', 'queryToCSalesReportExcel', '', params)
|
const res = await authApi(
|
||||||
|
"busidataTocsalesServiceImpl",
|
||||||
|
"busidataTocsalesServiceImpl",
|
||||||
|
"queryToCSalesReportExcel",
|
||||||
|
"",
|
||||||
|
params
|
||||||
|
);
|
||||||
|
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
const response = await downFilesBasedFileNameFileTypeAPI(res.attribute)
|
const response = await downFilesBasedFileNameFileTypeAPI(res.attribute);
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
const url = window.URL.createObjectURL(new Blob([response]), { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
|
const url = window.URL.createObjectURL(new Blob([response]), {
|
||||||
const link = document.createElement('a')
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
link.href = url
|
});
|
||||||
link.setAttribute('download', 'toc正向流程报表.xlsx') // 设置下载的文件名
|
const link = document.createElement("a");
|
||||||
document.body.appendChild(link)
|
link.href = url;
|
||||||
link.click()
|
link.setAttribute("download", "toc正向流程报表.xlsx"); // 设置下载的文件名
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
}
|
}
|
||||||
return
|
return;
|
||||||
|
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.pageModel.pageNum = 1
|
this.pageModel.pageNum = 1;
|
||||||
this.queryCriteria = {
|
this.queryCriteria = {
|
||||||
businessType:"TOC_RETURN",
|
businesstype: "TOC_RETURN",
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
//limit改变
|
//limit改变
|
||||||
pageSizeChange(val, obj) {
|
pageSizeChange(val, obj) {
|
||||||
obj.pageSize = val
|
obj.pageSize = val;
|
||||||
this.init()
|
this.init();
|
||||||
},
|
},
|
||||||
//页码变更
|
//页码变更
|
||||||
pageChange(val, obj) {
|
pageChange(val, obj) {
|
||||||
obj.page = val
|
obj.page = val;
|
||||||
this.init()
|
this.init();
|
||||||
},
|
},
|
||||||
//搜索联想
|
//搜索联想
|
||||||
async remoteMethod(val, row, options) {
|
async remoteMethod(val, row, options) {
|
||||||
// 客户
|
// 客户
|
||||||
if (row == 'cusCode') {
|
if (row == "cusCode") {
|
||||||
const res = await GetCustomerListAPI(val)
|
const res = await GetCustomerListAPI(val);
|
||||||
this[options] = []
|
this[options] = [];
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
res.data[1].forEach((item) => {
|
res.data[1].forEach((item) => {
|
||||||
this[options].push({ label: item.cCusName, value: item.cCusCode })
|
this[options].push({ label: item.cCusName, value: item.cCusCode });
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else if (row === 'workBenchID') {
|
} else if (row === "workBenchID") {
|
||||||
//这个不需要动态搜索
|
//这个不需要动态搜索
|
||||||
if (this[options].length) return
|
if (this[options].length) return;
|
||||||
const res = await WorkbenchGetBillListAPI({
|
const res = await WorkbenchGetBillListAPI({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 999,
|
limit: 999,
|
||||||
Sequence: '',
|
Sequence: "",
|
||||||
SequenceName: '',
|
SequenceName: "",
|
||||||
CodeOrName: '',
|
CodeOrName: "",
|
||||||
areaID: '',
|
areaID: "",
|
||||||
workShopID: ''
|
workShopID: "",
|
||||||
})
|
});
|
||||||
this[options] = []
|
this[options] = [];
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
res.data[1].forEach((item) => {
|
res.data[1].forEach((item) => {
|
||||||
this[options].push({
|
this[options].push({
|
||||||
label: item.workName,
|
label: item.workName,
|
||||||
value: item.workID
|
value: item.workID,
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else if (row === 'cInvCode') {
|
} else if (row === "cInvCode") {
|
||||||
const res = await U8BaseGetInvenListAPI({
|
const res = await U8BaseGetInvenListAPI({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 200,
|
limit: 200,
|
||||||
codeOrName: val
|
codeOrName: val,
|
||||||
})
|
});
|
||||||
this[options] = []
|
this[options] = [];
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
res.data[1].forEach((item) => {
|
res.data[1].forEach((item) => {
|
||||||
this[options].push({ label: item.cInvName, value: item.cInvCode })
|
this[options].push({ label: item.cInvName, value: item.cInvCode });
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else if (row === 'cInvCCode') {
|
} else if (row === "cInvCCode") {
|
||||||
const res = await U8BaseGetInvClassListAPI({
|
const res = await U8BaseGetInvClassListAPI({
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 200,
|
limit: 200,
|
||||||
codeOrName: val
|
codeOrName: val,
|
||||||
})
|
});
|
||||||
this[options] = []
|
this[options] = [];
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
res.data[1].forEach((item) => {
|
res.data[1].forEach((item) => {
|
||||||
this[options].push({
|
this[options].push({
|
||||||
label: item.cInvCName,
|
label: item.cInvCName,
|
||||||
value: item.cInvCCode
|
value: item.cInvCCode,
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 点击查询
|
// 点击查询
|
||||||
query() {
|
query() {
|
||||||
this.pageModel.pageNum = 1
|
this.pageModel.pageNum = 1;
|
||||||
// if (this.queryCriteria.business_date_start && this.queryCriteria.business_date_end) {
|
// if (this.queryCriteria.business_date_start && this.queryCriteria.business_date_end) {
|
||||||
// let startDate = new Date(this.queryCriteria.business_date_start)
|
// let startDate = new Date(this.queryCriteria.business_date_start)
|
||||||
// let endDate = new Date(this.queryCriteria.business_date_end)
|
// let endDate = new Date(this.queryCriteria.business_date_end)
|
||||||
|
@ -485,7 +526,7 @@ export default {
|
||||||
// this.$vmNews('请选择开始时间和结束时间')
|
// this.$vmNews('请选择开始时间和结束时间')
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
this.init()
|
this.init();
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* 导出、打印功能
|
* 导出、打印功能
|
||||||
|
@ -496,135 +537,142 @@ export default {
|
||||||
* tableColumn:传打印表格当前tableColumn(仅打印)
|
* tableColumn:传打印表格当前tableColumn(仅打印)
|
||||||
* */
|
* */
|
||||||
fixedClick(item, boxId, name, tableData, tableColumn) {
|
fixedClick(item, boxId, name, tableData, tableColumn) {
|
||||||
if (item.title == '导出') {
|
if (item.title == "导出") {
|
||||||
this.exportEvent(name, boxId)
|
this.exportEvent(name, boxId);
|
||||||
} else if (item.title == '打印') {
|
} else if (item.title == "打印") {
|
||||||
this.duplicate(tableData, tableColumn)
|
this.duplicate(tableData, tableColumn);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//导出功能
|
//导出功能
|
||||||
exportEvent(excelName, boxId) {
|
exportEvent(excelName, boxId) {
|
||||||
// console.log(document.querySelector(boxId), '123', boxId)
|
// console.log(document.querySelector(boxId), '123', boxId)
|
||||||
let gatherData = {
|
let gatherData = {
|
||||||
raw: true
|
raw: true,
|
||||||
}
|
};
|
||||||
let grid = XLSX.utils.table_to_book(
|
let grid = XLSX.utils.table_to_book(
|
||||||
document.querySelector(boxId),
|
document.querySelector(boxId),
|
||||||
gatherData
|
gatherData
|
||||||
)
|
);
|
||||||
let workbook = XLSX.write(grid, {
|
let workbook = XLSX.write(grid, {
|
||||||
bookType: 'xlsx',
|
bookType: "xlsx",
|
||||||
bookSST: true,
|
bookSST: true,
|
||||||
type: 'array'
|
type: "array",
|
||||||
})
|
});
|
||||||
try {
|
try {
|
||||||
FileSaver.saveAs(
|
FileSaver.saveAs(
|
||||||
new Blob([workbook], {
|
new Blob([workbook], {
|
||||||
type: 'application/octet-stream'
|
type: "application/octet-stream",
|
||||||
}),
|
}),
|
||||||
excelName + '.xlsx'
|
excelName + ".xlsx"
|
||||||
)
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, workbook)
|
if (typeof console !== "undefined") console.log(e, workbook);
|
||||||
}
|
}
|
||||||
return workbook
|
return workbook;
|
||||||
},
|
},
|
||||||
//打印
|
//打印
|
||||||
duplicate(tableData, tableColumn) {
|
duplicate(tableData, tableColumn) {
|
||||||
basePrintJS(tableData, tableColumn)
|
basePrintJS(tableData, tableColumn);
|
||||||
},
|
},
|
||||||
//初始化表单
|
//初始化表单
|
||||||
async init() {
|
async init() {
|
||||||
this.tableLoading = true
|
this.tableLoading = true;
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
this.tableLoading = false
|
this.tableLoading = false;
|
||||||
},10000)
|
}, 10000);
|
||||||
let params = {
|
let params = {
|
||||||
...this.queryCriteria,
|
...this.queryCriteria,
|
||||||
...this.pageModel
|
...this.pageModel,
|
||||||
}
|
};
|
||||||
|
delete params.pageTotal
|
||||||
//初始化表单
|
//初始化表单
|
||||||
const res = await authApi('tocofsSaleoutServiceImplReport', 'tocofsSaleoutServiceImplReport', 'queryToCReturnReport', '', params)
|
const res = await authApi(
|
||||||
this.pageModel.pageTotal = res.attribute.total
|
"tocofsSaleoutServiceImplReport",
|
||||||
res.attribute.list.forEach(item => {
|
"tocofsSaleoutServiceImplReport",
|
||||||
item.newstate = this.dist_state[item.newstate]
|
"queryToCReturnReport",
|
||||||
item.newstate2 = this.dist_state[item.newstate2]
|
"",
|
||||||
item.newstate3 = this.dist_state[item.newstate3]
|
params
|
||||||
})
|
);
|
||||||
|
this.pageModel.pageTotal = res.attribute.total;
|
||||||
|
res.attribute.list.forEach((item) => {
|
||||||
|
item.newstate = this.dist_state[item.newstate];
|
||||||
|
item.newstate2 = this.dist_state[item.newstate2];
|
||||||
|
item.newstate3 = this.dist_state[item.newstate3];
|
||||||
|
});
|
||||||
this.mainTableData = this.dataDispose(
|
this.mainTableData = this.dataDispose(
|
||||||
res.attribute.list,
|
res.attribute.list,
|
||||||
this.tableDataMergeList
|
this.tableDataMergeList
|
||||||
)
|
);
|
||||||
this.tableLoading = false
|
this.tableLoading = false;
|
||||||
},
|
},
|
||||||
//data处理
|
//data处理
|
||||||
dataDispose(data, arr) {
|
dataDispose(data, arr) {
|
||||||
if (!arr.length) return data
|
if (!arr.length) return data;
|
||||||
//分类存放分组
|
//分类存放分组
|
||||||
let tempObj = {}
|
let tempObj = {};
|
||||||
//结果
|
//结果
|
||||||
let result = []
|
let result = [];
|
||||||
//将层级转变为 [[1],[1,2],[1,2,3]]
|
//将层级转变为 [[1],[1,2],[1,2,3]]
|
||||||
const transformedArray = arr.reduce((acc, currentValue) => {
|
const transformedArray = arr.reduce((acc, currentValue) => {
|
||||||
acc.push([...(acc.length ? acc[acc.length - 1] : []), currentValue])
|
acc.push([...(acc.length ? acc[acc.length - 1] : []), currentValue]);
|
||||||
return acc
|
return acc;
|
||||||
}, [])
|
}, []);
|
||||||
//开始对表单进行排序
|
//开始对表单进行排序
|
||||||
//排序后的arr
|
//排序后的arr
|
||||||
let newArr = []
|
let newArr = [];
|
||||||
let sortObj = {}
|
let sortObj = {};
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let keyValue = ''
|
let keyValue = "";
|
||||||
arr.forEach((key2, index) => {
|
arr.forEach((key2, index) => {
|
||||||
keyValue += item[key2]
|
keyValue += item[key2];
|
||||||
})
|
});
|
||||||
if (!sortObj[keyValue]) {
|
if (!sortObj[keyValue]) {
|
||||||
sortObj[keyValue] = data.filter((item01) => {
|
sortObj[keyValue] = data.filter((item01) => {
|
||||||
return arr.every((prop) => item01[prop] === item[prop])
|
return arr.every((prop) => item01[prop] === item[prop]);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
Object.keys(sortObj)
|
Object.keys(sortObj)
|
||||||
.sort()
|
.sort()
|
||||||
.forEach((key) => {
|
.forEach((key) => {
|
||||||
newArr = [...newArr, ...sortObj[key]]
|
newArr = [...newArr, ...sortObj[key]];
|
||||||
})
|
});
|
||||||
// 开始循环
|
// 开始循环
|
||||||
newArr.forEach((item) => {
|
newArr.forEach((item) => {
|
||||||
transformedArray.forEach((key) => {
|
transformedArray.forEach((key) => {
|
||||||
//keyValue:当前key下的value加一起,用于tempObj的key
|
//keyValue:当前key下的value加一起,用于tempObj的key
|
||||||
let keyValue = ''
|
let keyValue = "";
|
||||||
key.forEach((keyItem, index) => {
|
key.forEach((keyItem, index) => {
|
||||||
keyValue += item[keyItem]
|
keyValue += item[keyItem];
|
||||||
if (index < key.length - 1) {
|
if (index < key.length - 1) {
|
||||||
keyValue += '|'
|
keyValue += "|";
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
if (!tempObj[keyValue]) {
|
if (!tempObj[keyValue]) {
|
||||||
//拿到所有当前key下相同数据
|
//拿到所有当前key下相同数据
|
||||||
tempObj[keyValue] = newArr.filter((item01) => {
|
tempObj[keyValue] = newArr.filter((item01) => {
|
||||||
return key.every((prop) => item01[prop] === item[prop])
|
return key.every((prop) => item01[prop] === item[prop]);
|
||||||
})
|
});
|
||||||
// 计算总数
|
// 计算总数
|
||||||
tempObj[keyValue][0][`${key[key.length - 1]}Length`] =
|
tempObj[keyValue][0][`${key[key.length - 1]}Length`] =
|
||||||
tempObj[keyValue].length
|
tempObj[keyValue].length;
|
||||||
|
|
||||||
if (key.length === 1) {
|
if (key.length === 1) {
|
||||||
result = [...tempObj[keyValue], ...result]
|
result = [...tempObj[keyValue], ...result];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
return result
|
return result;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
baseNewTable
|
baseNewTable,
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@ -660,7 +708,6 @@ export default {
|
||||||
width: 200px !important;
|
width: 200px !important;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> .main {
|
> .main {
|
||||||
|
|
Loading…
Reference in New Issue