Commit acb9ebdb authored by lanbaoming's avatar lanbaoming

Merge branch 'dev'

parents 7e29b5c2 d3eb5c5f
......@@ -19,3 +19,12 @@ export function exportExcel(data) {
responseType: 'blob'
})
}
export function exportExcel2(data) {
return request({
url: '/Report/CustomerAnalysis/exportExcel2',
method: 'get',
params: data,
responseType: 'blob'
})
}
......@@ -18,3 +18,13 @@ export function exportExcel(query) {
responseType: 'blob'
})
}
//获取统计汇总数据 lanbm 2024-05-04 add
export function getStatisticalSummary(query) {
return request({
url: '/Report/SalesAnalysis/getStatisticalSummary',
method: 'get',
params: query
})
}
......@@ -49,3 +49,12 @@ export function exportExcel(query) {
responseType: 'blob'
})
}
//测试功能
export function test(query) {
return request({
url: '/ecwVz/vz/Test',
method: 'get',
params: query
})
}
......@@ -133,7 +133,8 @@
</el-table-column>
<el-table-column prop="price" :label="$t('金额')" align="center"></el-table-column>
<el-table-column prop="payPrice" :label="$t('实付金额')" align="center"></el-table-column>
<el-table-column prop="payTime" :label="$t('实付日期')" align="center">
<el-table-column prop="payTime" :label="$t('创建日期')" align="center">
<!--实付日期 改为 创建日期 lanbm 2024-05-06 add-->
<template slot-scope="scope">
<span v-if="scope.row.payTime">{{formatDate(scope.row.payTime)}}</span>
</template>
......
......@@ -376,7 +376,8 @@
</template>
</el-table-column>
<el-table-column :label="$t('期望收款汇率')" align="center">
<template slot-scope="scope">
<!--lanbm 2024-05-06 汇率保留小数增加到6位,为了方便显示,加宽此列的显示-->
<template slot-scope="scope" style="width: 200px;">
<el-form-item
v-if="scope.row.type !== 'total'"
label=""
......
<template>
<div class="app-container">
<div slot="header" class="card-title">{{ $t('付款单') }}</div>
<div slot="header" class="card-title">{{ $t("付款单") }}</div>
<!-- 搜索工作栏 -->
<el-card v-show="showSearch" class="card">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
label-width="100px"
label-width="150px"
class="card"
>
<el-row :gutter="10">
<el-col :span="4"> <el-form-item :label="$t('付款单号')">
<el-input
clearable
style="max-width: 188px"
v-model="queryParams.paymentNo"
:placeholder="$t('请输入付款单号')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item></el-col>
<el-col :span="4"><el-form-item :label="$t('供应商')">
<el-select
clearable
v-model="queryParams.supplierId"
:placeholder="$t('请选择供应商')"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
</el-select>
</el-form-item></el-col>
<el-col :span="4"><el-form-item :label="$t('业务员')">
<!-- <el-select v-model="form.salesmanId" :placeholder="$t('请选择业务员')">
<el-col :span="4">
<el-form-item :label="$t('付款单号')">
<el-input
clearable
style="max-width: 188px;"
v-model="queryParams.paymentNo"
:placeholder="$t('请输入付款单号')"
clearable
@keyup.enter.native="handleQuery"
/> </el-form-item
></el-col>
<el-col :span="4"
><el-form-item :label="$t('供应商')">
<el-select
clearable
v-model="queryParams.supplierId"
:placeholder="$t('请选择供应商')"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
</el-select> </el-form-item
></el-col>
<el-col :span="4"
><el-form-item :label="$t('业务员')">
<!-- <el-select v-model="form.salesmanId" :placeholder="$t('请选择业务员')">
<el-option
v-for="item in creatorData"
:key="item.id"
......@@ -44,82 +47,116 @@
:value="item.id"
/>
</el-select> -->
<el-select v-model="queryParams.salesmanName" filterable :placeholder="$t('请选择业务员')"
clearable
>
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
</el-select>
</el-form-item> </el-col>
<el-col :span="6"><el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="queryParams.beginCreateTime"
type="datetimerange"
value-format="yyyy-MM-dd"
range-separator="到"
:start-placeholder="$t('请选择日期')"
:end-placeholder="$t('请选择日期')">
</el-date-picker>
</el-form-item></el-col>
<el-select
v-model="queryParams.salesmanName"
filterable
:placeholder="$t('请选择业务员')"
clearable
>
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6"
><el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="queryParams.beginCreateTime"
type="datetimerange"
value-format="yyyy-MM-dd"
range-separator="到"
:start-placeholder="$t('请选择日期')"
:end-placeholder="$t('请选择日期')"
>
</el-date-picker> </el-form-item
></el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('状态')">
<dict-selector clearable :type="DICT_TYPE.ECW_PAYMENT_STATE" v-model="queryParams.state"/>
<dict-selector
clearable
:type="DICT_TYPE.ECW_PAYMENT_STATE"
v-model="queryParams.state"
/>
</el-form-item>
</el-col>
<el-col :span="4"><el-form-item :label="$t('发票状态')">
<el-select
clearable
v-model="queryParams.invoiceStatus"
:placeholder="$t('请选择是否开票')"
>
<el-option :label="$t('未开票')" value="0"/>
<el-option :label="$t('已开票')" value="1"/>
</el-select>
</el-form-item></el-col>
<el-col :span="6"><el-form-item>
<el-button type="primary" @click="handleQuery">{{ $t('查找') }}</el-button>
<el-button
style="margin-left: 10px"
type="success"
v-hasPermi="['ecw:paymentVoucher:create']"
@click="handleAdd(0)"
>{{ $t('新增请款单') }}</el-button
>
</el-form-item></el-col>
<el-col :span="4"
><el-form-item :label="$t('发票状态')">
<el-select
clearable
v-model="queryParams.invoiceStatus"
:placeholder="$t('请选择是否开票')"
>
<el-option :label="$t('未开票')" value="0" />
<el-option :label="$t('已开票')" value="1" />
</el-select> </el-form-item
></el-col>
<el-col :span="6"
><el-form-item>
<el-button type="primary" @click="handleQuery">{{
$t("查找")
}}</el-button>
<!--lanbm 2024-05-06 改 “新增请款单” 为 “新增付款单” -->
<el-button
style="margin-left: 10px"
type="success"
v-hasPermi="['ecw:paymentVoucher:create']"
@click="handleAdd(0)"
>{{ $t("新增付款单") }}</el-button
>
</el-form-item></el-col
>
</el-row>
</el-form>
</el-card>
<el-table v-loading="loadings" :data="list" border class="card">
<el-table-column :label="$t('序号')" align="center" prop="id" type="index">
<el-table-column
:label="$t('序号')"
align="center"
prop="id"
type="index"
>
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('付款单号')" align="center" prop="paymentNo">
<template slot-scope="scope">
<span style="color: #1890ff;" @click="paymentDetail(scope.row)">{{ scope.row.paymentNo }}</span>
<span style="color: #1890ff" @click="paymentDetail(scope.row)">{{
scope.row.paymentNo
}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('供应商')" align="center" prop="supplierName"/>
<el-table-column
:label="$t('供应商')"
align="center"
prop="supplierName"
/>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('最后付款时间')" align="center" prop="latestPayAt">
<el-table-column
:label="$t('最后付款时间')"
align="center"
prop="latestPayAt"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.latestPayAt, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.latestPayAt, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('发票')" align="center" prop="invoiceStatus">
<template slot-scope="scope">
<span>{{ scope.row.invoiceStatus === 0 ? $t('未开票') : $t('已开票') }}</span>
<span>{{
scope.row.invoiceStatus === 0 ? $t("未开票") : $t("已开票")
}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('状态')" align="center">
......@@ -128,7 +165,11 @@
:type="DICT_TYPE.ECW_PAYMENT_STATE"
:value="scope.row.state"
/>
<span v-if="[2,4,6].includes(scope.row.state) && scope.row.comment" :title="scope.row.comment"><i class="el-icon-question"></i></span>
<span
v-if="[2, 4, 6].includes(scope.row.state) && scope.row.comment"
:title="scope.row.comment"
><i class="el-icon-question"></i
></span>
</template>
</el-table-column>
<el-table-column
......@@ -136,37 +177,107 @@
align="center"
class-name="small-padding fixed-width"
>
<template v-slot="{row}">
<el-button v-if="[0,2].includes(row.state)" size="mini" @click="handleAdd(row.id)"
v-hasPermi="['ecw:paymentVoucher:edit']" type="text">{{ $t('编辑') }}
<template v-slot="{ row }">
<el-button
v-if="[0, 2].includes(row.state)"
size="mini"
@click="handleAdd(row.id)"
v-hasPermi="['ecw:paymentVoucher:edit']"
type="text"
>{{ $t("编辑") }}
</el-button>
<!-- <el-button v-if="[1,3].includes(row.state)" size="mini" v-hasPermi="['ecw:paymentVoucher:process']" type="text" @click="examineClick(scope.row.id)">{{ $t('审核') }}</el-button>-->
<el-button size="mini" type="text" v-show="[1].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:Unapprove']" @click="bridgeFn(1, $t('取消审核'),row)">
{{ $t('取消审核') }}
<el-button
size="mini"
type="text"
v-show="[1].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:Unapprove']"
@click="bridgeFn(1, $t('取消审核'), row)"
>
{{ $t("取消审核") }}
</el-button>
<el-button size="mini" type="text" v-show="[7,3,1,5].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:details']" @click="$router.push({path:'/bpm/process-instance/detail',query:{id:row.bmpId}})" >{{ $t('审核详情') }}</el-button>
<el-button size="mini" type="text" v-if="[3].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:Cancel-De-approval']" @click="bridgeFn(2, $t('取消付款单反审核'),row)" >{{ $t('取消反审核') }}</el-button>
<el-button size="mini" type="text" v-if="[5].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:Cancel-Write-off']" @click="bridgeFn(3, $t('取消付款单核销'),row)" >{{ $t('取消核销') }}</el-button>
<el-button
size="mini"
type="text"
v-show="[7, 3, 1, 5].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:details']"
@click="
$router.push({
path: '/bpm/process-instance/detail',
query: { id: row.bmpId },
})
"
>{{ $t("审核详情") }}</el-button
>
<el-button
size="mini"
type="text"
v-if="[3].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:Cancel-De-approval']"
@click="bridgeFn(2, $t('取消付款单反审核'), row)"
>{{ $t("取消反审核") }}</el-button
>
<el-button
size="mini"
type="text"
v-if="[5].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:Cancel-Write-off']"
@click="bridgeFn(3, $t('取消付款单核销'), row)"
>{{ $t("取消核销") }}</el-button
>
<el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:De-approval']"
@click="bridgeFn(4, $t('反审核'),row)">{{ $t('反审核') }}
<el-button
v-if="[4].includes(row.state)"
size="mini"
type="text"
v-hasPermi="['ecw:paymentVoucher:De-approval']"
@click="bridgeFn(4, $t('反审核'), row)"
>{{ $t("反审核") }}
</el-button>
<el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:writeOff']"
@click="bridgeFn(5, $t('核销'),row)">{{ $t('核销') }}
<el-button
v-if="[4].includes(row.state)"
size="mini"
type="text"
v-hasPermi="['ecw:paymentVoucher:writeOff']"
@click="bridgeFn(5, $t('核销'), row)"
>{{ $t("核销") }}
</el-button>
<el-button v-if="[6].includes(row.state)" size="mini" type="text"
v-hasPermi="['ecw:paymentVoucher:cancelWriteOff']" @click="bridgeFn(6, $t('反核销'),row)">
{{ $t('反核销') }}
<el-button
v-if="[6].includes(row.state)"
size="mini"
type="text"
v-hasPermi="['ecw:paymentVoucher:cancelWriteOff']"
@click="bridgeFn(6, $t('反核销'), row)"
>
{{ $t("反核销") }}
</el-button>
<el-button v-if="[7].includes(row.state)" v-hasPermi="['ecw:paymentVoucher:Cancel-Cancelling-Write-off']" size="mini" type="text" @click="bridgeFn(7, $t('取消付款单反核销'),row)" > {{ $t('取消反核销') }}</el-button>
<el-button
v-if="[7].includes(row.state)"
v-hasPermi="['ecw:paymentVoucher:Cancel-Cancelling-Write-off']"
size="mini"
type="text"
@click="bridgeFn(7, $t('取消付款单反核销'), row)"
>
{{ $t("取消反核销") }}</el-button
>
<!-- <el-button v-if="scope.row.state == 3" size="mini" type="text">{{ $t('开票') }}</el-button> -->
<el-button v-if="[6,4].includes(row.state)" size="mini" type="text" @click="toprint(row.id)"
v-hasPermi="['ecw:paymentVoucher:print']">{{ $t('打印') }}
<el-button
v-if="[6, 4].includes(row.state)"
size="mini"
type="text"
@click="toprint(row.id)"
v-hasPermi="['ecw:paymentVoucher:print']"
>{{ $t("打印") }}
</el-button>
<el-button v-if="[0,2].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:delete']"
@click="deleteClick(row)">{{ $t('删除') }}
<el-button
v-if="[0, 2].includes(row.state)"
size="mini"
type="text"
v-hasPermi="['ecw:paymentVoucher:delete']"
@click="deleteClick(row)"
>{{ $t("删除") }}
</el-button>
<!-- <el-button size="mini" type="text" @click="open = true">{{ $t('导出订单') }}</el-button> -->
</template>
......@@ -193,44 +304,53 @@
class="card-title"
style="border-bottom: 2px solid #f8f8f8"
>
<span>{{ $t('导出账单') }}</span>
<span>{{ $t("导出账单") }}</span>
<i class="el-icon-close" @click="cancel"></i>
</div>
<div class="dialog-footer">
<el-button type="primary" style="width: 130px" @click="submitForm"
>{{ $t('国内账单') }}
</el-button
>
>{{ $t("国内账单") }}
</el-button>
<el-button
plain
type="primary"
style="width: 130px; margin: 0"
@click="submitForm"
>Debite note
</el-button
>
>Debite note
</el-button>
</div>
</el-dialog>
<!--对话框 审核 -->
<el-dialog width="30%" @close="cancelReason = ''" :title="examineTitle" :visible.sync="examineShow">
<el-dialog
width="30%"
@close="cancelReason = ''"
:title="examineTitle"
:visible.sync="examineShow"
>
<div class="cancel_content">
<span>{{ $t('申请理由') }}</span>
<el-input type="textarea" :rows="6" v-model="cancelReason" :placeholder="$t('请输入取消理由')"></el-input>
<span>{{ $t("申请理由") }}</span>
<el-input
type="textarea"
:rows="6"
v-model="cancelReason"
:placeholder="$t('请输入取消理由')"
></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick()">{{ $t('提交') }}</el-button>
<el-button @click="examineShow = false;">{{ $t('取消') }}</el-button>
<el-button type="primary" @click="cancelWriteOffClick()">{{
$t("提交")
}}</el-button>
<el-button @click="examineShow = false">{{ $t("取消") }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {userList, listSimpleUsers} from "@/api/system/user";
import {DICT_TYPE} from "@/utils/dict";
import { userList, listSimpleUsers } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import CustomerSelector from "@/components/CustomerSelector";
import {getSupplierPage} from "@/api/ecw/supplier";
import { getSupplierPage } from "@/api/ecw/supplier";
import {
getPaymentList,
deletePayment,
......@@ -240,8 +360,9 @@ import {
cancelFinancePaymentApproval,
cancelFinancePaymentApprovalNo,
cancelFinancePaymentWriteOff,
cancelFinancePaymentWriteOffNo, paymentCancelFinancePaymentWriteOffNo
} from "@/api/ecw/financial"
cancelFinancePaymentWriteOffNo,
paymentCancelFinancePaymentWriteOffNo,
} from "@/api/ecw/financial";
export default {
name: "EcwFinancialPaymentvoucher",
......@@ -251,10 +372,10 @@ export default {
data() {
return {
examineShow: false,
examineTitle: '',
examineTitle: "",
examineIndex: 0,
examineData: {},
cancelReason: '',
cancelReason: "",
open: false,
showSearch: true,
loadings: false,
......@@ -291,25 +412,29 @@ export default {
};
},
activated() {
this.handleQuery()
this.handleQuery();
},
created() {
let that = this;
listSimpleUsers().then((res) => (that.creatorData = res.data));
// userList("salesman").then((res) => (that.creatorData = res.data));
getSupplierPage({pageNo: "1", pageSize: "10000"}).then((res) => {
const {data} = res;
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});
this.getList()
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.queryParams.beginCreateTime, "createTime");
let params = { ...this.queryParams };
this.addBeginAndEndTime(
params,
this.queryParams.beginCreateTime,
"createTime"
);
// 执行查询
getPaymentList(params).then((response) => {
this.list = response.data.list;
......@@ -329,13 +454,13 @@ export default {
stateMap(state) {
switch (state) {
case 1:
return this.$t('待审核')
return this.$t("待审核");
case 2:
return this.$t('已审核待核销')
return this.$t("已审核待核销");
case 3:
return this.$t('审批驳回')
return this.$t("审批驳回");
case 4:
return this.$t('已核销')
return this.$t("已核销");
}
},
/** 新增按钮操作 */
......@@ -347,43 +472,55 @@ export default {
},
deleteClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('是否确认删除该付款单') + '?').then(function () {
return deletePayment(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('删除成功'));
}).catch(() => {
});
this.$modal
.confirm(this.$t("是否确认删除该付款单") + "?")
.then(function () {
return deletePayment(id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("删除成功"));
})
.catch(() => {});
},
verificationClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('您确认要核销吗') + '?').then(function () {
return paymentVerification(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('核销成功'));
}).catch(() => {
});
this.$modal
.confirm(this.$t("您确认要核销吗") + "?")
.then(function () {
return paymentVerification(id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("核销成功"));
})
.catch(() => {});
},
verificationCancelClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('您确认要反核销吗') + '?').then(function () {
return paymentVerificationCancel(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('反核销成功'));
}).catch(() => {
});
this.$modal
.confirm(this.$t("您确认要反核销吗") + "?")
.then(function () {
return paymentVerificationCancel(id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("反核销成功"));
})
.catch(() => {});
},
verifyCancelClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('您确认要反审核吗') + '?').then(function () {
return paymentVerifyCancel(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('反审核成功'));
}).catch(() => {
});
this.$modal
.confirm(this.$t("您确认要反审核吗") + "?")
.then(function () {
return paymentVerifyCancel(id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("反审核成功"));
})
.catch(() => {});
},
toprint(id) {
return this.$router.push("printPaymentVoucher?id=" + id);
......@@ -402,52 +539,76 @@ export default {
this.examineShow = true;
},
cancelWriteOffClick() {
if(!this.cancelReason){
return this.$message.warning(this.$t('请输入申请理由!'))
if (!this.cancelReason) {
return this.$message.warning(this.$t("请输入申请理由!"));
}
let resolve = (val = this.$t('操作成功吗!')) => {
let resolve = (val = this.$t("操作成功吗!")) => {
this.getList();
this.$message.success(val);
this.examineShow = false;
}
};
let reject = () => {
this.examineShow = false;
}
let {id: paymentId,paymentNo} = this.examineData
let p = {paymentId, remark: this.cancelReason, paymentNo, reason:this.cancelReason }
};
let { id: paymentId, paymentNo } = this.examineData;
let p = {
paymentId,
remark: this.cancelReason,
paymentNo,
reason: this.cancelReason,
};
switch (this.examineIndex) {
case 1:
// 取消审核
cancelFinancePaymentApproval(p).then(()=>resolve(this.$t('取消付款单审核成功!')),reject)
break
cancelFinancePaymentApproval(p).then(
() => resolve(this.$t("取消付款单审核成功!")),
reject
);
break;
// 取消付款单反审核
case 2:
cancelFinancePaymentApprovalNo(p).then(()=>resolve(this.$t('取消付款单反审核成功!')),reject)
cancelFinancePaymentApprovalNo(p).then(
() => resolve(this.$t("取消付款单反审核成功!")),
reject
);
break;
case 3:
//取消付款单核销
cancelFinancePaymentWriteOffNo(p).then(()=>resolve(this.$t('取消付款单核销成功!')),reject)
break
cancelFinancePaymentWriteOffNo(p).then(
() => resolve(this.$t("取消付款单核销成功!")),
reject
);
break;
case 4:
// 反审核
paymentVerifyCancel(p).then(()=>resolve(this.$t('提交付款单反审核成功,请耐心等待审核结果!')),reject)
// 反审核
paymentVerifyCancel(p).then(
() => resolve(this.$t("提交付款单反审核成功,请耐心等待审核结果!")),
reject
);
break;
case 5:
// 核销
paymentVerification(p).then(()=>resolve(this.$t('提交付款单核销成功,请耐心等待审核结果!')),reject);
// 核销
paymentVerification(p).then(
() => resolve(this.$t("提交付款单核销成功,请耐心等待审核结果!")),
reject
);
break;
case 6:
// 反核销
paymentVerificationCancel(p).then(()=>resolve(this.$t('提交付款单反核销成功,请耐心等待审核结果!')),reject)
// 反核销
paymentVerificationCancel(p).then(
() => resolve(this.$t("提交付款单反核销成功,请耐心等待审核结果!")),
reject
);
break;
case 7:
// 取消反核销
paymentCancelFinancePaymentWriteOffNo(p).then(()=>resolve(this.$t('取消付款单反核销成功!')),reject)
paymentCancelFinancePaymentWriteOffNo(p).then(
() => resolve(this.$t("取消付款单反核销成功!")),
reject
);
break;
}
}
},
},
};
</script>
......
......@@ -88,7 +88,7 @@ export default {
},
computed:{
orderInfoForCopy(){
return `订单号:${this.order.orderNo}\n唛头:${this.order.marks}\n提货点:${this.order.logisticsInfoDto?.destTitleZh}\n送货地址:${this.order.logisticsInfoDto?.startAddressZh}`
return `订单号:${this.order.orderNo}\n唛头:${this.order.marks}\n提货点:${this.order.logisticsInfoDto?.destTitleZh}\n送货地址:${this.order.logisticsInfoDto?.startAddressZh}\n仓库电话: ${this.order.logisticsInfoDto?.startTell}`
}
},
async created(){
......
......@@ -249,7 +249,7 @@
size="mini"
@click="handleExport"
:loading="exportLoading"
v-show="objEcwReportPermission.exportdataq == 1"
v-show="false"
>
{{ $t("导出") }}</el-button
>
......@@ -264,9 +264,9 @@
size="mini"
@click="handleExport2"
:loading="exportLoading"
v-show="false"
v-show="objEcwReportPermission.exportdataq == 1"
>
{{ $t("导出测试") }}</el-button
{{ $t("导出") }}</el-button
>
</el-form-item>
</el-form>
......@@ -327,12 +327,24 @@
<el-table-column label="泡货占比" align="center" prop="phSumZb" />
<el-table-column label="控货总V值" align="center" prop="khSumV" />
<el-table-column label="控货占比" align="center" prop="khSumZb" />
<el-table-column label="是否首次成交" align="center" prop="isFirst" />
<el-table-column label="首次成交时间" align="center" prop="firstDate">
<!--2024-05-06和张工确认这几个参数无取数逻辑,暂时隐藏-->
<el-table-column
label="是否首次成交"
v-show="false"
align="center"
prop="isFirst"
/>
<el-table-column
label="首次成交时间"
v-show="false"
align="center"
prop="firstDate"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.firstDate) }}</span>
</template>
</el-table-column>
<!--2024-05-06和张工确认这几个参数无取数逻辑,暂时隐藏-->
<el-table-column label="提货率" align="center" prop="thL" />
<el-table-column label="客户业绩类型" align="center" prop="cusYjType" />
<el-table-column label="客户来源" align="center" prop="sourcename" />
......@@ -367,7 +379,11 @@ import Treeselect from "@riophae/vue-treeselect";
//自定义目录数样式
import "@/assets/styles/vue-treeselect.css";
import { listSimpleDepts } from "@/api/system/dept";
import { getListPage, exportExcel } from "@/api/report/customeranalysis";
import {
getListPage,
exportExcel,
exportExcel2,
} from "@/api/report/customeranalysis";
import {
getCurUserPermission,
getDeptChild,
......@@ -517,50 +533,20 @@ export default {
getCountryListAll().then((r) => {
this.countryList = r.data;
});
//获取当前用户报表权限
getCurUserPermission().then((response) => {
//复制对象
Object.assign(this.objEcwReportPermission, response.data);
//this.objEcwReportPermission = response.data;
if (this.objEcwReportPermission.permissionFw == 1) {
//只能看自己的,不能选择部门和客户经理
this.showCustomsManage = false;
this.showDept = false;
}
//获取页面传参
let sSalesmanid = this.$route.query.salesmanid;
let sDeptid = this.$route.query.deptid;
let s = this.$route.query.sDate;
let e = this.$route.query.eDate;
let bd = this.$route.query.duibiYear;
//客户编号
let number = this.$route.query.number;
if (sSalesmanid != undefined && sSalesmanid != null) {
this.queryParams.salesmanid = parseInt(sSalesmanid);
}
if (sDeptid != undefined && sDeptid != null) {
this.queryParams.deptid = parseInt(sDeptid);
}
if (s != undefined && s != null) {
this.queryParams.sdate = s + "-01";
}
if (e != undefined && s != null) {
let lastDay = getLastDay(e + "-01");
this.queryParams.edate = e + "-" + lastDay;
}
if (bd != undefined && bd != null) {
this.queryParams.duibiYear = bd;
}
if (number != undefined && number != null) {
this.queryParams.searchtype = "eq";
this.queryParams.name = number;
this.doLoadData();
},
watch: {
$route(to) {
//lanbm 2024-05-06 解决重新进入参数不刷新的问题
if (this.$route.name == "客户分析") {
this.doLoadData();
}
this.getTreeselect();
this.getList();
});
},
},
computed: {
//这几个函数的执行顺序
//created ------> computed ------> mounted ------> watch
},
computed: {},
methods: {
/** 查询列表 */
getList() {
......@@ -582,6 +568,49 @@ export default {
this.loading = false;
});
},
doLoadData() {
//获取当前用户报表权限
getCurUserPermission().then((response) => {
//复制对象
Object.assign(this.objEcwReportPermission, response.data);
//this.objEcwReportPermission = response.data;
if (this.objEcwReportPermission.permissionFw == 1) {
//只能看自己的,不能选择部门和客户经理
this.showCustomsManage = false;
this.showDept = false;
}
//获取页面传参
let sSalesmanid = this.$route.query.salesmanid;
let sDeptid = this.$route.query.deptid;
let s = this.$route.query.sDate;
let e = this.$route.query.eDate;
let bd = this.$route.query.duibiYear;
//客户编号
let number = this.$route.query.number;
if (sSalesmanid != undefined && sSalesmanid != null) {
this.queryParams.salesmanid = parseInt(sSalesmanid);
}
if (sDeptid != undefined && sDeptid != null) {
this.queryParams.deptid = parseInt(sDeptid);
}
if (s != undefined && s != null) {
this.queryParams.sdate = s + "-01";
}
if (e != undefined && s != null) {
let lastDay = getLastDay(e + "-01");
this.queryParams.edate = e + "-" + lastDay;
}
if (bd != undefined && bd != null) {
this.queryParams.duibiYear = bd;
}
if (number != undefined && number != null) {
this.queryParams.searchtype = "eq";
this.queryParams.name = number;
}
this.getTreeselect();
this.getList();
});
},
isChinese() {
//基础函数,判断系统显示语言是中文还是英文
return this.$i18n.locale === "zh_CN";
......@@ -688,7 +717,7 @@ export default {
.confirm("是否确认导出所有数据项?")
.then(() => {
this.exportLoading = true;
return exportExcel(this.queryParams);
return exportExcel2(this.queryParams);
})
.then((response) => {
//放入后台队列需要注释此行代码
......
......@@ -68,10 +68,9 @@
v-model="queryParams.fhNumber"
placeholder="请输入发货人编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="收货人编号" prop="delFlag">
<el-form-item label="收货人编号" prop="shNumber">
<el-select
v-model="queryParams.SearchType4"
clearable
......@@ -86,18 +85,29 @@
</el-select>
<el-input
style="width: 200px"
v-model="queryParams.fhNumber"
v-model="queryParams.shNumber"
placeholder="请输入收货人编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="唛头" prop="remark">
<el-select
v-model="queryParams.SearchType5"
clearable
style="width: 100px"
>
<el-option
v-for="dict in SearchType"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<el-input
v-model="queryParams.remark"
v-model="queryParams.marks"
placeholder="请输入唛头"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户经理" prop="salesmanId">
......@@ -190,13 +200,11 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('控货')" prop="isCargoControl">
<dict-selector
v-model="queryParams.isCargoControl"
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter="bool"
clearable
/>
<el-form-item :label="$t('是否控货')" prop="isCargoControl">
<el-select v-model="queryParams.isCargoControl" clearable>
<el-option label="是" value="1"></el-option>
<el-option label="否" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="重泡类型" prop="remark">
<el-select v-model="queryParams.zpType" clearable>
......@@ -235,21 +243,30 @@
</el-select>
</el-form-item>
<el-form-item label="数据筛选" prop="remark">
<el-select v-model="queryParams.dataSearch1" clearable style="width: 150px">
<el-select
v-model="queryParams.dataSearch1"
clearable
style="width: 150px"
>
<el-option label="入仓箱数" value="1"></el-option>
<el-option label="入仓体积" value="2"></el-option>
<el-option label="入仓重量" value="3"></el-option>
<el-option label="重/泡标准" value="3"></el-option>
<el-option label="提货率" value="4"></el-option>
</el-select>
<el-select v-model="queryParams.dataSearch2" clearable style="width: 150px">
<el-select
v-model="queryParams.dataSearch2"
clearable
style="width: 150px"
>
<el-option label="大于等于" value="1"></el-option>
<el-option label="等于" value="2"></el-option>
<el-option label="小于等于" value="3"></el-option>
</el-select>
<el-input style="width: 100px"
<el-input
style="width: 100px"
v-model="queryParams.dataSearch3"
placeholder="请输入数值"
placeholder="请输入数值"
clearable
@keyup.enter.native="handleQuery"
/>
......@@ -292,21 +309,64 @@
>
</el-form-item>
</el-form>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">总箱数 总方数 总重量 总V值</div>
</el-col>
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">新客户 总箱数 总方数 总重量 总V值</div>
</el-col>
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">旧客户 总箱数 总方数 总重量 总V值</div>
<el-row>
<el-col :span="24" class="card-box">
<el-card>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%">
<tbody>
<tr>
<td><div class="cell"></div></td>
<td>
<div class="cell">总箱数:{{ StatisticalSummary.sumBox }}</div>
</td>
<td>
<div class="cell">总方数:{{ StatisticalSummary.sumM3 }}</div>
</td>
<td>
<div class="cell">总重量:{{ StatisticalSummary.sumKG }}</div>
</td>
<td>
<div class="cell">总V值:{{ StatisticalSummary.sumV }}</div>
</td>
</tr>
<tr>
<td><div class="cell">新客户</div></td>
<td>
<div class="cell">总箱数:{{ StatisticalSummary.sumBoxNew }}</div>
</td>
<td>
<div class="cell">总方数:{{ StatisticalSummary.sumM3New }}</div>
</td>
<td>
<div class="cell">总重量:{{ StatisticalSummary.sumKGNew }}</div>
</td>
<td>
<div class="cell">总V值:{{ StatisticalSummary.sumVNew }}</div>
</td>
</tr>
<tr>
<td><div class="cell">旧客户</div></td>
<td>
<div class="cell">总箱数:{{ StatisticalSummary.sumBoxOld }}</div>
</td>
<td>
<div class="cell">总方数:{{ StatisticalSummary.sumM3Old }}</div>
</td>
<td>
<div class="cell">总重量:{{ StatisticalSummary.sumKGOld }}</div>
</td>
<td>
<div class="cell">总V值:{{ StatisticalSummary.sumVOld }}</div>
</td>
</tr>
</tbody>
</table>
</div>
</el-card>
</el-col>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="排名" align="center" prop="px" />
......@@ -383,7 +443,7 @@
<el-table-column label="入仓箱数" align="center" prop="sumquantity" />
<el-table-column label="体积" align="center" prop="sumvolume" />
<el-table-column label="重量" align="center" prop="sumweight" />
<el-table-column label="控货" align="center" prop="iscargocontrol" />
<el-table-column label="是否控货" align="center" prop="iscargocontrol" />
<el-table-column label="重货/泡货" align="center" prop="ordertypeShow" />
<el-table-column label="重货/泡货标准" align="center" prop="zpUnitShow" />
<el-table-column label="付款方" align="center" prop="draweeName" />
......@@ -421,7 +481,7 @@ import { getCountryListAll } from "@/api/ecw/country";
import Treeselect from "@riophae/vue-treeselect";
import "@/assets/styles/vue-treeselect.css";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListPage, exportExcel } from "@/api/report/salesanalysis";
import { getListPage, exportExcel,getStatisticalSummary } from "@/api/report/salesanalysis";
import { getCurUserPermission } from "@/api/report/EcwReportPermission";
import { getAllChannelList, getChannelList } from "@/api/ecw/channel";
import { listSimpleDepts } from "@/api/system/dept";
......@@ -464,19 +524,20 @@ export default {
queryParams: {
pageNo: 1,
pageSize: 10,
SearchType3: undefined,
SearchType3: "eq",
fhNumber: undefined, //发货客户编号
SearchType3: undefined,
SearchType4: "eq",
shNumber: undefined, //收货客户编号
startWarehouseId: undefined, //始发仓
muDiGuo: undefined, //目的国
muDiShi: undefined, //目的城市
dstwarehousename: undefined, //目的仓
transportId: undefined, //运输方式
SearchType1: undefined, //订单编号查询类型
SearchType1: "eq", //订单编号查询类型
orderNo: undefined, //订单编号
SearchType2: undefined, //提单号的查询类别
SearchType2: "eq", //提单号的查询类别
tidanNo: undefined, //提单号
SearchType5: "in",
marks: undefined, //唛头
status: undefined, //订单状态
salesmanId: undefined, //客户经理
......@@ -488,9 +549,9 @@ export default {
dateSearch1: undefined, //时间筛选类型
sdate1: undefined, //开始时间
edate2: undefined, //结束时间
dataSearch1:undefined,//数据类型筛选
dataSearch2:undefined,//比较符号设置
dataSearch3:undefined,//数据值
dataSearch1: undefined, //数据类型筛选
dataSearch2: undefined, //比较符号设置
dataSearch3: undefined, //数据值
},
channelList: [],
countryList: [],
......@@ -504,6 +565,20 @@ export default {
DeptEx: { id: undefined, name: undefined, parentId: undefined },
showWarehouseInItemId: undefined,
type: 1,
StatisticalSummary:{
sumBox:0,
sumM3:0,
sumKG:0,
sumV:0,
sumBoxNew:0,
sumM3New:0,
sumKGNew:0,
sumVNew:0,
sumBoxOld:0,
sumM3Old:0,
sumKGOld:0,
sumVOld:0,
}
};
},
created() {
......@@ -511,9 +586,7 @@ export default {
getCountryListAll().then((r) => {
this.countryList = r.data;
});
getAllChannelList().then((res) => (this.channelList = res.data));
getWarehouseList().then((res) => (this.warehouseList = res.data));
this.loading = false;
//获取当前用户报表权限
......@@ -555,6 +628,12 @@ export default {
this.total = response.data.total;
this.loading = false;
});
//获取统计数据
getStatisticalSummary(params).then((response) => {
this.StatisticalSummary = response.data;
});
},
/** 表单重置 */
......@@ -591,14 +670,17 @@ export default {
params.pageSize = undefined;
// 执行导出
this.$modal
.confirm("是否确认导出所数据?")
.confirm("是否确认导出所数据?")
.then(() => {
this.exportLoading = true;
return exportExcel(params);
})
.then((response) => {
this.$download.excel(response, "销售分析数据报表.xls");
//this.$download.excel(response, "销售分析数据报表.xls");
this.exportLoading = false;
this.$message.success(
this.$t("已加入导出队列,请稍后在下载日志中下载")
);
})
.catch(() => {});
},
......
......@@ -59,6 +59,17 @@
{{ $t("导出") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus" v-show="false"
size="mini"
@click="TestFun"
>
{{ $t("测试功能") }}</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
......@@ -149,6 +160,7 @@ import {
getModel,
getPageList,
exportExcel,
test,
} from "@/api/report/vz";
import Treeselect from "@riophae/vue-treeselect";
import "@/assets/styles/vue-treeselect.css";
......@@ -305,7 +317,7 @@ export default {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
update(this.form).then((response) => {
......@@ -337,6 +349,11 @@ export default {
})
.catch(() => {});
},
TestFun() {
test().then((response) => {
this.$modal.msgSuccess("测试发送");
});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment