|
@@ -14,37 +14,65 @@
|
|
|
}
|
|
|
"
|
|
|
type="primary"
|
|
|
- style="margin-bottom:20px"
|
|
|
+ style="margin-bottom: 20px"
|
|
|
>
|
|
|
添加订单
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
@click="onOrderExport"
|
|
|
- v-permission="'export/routeOrderList/taoqi'"
|
|
|
+ v-permission="{
|
|
|
+ child: 'export/routeOrderList',
|
|
|
+ parent: '/financeManager',
|
|
|
+ }"
|
|
|
type="primary"
|
|
|
style="margin-bottom:20px"
|
|
|
>
|
|
|
报表导出
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-permission="'adapay/exportBill/taoqi'"
|
|
|
+ </el-button> -->
|
|
|
+ <ExportChiose
|
|
|
+ v-permission="{
|
|
|
+ child: 'export/routeOrderList',
|
|
|
+ parent: '/financeManager',
|
|
|
+ }"
|
|
|
+ style="margin-bottom: 20px; display: inline-block"
|
|
|
+ name="报表导出"
|
|
|
+ ExportEnum="ROUTE_ORDER_LIST1"
|
|
|
+ :exportData="onOrderExport"
|
|
|
+ fileName="财务列表"
|
|
|
+ errorMsg="请选择开始日期和结束日期"
|
|
|
+ :isDownList="true"
|
|
|
+ />
|
|
|
+ <!-- <el-button
|
|
|
+ v-permission="{ child: 'adapay/exportBill', parent: '/financeManager' }"
|
|
|
@click="onAdaPayExport"
|
|
|
type="primary"
|
|
|
- style="margin-bottom:20px"
|
|
|
+ style="margin-bottom: 20px"
|
|
|
>
|
|
|
汇付订单导出
|
|
|
- </el-button>
|
|
|
+ </el-button> -->
|
|
|
+ <ExportChiose
|
|
|
+ v-permission="{ child: 'adapay/exportBill', parent: '/financeManager' }"
|
|
|
+ style="margin-bottom: 20px; display: inline-block"
|
|
|
+ name="汇付订单导出"
|
|
|
+ ExportEnum="EXPORT_BILL"
|
|
|
+ :exportData="onAdaPayExport"
|
|
|
+ fileName="汇付订单"
|
|
|
+ errorMsg="请选择开始日期和结束日期"
|
|
|
+ :flag="
|
|
|
+ !(this.searchForm.orderDate && this.searchForm.orderDate.length > 0)
|
|
|
+ "
|
|
|
+ />
|
|
|
<el-button
|
|
|
@click="onDownload"
|
|
|
v-permission="'import/downloadTemplate?financeManager/taoqi'"
|
|
|
type="primary"
|
|
|
- style="margin-bottom:20px"
|
|
|
+ style="margin-bottom: 20px"
|
|
|
>
|
|
|
下载模板
|
|
|
</el-button>
|
|
|
<el-upload
|
|
|
v-permission="'import/routeOrder/taoqi'"
|
|
|
- style="display: inline-block;margin-left:10px;"
|
|
|
+ style="display: inline-block; margin-left: 10px"
|
|
|
action="/api-web/import/routeOrder"
|
|
|
:show-file-list="false"
|
|
|
:before-upload="beforeUpload"
|
|
@@ -53,12 +81,7 @@
|
|
|
:on-error="handleError"
|
|
|
:on-success="handleSuccess"
|
|
|
>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- style="margin-bottom:20px"
|
|
|
- >
|
|
|
- 导入
|
|
|
- </el-button>
|
|
|
+ <el-button type="primary" style="margin-bottom: 20px"> 导入 </el-button>
|
|
|
</el-upload>
|
|
|
<!-- 搜索类型 -->
|
|
|
<save-form
|
|
@@ -407,6 +430,7 @@
|
|
|
v-model.trim="form.routeOrganId"
|
|
|
:disabled="!isAdd"
|
|
|
@change="changeOrgin"
|
|
|
+ filterable
|
|
|
style="width: 100% !important"
|
|
|
>
|
|
|
<el-option
|
|
@@ -703,11 +727,12 @@ import { orderStatus, dealStatus } from "@/utils/searchArray";
|
|
|
import cleanDeep from "clean-deep";
|
|
|
import axios from "axios";
|
|
|
import qs from "qs";
|
|
|
-import { getToken, getTenantId} from "@/utils/auth";
|
|
|
+import { getToken, getTenantId } from "@/utils/auth";
|
|
|
import load from "@/utils/loading";
|
|
|
import { orderServerList } from "@/utils/searchArray";
|
|
|
import { Export } from "@/utils/downLoadFile";
|
|
|
import Tooltip from "@/components/Tooltip/index";
|
|
|
+import ExportChiose from "@/components/Export-chiose";
|
|
|
let validAmount = (rule, value, callback) => {
|
|
|
if (!value) {
|
|
|
callback(new Error("请输入商品数量"));
|
|
@@ -721,7 +746,7 @@ let validAmount = (rule, value, callback) => {
|
|
|
};
|
|
|
let that;
|
|
|
export default {
|
|
|
- components: { pagination, Tooltip },
|
|
|
+ components: { pagination, Tooltip, ExportChiose },
|
|
|
name: "incomeTwo",
|
|
|
computed: {
|
|
|
extraQuery() {
|
|
@@ -821,7 +846,7 @@ export default {
|
|
|
},
|
|
|
headers: {
|
|
|
Authorization: getToken(),
|
|
|
- tenantId: getTenantId()
|
|
|
+ tenantId: getTenantId(),
|
|
|
},
|
|
|
getCalenderList: [],
|
|
|
};
|
|
@@ -885,10 +910,10 @@ export default {
|
|
|
}
|
|
|
form.goodsJson =
|
|
|
form.applyType == "SERVICE" ? null : JSON.stringify(goodsJson);
|
|
|
- if(this.insertOrderType == 1) {
|
|
|
- form.calenderId = null
|
|
|
- } else if(this.insertOrderType == 2) {
|
|
|
- form.userId = null
|
|
|
+ if (this.insertOrderType == 1) {
|
|
|
+ form.calenderId = null;
|
|
|
+ } else if (this.insertOrderType == 2) {
|
|
|
+ form.userId = null;
|
|
|
}
|
|
|
routeOrderAdd(form).then((res) => {
|
|
|
if (res.code == 200) {
|
|
@@ -920,136 +945,136 @@ export default {
|
|
|
// }
|
|
|
// 关闭弹窗重置验证
|
|
|
this.$refs[formName].resetFields();
|
|
|
- this.insertOrderType = 1
|
|
|
+ this.insertOrderType = 1;
|
|
|
},
|
|
|
- onOrderExport() {
|
|
|
- // 报表导出
|
|
|
- let url = "/api-web/export/routeOrderList";
|
|
|
- let searchForm = this.searchForm;
|
|
|
- let data = {
|
|
|
- orderType: 3,
|
|
|
- search: searchForm.search,
|
|
|
- orderNo: searchForm.orderNo,
|
|
|
- transNo: searchForm.transNo,
|
|
|
- merNos: searchForm.merNos,
|
|
|
- actualAmount: searchForm.actualAmount,
|
|
|
- balancePaymentAmount: searchForm.balancePaymentAmount,
|
|
|
- paymentStatus: searchForm.paymentStatus,
|
|
|
- paymentType: searchForm.paymentType,
|
|
|
- routingOrganId: this.searchForm.routingOrganId.join(','),
|
|
|
- lessBalancePaymentAmount: searchForm.lessBalancePaymentAmount,
|
|
|
- lessActualAmount: searchForm.lessActualAmount,
|
|
|
- ...this.extraQuery,
|
|
|
- };
|
|
|
+ // onOrderExport() {
|
|
|
+ // // 报表导出
|
|
|
+ // let url = "/api-web/export/routeOrderList";
|
|
|
+ // let searchForm = this.searchForm;
|
|
|
+ // let data = {
|
|
|
+ // orderType: 3,
|
|
|
+ // search: searchForm.search,
|
|
|
+ // orderNo: searchForm.orderNo,
|
|
|
+ // transNo: searchForm.transNo,
|
|
|
+ // merNos: searchForm.merNos,
|
|
|
+ // actualAmount: searchForm.actualAmount,
|
|
|
+ // balancePaymentAmount: searchForm.balancePaymentAmount,
|
|
|
+ // paymentStatus: searchForm.paymentStatus,
|
|
|
+ // paymentType: searchForm.paymentType,
|
|
|
+ // routingOrganId: this.searchForm.routingOrganId.join(","),
|
|
|
+ // lessBalancePaymentAmount: searchForm.lessBalancePaymentAmount,
|
|
|
+ // lessActualAmount: searchForm.lessActualAmount,
|
|
|
+ // ...this.extraQuery,
|
|
|
+ // };
|
|
|
|
|
|
- if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
|
|
|
- data.orderStartDate = this.searchForm.orderDate[0];
|
|
|
- data.orderEndDate = this.searchForm.orderDate[1];
|
|
|
- } else {
|
|
|
- data.orderStartDate = null;
|
|
|
- data.orderEndDate = null;
|
|
|
- }
|
|
|
- const options = {
|
|
|
- method: "POST",
|
|
|
- headers: {
|
|
|
- Authorization: getToken(),
|
|
|
- tenantId: getTenantId()
|
|
|
- },
|
|
|
- data: qs.stringify(cleanDeep(data)),
|
|
|
- url,
|
|
|
- responseType: "json",
|
|
|
- };
|
|
|
- this.$confirm("您确定导出报表", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- load.startLoading();
|
|
|
- axios(options).then((res) => {
|
|
|
- load.endLoading();
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.$message.info(res.data.msg);
|
|
|
- } else {
|
|
|
- this.$message.error(res.data.msg);
|
|
|
- }
|
|
|
- // let blob = new Blob([res.data], {
|
|
|
- // // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
- // type: "application/vnd.ms-excel;charset=utf-8",
|
|
|
- // //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
- // });
|
|
|
- // let objectUrl = URL.createObjectURL(blob);
|
|
|
- // let link = document.createElement("a");
|
|
|
- // let nowTime = new Date();
|
|
|
- // let ymd =
|
|
|
- // nowTime.getFullYear() +
|
|
|
- // "" +
|
|
|
- // (nowTime.getMonth() + 1) +
|
|
|
- // "" +
|
|
|
- // nowTime.getDate() +
|
|
|
- // "" +
|
|
|
- // nowTime.getHours() +
|
|
|
- // "" +
|
|
|
- // nowTime.getMinutes();
|
|
|
- // let fname = "报表导出" + new Date().getTime() + ".xls"; //下载文件的名字
|
|
|
- // link.href = objectUrl;
|
|
|
- // link.setAttribute("download", fname);
|
|
|
- // document.body.appendChild(link);
|
|
|
- // link.click();
|
|
|
- // load.endLoading();
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
- onAdaPayExport() {
|
|
|
- // 报表导出
|
|
|
- let url = "/api-web/adapay/exportBill";
|
|
|
- let data = {
|
|
|
- ...this.extraQuery,
|
|
|
- };
|
|
|
- data.routingOrganId= this.searchForm.routingOrganId.join(',')
|
|
|
- if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
|
|
|
- data.startTime = this.searchForm.orderDate[0];
|
|
|
- data.endTime = this.searchForm.orderDate[1];
|
|
|
- } else {
|
|
|
- this.$message.error("请选择开始日期和结束日期");
|
|
|
- return;
|
|
|
- }
|
|
|
- const options = {
|
|
|
- method: "get",
|
|
|
- headers: {
|
|
|
- Authorization: getToken(),
|
|
|
- tenantId: getTenantId()
|
|
|
- },
|
|
|
- params: data,
|
|
|
- url,
|
|
|
- responseType: "blob",
|
|
|
- };
|
|
|
- this.$confirm("您确定导出汇付订单", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- load.startLoading();
|
|
|
- axios(options).then((res) => {
|
|
|
- let blob = new Blob([res.data], {
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
- type: "application/vnd.ms-excel;charset=utf-8",
|
|
|
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
- });
|
|
|
- let objectUrl = URL.createObjectURL(blob);
|
|
|
- let link = document.createElement("a");
|
|
|
- let fname = "汇付订单" + new Date().getTime() + ".xls"; //下载文件的名字
|
|
|
- link.href = objectUrl;
|
|
|
- link.setAttribute("download", fname);
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- load.endLoading();
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
+ // if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
|
|
|
+ // data.orderStartDate = this.searchForm.orderDate[0];
|
|
|
+ // data.orderEndDate = this.searchForm.orderDate[1];
|
|
|
+ // } else {
|
|
|
+ // data.orderStartDate = null;
|
|
|
+ // data.orderEndDate = null;
|
|
|
+ // }
|
|
|
+ // const options = {
|
|
|
+ // method: "POST",
|
|
|
+ // headers: {
|
|
|
+ // Authorization: getToken(),
|
|
|
+ // tenantId: getTenantId(),
|
|
|
+ // },
|
|
|
+ // data: qs.stringify(cleanDeep(data)),
|
|
|
+ // url,
|
|
|
+ // responseType: "json",
|
|
|
+ // };
|
|
|
+ // this.$confirm("您确定导出报表", "提示", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning",
|
|
|
+ // })
|
|
|
+ // .then(() => {
|
|
|
+ // load.startLoading();
|
|
|
+ // axios(options).then((res) => {
|
|
|
+ // load.endLoading();
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // this.$message.info(res.data.msg);
|
|
|
+ // } else {
|
|
|
+ // this.$message.error(res.data.msg);
|
|
|
+ // }
|
|
|
+ // // let blob = new Blob([res.data], {
|
|
|
+ // // // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
+ // // type: "application/vnd.ms-excel;charset=utf-8",
|
|
|
+ // // //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
+ // // });
|
|
|
+ // // let objectUrl = URL.createObjectURL(blob);
|
|
|
+ // // let link = document.createElement("a");
|
|
|
+ // // let nowTime = new Date();
|
|
|
+ // // let ymd =
|
|
|
+ // // nowTime.getFullYear() +
|
|
|
+ // // "" +
|
|
|
+ // // (nowTime.getMonth() + 1) +
|
|
|
+ // // "" +
|
|
|
+ // // nowTime.getDate() +
|
|
|
+ // // "" +
|
|
|
+ // // nowTime.getHours() +
|
|
|
+ // // "" +
|
|
|
+ // // nowTime.getMinutes();
|
|
|
+ // // let fname = "报表导出" + new Date().getTime() + ".xls"; //下载文件的名字
|
|
|
+ // // link.href = objectUrl;
|
|
|
+ // // link.setAttribute("download", fname);
|
|
|
+ // // document.body.appendChild(link);
|
|
|
+ // // link.click();
|
|
|
+ // // load.endLoading();
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ // .catch(() => {});
|
|
|
+ // },
|
|
|
+ // onAdaPayExport() {
|
|
|
+ // // 报表导出
|
|
|
+ // let url = "/api-web/adapay/exportBill";
|
|
|
+ // let data = {
|
|
|
+ // ...this.extraQuery,
|
|
|
+ // };
|
|
|
+ // data.routingOrganId= this.searchForm.routingOrganId.join(',')
|
|
|
+ // if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
|
|
|
+ // data.startTime = this.searchForm.orderDate[0];
|
|
|
+ // data.endTime = this.searchForm.orderDate[1];
|
|
|
+ // } else {
|
|
|
+ // this.$message.error("请选择开始日期和结束日期");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // const options = {
|
|
|
+ // method: "get",
|
|
|
+ // headers: {
|
|
|
+ // Authorization: getToken(),
|
|
|
+ // tenantId: getTenantId()
|
|
|
+ // },
|
|
|
+ // params: data,
|
|
|
+ // url,
|
|
|
+ // responseType: "blob",
|
|
|
+ // };
|
|
|
+ // this.$confirm("您确定导出汇付订单", "提示", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning",
|
|
|
+ // })
|
|
|
+ // .then(() => {
|
|
|
+ // load.startLoading();
|
|
|
+ // axios(options).then((res) => {
|
|
|
+ // let blob = new Blob([res.data], {
|
|
|
+ // // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
+ // type: "application/vnd.ms-excel;charset=utf-8",
|
|
|
+ // //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
+ // });
|
|
|
+ // let objectUrl = URL.createObjectURL(blob);
|
|
|
+ // let link = document.createElement("a");
|
|
|
+ // let fname = "汇付订单" + new Date().getTime() + ".xls"; //下载文件的名字
|
|
|
+ // link.href = objectUrl;
|
|
|
+ // link.setAttribute("download", fname);
|
|
|
+ // document.body.appendChild(link);
|
|
|
+ // link.click();
|
|
|
+ // load.endLoading();
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ // .catch(() => {});
|
|
|
+ // },
|
|
|
search() {
|
|
|
this.pageInfo.page = 1;
|
|
|
this.$refs.searchForm.save(this.searchForm);
|
|
@@ -1074,7 +1099,7 @@ export default {
|
|
|
params.balancePaymentAmount = params.balancePaymentAmount
|
|
|
? params.balancePaymentAmount
|
|
|
: null;
|
|
|
- params.routingOrganId= this.searchForm.routingOrganId.join(',')
|
|
|
+ params.routingOrganId = this.searchForm.routingOrganId.join(",");
|
|
|
if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
|
|
|
params.orderStartDate = this.searchForm.orderDate[0];
|
|
|
params.orderEndDate = this.searchForm.orderDate[1];
|
|
@@ -1217,12 +1242,12 @@ export default {
|
|
|
return { id: item.goodsId, number: item.num };
|
|
|
})
|
|
|
);
|
|
|
- if(orderInfo.userId && !res.data.calenderId) {
|
|
|
- this.insertOrderType = 1
|
|
|
- } else if(res.data.calenderId && !orderInfo.userId) {
|
|
|
- this.insertOrderType = 2
|
|
|
+ if (orderInfo.userId && !res.data.calenderId) {
|
|
|
+ this.insertOrderType = 1;
|
|
|
+ } else if (res.data.calenderId && !orderInfo.userId) {
|
|
|
+ this.insertOrderType = 2;
|
|
|
} else {
|
|
|
- this.insertOrderType = 3
|
|
|
+ this.insertOrderType = 3;
|
|
|
}
|
|
|
this.routeOrderStatus = true;
|
|
|
});
|
|
@@ -1351,6 +1376,52 @@ export default {
|
|
|
return str;
|
|
|
},
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ onOrderExport() {
|
|
|
+ // 报表导出
|
|
|
+ let url = "/api-web/export/routeOrderList";
|
|
|
+ let searchForm = this.searchForm;
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ orderType: 3,
|
|
|
+ search: searchForm.search,
|
|
|
+ orderNo: searchForm.orderNo,
|
|
|
+ transNo: searchForm.transNo,
|
|
|
+ merNos: searchForm.merNos,
|
|
|
+ actualAmount: searchForm.actualAmount,
|
|
|
+ balancePaymentAmount: searchForm.balancePaymentAmount,
|
|
|
+ paymentStatus: searchForm.paymentStatus,
|
|
|
+ paymentType: searchForm.paymentType,
|
|
|
+ routingOrganId: searchForm.routingOrganId,
|
|
|
+ lessBalancePaymentAmount: searchForm.lessBalancePaymentAmount,
|
|
|
+ lessActualAmount: searchForm.lessActualAmount,
|
|
|
+ ...this.extraQuery,
|
|
|
+ };
|
|
|
+ data.routingOrganId = this.searchForm.routingOrganId.join(",");
|
|
|
+
|
|
|
+ if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
|
|
|
+ data.orderStartDate = this.searchForm.orderDate[0];
|
|
|
+ data.orderEndDate = this.searchForm.orderDate[1];
|
|
|
+ } else {
|
|
|
+ data.orderStartDate = null;
|
|
|
+ data.orderEndDate = null;
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ onAdaPayExport() {
|
|
|
+ // 报表导出
|
|
|
+ let url = "/api-web/adapay/exportBill";
|
|
|
+ let data = {
|
|
|
+ ...this.extraQuery,
|
|
|
+ };
|
|
|
+ data.routingOrganId = this.searchForm.routingOrganId.join(",");
|
|
|
+ if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
|
|
|
+ data.startTime = this.searchForm.orderDate[0];
|
|
|
+ data.endTime = this.searchForm.orderDate[1];
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|