| | |
| | | /* |
| | | * @Author: your name |
| | | * @Date: 2021-09-22 10:18:34 |
| | | * @LastEditTime: 2023-07-10 10:39:47 |
| | | * @LastEditTime: 2023-09-01 09:45:12 |
| | | * @LastEditors: zhaoxiaoqiang 287285524@qq.com |
| | | * @Description: In User Settings Edit |
| | | * @FilePath: \qyp_finlean_plat\src\api\credit.js |
| | |
| | | data |
| | | }) |
| | | } |
| | | // 订单详情 |
| | | export function orderInit(data) { |
| | | // 支付历史初始化 |
| | | export function payInit(data) { |
| | | return request({ |
| | | url: '/qyp/order/orderInit', |
| | | url: '/qyp/order/payInit', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 退款 |
| | | export function refund(data) { |
| | | return request({ |
| | | url: '/qyp/order/refund', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | /* |
| | | * @Author: your name |
| | | * @Date: 2021-09-16 17:39:48 |
| | | * @LastEditTime: 2023-08-25 10:09:01 |
| | | * @LastEditTime: 2023-09-01 11:28:03 |
| | | * @LastEditors: zhaoxiaoqiang 287285524@qq.com |
| | | * @Description:这个文件只用作列表和导出接口的使用 |
| | | * @FilePath: \qyp-plat\src\api\listapi.js |
| | |
| | | let accountApi = { |
| | | // 用户列表 |
| | | userList(data) { |
| | | data.sysType = 4; |
| | | return request({ |
| | | url: "/user/list", |
| | | method: "post", |
| | |
| | | data, |
| | | }); |
| | | }, |
| | | payList(data) { |
| | | return request({ |
| | | url: "/qyp/order/payList", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | // 支付列表 |
| | | payPlanList(data) { |
| | | return request({ |
| | | url: "/qyp/order/payPlanList", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | // 权益领取 |
| | | useList(data) { |
| | | return request({ |
| | | url: "/qyp/order/useList", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | }; |
| | | export default accountApi; |
| | |
| | | }) |
| | | } |
| | | |
| | | export function getInfo(token) { |
| | | return request({ |
| | | url: '/vue-admin-template/user/info', |
| | | method: 'get', |
| | | params: { token } |
| | | }) |
| | | } |
| | | // 强制退出 |
| | | export function logout() { |
| | | return request({ |
| | |
| | | } |
| | | //更新用户密码 |
| | | export function updatePwd(data) { |
| | | data.sysType = 4; |
| | | return request({ |
| | | url: '/user/updatePwd', |
| | | method: 'post', |
| | |
| | | * @Author: 小明丶 |
| | | * @Date: 2019-10-25 10:17:56 |
| | | * @LastEditors: zhaoxiaoqiang 287285524@qq.com |
| | | * @LastEditTime: 2023-07-28 16:27:12 |
| | | * @LastEditTime: 2023-09-01 10:34:18 |
| | | * @Description: |
| | | */ |
| | | /** |
| | |
| | | downFile(blob, fileName); |
| | | }, |
| | | configDate2: function(res, parFilename, from) { |
| | | console.log(res); |
| | | // let fileNamet =/\.{1}[A-Za-z]{1,}$/.exec(res.headers['content-disposition']); |
| | | let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'}); |
| | | let fileName = parFilename?parFilename:""; |
| | |
| | | if (window.navigator.msSaveOrOpenBlob) { |
| | | navigator.msSaveBlob(blob, fileName); |
| | | } else { |
| | | // let objectUrl = URL.createObjectURL(blob); |
| | | // window.location.href = objectUrl; |
| | | let link = document.createElement('a'); |
| | | link.href = window.URL.createObjectURL(blob); |
| | | link.download = fileName; |
| | |
| | | <el-descriptions-item label="项目名称">{{ orderDetail.projName }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-dialog> |
| | | <el-dialog top="2vh" :title="subTitle" fullscreen :visible.sync="productShow" width="60%"> |
| | | <history v-if="isWhith==1"></history> |
| | | <plan v-else-if="isWhith==2"></plan> |
| | | <draw v-else-if="isWhith==3"></draw> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Etable from "../../components/table.vue"; |
| | | import Etable from "@/components/table.vue"; |
| | | import history from './history.vue'; |
| | | import plan from './plan.vue'; |
| | | import draw from './draw.vue'; |
| | | import {orderInit,orderDtl} from "@/api/credit"; |
| | | import uploadImg from "@/components/upload.vue"; |
| | | export default { |
| | | name: "order", |
| | | components: { Etable,uploadImg }, |
| | | components: { Etable,uploadImg,history,plan,draw }, |
| | | data() { |
| | | return { |
| | | formInline: {status:"all"}, |
| | |
| | | { |
| | | lable: "操作", |
| | | align: "center", |
| | | width: "200", |
| | | width: "300", |
| | | fixed: "right", |
| | | render: (h, scope) => { |
| | | return h("div", [ |
| | |
| | | }, |
| | | }, |
| | | "查看详情" |
| | | ), |
| | | h( |
| | | "el-button", |
| | | { |
| | | props:{ |
| | | type:'text' |
| | | }, |
| | | style: { |
| | | // display: this.filterBtnById(150101) |
| | | // ? "inline-block" |
| | | // : "none", |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | |
| | | this.isWhith = 1; |
| | | this.productShow = true; |
| | | // this.title = '订单详情'; |
| | | // let {orderId} = scope.row; |
| | | // this.getProductDetail(orderId); |
| | | }, |
| | | }, |
| | | }, |
| | | "支付历史" |
| | | ), |
| | | h( |
| | | "el-button", |
| | | { |
| | | props:{ |
| | | type:'text' |
| | | }, |
| | | style: { |
| | | // display: this.filterBtnById(150101) |
| | | // ? "inline-block" |
| | | // : "none", |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.isWhith = 2; |
| | | this.productShow = true; |
| | | // this.title = '订单详情'; |
| | | // let {orderId} = scope.row; |
| | | // this.getProductDetail(orderId); |
| | | }, |
| | | }, |
| | | }, |
| | | "扣款计划" |
| | | ), |
| | | h( |
| | | "el-button", |
| | | { |
| | | props:{ |
| | | type:'text' |
| | | }, |
| | | style: { |
| | | // display: this.filterBtnById(150101) |
| | | // ? "inline-block" |
| | | // : "none", |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.isWhith = 3; |
| | | this.productShow = true; |
| | | // this.title = '订单详情'; |
| | | // let {orderId} = scope.row; |
| | | // this.getProductDetail(orderId); |
| | | }, |
| | | }, |
| | | }, |
| | | "权益领取" |
| | | ) |
| | | ]); |
| | | }, |
| | |
| | | ], |
| | | relustObj: {}, |
| | | addProd:false, |
| | | productShow:false, |
| | | createdTime:[], |
| | | title:"新增项目", |
| | | orderDetail:{}, |
| | | exportExcelList:[] |
| | | exportExcelList:[], |
| | | isWhith:'' |
| | | } |
| | | }, |
| | | computed:{ |
| | | subTitle(){ |
| | | let text ='支付历史'; |
| | | if(this.isWhith==2){ |
| | | text = '扣款计划' |
| | | }else if(this.isWhith==3){ |
| | | text = '权益领取' |
| | | } |
| | | return text; |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | } |
| | | }, |
| | | deep: true |
| | | }, |
| | | productShow:{ |
| | | handler: function(val) { |
| | | if(!val){ |
| | | this.isWhith =''; |
| | | } |
| | | }, |
| | | deep: true |
| | | }, |
| | | }, |
| | | //生命周期 - 创建完成(可以访问当前this实例) |
| | | created() { |
| | | this.initSerch(); |
| | |
| | | |
| | | <!-- |
| | | * @Author: zhaoxiaoqiang 287285524@qq.com |
| | | * @Date: 2023-08-24 15:16:23 |
| | | * @LastEditors: zhaoxiaoqiang 287285524@qq.com |
| | | * @LastEditTime: 2023-08-24 15:17:26 |
| | | * @LastEditTime: 2023-09-01 11:22:22 |
| | | * @FilePath: \qyp_plat\src\views\qyp-project-order\history.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | | <template> |
| | | <div> |
| | | |
| | | <el-form |
| | | :model="formInline" |
| | | inline |
| | | label-width="120px" |
| | | class="form-flex" |
| | | size="small" |
| | | > |
| | | <div style="width: 90%"> |
| | | <el-form-item label="权益账号:"> |
| | | <el-input |
| | | v-model.trim="formInline.mblNo" |
| | | style="width: 240px" |
| | | @keyup.native="keyupEvent($event)" |
| | | type="tel" |
| | | clearable |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="权益领取时间:"> |
| | | <el-date-picker |
| | | v-model="createdTime" |
| | | style="width: 240px" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item style="text-align: right;"> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 8px;" @click="onSearch">查 询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <Etable |
| | | hasIndex |
| | | :searchData='searchData' |
| | | httpUrl="useList" |
| | | :columns="columns" |
| | | :exportUrl="{ |
| | | url: '/qyp/order/useExport', |
| | | powerId: '', |
| | | name: '权益领取', |
| | | }" |
| | | > |
| | | </Etable> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Etable from "@/components/table.vue"; |
| | | export default { |
| | | components: { Etable }, |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | columns:[ |
| | | { |
| | | lable: "权益账号", |
| | | prop: "mblNo", |
| | | align: "center", |
| | | }, |
| | | created() { |
| | | |
| | | { |
| | | lable: "权益领取时间", |
| | | prop: "creTime", |
| | | align: "center", |
| | | }, |
| | | mounted() { |
| | | |
| | | { |
| | | lable: "权益名称", |
| | | prop: "productName", |
| | | align: "center", |
| | | } |
| | | ], |
| | | formInline:{}, |
| | | searchData:{}, |
| | | createdTime:[] |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | onSearch(){ |
| | | this.formInline.creStartTime = this.createdTime[0]?this.createdTime[0]:null; |
| | | this.formInline.creEndTime = this.createdTime[1]?this.createdTime[1]:null; |
| | | let objForm = JSON.parse(JSON.stringify(this.formInline)); |
| | | for (let key in objForm) { |
| | | if (objForm[key] === "all"||objForm[key] === null||objForm[key] === '') { |
| | | delete objForm[key]; |
| | | } |
| | | } |
| | | this.searchData = { ...objForm }; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | * @Author: zhaoxiaoqiang 287285524@qq.com |
| | | * @Date: 2023-08-24 15:16:23 |
| | | * @LastEditors: zhaoxiaoqiang 287285524@qq.com |
| | | * @LastEditTime: 2023-08-31 08:58:17 |
| | | * @LastEditTime: 2023-09-01 11:19:29 |
| | | * @FilePath: \qyp_plat\src\views\qyp-project-order\history.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | | <template> |
| | | <div> |
| | | 12121212 |
| | | <el-form |
| | | :model="formInline" |
| | | inline |
| | | label-width="100px" |
| | | class="form-flex" |
| | | size="small" |
| | | > |
| | | <div style="width: 90%"> |
| | | <el-form-item label="支付订单号:"> |
| | | <el-input |
| | | v-model.trim="formInline.tradeNo" |
| | | style="width: 240px" |
| | | @keyup.native="keyupEvent($event)" |
| | | type="tel" |
| | | clearable |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="支付时间:"> |
| | | <el-date-picker |
| | | v-model="createdTime" |
| | | style="width: 240px" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="支付状态:"> |
| | | <el-select |
| | | v-model="formInline.payStatus" |
| | | style="width:240px" |
| | | clearable |
| | | placeholder="请选择" |
| | | > |
| | | <el-option label="全部" value="all"></el-option> |
| | | <el-option |
| | | v-for="item in relustObj.payStatusList" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item style="text-align: right;"> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 8px;" @click="onSearch">查 询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <Etable |
| | | hasIndex |
| | | httpUrl="payList" |
| | | :columns="columns" |
| | | :searchData="searchData" |
| | | :exportUrl="{ |
| | | url: '/qyp/order/payExport', |
| | | powerId: '', |
| | | name: '支付历史', |
| | | }" |
| | | > |
| | | </Etable> |
| | | <el-dialog top="2vh" title="退款" append-to-body :visible.sync="productShow" width="40%"> |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" size="small" label-width="100px" class="demo-ruleForm"> |
| | | <el-form-item label="退款类型" prop="refundType"> |
| | | <el-radio-group v-model="ruleForm.refundType"> |
| | | <el-radio v-for="item in relustObj.refundTypeList" :disabled="!item.selected" :key="item.code" :label="item.code">{{ item.name }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="退款金额" prop="refundAmount"> |
| | | <el-input v-model="ruleForm.refundAmount" placeholder="请输入退款金额"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="text-align: right;"> |
| | | <el-button @click="resetForm('ruleForm')">取消</el-button> |
| | | <el-button type="primary" @click="submitForm('ruleForm')">确认</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {payInit,refund} from "@/api/credit"; |
| | | import Etable from "@/components/table.vue"; |
| | | export default { |
| | | components: { Etable }, |
| | | data() { |
| | | return { |
| | | productShow:false, |
| | | formInline:{}, |
| | | searchData:{}, |
| | | createdTime:[], |
| | | relustObj:{}, |
| | | columns:[ |
| | | { |
| | | lable: "支付订单号", |
| | | prop: "tradeNo", |
| | | align: "center", |
| | | width: "300", |
| | | }, |
| | | { |
| | | lable: "支付时间", |
| | | prop: "payTime", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "支付状态", |
| | | prop: "payStatusStr", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "支付金额", |
| | | prop: "payAmount", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "停车券退款状态", |
| | | prop: "tcjRefundStatusStr", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "停车券退款金额", |
| | | prop: "tcjRefundAmount", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "停车券退款时间", |
| | | prop: "tcjRefundTime", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "权益会员退款状态", |
| | | prop: "refundStatusStr", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "权益会员退款金额", |
| | | prop: "refundAmount", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "权益会员退款时间", |
| | | prop: "refundTime", |
| | | align: "center", |
| | | width: "180", |
| | | }, |
| | | { |
| | | lable: "操作", |
| | | align: "center", |
| | | width: "200", |
| | | fixed: "right", |
| | | render: (h, scope) => { |
| | | return h("div", [ |
| | | h( |
| | | "el-button", |
| | | { |
| | | props:{ |
| | | type:'text', |
| | | disabled:!scope.row.canRefund&&!scope.row.tcjCanRefund |
| | | }, |
| | | style: { |
| | | // display: this.filterBtnById(150101) |
| | | // ? "inline-block" |
| | | // : "none", |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | let {canRefund,tcjCanRefund,payId} = scope.row; |
| | | this.ruleForm.payId = payId; |
| | | this.relustObj.refundTypeList.forEach(element => { |
| | | if(element.code==1){ |
| | | element.selected = canRefund; |
| | | } |
| | | if(element.code==2){ |
| | | element.selected = tcjCanRefund; |
| | | } |
| | | }); |
| | | this.productShow = true; |
| | | }, |
| | | }, |
| | | }, |
| | | "退款" |
| | | ) |
| | | ]); |
| | | }, |
| | | }, |
| | | |
| | | ], |
| | | ruleForm:{}, |
| | | rules:{ |
| | | refundType: [ |
| | | { required: true, message: '请选择退款类型', trigger: 'change' } |
| | | ], |
| | | refundAmount: [{ required: true, message: '请输入退款金额', trigger: 'blur' }] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | watch:{ |
| | | productShow:{ |
| | | handler: function(val) { |
| | | if(!val){ |
| | | this.$refs['ruleForm'].resetFields(); |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | deep: true |
| | | } |
| | | }, |
| | | created() { |
| | | this.initSerch(); |
| | | }, |
| | | methods: { |
| | | |
| | | keyupEvent(e) { |
| | | //只能输入整数 |
| | | e.target.value = e.target.value.replace(/[^\d]/g, ""); |
| | | }, |
| | | initSerch() { |
| | | payInit().then(({ body }) => { |
| | | this.relustObj = body; |
| | | }); |
| | | }, |
| | | onSearch() { |
| | | this.formInline.payStartTime = this.createdTime[0]?this.createdTime[0]:null; |
| | | this.formInline.payEndTime = this.createdTime[1]?this.createdTime[1]:null; |
| | | let objForm = JSON.parse(JSON.stringify(this.formInline)); |
| | | for (let key in objForm) { |
| | | if (objForm[key] === "all"||objForm[key] === null||objForm[key] === '') { |
| | | delete objForm[key]; |
| | | } |
| | | } |
| | | this.searchData = { ...objForm }; |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | refund(this.ruleForm).then(({body})=>{ |
| | | this.$message.success("退款成功"); |
| | | this.onSearch(); |
| | | this.productShow = false; |
| | | }).catch(err=>{ |
| | | this.productShow = false; |
| | | }) |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | this.productShow = false; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | |
| | | <!-- |
| | | * @Author: zhaoxiaoqiang 287285524@qq.com |
| | | * @Date: 2023-08-24 15:16:23 |
| | | * @LastEditors: zhaoxiaoqiang 287285524@qq.com |
| | | * @LastEditTime: 2023-08-24 15:17:08 |
| | | * @LastEditTime: 2023-09-01 10:31:52 |
| | | * @FilePath: \qyp_plat\src\views\qyp-project-order\history.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | | <template> |
| | | <div> |
| | | |
| | | <Etable |
| | | hasIndex |
| | | httpUrl="payPlanList" |
| | | :columns="columns" |
| | | :exportUrl="{ |
| | | url: '/qyp/order/payPlanExport', |
| | | powerId: '', |
| | | name: '扣款计划', |
| | | }" |
| | | > |
| | | </Etable> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Etable from "@/components/table.vue"; |
| | | export default { |
| | | components: { Etable }, |
| | | data() { |
| | | return { |
| | | |
| | | columns:[ |
| | | { |
| | | lable: "扣款次数", |
| | | prop: "term", |
| | | align: "center", |
| | | }, |
| | | { |
| | | lable: "扣款日期", |
| | | prop: "deductTime", |
| | | align: "center", |
| | | }, |
| | | { |
| | | lable: "扣款金额", |
| | | prop: "payAmt", |
| | | align: "center", |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | |