This commit is contained in:
pikachu1995@126.com
2024-01-22 15:24:41 +08:00
385 changed files with 241037 additions and 565 deletions

View File

@@ -1,33 +1,25 @@
import plugins from "./plugins";
import toobar from "./toolbar";
import { upLoadFile } from "@/api/common";
const localCDN = window.location.origin + "/tinymce"; //本地引入
export const initEditor = {
base_url: localCDN,
height: "400px",
language: "zh_CN",
language: "zh-Hans",
menubar: "file edit view format table", // 菜单:指定应该出现哪些菜单
toolbar: toobar, // 分组工具栏控件
plugins: plugins, // 插件(比如: advlist | link | image | preview等)
plugins:plugins, // 插件(比如: advlist | link | image | preview等)
object_resizing: false, // 是否禁用表格图片大小调整
end_container_on_empty_block: true, // enter键 分块
powerpaste_word_import: "merge", // 是否保留word粘贴样式 clean | merge
advlist_bullet_styles: "square", // 无序列表 有序列表
maxSize: "2097152", // 设置图片大小
accept: "image/jpeg, image/png", // 设置图片上传规则
images_upload_handler: async function (blobInfo, success, failure) {
const formData = new FormData();
formData.append("file", blobInfo.blob());
try {
const res = await upLoadFile(formData);
if (res.result) {
success(res.result)
} else {
failure("上传文件有误请稍后重试");
}
} catch (e) {
failure('上传出错')
}
},
paste_data_images:false,
browser_spellcheck: true, // 拼写检查
branding: false, // 去水印
elementpath: false, // 禁用编辑器底部的状态栏
statusbar: false, // 隐藏编辑器底部的状态栏
// init_instance_callback: function (editor) {
// var freeTiny = document.querySelector(".tox .tox-notification--in .tox-notification .tox-notification--warning .tox .tox-notification--warning .tox-notifications-container");
// freeTiny.style.display = "none";
@@ -51,7 +43,4 @@ export const initEditor = {
ul,ol{ list-style-position:inside; }
`, // 设置样式
statusbar: false, // 隐藏编辑器底部的状态栏
elementpath: false, // 禁用编辑器底部的状态栏
paste_data_images: true, // 允许粘贴图像
};

View File

@@ -0,0 +1,129 @@
<template>
<div>
<!-- 使用 fullscreen 类来控制是否全屏显示 -->
<div :class="{ fullscreen: fullscreen }" class="tinymce-container">
<!-- 使用 tinymce-textarea 类作为编辑器的文本区域 -->
<uploadImage @callback="insertImage" />
<textarea :id="tinymceId" class="tinymce-textarea" />
</div>
</div>
</template>
<script>
import { initEditor } from "@/components/editor/config";
import uploadImage from "@/components/editor/upload-image.vue";
export default {
components:{uploadImage},
name: "Tinymce",
props: {
value: {
type: String,
default: "",
},
height:{
type:String,
default:'500px'
}
},
data() {
return {
// 引入编辑器的配置
initEditor,
hasChange: false, // 标记内容是否有更改
hasInit: false, // 标记编辑器是否已初始化
tinymceId:
"tinymce-" + +new Date() + ((Math.random() * 1000).toFixed(0) + ""), // 生成唯一的编辑器 ID
fullscreen: false, // 标记编辑器是否处于全屏模式
toolbar: [], // 工具栏配置
content: "", // 编辑器内容
};
},
created() {
this.init();
},
watch: {
value: {
handler(val) {
if (!this.hasChange && this.hasInit) {
// 当内容有更改且编辑器已初始化时,更新编辑器的内容
this.$nextTick(() =>
window.tinymce.get(this.tinymceId).setContent(val || "")
);
}
},
deep: true,
},
},
methods: {
// 数据返回并给富文本框插入图片
insertImage(arr){
arr.forEach(v => window.tinymce.get(this.tinymceId).insertContent(`<img src="${v}" >`))
},
init() {
// 初始化编辑器
this.initTinymce();
},
initTinymce() {
const _this = this;
window.tinymce.init({
selector: `#${this.tinymceId}`,
convert_urls: false,
init_instance_callback: (editor) => {
if (_this.value) {
// 如果有初始值,则设置编辑器的内容为初始值
this.$nextTick(() => editor.setContent(_this.value));
}
_this.hasInit = true;
// 监听编辑器内容的变化
editor.on("NodeChange Change KeyUp SetContent", (event) => {
if (_this.value) {
// 内容发生更改
this.hasChange = true;
}
// 通过 input 事件将编辑器的内容传递给父组件
this.$emit("input", editor.getContent());
});
},
setup(editor) {
// 监听全屏状态变化
editor.on("FullscreenStateChanged", (e) => {
_this.fullscreen = e.state;
});
},
..._this.initEditor,
height:this.height
});
},
setContent(value) {
// 设置编辑器的内容
window.tinymce.get(this.tinymceId).setContent(value);
},
getContent() {
// 获取编辑器的内容
return window.tinymce.get(this.tinymceId).getContent();
},
destroyTinymce() {
const tinymce = window.tinymce.get(this.tinymceId);
if (tinymce) {
// 销毁编辑器实例
tinymce.destroy();
}
},
},
mounted() {
this.init();
},
activated() {
if (window.tinymce) {
this.initTinymce();
}
},
deactivated() {
this.destroyTinymce();
},
destroyed() {
this.destroyTinymce();
},
};
</script>

View File

@@ -1,4 +1,4 @@
const plugins = [
'advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools importcss insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount'
'advlist', 'anchor', 'autolink', 'autosave', 'code', 'codesample', 'directionality', 'emoticons', 'fullscreen', 'image', 'importcss', 'insertdatetime', 'link', 'lists', 'media', 'nonbreaking', 'pagebreak', 'preview', 'save', 'searchreplace', 'table', 'template', 'visualblocks', 'visualchars', 'wordcount'
]
export default plugins

View File

@@ -0,0 +1,213 @@
<template>
<div class="wrapper">
<Button @click="handleClickUploadImage">上传图片</Button>
<Modal v-model="show" width="850" @on-ok="callback" title="上传图片">
<div class="import-oss" @click="importOSS">
从资源库中导入
</div>
<div style="display: flex; flex-wrap: wrap">
<vuedraggable
:animation="200"
:list="images"
>
<div
v-for="(item, __index) in images"
:key="__index"
class="upload-list"
>
<template>
<img alt="image" :src="item.url"/>
<div class="upload-list-cover">
<div>
<Icon
size="30"
type="md-search"
@click.native="$previewImage(item.url)"
></Icon>
<Icon
size="30"
type="md-trash"
@click.native="handleRemoveGoodsPicture(__index)"
></Icon>
</div>
</div>
</template>
</div>
</vuedraggable>
<div class="upload-box">
<Upload
ref="upload"
:action="uploadFileUrl"
:format="['jpg', 'jpeg', 'png']"
:headers="{ ...accessToken }"
:max-size="10240"
:on-exceeded-size="handleMaxSize"
:on-format-error="handleFormatError"
:on-success="handleSuccessGoodsPicture"
:show-upload-list="false"
multiple
type="drag"
>
<div style="width: 148px; height: 148px; line-height: 148px">
<Icon size="20" type="md-add"></Icon>
</div>
</Upload>
</div>
</div>
</Modal>
<Modal width="1000" v-model="showOssManager" @on-ok="confirmUrls">
<OssManage ref="ossManage" @selected="handleCallback" />
</Modal>
</div>
</template>
<script>
import vuedraggable from "vuedraggable";
import { uploadFile } from "@/libs/axios";
import OssManage from "@/views/sys/oss-manage/ossManage.vue";
export default {
name: "upload-image",
components: {
OssManage,
vuedraggable,
},
data() {
return {
show: false, // 是否显示弹窗
uploadFileUrl: uploadFile, // 上传地址
accessToken:"",
showOssManager:false, // 是否显示oss管理弹窗
images:[],
selectedImage:[]
}
},
mounted() {
this.accessToken = {
accessToken: this.getStore("accessToken"),
};
},
methods: {
confirmUrl(){
},
handleClickUploadImage(){
this.show = true
},
// 回调给父级
callback() {
// 先给数据做一下处理 然后将数据传给父级
const formatImages = this.images.map((item) => item.url);
this.$emit('callback',formatImages)
},
// 移除商品图片
handleRemoveGoodsPicture(__index) {
this.images.splice(__index, 1);
},
// 图片大小不正确
handleMaxSize(file) {
this.$Notice.warning({
title: "超过文件大小限制",
desc: "图片大小不能超过10MB",
});
},
// 图片格式不正确
handleFormatError(file) {
this.$Notice.warning({
title: "文件格式不正确",
desc: "文件 " + file.name + " 的格式不正确",
});
},
// sku图片上传成功
handleSuccessGoodsPicture(res, file) {
if (file.response) {
file.url = file.response.result;
this.images.push(file);
}
},
confirmUrls(){
this.selectedImage.length ? this.selectedImage.forEach(element => {
this.images.push({ url: element.url })
}):''
this.showOssManager = false
},
handleCallback(val){
this.selectedImage = val
},
// 从资源库中导入图片
importOSS(){
this.showOssManager = true
this.$refs.ossManage.selectImage = true;
}
}
}
</script>
<style scoped lang="scss">
.import-oss{
margin-bottom: 10px;
text-align: right;
color: $theme_color;
cursor: pointer;
}
.wrapper{
margin: 10px 0;
}
.upload-list {
width: 150px;
height: 150px;
text-align: center;
border: 1px solid transparent;
border-radius: 4px;
display: inline-block;
background: #fff;
position: relative;
margin-right: 4px;
vertical-align: bottom;
}
.upload-box{
margin: 10px 0;
}
.upload-list img {
width: 100%;
height: 100%;
}
.upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
justify-content: space-between;
align-items: center;
flex-direction: column;
}
.upload-list:hover .upload-list-cover {
display: flex;
}
.upload-list-cover div {
margin-top: 50px;
width: 100%;
>i {
width: 50%;
margin-top: 8px;
color: #fff;
font-size: 20px;
cursor: pointer;
}
}
</style>

