Commit 88f73eab authored by zenglun's avatar zenglun

提交部分代码

parent 25be7af3
<template>
<div class="default-page">
<div class="center-box">
<div class="imgbox">
<img src="../../../../assets/images/newProductList/default.png" />
</div>
<p>{{ tips }}</p>
<div class="default-page-btn" @click="$emit('to-add')">去添加</div>
</div>
</div>
</template>
<script>
//
export default {
props: ["tips"],
};
</script>
<style lang="less" scoped>
// 缺省页
.default-page {
.center-box {
margin: 0 auto;
margin-top: 218px;
width: 132px;
.imgbox {
width: 98px;
height: 98px;
margin: 0 auto;
img {
width: 100%;
}
}
p {
text-align: center;
padding-top: 18px;
color: #b6b7b9;
padding-bottom: 18px;
}
}
}
.default-page-btn {
width: 100px;
height: 36px;
cursor: pointer;
margin: 0 auto;
background: #0CC399;
border-radius: 4px;
color: white;
text-align: center;
line-height: 36px;
}
</style>
<template>
<div class="body" :class="{ 'body--two': status === 0 }">
<h1 v-if="status === 0">提示</h1>
<h1 v-else>删除</h1>
<textarea placeholder="请输入删除原因" v-model="deleteRemark" v-if="status !== 0"></textarea>
<p v-if="status === 0">此操作将永久删除该文件, 是否继续?</p>
<div class="footer" :class="{ 'footer--two': status === 0 }">
<div @click="cancel">取消</div>
<div class="determine" @click="Determine">确定</div>
</div>
</div>
</template>
<script>
import { GO_URLS } from "@/config/URLS";
export default {
props: {
id: 0,
status: null
},
data() {
return {
deleteRemark: ""
};
},
created() {},
methods: {
checkReason() {
if (this.deleteRemark.trim() === "") {
this.$message({
message: "删除原因不可为空",
type: "warning"
});
return;
} else if (this.deleteRemark.trim().length > 30) {
this.$message({
showClose: true,
message: "删除原因长度不可大于三十字",
type: "warning"
});
return false;
}
this.moveRecycleBin();
},
Determine() {
switch (this.status) {
case 0:
this.deleteConfirm({ id: Number(this.id) });
break;
default:
this.checkReason();
break;
}
},
// 移入回收站
async moveRecycleBin() {
const res = await this.$ajax({
type: "post",
url: GO_URLS.abandon,
params: {
id: this.id,
abandon_remark: this.deleteRemark
}
});
if (res) {
this.$emit("deleteSuccess");
}
},
// 删除存证
async deleteConfirm(params) {
const res = await this.$ajax({
type: "delete",
url: GO_URLS.delete,
params: params
});
if (res) {
this.$emit("deleteSuccess");
}
},
cancel() {
this.$emit("CloseDg");
}
}
};
</script>
<style lang="less" scoped>
.body--two {
height: 284px !important;
}
.body {
width: 600px;
height: 327px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 20px 0px rgba(61, 118, 249, 0.18);
h1 {
font-size: 22px;
font-weight: 500;
margin: 0;
color: rgba(0, 0, 0, 1);
padding: 34px 0 18px 44px;
line-height: 1;
}
textarea {
width: 500px;
height: 112px;
border: 1px solid rgba(226, 226, 226, 1);
margin-left: 50px;
font-size: 18px;
resize: none;
line-height: 25px;
padding-top: 12px;
text-indent: 12px;
&:focus {
border-color: #0cc399 !important;
outline: 0;
}
&::-webkit-input-placeholder {
font-size: 18px;
font-weight: 400;
color: rgba(192, 198, 210, 1);
line-height: 25px;
}
}
p {
width: 500px;
height: 112px;
line-height: 112px;
font-size: 18px;
text-align: center;
}
.footer--two {
padding-top: 0 !important;
}
.footer {
padding-top: 42px;
float: right;
padding-right: 50px;
overflow: hidden;
div {
float: left;
width: 120px;
height: 40px;
cursor: pointer;
border-radius: 4px;
text-align: center;
font-size: 14px;
color: #5c6476;
line-height: 40px;
}
.determine {
background: #0cc399;
color: white;
}
}
}
</style>
\ No newline at end of file
......@@ -117,11 +117,11 @@
import { GO_URLS } from "@/config/URLS";
import CommonDialog from "@/components/CommonDialog.vue";
import Pagination from "@/components/Pagination.vue";
import defaultPage from "@/components/newProductList/defaultPage.vue";
import defaultPage from "../../components/defaultPage/defaultPage.vue";
import IncrementalDataList from "../../components/incrementalDataList/incrementalDataList.vue"; //增量数据列表
import Increments from "../increment/increment.vue"; // 增量
import AddGoods from "@/components/category/addGoods.vue"; // 添加存证
import deleteGoods from "@/components/category/deleteGoods.vue"; // 删除组件
import deleteGoods from "../../components/deleteGoods/deleteGoods.vue"; // 删除组件
import Uncertified from "@/components/Uncertified.vue"; // 未认证提示组件
import copyGoods from "../../components/copyGoods/copyGoods.vue";
import prompt from "../prompt/prompt.vue";
......
This diff is collapsed.
......@@ -46,7 +46,7 @@
<script lang="ts">
import { Component, Vue, Watch } from "vue-property-decorator";
// 模板管理部分
import TemplateManage from "@/components/category/TemplateManage.vue";
import TemplateManage from "../../components/templateManage/templateManage.vue";
// 右侧存证部分
import productList from "../../components/productList/productList.vue";
//删除页
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment