From 1e49e17d482e3a3e67108bdffa4ae5f374e26cb8 Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang <287285524@qq.com>
Date: Thu, 31 Aug 2023 18:05:46 +0800
Subject: [PATCH] 订单管理管理员订单管理
---
src/views/qyp-project-order/index.vue | 312 +++++++++++
src/views/qyp-project-order/history.vue | 3
src/views/qyp-project-management/promotion.vue | 183 ++++--
src/api/user.js | 11
src/components/table.vue | 16
src/views/qyp-project-order/admin.vue | 344 ++++++++++++
src/api/listapi.js | 7
src/views/qyp-project-management/index.vue | 287 ++++++++--
src/components/fl-select.vue | 2
src/components/upload.vue | 368 ++++---------
src/api/credit.js | 16
src/utils/MenuUtils.js | 3
12 files changed, 1,102 insertions(+), 450 deletions(-)
diff --git a/src/api/credit.js b/src/api/credit.js
index 836257d..cad6a5a 100644
--- a/src/api/credit.js
+++ b/src/api/credit.js
@@ -73,4 +73,20 @@
method: 'post',
data
})
+}
+// 订单详情
+export function orderDtl(data) {
+ return request({
+ url: '/qyp/order/orderDtl',
+ method: 'post',
+ data
+ })
+}
+// 订单详情
+export function orderInit(data) {
+ return request({
+ url: '/qyp/order/orderInit',
+ method: 'post',
+ data
+ })
}
\ No newline at end of file
diff --git a/src/api/listapi.js b/src/api/listapi.js
index 73d7d0b..596aff3 100644
--- a/src/api/listapi.js
+++ b/src/api/listapi.js
@@ -40,5 +40,12 @@
data,
});
},
+ orderList(data) {
+ return request({
+ url: "/qyp/order/orderList",
+ method: "post",
+ data,
+ });
+ },
};
export default accountApi;
diff --git a/src/api/user.js b/src/api/user.js
index e4f2984..daa10ef 100644
--- a/src/api/user.js
+++ b/src/api/user.js
@@ -137,13 +137,20 @@
// =================
export function uploadFile(data) { //文件上传公共
return request({
- url: '/pub/uploadFile',
+ url: '/pub/upload',
method: 'post',
data
})
}
-
+// 项目文件上传
+export function projFileUpload(data) { //文件上传公共
+ return request({
+ url: '/qyp/manual/projFileUpload',
+ method: 'post',
+ data
+ })
+}
diff --git a/src/components/secect.vue b/src/components/fl-select.vue
similarity index 98%
rename from src/components/secect.vue
rename to src/components/fl-select.vue
index 5e8b4ed..de4e823 100644
--- a/src/components/secect.vue
+++ b/src/components/fl-select.vue
@@ -4,7 +4,7 @@
* @LastEditors: zxq
* @LastEditTime: 2023-01-03 11:08:50
* @Description: Description
- * @FilePath: \qyp-plat\src\components\secect.vue
+ * @FilePath: \qyp-plat\src\components\fl-select.vue
-->
<template>
<el-select
diff --git a/src/components/table.vue b/src/components/table.vue
index 350b0ac..606de18 100644
--- a/src/components/table.vue
+++ b/src/components/table.vue
@@ -1,8 +1,8 @@
<!--
* @Author: zxq
* @Date: 2021-09-13 17:29:07
- * @LastEditTime: 2023-04-23 11:27:58
- * @LastEditors: zxq
+ * @LastEditTime: 2023-08-31 17:14:36
+ * @LastEditors: zhaoxiaoqiang 287285524@qq.com
* @Description: In User Settings Edit
* @FilePath: \qyp_finlean_plat\src\components\table.vue
-->
@@ -31,11 +31,13 @@
@select-all="selectAll"
@cell-click="cellClick"
@select="select"
+ :row-key="getRowKey"
>
<el-table-column
v-if="hasSelection"
type="selection"
:border="border"
+ :reserve-selection="true"
:selectable="selectHandle"
width="50"
></el-table-column>
@@ -247,8 +249,7 @@
type: Object,
default: () => {
return {};
- },
-
+ }
},
//订单明细 导出路径
exportOrderUrl: {
@@ -295,6 +296,10 @@
type:String,
default:'items'
},
+ rowKey:{
+ type:String,
+ default:'id'
+ }
},
components: {
expandDom: {
@@ -388,6 +393,9 @@
},
},
methods: {
+ getRowKey (row) {
+ return row[this.rowKey]
+ },
pageChange(newPage) {
this.queryData.page = newPage;
this.getData();
diff --git a/src/components/upload.vue b/src/components/upload.vue
index 0af7d97..faf40f5 100644
--- a/src/components/upload.vue
+++ b/src/components/upload.vue
@@ -2,294 +2,156 @@
* @Author: zxq
* @Date: 2022-01-05 18:44:53
* @LastEditors: zhaoxiaoqiang 287285524@qq.com
- * @LastEditTime: 2023-08-24 14:39:04
+ * @LastEditTime: 2023-08-31 14:56:53
* @Description: Description
- * @FilePath: \qyp_finlean_plat\src\components\upload.vue
+ * @FilePath: \sjzl-plat\src\components\upload.vue
-->
<template>
- <div style="width: 100%">
+ <div>
<el-upload
- action="#"
- :limit="limit"
- multiple
- class="upload-demo"
- :list-type="!isUploadOther?'picture-card':''"
- :disabled="disabled"
- :on-exceed="masterFileMax"
- :before-upload="beforeAvatarUpload"
- :http-request="uploadFileData"
- :file-list="PicList"
- :class="[uploadDisabled ? 'updispaly' : '']"
- >
- <el-button v-if="isUploadOther" size="small" icon="el-icon-plus" type="primary" >点击上传</el-button>
- <i v-else slot="default" class="el-icon-plus"></i>
- <div slot="file" slot-scope="{ file }">
- <template v-if="isUploadOther">
- <div class="pdf_style" v-if='file.url'>
- <template
- v-if="
- file.url
- .substring(file.url.lastIndexOf('.'))
- .split('.')[1]
- .trim() != 'pdf'
- "
+ action="#"
+ :limit='limit'
+ multiple
+ :disabled='disabled'
+ list-type="picture-card"
+ :on-exceed="masterFileMax"
+ :before-upload="beforeAvatarUpload"
+ :http-request="uploadFileData"
+ :file-list="pictureList"
+ >
+ <i slot="default" class="el-icon-plus"></i>
+ <div slot="file" slot-scope="{ file }">
+ <!-- <span>{{ file.url }}</span> -->
+ <img class="el-upload-list__item-thumbnail" :src="file.url" alt=""/>
+ <span class="el-upload-list__item-actions">
+ <span
+ class="el-upload-list__item-preview"
+ @click="handlePictureCardPreview(file)"
>
- <div :style="imgStyle" class="img_box">
- <img
- class="el-upload-list__item-thumbnail"
- :style="imgStyle"
- :src="file.url"
- alt=""
- />
- <div class="el-upload-list__item-actions" :style="imgStyle">
- <span class="el-upload-list__item-preview">
- <i
- class="el-icon-zoom-in"
- style="color: #fff; font-size: 20px"
- @click="handlePictureCardPreview(file)"
- ></i>
- <i
- class="el-icon-delete"
- style="color: #fff; font-size: 20px"
- @click="handleRemoveLoanT(file)"
- ></i>
- </span>
- </div>
- </div>
- </template>
- <template v-else>
- <div class="pdf_box">
- <span>{{ file.fileName }}</span>
- <i
- class="el-icon-delete delete_file"
- style="color: #fff; font-size: 20px"
- @click="handleRemoveLoanT(file)"
- ></i>
- </div>
- </template>
- </div>
- </template>
- <template v-else>
- <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
- <span class="el-upload-list__item-actions">
- <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
- <i class="el-icon-zoom-in"></i>
+ <i class="el-icon-zoom-in"></i>
</span>
- <span v-if='!disabled' class="el-upload-list__item-delete" @click="handleRemoveLoanT(file)">
- <i class="el-icon-delete"></i>
+ <span v-if='!disabled'
+ class="el-upload-list__item-delete"
+ @click="handleRemoveLoanT(file)"
+ >
+ <i class="el-icon-delete"></i>
</span>
- </span>
- </template>
- </div>
+ </span>
+ </div>
</el-upload>
- <el-dialog
- title="查看图片"
- :append-to-body="true"
- top="0"
- :visible.sync="imgVisible"
- class="dialogImageUrlbox"
- >
- <img width="100%" :src="dialogImageUrl" alt="" />
+ <el-dialog title="查看图片" top="1vh" :append-to-body='true' :visible.sync="imgVisible" class='dialogImageUrlbox'>
+ <img width="80%" :src="dialogImageUrl" alt="" />
</el-dialog>
</div>
</template>
+
<script>
-import axios from "axios";
import { uploadFile } from "@/api/user";
import { imgShrink } from "@/utils/validate";
-import {showTipOfStatuCode} from '@/utils/statusCodeManage'
+
export default {
- props: {
- limit: {
- type: Number | String,
- default: "",
- },
- disabled: {
+ props:{
+ limit: {
+ type: Number,
+ default: 1
+ },
+ disabled: {
type: Boolean,
- default: false,
- },
- defaultList: {
+ default: false
+ },
+ defaultList:{
type: Array,
- default: () => {
- return [];
- },
- },
- imgSize: {
- type: Object,
- default: () => {
- return {};
- },
- },
- imgStyle: {
- type: Object,
- default: () => {
- return {
- width: "100px",
- height: "100px",
- };
- },
- },
- isUploadOther: {
+ default: ()=>{
+ return []
+ }
+ },
+ isProject:{
type: Boolean,
- default: false,
- },
+ default: false
+ }
},
data() {
- return {
- PicList: [],
- imgVisible: false,
- dialogImageUrl: "",
- uploadFileForm: {
- suffix: "",
- base64Data: "",
- },
- uploadDisabled: false,
- };
+ return {
+ pictureList:[],
+ imgVisible:false,
+ dialogImageUrl:'',
+ uploadFileForm:{
+ suffix:"",
+ base64Data:""
+ }
+ };
},
- watch: {
- defaultList: {
- handler: function (val) {
- this.PicList = val;
- },
- deep: true,
- },
+ watch:{
+ defaultList:{
+ handler: function(val) {
+ console.log(val)
+ this.pictureList = val;
+ },
+ deep: true
+ }
},
methods: {
- beforeAvatarUpload(file, type) {
- var testmsg = !/\/(?:jpg|jpeg|png|pdf)/i.test(file.type);
- const isLt5M = file.size / 1024 / 1024 < 100;
- if (testmsg) {
- this.$message.error("请检查文件格式");
- return false;
- }
- if (!isLt5M) {
- this.$message.error("上传图片大小不能超过 100MB!");
- return false;
- }
- },
- uploadFileData(file, type) {
- if(this.isUploadOther){
- var formData = new FormData(); //新建表单对象
- formData.append("file", file.file); //把文件对象添加到表单对象里
- formData.append("filename", file.file.name); //把文件名称添加到表单对象里
- axios.post("/sfPlat/pub/uploadLargeFile", formData).then(({ data }) => {
- let { fileUrl, fileName, fileId } = data.body;
- this.PicList.push({
- fileUrl: fileUrl,
- fileName,
- url: fileUrl,
- fileId,
- });
- this.$emit("sendList", this.PicList);
- })
- .catch((err) => {
- showTipOfStatuCode(err)
- });
- }else{
+ beforeAvatarUpload(file,type) {
+ var testmsg = /^image\/(jpeg|png|jpg)$/.test(file.type);
+ const isLt5M = file.size / 1024 / 1024 < 15;
+ if (!testmsg) {
+ this.$message.error("上传图片格式不对!");
+ return false;
+ }
+ if (!isLt5M) {
+ this.$message.error("上传图片大小不能超过 15MB!");
+ return false;
+ }
+ },
+ uploadFileData(file,type) {
//上传图片
const fileName = file.file.name;
- this.uploadFileForm.suffix = fileName.substr(fileName.lastIndexOf(".") + 1, fileName.length);
- imgShrink(file.file,this.imgSize.width,this.imgSize.height).then(resBase64 => {
- this.uploadFileForm.base64Data = resBase64.split(",")[1];
- //直接拿到base64信息
- uploadFile(this.uploadFileForm).then(res => {
- this.PicList.push({
- filePath: res.body.fileUrl,
- fileName: fileName,
- url: res.body.fileUrl,
- fileId: res.body.fileId
+ this.uploadFileForm.suffix = fileName.substr( fileName.lastIndexOf(".") + 1,fileName.length);
+ imgShrink(file.file).then(resBase64 => {
+ this.uploadFileForm.base64Data = resBase64.split(",")[1];
+ let apiEvent = {uploadFile};
+ //直接拿到base64信息
+ apiEvent["uploadFile"](this.uploadFileForm).then(res => {
+ this.pictureList.push({
+ filePath: res.body.fileUrl,
+ fileName: fileName,
+ uid: file.file.uid,
+ url: res.body.fileUrl,
+ fileId:res.body.fileId
+ });
+ this.$emit('sendList',this.pictureList);
});
- this.uploadDisabled = this.PicList.length >= 1 && this.limit==1
- this.$emit('sendList', this.PicList);
- });
});
+ },
+ handlePictureCardPreview(file) {
+ this.dialogImageUrl = file.url;
+ this.imgVisible = true;
+ },
+ handleRemoveLoanT(file) {
+ const index = this.pictureList.findIndex(item => {
+ return item.uid == file.uid;
+ });
+ this.pictureList.splice(index,1);
+ this.$emit('sendList',this.pictureList);
+ },
+ masterFileMax(){
+ this.$message.warning(`请最多上传 ${this.limit} 个文件。`);
}
- },
- handlePictureCardPreview(file) {
- this.dialogImageUrl = file.url;
- this.imgVisible = true;
- },
- handleRemoveLoanT(file) {
- const index = this.PicList.findIndex((item) => {
- return item.fileId == file.fileId;
- });
- this.PicList.splice(index, 1);
- this.uploadDisabled = this.PicList.length >= 1 && this.limit == 1;
- this.$emit("sendList", this.PicList);
- },
- masterFileMax() {
- this.$message.warning(`最多上传 ${this.limit} 个文件。`);
- },
},
- created() {},
mounted() {
if (this.defaultList.length > 0) {
- this.PicList = this.defaultList;
- this.uploadDisabled = this.PicList.length >= 1 && this.limit == 1;
+ this.pictureList = this.defaultList;
+ this.uploadDisabled = this.pictureList.length >= 1 && this.limit == 1;
}
},
};
</script>
-<style lang="scss">
-.updispaly {
- .el-upload--picture-card {
- display: none;
- }
- .el-upload {
- width: 100% !important;
- height: 100% !important;
- }
- .uplaod_img > .el-upload--picture-card {
- width: 100% !important;
- height: 100% !important;
- }
+<style>
+.el-upload--picture-card , .el-upload-list__item{
+ width: 74px !important;
+ height: 74px !important;
+ line-height: 76px !important;
}
-.pdf_style{
- .img_box {
- position: relative;
- margin-right: 5px;
- margin-bottom: 5px;
- }
- .el-upload-list__item {
- width: inherit !important;
- }
- .el-upload-list__item-actions {
- position: absolute !important;
- top: 0 !important;
- left: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- opacity: 0;
- background: rgba(0, 0, 0, 0.5);
- }
-
- .img_box:hover .el-upload-list__item-actions {
- opacity: 1;
- }
- .el-upload-list {
- display: flex !important;
- justify-content: flex-start !important;
- align-items: center !important;
- flex-wrap: wrap !important;
- }
- .pdf_box {
- padding: 5px 0;
- padding-right: 24px;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- }
- .delete_file {
- display: inline-block;
- margin-left: 12px;
- opacity: 0;
- }
- .pdf_box:hover .delete_file {
- opacity: 1;
- color: #666 !important;
- }
-}
-
+
</style>
diff --git a/src/utils/MenuUtils.js b/src/utils/MenuUtils.js
index f7dd72f..b77b0fd 100644
--- a/src/utils/MenuUtils.js
+++ b/src/utils/MenuUtils.js
@@ -14,8 +14,7 @@
// 这个component属性是一个字符串,或者可能连字段名都是其他的key
// 所以这里要做一些转换
// 结构创建
- let data = arr ? arr : []
- console.log(data)
+ let data = arr ? arr : [];
for (let i = 0, j = data.length; i < j; i++) {
if (data[i].childPowerInfos == null || data[i].childPowerInfos.length == 0) {
data[i].childPowerInfos = [{
diff --git a/src/views/qyp-project-management/index.vue b/src/views/qyp-project-management/index.vue
index 5826f29..b602ade 100644
--- a/src/views/qyp-project-management/index.vue
+++ b/src/views/qyp-project-management/index.vue
@@ -50,12 +50,15 @@
</el-form-item>
</div>
<el-form-item style="text-align: right;">
- <el-button type="primary" style="margin-left: 10px;margin-bottom: 8px;" v-if='filterBtnById("150102")' @click="addProduct">新 增</el-button>
+ <!-- v-if='filterBtnById("150102")' -->
<el-button type="primary" style="margin-left: 10px;margin-bottom: 8px;" @click="onSearch">查 询</el-button>
</el-form-item>
</el-form>
</div>
<div class="table_box">
+ <div style="margin-left: 10px;text-align: right;">
+ <el-button type="primary" size="small" @click="addProduct">新增项目</el-button>
+ </div>
<Etable
hasIndex
httpUrl="projectList"
@@ -64,14 +67,51 @@
@getDataList="getDataList"
:exportUrl="{
url: '/qyp/project/export',
- powerId: '150103',
+ powerId: '',
name: '项目列表',
}"
></Etable>
</div>
- <el-dialog top="8vh" title="新增商品" :visible.sync="addProd" width="60%">
- <!-- 新增商品名称 -->
-
+ <el-dialog top="2vh" :title="title" :visible.sync="addProd" width="60%">
+ <!-- 新增商品名称 -->
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" size="small" label-width="100px" class="demo-ruleForm">
+ <el-form-item label="项目名称" prop="projName">
+ <el-input v-model="ruleForm.projName" :disabled="disabled" :maxlength="50"></el-input>
+ </el-form-item>
+ <el-form-item label="项目价格" prop="projPrice">
+ <el-input v-model="ruleForm.projPrice" :disabled="disabled" :maxlength="10"></el-input>
+ </el-form-item>
+ <el-form-item label="项目链接" prop="projUrl">
+ <el-input v-model="ruleForm.projUrl" :disabled="disabled" :maxlength="150"></el-input>
+ </el-form-item>
+ <el-form-item label="项目描述" prop="projDesc">
+ <el-input type="textarea" v-model="ruleForm.projDesc" :disabled="disabled"></el-input>
+ </el-form-item>
+ <el-form-item label="项目状态" prop="status">
+ <el-radio-group v-model="ruleForm.status" :disabled="disabled">
+ <el-radio v-for="item in relustObj.statusList" :key="item.code" :label="item.code">{{ item.name }}</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="项目背景图" v-if="addProd" ref="backFilePath" prop="backFilePath">
+ <uploadImg v-if="addProd" @sendList="imgSet($event,'backFilePath')" :disabled="disabled" :defaultList="ruleForm.backFilePath"></uploadImg>
+ </el-form-item>
+ <el-form-item label="项目logo" ref="logoFilePath" prop="logoFilePath">
+ <uploadImg v-if="addProd" @sendList="imgSet($event,'logoFilePath')" :disabled="disabled" :defaultList="ruleForm.logoFilePath"></uploadImg>
+ </el-form-item>
+ <el-form-item label="平台头图" ref="titleFilePath" prop="titleFilePath">
+ <uploadImg v-if="addProd" @sendList="imgSet($event,'titleFilePath')" :disabled="disabled" :defaultList="ruleForm.titleFilePath"></uploadImg>
+ </el-form-item>
+ <el-form-item label="会员权益" ref="qyFilePath" prop="qyFilePath">
+ <uploadImg v-if="addProd" @sendList="imgSet($event,'qyFilePath')" :disabled="disabled" :defaultList="ruleForm.qyFilePath"></uploadImg>
+ </el-form-item>
+ <el-form-item label="活动规则" ref="ruleFilePath" prop="ruleFilePath">
+ <uploadImg v-if="addProd" @sendList="imgSet($event,'ruleFilePath')" :disabled="disabled" :defaultList="ruleForm.ruleFilePath"></uploadImg>
+ </el-form-item>
+ <el-form-item style="text-align:right;" v-if="!disabled">
+ <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
+ <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
+ </el-form-item>
+ </el-form>
</el-dialog>
</div>
@@ -80,55 +120,49 @@
<script>
import Etable from "../../components/table.vue";
import {projectInit,projectAdd,projectDtl,projectUpdata} from "@/api/credit";
- // import orderDetail from "./orderDetail.vue";
import uploadImg from "@/components/upload.vue";
- import MultipleSelect from "../../components/secect.vue";
- import moment from 'moment';
export default {
name: "order",
- components: { Etable, MultipleSelect, uploadImg },
+ components: { Etable,uploadImg },
data() {
- let validateImage = (rule, value, callback) => { //验证器
- if (!this.payForm.prodListImages.length) { //为true代表图片在 false报错
- callback(new Error('请上传商品展示图片'));
+ let backFilePathImage = (rule, value, callback) => { //验证器
+ if (!this.ruleForm.backFilePath.length) { //为true代表图片在 false报错
+ callback(new Error('请上传项目背景图'));
} else {
callback();
}
};
- let validateImage1 = (rule, value, callback) => { //验证器
- if (!this.payForm.prodImages.length) { //为true代表图片在 false报错
- callback(new Error('请上传商品轮播图'));
+ let logoFilePathImage = (rule, value, callback) => { //验证器
+ if (!this.ruleForm.logoFilePath.length) { //为true代表图片在 false报错
+ callback(new Error('请上传项目logo图'));
} else {
callback();
}
};
- let validateImage2 = (rule, value, callback) => { //验证器
- if (!this.payForm.prodDescImages.length) { //为true代表图片在 false报错
- callback(new Error('请上传商品详情图片'));
+ let titleFilePathImage = (rule, value, callback) => { //验证器
+ if (!this.ruleForm.titleFilePath.length) { //为true代表图片在 false报错
+ callback(new Error('请上传平台头图'));
+ } else {
+ callback();
+ }
+ };
+ let qyFilePathImage = (rule, value, callback) => { //验证器
+ if (!this.ruleForm.qyFilePath.length) { //为true代表图片在 false报错
+ callback(new Error('请上传会员权益图'));
+ } else {
+ callback();
+ }
+ };
+ let ruleFilePathImage = (rule, value, callback) => { //验证器
+ if (!this.ruleForm.ruleFilePath.length) { //为true代表图片在 false报错
+ callback(new Error('请上传会员权益图'));
} else {
callback();
}
};
return {
- disabled: true,
- payForm: {
- prodImages: [],
- prodListImages:[],
- prodDescImages:"",
- },
- licensePaths: [],
- prodListImages:[],
- prodDescImages:[],
- payFormRule: {
- prodListImage:[{ required: true, trigger: "change",validator: validateImage}],
- prodImages:[{ required: true, trigger: "change",validator: validateImage1}],
- prodDescImages:[{ required: true, trigger: "change",validator: validateImage2}],
- desc: [{ required: true, message: "请输入商品简介", trigger: "blur" }],
- status:[{ required: true, message: "请选择上架状态", trigger: "change" }]
- },
- formInline: {
- status:"all",
- },
+ disabled: false,
+ formInline: {status:"all"},
searchData: {},
columns: [
{
@@ -146,8 +180,7 @@
{
lable: "项目链接",
prop: "projUrl",
- align: "center",
- width: "200",
+ align: "center"
},
{
lable: "创建时间",
@@ -172,54 +205,124 @@
{
lable: "操作",
align: "center",
- width: "180",
+ width: "200",
fixed: "right",
render: (h, scope) => {
return h("div", [
h(
- "span",
+ "el-button",
{
+ props:{
+ type:'text'
+ },
style: {
- cursor: "pointer",
- color: "#3C8EFE",
- display: this.filterBtnById(150101)
- ? "inline-block"
- : "none",
+ // display: this.filterBtnById(150101)
+ // ? "inline-block"
+ // : "none",
},
on: {
click: () => {
-
+ this.title = '项目详情';
+ this.disabled = true;
+ let {projId} = scope.row;
+ this.getProductDetail(projId);
},
},
},
"查看详情"
),
h(
- "span",
+ "el-button",
{
+ props:{
+ type:'text'
+ },
style: {
- cursor: "pointer",
- "margin-left": "8px",
- color: "#3C8EFE",
- display: this.filterBtnById(150104)
- ? "inline-block"
- : "none",
+ "margin-left": "15px",
+ // display: this.filterBtnById(150104)
+ // ? "inline-block"
+ // : "none",
},
on: {
click: () => {
-
+ this.title = '编辑项目';
+ this.disabled = false;
+ let {projId} = scope.row;
+ this.getProductDetail(projId);
},
},
},
"编辑"
- ),
+ )
]);
},
},
],
relustObj: {},
addProd:false,
- createdTime:[]
+ createdTime:[],
+ ruleForm:{
+ backFilePath:[],
+ logoFilePath:[],
+ titleFilePath:[],
+ qyFilePath:[],
+ ruleFilePath:[]
+ },
+ rules: {
+ projName: [
+ { required: true, message: '请输入项目名称', trigger: 'blur' }
+ ],
+ projPrice: [
+ { required: true, message: '请输入项目价格', trigger: 'blur' }
+ ],
+ projUrl: [
+ { required: true, message: '请输入项目链接', trigger: 'blur' }
+ ],
+ projDesc: [
+ { required: true, message: '请输入项目描述', trigger: 'blur' }
+ ],
+ status: [
+ { required: true, message: '请选择项目状态', trigger: 'change' }
+ ],
+ backFilePath: [
+ { required: true,trigger: 'change',validator: backFilePathImage }
+ ],
+ logoFilePath: [
+ { required: true, trigger: 'change',validator: logoFilePathImage }
+ ],
+ titleFilePath: [
+ { required: true, trigger: 'change',validator: titleFilePathImage }
+ ],
+ qyFilePath: [
+ { required: true, trigger: 'change' ,validator: qyFilePathImage }
+ ],
+ ruleFilePath: [
+ { required: true, trigger: 'change',validator: ruleFilePathImage }
+ ]
+ },
+ title:"新增项目"
+ }
+ },
+ watch:{
+ addProd:{
+ handler: function(val) {
+ if(!val){
+ this.ruleForm = {
+ projName:"",
+ projPrice:"",
+ projUrl:"",
+ projDesc:"",
+ status:"",
+ backFilePath:[],
+ logoFilePath:[],
+ titleFilePath:[],
+ qyFilePath:[],
+ ruleFilePath:[]
+ };
+ this.$refs['ruleForm'].resetFields();
+ }
+ },
+ deep: true
}
},
//生命周期 - 创建完成(可以访问当前this实例)
@@ -248,7 +351,9 @@
this.addProd = false;
},
addProduct(){
- this.disabled = false;
+ this.title = '新增项目';
+ this.addProd = true;
+ this.disabled = false;
},
onSearch() {
if (this.createdTime && this.createdTime.length) {
@@ -284,19 +389,59 @@
},
getDataList(e) {
},
- // prodDescSend(e){
- // //文件上传
- // this.payForm.prodDescImages = e.map((res) => {
- // return res.filePath;
- // });
- // this.$refs.prodDescImagesIplaod.clearValidate();
- // },
- // productShowUSend(e){
- // this.payForm.prodListImages = e.map((res) => {
- // return res.filePath;
- // });
- // this.$refs.productShowUpload.clearValidate();
- // },
+ submitForm(formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ let {backFilePath,logoFilePath,titleFilePath,qyFilePath,ruleFilePath,projId} = this.ruleForm;
+ let method = {projectUpdata,projectAdd};
+ let data = {};
+ if(projId){
+ data = {...this.ruleForm,backFilePath:backFilePath[0],logoFilePath:logoFilePath[0],titleFilePath:titleFilePath[0],qyFilePath:qyFilePath[0],ruleFilePath:ruleFilePath[0]}
+ }else{
+ data = {...this.ruleForm,backFilePath:backFilePath[0],logoFilePath:logoFilePath[0],titleFilePath:titleFilePath[0],qyFilePath:qyFilePath[0],ruleFilePath:ruleFilePath[0]}
+ }
+ method[projId?"projectUpdata":"projectAdd"](data).then(res=>{
+ this.$message.success("创建成功");
+ this.addProd = false;
+ this.onSearch();
+ })
+ } else {
+ console.log('error submit!!');
+ return false;
+ }
+ });
+ },
+ resetForm(formName) {
+ this.$refs[formName].resetFields();
+ },
+ imgSet(e,id){
+ let fileRef = id + "";
+ //文件上传
+ this.ruleForm[id] = e.map((res) => {
+ return res.filePath;
+ });
+ this.$refs[fileRef].clearValidate();
+ },
+ getProductDetail(projId,type){
+ projectDtl({projId:projId}).then(({body})=>{
+ let {backFilePath,logoFilePath,titleFilePath,qyFilePath,ruleFilePath} = body;
+ body.backFilePath = this.setDefaultImg(backFilePath,'backFilePath');
+ body.logoFilePath = this.setDefaultImg(logoFilePath,'logoFilePath');
+ body.titleFilePath = this.setDefaultImg(titleFilePath,"titleFilePath");
+ body.qyFilePath = this.setDefaultImg(qyFilePath,"qyFilePath");
+ body.ruleFilePath = this.setDefaultImg(ruleFilePath,"ruleFilePath");
+ this.ruleForm = body;
+ this.$nextTick(()=>{
+ this.addProd = true;
+ });
+ })
+ },
+ setDefaultImg(url,type){
+ let backArr = [url].map((n,index)=>{
+ return {url:n,filePath:n,uid:type+index,fileId:type+index,fileName:n,name:n};
+ });
+ return backArr
+ }
}
};
</script>
diff --git a/src/views/qyp-project-management/promotion.vue b/src/views/qyp-project-management/promotion.vue
index 54113f3..5994076 100644
--- a/src/views/qyp-project-management/promotion.vue
+++ b/src/views/qyp-project-management/promotion.vue
@@ -80,12 +80,14 @@
</div>
</div>
<el-form-item style="text-align: right;">
- <el-button type="primary" style="margin-left: 10px;margin-bottom: 8px;" v-if='filterBtnById("150102")' @click="addProduct">新 增</el-button>
<el-button type="primary" style="margin-left: 10px;margin-bottom: 8px;" @click="onSearch">查 询</el-button>
</el-form-item>
</el-form>
</div>
<div class="table_box">
+ <div style="margin-left: 10px;text-align: right;">
+ <el-button type="primary" size="small" @click="addPromotion">新增推广位</el-button>
+ </div>
<Etable
hasIndex
httpUrl="promoteList"
@@ -99,10 +101,41 @@
}"
></Etable>
</div>
- <el-dialog top="8vh" title="新增商品" :visible.sync="addProd" width="60%">
+ <el-dialog top="2vh" :title="title" :visible.sync="addProd" width="50%">
<!-- 新增商品名称 -->
-
-
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" :disabled="disabled" size="small" label-width="100px" class="demo-ruleForm">
+ <el-form-item label="项目" prop="projId">
+ <el-select v-model="ruleForm.projId" placeholder="请选择项目">
+ <el-option
+ v-for="item in relustObj.projList"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="代理名称" prop="agencyName">
+ <el-input v-model="ruleForm.agencyName" :disabled="disabled"></el-input>
+ </el-form-item>
+ <el-form-item label="推广位名称" prop="promName">
+ <el-input v-model="ruleForm.promName"></el-input>
+ </el-form-item>
+ <el-form-item label="推广位姓名" prop="promoterName">
+ <el-input v-model="ruleForm.promoterName"></el-input>
+ </el-form-item>
+ <el-form-item label="推广位电话" prop="promoterMblNo">
+ <el-input v-model="ruleForm.promoterMblNo"></el-input>
+ </el-form-item>
+ <el-form-item label="推广位状态" prop="status">
+ <el-radio-group v-model="ruleForm.status" :disabled="disabled">
+ <el-radio v-for="item in relustObj.statusList" :key="item.code" :label="item.code">{{ item.name }}</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item style="text-align:right;" v-if="!disabled">
+ <el-button type="primary" @click="submitForm('ruleForm')">保 存</el-button>
+ <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
+ </el-form-item>
+ </el-form>
</el-dialog>
</div>
</template>
@@ -111,39 +144,14 @@
import Etable from "@/components/table.vue";
import {promoteInit,promoteAdd,promoteDtl,promotePpdate} from "@/api/credit";
import uploadImg from "@/components/upload.vue";
- import MultipleSelect from "@/components/secect.vue";
+ import MultipleSelect from "@/components/fl-select.vue";
export default {
name: "order",
components: { Etable, MultipleSelect, uploadImg },
data() {
- let validateImage = (rule, value, callback) => { //验证器
- if (!this.payForm.prodListImages.length) { //为true代表图片在 false报错
- callback(new Error('请上传商品展示图片'));
- } else {
- callback();
- }
- };
- let validateImage1 = (rule, value, callback) => { //验证器
- if (!this.payForm.prodImages.length) { //为true代表图片在 false报错
- callback(new Error('请上传商品轮播图'));
- } else {
- callback();
- }
- };
- let validateImage2 = (rule, value, callback) => { //验证器
- if (!this.payForm.prodDescImages.length) { //为true代表图片在 false报错
- callback(new Error('请上传商品详情图片'));
- } else {
- callback();
- }
- };
return {
- disabled: true,
- payForm: {
- prodImages: [],
- prodListImages:[],
- prodDescImages:"",
- },
+ disabled: false,
+ ruleForm: {},
columns: [
{
lable: "推广位链接",
@@ -204,37 +212,46 @@
render: (h, scope) => {
return h("div", [
h(
- "span",
+ "el-button",
{
+ props:{
+ type:'text',
+ size:'small'
+ },
style: {
- cursor: "pointer",
- color: "#3C8EFE",
- display: this.filterBtnById(150101)
- ? "inline-block"
- : "none",
+ // display: this.filterBtnById(150101)
+ // ? "inline-block"
+ // : "none",
},
on: {
click: () => {
-
+ this.title ='推广位详情';
+ this.disabled =true;
+ let { promId } = scope.row;
+ this.getProductDetail(promId)
},
},
},
"查看详情"
),
h(
- "span",
+ "el-button",
{
+ props:{
+ type:'text',
+ size:'small'
+ },
style: {
- cursor: "pointer",
- "margin-left": "8px",
- color: "#3C8EFE",
- display: this.filterBtnById(150104)
- ? "inline-block"
- : "none",
+ // display: this.filterBtnById(150101)
+ // ? "inline-block"
+ // : "none",
},
on: {
click: () => {
-
+ this.disabled = false;
+ this.title ='编辑推广位';
+ let { promId } = scope.row;
+ this.getProductDetail(promId)
},
},
},
@@ -244,25 +261,40 @@
},
},
],
- licensePaths: [],
- prodListImages:[],
- prodDescImages:[],
- payFormRule: {
- prodListImage:[{ required: true, trigger: "change",validator: validateImage}],
- prodImages:[{ required: true, trigger: "change",validator: validateImage1}],
- prodDescImages:[{ required: true, trigger: "change",validator: validateImage2}],
- desc: [{ required: true, message: "请输入商品简介", trigger: "blur" }],
+ rules: {
+ projId:[{ required: true, trigger: "change",message: "请选择项目"}],
+ agencyName:[{ required: true, trigger: "blur",message: "请输入代理名称"}],
+ promName:[{ required: true, trigger: "blur",message: "请输入推广位名称"}],
+ promoterName:[{ required: true, trigger: "blur",message: "请输入推广位姓名"}],
+ promoterMblNo:[{ required: true, trigger: "blur",message: "请输入推广位电话"}],
status:[{ required: true, message: "请选择上架状态", trigger: "change" }]
},
formInline: {
status:"all",
},
searchData: {},
-
relustObj: {},
addProd:false,
createdTime:[],
- promotionCreatedTime:[]
+ promotionCreatedTime:[],
+ title:'新增推广位'
+ }
+ },
+ watch:{
+ addProd:{
+ handler: function(val) {
+ if(!val){
+ this.ruleForm = {
+ agencyName:"",
+ promName:"",
+ promoterName:"",
+ promoterMblNo:"",
+ status:""
+ };
+ this.$refs['ruleForm'].resetFields();
+ }
+ },
+ deep: true
}
},
//生命周期 - 创建完成(可以访问当前this实例)
@@ -274,14 +306,14 @@
//只能输入整数
e.target.value = e.target.value.replace(/[^\d]/g, "");
},
- addPDH(){
- this.$refs['skuObj'].validate((valid) => {
+ submitForm(){
+ this.$refs['ruleForm'].validate((valid) => {
if(valid){
- let {productAttr,prodName,prodFundType,prodOsType} = this.skuObj;
- let data = {prodName,prodFundType,prodOsType,prodBrandCode:productAttr[1].value,prodModelCode:productAttr[2].value,prodType:productAttr[0].value};
- prodAdd(data).then((res)=>{
+ let { promId } = this.ruleForm;
+ let event = {promoteAdd,promotePpdate};
+ event[promId?"promotePpdate":"promoteAdd"](this.ruleForm).then((res)=>{
this.addProd = false;
- this.initSerch();
+ this.onSearch();
})
}
})
@@ -290,7 +322,9 @@
this.$refs["skuObj"].resetFields();
this.addProd = false;
},
- addProduct(){
+ addPromotion(){
+ this.addProd = true;
+ this.title='新增推广位';
this.disabled = false;
},
onSearch() {
@@ -334,19 +368,14 @@
},
getDataList(e) {
},
- // prodDescSend(e){
- // //文件上传
- // this.payForm.prodDescImages = e.map((res) => {
- // return res.filePath;
- // });
- // this.$refs.prodDescImagesIplaod.clearValidate();
- // },
- // productShowUSend(e){
- // this.payForm.prodListImages = e.map((res) => {
- // return res.filePath;
- // });
- // this.$refs.productShowUpload.clearValidate();
- // },
+ getProductDetail(promId,type){
+ promoteDtl({promId:promId}).then(({body})=>{
+ this.ruleForm = body;
+ this.$nextTick(()=>{
+ this.addProd = true;
+ });
+ })
+ },
}
};
</script>
diff --git a/src/views/qyp-project-order/admin.vue b/src/views/qyp-project-order/admin.vue
index 85de38c..8ae691e 100644
--- a/src/views/qyp-project-order/admin.vue
+++ b/src/views/qyp-project-order/admin.vue
@@ -1,28 +1,334 @@
<template>
- <div>
+ <div class="main_index">
+ <div class="search_from">
+ <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.orderId"
+ style="width: 240px"
+ @keyup.native="keyupEvent($event)"
+ type="tel"
+ clearable
+ placeholder="请输入"
+ ></el-input>
+ </el-form-item>
+ <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>
+ <el-form-item label="推广位:">
+ <el-select
+ v-model="formInline.promId"
+ style="width:240px"
+ clearable
+ placeholder="请选择"
+ >
+ <el-option label="全部" value="all"></el-option>
+ <el-option
+ v-for="item in relustObj.promoteList"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="订单状态:">
+ <el-select
+ v-model="formInline.orderStatus"
+ style="width:240px"
+ clearable
+ placeholder="请选择"
+ >
+ <el-option label="全部" value="all"></el-option>
+ <el-option
+ v-for="item in relustObj.orderStatusList"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="代理名称:">
+ <el-select
+ v-model="formInline.agencyName"
+ style="width:240px"
+ clearable
+ placeholder="请选择"
+ >
+ <el-option label="全部" value="all"></el-option>
+ <el-option
+ v-for="item in relustObj.agencyList"
+ :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>
+ </div>
+ <div class="table_box">
+ <div style="margin-left: 10px;text-align: right;">
+ <el-button type="primary" size="small" @click="addProduct">导出excel</el-button>
+ </div>
+ <Etable
+ hasIndex
+ hasSelection
+ rowKey="orderId"
+ httpUrl="orderList"
+ :columns="columns"
+ :searchData="searchData"
+ @getDataList="getDataList"
+ @handleSelectionChange="handleSelectionChange"
+ :exportUrl="{
+ url: '/qyp/order/orderExport',
+ powerId: '',
+ name: '订单列表',
+ }"
+ ></Etable>
+ </div>
+ <el-dialog top="2vh" :title="title" :visible.sync="addProd" width="60%">
+ <el-descriptions>
+ <el-descriptions-item label="订单编号">{{ orderDetail.orderId }}</el-descriptions-item>
+ <el-descriptions-item label="订单创建时间">{{ orderDetail.creTime }}</el-descriptions-item>
+ <el-descriptions-item label="订单状态">{{ orderDetail.orderStatusStr }}</el-descriptions-item>
+ <el-descriptions-item label="电话号码">{{ orderDetail.mblNo }}</el-descriptions-item>
+ <el-descriptions-item label="代理名称">{{ orderDetail.agencyName }}</el-descriptions-item>
+ <el-descriptions-item label="推广位名称">{{ orderDetail.promName }}</el-descriptions-item>
+ <el-descriptions-item label="签约时间">{{ orderDetail.signTime }}</el-descriptions-item>
+ <el-descriptions-item label="解约时间">{{ orderDetail.terminateTime }}</el-descriptions-item>
+ <el-descriptions-item label="项目名称">{{ orderDetail.projName }}</el-descriptions-item>
+ </el-descriptions>
+ </el-dialog>
</div>
-</template>
-
-<script>
-export default {
+ </template>
+
+ <script>
+ import Etable from "../../components/table.vue";
+ import {orderInit,orderDtl} from "@/api/credit";
+ import uploadImg from "@/components/upload.vue";
+ export default {
+ name: "order",
+ components: { Etable,uploadImg },
data() {
- return {
-
- };
+ return {
+ formInline: {status:"all"},
+ searchData: {},
+ columns: [
+ {
+ lable: "订单编号",
+ prop: "orderId",
+ align: "center",
+ width: "300",
+ },
+ {
+ lable: "签约时间",
+ prop: "signTime",
+ align: "center",
+ width: "180",
+ },
+ {
+ lable: "订单状态",
+ prop: "orderStatusStr",
+ align: "center"
+ },
+ {
+ lable: "电话号码",
+ prop: "mblNo",
+ align: "center",
+ width: "150",
+ },
+ {
+ lable: "代理名称",
+ prop: "agencyName",
+ align: "center",
+ width: "180",
+ },
+ {
+ lable: "推广位名称",
+ prop: "promName",
+ align: "center",
+ width: "180"
+ },
+ {
+ lable: "支付金额",
+ prop: "payAmt",
+ align: "center",
+ width: "180"
+ },
+ {
+ lable: "支付方式",
+ prop: "payType",
+ align: "center",
+ width: "180"
+ },
+ {
+ lable: "是否使用优惠券",
+ prop: "useCoup",
+ align: "center",
+ width: "180"
+ },
+ {
+ lable: "",
+ },
+ {
+ lable: "操作",
+ align: "center",
+ width: "200",
+ 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.title = '订单详情';
+ let {orderId} = scope.row;
+ this.getProductDetail(orderId);
+ },
+ },
+ },
+ "查看详情"
+ )
+ ]);
+ },
+ },
+ ],
+ relustObj: {},
+ addProd:false,
+ createdTime:[],
+ title:"新增项目",
+ orderDetail:{},
+ exportExcelList:[]
+ }
},
+ watch:{
+ addProd:{
+ handler: function(val) {
+ if(!val){
+ }
+ },
+ deep: true
+ }
+ },
+ //生命周期 - 创建完成(可以访问当前this实例)
created() {
-
- },
- mounted() {
-
+ this.initSerch();
},
methods: {
-
+ addProduct(){
+ if(!this.exportExcelList.length){
+ return this.$message.error("请选择订单后导出");
+ }
+ },
+ keyupEvent(e) {
+ //只能输入整数
+ e.target.value = e.target.value.replace(/[^\d]/g, "");
+ },
+ onSearch() {
+ if (this.createdTime && this.createdTime.length) {
+ this.formInline.signStartTime = this.createdTime[0];
+ this.formInline.signEndTime = this.createdTime[1];
+ } else {
+ this.formInline.signStartTime = null;
+ this.formInline.signEndTime = null;
+ }
+ let objForm = JSON.parse(JSON.stringify(this.formInline));
+ for (let key in objForm) {
+ if (objForm[key] === "all") {
+ delete objForm[key];
+ }
+ }
+ this.searchData = { ...objForm };
+ },
+ initSerch() {
+ orderInit().then(({ body }) => {
+ this.relustObj = body;
+ });
+ },
+ getDataList(e) {
+ },
+ handleSelectionChange(list){
+ this.exportExcelList = list;
+ },
+ getProductDetail(orderId){
+ orderDtl({orderId:orderId}).then(({body})=>{
+ this.orderDetail = body;
+ this.addProd = true;
+ })
+ }
}
-};
-</script>
-
-<style scoped lang="less">
-
-</style>
+ };
+ </script>
+
+ <style scoped lang="scss">
+ .main_index {
+ background-color: #f0f2f5;
+ .table_box_num {
+ margin-top: 5px;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ color: #666;
+ font-size: 14px;
+ font-weight: bold;
+ padding-right: 16px;
+ box-sizing: border-box;
+ span {
+ display: inline-block;
+ &:nth-child(even) {
+ margin-right: 20px;
+ color: #333;
+ }
+ }
+ }
+ .el-form-div {
+ width: 100%;
+ display: flex;
+ }
+ .tips{
+ color: #f56c6c;
+ }
+ }
+ </style>
+
\ No newline at end of file
diff --git a/src/views/qyp-project-order/history.vue b/src/views/qyp-project-order/history.vue
index 3d99a85..bbe31b8 100644
--- a/src/views/qyp-project-order/history.vue
+++ b/src/views/qyp-project-order/history.vue
@@ -1,8 +1,9 @@
+
<!--
* @Author: zhaoxiaoqiang 287285524@qq.com
* @Date: 2023-08-24 15:16:23
* @LastEditors: zhaoxiaoqiang 287285524@qq.com
- * @LastEditTime: 2023-08-24 16:57:47
+ * @LastEditTime: 2023-08-31 08:58:17
* @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
-->
diff --git a/src/views/qyp-project-order/index.vue b/src/views/qyp-project-order/index.vue
index 85de38c..0a2c42f 100644
--- a/src/views/qyp-project-order/index.vue
+++ b/src/views/qyp-project-order/index.vue
@@ -1,28 +1,300 @@
<template>
- <div>
-
+ <div class="main_index">
+ <div class="search_from">
+ <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.orderId"
+ style="width: 240px"
+ @keyup.native="keyupEvent($event)"
+ type="tel"
+ clearable
+ placeholder="请输入"
+ ></el-input>
+ </el-form-item>
+ <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>
+ <el-form-item label="推广位:">
+ <el-select
+ v-model="formInline.promId"
+ style="width:240px"
+ clearable
+ placeholder="请选择"
+ >
+ <el-option label="全部" value="all"></el-option>
+ <el-option
+ v-for="item in relustObj.promoteList"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="订单状态:">
+ <el-select
+ v-model="formInline.orderStatus"
+ style="width:240px"
+ clearable
+ placeholder="请选择"
+ >
+ <el-option label="全部" value="all"></el-option>
+ <el-option
+ v-for="item in relustObj.orderStatusList"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ </div>
+ <el-form-item style="text-align: right;">
+ <!-- v-if='filterBtnById("150102")' -->
+ <el-button type="primary" style="margin-left: 10px;margin-bottom: 8px;" @click="onSearch">查 询</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="table_box">
+ <div style="margin-left: 10px;text-align: right;">
+ <el-button type="primary" size="small" @click="addProduct">导出excel</el-button>
+ </div>
+ <Etable
+ hasIndex
+ hasSelection
+ rowKey="orderId"
+ httpUrl="orderList"
+ :columns="columns"
+ :searchData="searchData"
+ @getDataList="getDataList"
+ @handleSelectionChange="handleSelectionChange"
+ :exportUrl="{
+ url: '/qyp/order/orderExport',
+ powerId: '',
+ name: '订单列表',
+ }"
+ ></Etable>
+ </div>
+ <el-dialog top="2vh" :title="title" :visible.sync="addProd" width="60%">
+ <el-descriptions>
+ <el-descriptions-item label="订单编号">{{ orderDetail.orderId }}</el-descriptions-item>
+ <el-descriptions-item label="订单创建时间">{{ orderDetail.creTime }}</el-descriptions-item>
+ <el-descriptions-item label="订单状态">{{ orderDetail.orderStatusStr }}</el-descriptions-item>
+ <el-descriptions-item label="电话号码">{{ orderDetail.mblNo }}</el-descriptions-item>
+ <el-descriptions-item label="代理名称">{{ orderDetail.agencyName }}</el-descriptions-item>
+ <el-descriptions-item label="推广位名称">{{ orderDetail.promName }}</el-descriptions-item>
+ <el-descriptions-item label="签约时间">{{ orderDetail.signTime }}</el-descriptions-item>
+ <el-descriptions-item label="解约时间">{{ orderDetail.terminateTime }}</el-descriptions-item>
+ <el-descriptions-item label="项目名称">{{ orderDetail.projName }}</el-descriptions-item>
+ </el-descriptions>
+ </el-dialog>
</div>
-</template>
-
-<script>
-export default {
+ </template>
+
+ <script>
+ import Etable from "../../components/table.vue";
+ import {orderInit,orderDtl} from "@/api/credit";
+ import uploadImg from "@/components/upload.vue";
+ export default {
+ name: "order",
+ components: { Etable,uploadImg },
data() {
- return {
-
- };
+ return {
+ formInline: {status:"all"},
+ searchData: {},
+ columns: [
+ {
+ lable: "订单编号",
+ prop: "orderId",
+ align: "center",
+ width: "300",
+ },
+ {
+ lable: "签约时间",
+ prop: "signTime",
+ align: "center",
+ width: "180",
+ },
+ {
+ lable: "订单状态",
+ prop: "orderStatusStr",
+ align: "center"
+ },
+ {
+ lable: "电话号码",
+ prop: "mblNo",
+ align: "center",
+ width: "150",
+ },
+ {
+ lable: "代理名称",
+ prop: "agencyName",
+ align: "center",
+ width: "180",
+ },
+ {
+ lable: "推广位名称",
+ prop: "promName",
+ align: "center",
+ width: "180"
+ },
+ {
+ lable: "",
+ },
+ {
+ lable: "操作",
+ align: "center",
+ width: "200",
+ 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.title = '订单详情';
+ let {orderId} = scope.row;
+ this.getProductDetail(orderId);
+ },
+ },
+ },
+ "查看详情"
+ )
+ ]);
+ },
+ },
+ ],
+ relustObj: {},
+ addProd:false,
+ createdTime:[],
+ title:"新增项目",
+ orderDetail:{},
+ exportExcelList:[]
+ }
},
+ watch:{
+ addProd:{
+ handler: function(val) {
+ if(!val){
+ }
+ },
+ deep: true
+ }
+ },
+ //生命周期 - 创建完成(可以访问当前this实例)
created() {
-
- },
- mounted() {
-
+ this.initSerch();
},
methods: {
-
+ addProduct(){
+ if(!this.exportExcelList.length){
+ return this.$message.error("请选择订单后导出");
+ }
+ },
+ keyupEvent(e) {
+ //只能输入整数
+ e.target.value = e.target.value.replace(/[^\d]/g, "");
+ },
+ onSearch() {
+ if (this.createdTime && this.createdTime.length) {
+ this.formInline.signStartTime = this.createdTime[0];
+ this.formInline.signEndTime = this.createdTime[1];
+ } else {
+ this.formInline.signStartTime = null;
+ this.formInline.signEndTime = null;
+ }
+ let objForm = JSON.parse(JSON.stringify(this.formInline));
+ for (let key in objForm) {
+ if (objForm[key] === "all") {
+ delete objForm[key];
+ }
+ }
+ this.searchData = { ...objForm };
+ },
+ initSerch() {
+ orderInit().then(({ body }) => {
+ this.relustObj = body;
+ });
+ },
+ getDataList(e) {
+ },
+ handleSelectionChange(list){
+ this.exportExcelList = list;
+ },
+ getProductDetail(orderId){
+ orderDtl({orderId:orderId}).then(({body})=>{
+ this.orderDetail = body;
+ this.addProd = true;
+ })
+ }
}
-};
-</script>
-
-<style scoped lang="less">
-
-</style>
+ };
+ </script>
+
+ <style scoped lang="scss">
+ .main_index {
+ background-color: #f0f2f5;
+ .table_box_num {
+ margin-top: 5px;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ color: #666;
+ font-size: 14px;
+ font-weight: bold;
+ padding-right: 16px;
+ box-sizing: border-box;
+ span {
+ display: inline-block;
+ &:nth-child(even) {
+ margin-right: 20px;
+ color: #333;
+ }
+ }
+ }
+ .el-form-div {
+ width: 100%;
+ display: flex;
+ }
+ .tips{
+ color: #f56c6c;
+ }
+ }
+ </style>
+
\ No newline at end of file
--
Gitblit v1.8.0