View File

@@ -38,6 +38,7 @@
type="primary"
@click="
goodsData = [];
goodsParams.pageNumber = 1;
getQueryGoodsList();
"
icon="ios-search"

View File

@@ -57,6 +57,7 @@ export default {
departmentTitle: "", // modal标题
searchKey: "", // 搜索关键词
dataDep: [], // 部门列表
cloneDep: [], // 克隆部门列表
selectDep: [], // 已选部门
departmentId: [] // 部门id
};
@@ -67,27 +68,20 @@ export default {
initDepartment().then(res => {
if (res.success) {
this.dataDep = res.result;
this.cloneDep = JSON.parse(JSON.stringify(this.dataDep));
}
});
},
searchDep() {
// 搜索部门
if (this.searchKey) {
this.depLoading = true;
searchDepartment({title: this.searchKey}).then(res => {
this.depLoading = false;
if (res.success) {
res.result.forEach(function (e) {
if (e.status == -1) {
e.title = "[已禁用] " + e.title;
e.disabled = true;
}
});
this.dataDep = res.result;
}
this.dataDep = this.cloneDep.filter(item => {
return item.title.indexOf(this.searchKey) > -1;
});
} else {
this.initDepartmentData();
this.dataDep = JSON.parse(JSON.stringify(this.cloneDep));
}
},
// 选择回调

View File

@@ -19,24 +19,24 @@
</div>
</Poptip>
</Input>
<Upload
:action="uploadFileUrl"
:headers="accessToken"
:on-success="handleSuccess"
:on-error="handleError"
:format="['jpg','jpeg','png','gif','bmp']"
accept=".jpg, .jpeg, .png, .gif, .bmp"
:max-size="1024"
:on-format-error="handleFormatError"
:on-exceeded-size="handleMaxSize"
:before-upload="beforeUpload"
:show-upload-list="false"
ref="up"
class="upload"
>
<Button :loading="loading" :size="size" :disabled="disabled">上传图片</Button>
</Upload>
<Button @click="handleCLickImg('storeLogo')">选择图片</Button>
<!--<Upload-->
<!--:action="uploadFileUrl"-->
<!--:headers="accessToken"-->
<!--:on-success="handleSuccess"-->
<!--:on-error="handleError"-->
<!--:format="['jpg','jpeg','png','gif','bmp']"-->
<!--accept=".jpg, .jpeg, .png, .gif, .bmp"-->
<!--:max-size="1024"-->
<!--:on-format-error="handleFormatError"-->
<!--:on-exceeded-size="handleMaxSize"-->
<!--:before-upload="beforeUpload"-->
<!--:show-upload-list="false"-->
<!--ref="up"-->
<!--class="upload"-->
<!--&gt;-->
<!--<Button :loading="loading" :size="size" :disabled="disabled">上传图片</Button>-->
<!--</Upload>-->
</div>
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
@@ -45,13 +45,22 @@
<Button @click="viewImage=false">关闭</Button>
</div>
</Modal>
<Modal width="1200px" v-model="picModalFlag">
<ossManage @callback="callbackSelected" ref="ossManage" />
</Modal>
</div>
</template>
<script>
import { uploadFile } from "@/api/index";
import ossManage from "@/views/sys/oss-manage/ossManage";
export default {
name: "uploadPicInput",
components: {
ossManage,
},
props: {
value: String,
size: {
@@ -86,10 +95,26 @@ export default {
currentValue: this.value, // 当前值
loading: false, // 加载状态
viewImage: false, // 预览图片modal
uploadFileUrl: uploadFile // 上传地址
uploadFileUrl: uploadFile, // 上传地址
picModalFlag: false, // 图片选择器
selectedFormBtnName: "", // 点击图片绑定form
picIndex: "", // 存储身份证图片下标,方便赋值
};
},
methods: {
// 选择图片modal
handleCLickImg(val, index) {
this.$refs.ossManage.selectImage = true;
this.picModalFlag = true;
this.selectedFormBtnName = val;
this.picIndex = index;
},
// 图片回显
callbackSelected(val) {
this.picModalFlag = false;
this.currentValue = val.url;
this.picIndex = "";
},
// 初始化
init() {
this.accessToken = {
@@ -125,6 +150,7 @@ export default {
this.loading = false;
if (res.success) {
this.currentValue = res.result;
console.log('this.currentValue', this.currentValue);
this.$emit("input", this.currentValue);
this.$emit("on-change", this.currentValue);
} else {

View File

@@ -3,6 +3,7 @@
<Card>
<Row class="operation">
<Button @click="add" type="primary">添加</Button>
<Button @click="refresh">刷新</Button>
<Button @click="delAll">批量删除</Button>
</Row>
<Table
@@ -284,6 +285,15 @@ export default {
},
});
},
// 刷新
refresh() {
this.loading = true;
setTimeout(() => {
this.getDataList();
this.loading = false;
this.$Message.success("刷新成功");
}, 500);
},
// 全部删除
delAll() {
if (this.selectCount <= 0) {

View File

@@ -214,19 +214,19 @@ export default {
});
} else {
this.skuColumn.push(
{
title: "成本",
key: "cost",
render: (h, params) => {
console.log(params)
return h("priceColorScheme", {props:{value:params.row.cost,color:this.$mainColor}} );
},
},
// {
// title: "成本",
// key: "cost",
// render: (h, params) => {
// console.log(params)
// return h("priceColorScheme", {props:{value:params.row.cost,color:this.$mainColor}} );
// },
// },
{
title: "价格",
key: "price",
render: (h, params) => {v
return h("priceColorScheme", {props:{alue:params.row.price,color:this.$mainColor}} );
render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
},
},{
title: "库存",

View File

@@ -10,6 +10,7 @@
</Form>
<Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button>
<Button @click="refresh">刷新</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="mt_10">
@@ -314,6 +315,15 @@ export default {
delete this.form.id;
this.modalVisible = true;
},
// 刷新
refresh() {
this.loading = true;
setTimeout(() => {
this.getDataList();
this.loading = false;
this.$Message.success("刷新成功");
}, 500);
},
// 编辑
edit(v) {
this.modalType = 1;

View File

@@ -9,8 +9,10 @@
<Form-item label="审核状态" prop="applyStatus">
<Select v-model="searchForm.applyStatus" clearable style="width: 200px">
<Option value="APPLY">申请中</Option>
<Option value="VIA_AUDITING">审核通过(提现成功)</Option>
<Option value="VIA_AUDITING">审核通过</Option>
<Option value="FAIL_AUDITING">审核拒绝</Option>
<Option value="SUCCESS">提现成功</Option>
<Option value="ERROR">提现失败</Option>
</Select>
</Form-item>
<Form-item label="申请时间">

View File

@@ -124,7 +124,7 @@
<Option value="DELIVERED">已发货</Option>
<Option value="COMPLETED">已完成</Option>
<Option value="TAKE">待核验</Option>
<Option value="CANCELLED">取消</Option>
<Option value="CANCELLED">关闭</Option>
</Select>
</Form-item>
<Form-item label="支付状态" prop="payStatus">
@@ -511,7 +511,7 @@
} else if (params.row.orderStatus == "TAKE") {
return h('div', [h('span', {}, '待核验'),]);
} else if (params.row.orderStatus == "CANCELLED") {
return h('div', [h('span', {}, '已取消'),]);
return h('div', [h('span', {}, '已关闭'),]);
}
}
},

View File

@@ -16,7 +16,7 @@
<!-- <Option value="TAKE">待核验</Option>-->
<!-- <Option value="COMPLETE">已完成</Option>-->
<!-- <Option value="WAIT_PINTUAN">待成团</Option>-->
<!-- <Option value="CANCELLED">取消</Option>-->
<!-- <Option value="CANCELLED">关闭</Option>-->
<!-- </Select>-->
<!-- </Form-item>-->
<Form-item label="下单时间">
@@ -127,7 +127,7 @@ export default {
} else if (params.row.orderStatus == "TAKE") {
return h("div", [h("tag", { props: { color: "volcano" } }, "待核验")]);
} else if (params.row.orderStatus == "CANCELLED") {
return h("div", [h("tag", { props: { color: "red" } }, "已取消")]);
return h("div", [h("tag", { props: { color: "red" } }, "已关闭")]);
}
}
},
@@ -191,7 +191,7 @@ export default {
{title: '已付款', value: 'PAID'},
{title: '待核验', value: 'TAKE'},
{title: '已完成', value: 'COMPLETED'},
{title: '已取消', value: 'CANCELLED'},
{title: '已关闭', value: 'CANCELLED'},
],
currentStatus: ''
};

View File

@@ -596,6 +596,11 @@ export default {
key: "num",
minWidth: 80,
},
{
title: "退款数量",
key: "returnGoodsNumber",
minWidth: 80,
},
{
title: "小计",
key: "subTotal",

View File

@@ -66,7 +66,7 @@
<!-- <Option value="DELIVERED">已发货</Option>-->
<!-- <Option value="COMPLETED">已完成</Option>-->
<!-- <Option value="TAKE">待核验</Option>-->
<!-- <Option value="CANCELLED">取消</Option>-->
<!-- <Option value="CANCELLED">关闭</Option>-->
<!-- <Option value="STAY_PICKED_UP">待自提</Option>-->
<!-- </Select>-->
<!-- </Form-item>-->
@@ -289,7 +289,7 @@ export default {
]);
} else if (params.row.orderStatus == "CANCELLED") {
return h("div", [
h("tag", { props: { color: "red" } }, "已取消"),
h("tag", { props: { color: "red" } }, "已关闭"),
]);
}
},
@@ -332,7 +332,7 @@ export default {
{title: '待核验', value: 'TAKE'},
{title: '待自提', value: 'STAY_PICKED_UP'},
{title: '已完成', value: 'COMPLETED'},
{title: '已取消', value: 'CANCELLED'},
{title: '已关闭', value: 'CANCELLED'},
],
currentStatus: ''

View File

@@ -246,9 +246,7 @@ export default {
// 返回查询数据页面
goBack() {
this.$router.push({
path: "/wapList",
});
this.$router.go(-1);
},
// 保存

View File

@@ -111,12 +111,12 @@
/>
</FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor
ref="editor"
openXss
v-model="form.content"
:init="{ ...initEditor,height:'800px' }"
></editor>
<tinymec
ref="editor"
openXss
v-model="form.content"
v-if="modalVisible"
></tinymec>
</FormItem>
<FormItem label="是否展示" prop="openStatus">
<i-switch size="large" v-model="form.openStatus">
@@ -146,12 +146,10 @@ import {
seeArticle,
updateArticleStatus,
} from "@/api/pages";
import Editor from "@tinymce/tinymce-vue";
import { initEditor } from "@/components/editor/config";
import tinymec from "@/components/editor/index.vue";
export default {
components: {
editor: Editor,
tinymec: tinymec,
},
props: {
selected: {
@@ -161,7 +159,6 @@ export default {
},
data() {
return {
initEditor: initEditor,
selectedIndex: 99999, // 已选下标
loading: true, // 表单加载状态
modalType: 0, // 添加或编辑标识

View File

@@ -17,12 +17,12 @@
</FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor
ref="editor"
openXss
v-model="form.article.content"
:init="{ ...initEditor,height:'800px' }"
></editor>
<editor
ref="editor"
openXss
v-model="form.article.content"
v-if="modalVisible"
></editor>
</FormItem>
</Form>
<div slot="footer">
@@ -40,12 +40,12 @@ import {
updatePrivacy,
getPrivacy,
} from "@/api/pages";
import Editor from "@tinymce/tinymce-vue";
import { initEditor } from "@/components/editor/config";
import tinymec from "@/components/editor/index.vue";
export default {
name: "privacy",
components: {
editor: Editor,
editor: tinymec,
},
props: {
selected: {
@@ -55,7 +55,6 @@ export default {
},
data() {
return {
initEditor,
loading: false, // 表单加载状态
modalVisible: false, // 添加或编辑显示
treeDataDefault: [],

View File

@@ -99,16 +99,16 @@
@click="close(row)"
>关闭
</Button>
<Button
class="ml_5"
v-if="
row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'
"
type="error"
size="small"
@click="remove(row)"
>删除
</Button>
<!--<Button-->
<!--class="ml_5"-->
<!--v-if="-->
<!--row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'-->
<!--"-->
<!--type="error"-->
<!--size="small"-->
<!--@click="remove(row)"-->
<!--&gt;删除-->
<!--</Button>-->
<Button
style="margin: 5px"
type="info"
@@ -286,7 +286,7 @@ export default {
slot: "action",
align: "center",
fixed: "right",
width: 150,
width: 250,
},
],
data: [], // 表单数据

View File

@@ -111,13 +111,13 @@
@click="edit(row, 'onlyView')"
>查看
</Button>
<Button
type="error"
size="small"
style="margin-right: 10px"
@click="delAll(row)"
>删除
</Button>
<!--<Button-->
<!--type="error"-->
<!--size="small"-->
<!--style="margin-right: 10px"-->
<!--@click="delAll(row)"-->
<!--&gt;删除-->
<!--</Button>-->
</template>
</Table>
<Row type="flex" justify="end" class="page">

View File

@@ -124,14 +124,14 @@
style="margin-right: 5px"
>关闭</Button
>
<Button
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'"
type="error"
size="small"
@click="close(row.id)"
style="margin-right: 5px"
>删除</Button
>
<!--<Button-->
<!--v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'"-->
<!--type="error"-->
<!--size="small"-->
<!--@click="close(row.id)"-->
<!--style="margin-right: 5px"-->
<!--&gt;删除</Button-->
<!--&gt;-->
</template>
</Table>
<Row type="flex" justify="end" class="mt_10">

View File

@@ -93,14 +93,14 @@
>关闭</Button
>
&nbsp;
<Button
type="error"
size="small"
v-if="row.promotionStatus == 'CLOSE' || row.promotionStatus == 'END'"
ghost
@click="expire(row)"
>删除</Button
>
<!--<Button-->
<!--type="error"-->
<!--size="small"-->
<!--v-if="row.promotionStatus == 'CLOSE' || row.promotionStatus == 'END'"-->
<!--ghost-->
<!--@click="expire(row)"-->
<!--&gt;删除</Button-->
<!--&gt;-->
</template>
</Table>

View File

@@ -241,7 +241,7 @@
<Option value="DELIVERED">已发货</Option>
<Option value="COMPLETED">已完成</Option>
<Option value="TAKE">待核验</Option>
<Option value="CANCELLED">取消</Option>
<Option value="CANCELLED">关闭</Option>
</Select>
</Form-item>
<Form-item label="支付状态" prop="payStatus">
@@ -660,7 +660,7 @@
} else if (params.row.orderStatus == "TAKE") {
return h('div', [h('span', {}, '待核验'),]);
} else if (params.row.orderStatus == "CANCELLED") {
return h('div', [h('span', {}, '已取消'),]);
return h('div', [h('span', {}, '已关闭'),]);
}
}
},

View File

@@ -217,7 +217,7 @@ export default {
UNPAID: "未付款",
PAID: "已付款",
DELIVERED: "已发货",
CANCELLED: "已取消",
CANCELLED: "已关闭",
COMPLETED: "已完成",
TAKE: "已完成",
},

View File

@@ -93,7 +93,7 @@ export default {
UNPAID: "未付款",
PAID: "已付款",
DELIVERED: "已发货",
CANCELLED: "已取消",
CANCELLED: "已关闭",
COMPLETED: "已完成",
TAKE: "已完成",
},

View File

@@ -81,7 +81,7 @@ export default {
UNPAID: "未付款",
PAID: "已付款",
DELIVERED: "已发货",
CANCELLED: "已取消",
CANCELLED: "已关闭",
COMPLETED: "已完成",
TAKE: "已完成",
},

View File

@@ -294,6 +294,7 @@
v-model="groupFormValidate.id"
:data="treeData"
change-on-select
@on-change="treeDataChange"
></Cascader>
</FormItem>
<FormItem label="分组名称" prop="directoryName">
@@ -344,6 +345,7 @@ export default {
groupFormValidate: {
id: [],
level: 0,
directoryName: "",
},
groupRuleValidate: {
@@ -742,7 +744,6 @@ export default {
methods: {
handleContextMenu(val) {
console.log("val", val);
this.selectedGroupData = val;
},
// 编辑分组
@@ -757,7 +758,6 @@ export default {
this.groupFormValidate.level = this.selectedGroupData.level;
this.groupFormValidate.parentId = this.selectedGroupData.parentId;
console.log(this.groupFormValidate);
},
// 删除分组
async handleContextMenuDelete(val) {
@@ -773,6 +773,15 @@ export default {
},
});
},
treeDataChange(value, selectedData) {
if (value && value.length) {
if (value[value.length -1] == '0') {
this.groupFormValidate.level = 0;
} else {
this.groupFormValidate.level = Number(selectedData[selectedData.length -1].level) + 1;
}
}
},
// 保存/修改分组
async submitAddGroup() {
this.$refs["formValidate"].validate(async (valid) => {
@@ -784,8 +793,6 @@ export default {
// params.directoryType = this.selectedGroupData.directoryType
params.parentId = params.id[params.id.length - 1];
// params.type = this.selectedGroupData.type
params.level =
params.parentId == "0" ? 0 : this.selectedGroupData.level + 1;
delete params.id;
res = await addFileDirectory(params);
} else {
@@ -875,14 +882,14 @@ export default {
// 选择分类回调
handleCateChange(data) {
this.selectedGroupData = data[0];
let {value, type} = data[0];
this.list.push({
value,
type,
});
let {value, type, level} = data[0];
this.list.push({value, type, level});
this.searchForm.fileDirectoryId = value;
if (value === "0") {
if (value === "0" || value === 0) {
delete this.searchForm.fileDirectoryId;
this.groupFormValidate.level = 0;
} else {
this.groupFormValidate.level = Number(level) + 1;
}
this.searchForm.userEnums = type;
this.getDataList();
@@ -1061,7 +1068,7 @@ export default {
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
deleteFile({ids: ids}).then((res) => {
deleteFile(ids).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("批量删除文件成功");
@@ -1082,7 +1089,7 @@ export default {
content: "您确认要删除文件 " + v.name + " ?",
loading: true,
onOk: () => {
deleteFile({ids: v.id}).then((res) => {
deleteFile(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("删除文件 " + v.name + " 成功");
@@ -1131,7 +1138,6 @@ export default {
},
// 清除选中状态
clearSelectAll() {
console.log("清除选中状态");
this.$refs.table.selectAll(false);
this.totalSize = "";
},
@@ -1144,6 +1150,7 @@ export default {
size += item.fileSize * 1.0;
});
this.totalSize = ((size * 1.0) / (1024 * 1024)).toFixed(2) + " MB";
this.$emit("selected", e)
},
},
mounted() {