fix: 修改交班部分文件名称,修改部分深度作用样式
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 交班模块 -->
|
<!-- 交班模块 -->
|
||||||
<div style="padding: 15px;">
|
<div style="padding: 15px">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<Search></Search>
|
<my-search></my-search>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<Content></Content>
|
<my-content></my-content>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import Search from './workconfig/Search.vue'
|
import mySearch from "./workconfig/my-search.vue";
|
||||||
import Content from './workconfig/Content.vue'
|
import myContent from "./workconfig/my-content.vue";
|
||||||
</script>
|
</script>
|
||||||
@@ -1,21 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="Table">
|
<div class="Table">
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<Table :list="datas.tableData" @handleDelete="handleDelete" @handleEdit="handleEdit"></Table>
|
<my-table
|
||||||
|
:list="datas.tableData"
|
||||||
|
@handleDelete="handleDelete"
|
||||||
|
@handleEdit="handleEdit"
|
||||||
|
></my-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<Paging :pagingConfig="datas.pagingConfig" @sizeChange="sizeChange" @currentChange="currentChange"></Paging>
|
<my-paging
|
||||||
|
:pagingConfig="datas.pagingConfig"
|
||||||
|
@sizeChange="sizeChange"
|
||||||
|
@currentChange="currentChange"
|
||||||
|
></my-paging>
|
||||||
<!-- 其他模板 -->
|
<!-- 其他模板 -->
|
||||||
<!-- 新增/编辑 -->
|
<!-- 新增/编辑 -->
|
||||||
<myDialog ref="myDialogRef" :title="datas.title" @confirm="confirm" width="30%">
|
<my-dialog ref="myDialogRef" :title="datas.title" @confirm="confirm" width="30%">
|
||||||
<el-form ref="ruleFormRef" :rules="datas.rules" :model="datas.DialogForm" label-width="80px">
|
<el-form ref="ruleFormRef" :rules="datas.rules" :model="datas.DialogForm" label-width="80px">
|
||||||
<el-form-item label="商品图片" required prop="images">
|
<el-form-item label="商品图片" required prop="images">
|
||||||
<div style="display: flex; flex-wrap: wrap">
|
<div style="display: flex; flex-wrap: wrap">
|
||||||
<div v-for="(item, index) in datas.DialogForm.images" :key="index" style="position: relative"
|
<div
|
||||||
class="showStyle">
|
v-for="(item, index) in datas.DialogForm.images"
|
||||||
|
:key="index"
|
||||||
|
style="position: relative"
|
||||||
|
class="showStyle"
|
||||||
|
>
|
||||||
<el-icon class="buttonstyle" @click="deleteEvent(item)">
|
<el-icon class="buttonstyle" @click="deleteEvent(item)">
|
||||||
<DeleteFilled />
|
<DeleteFilled />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<img style="width: 148px; height: 148px; margin-right: 6px" class="imgStyle" :src="item" alt="" />
|
<img
|
||||||
|
style="width: 148px; height: 148px; margin-right: 6px"
|
||||||
|
class="imgStyle"
|
||||||
|
:src="item"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="upImgStyle" @click="addimgEvent">+</div>
|
<div class="upImgStyle" @click="addimgEvent">+</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,7 +47,11 @@
|
|||||||
<el-input v-model="datas.DialogForm.telephone" placeholder="请输入联系电话" />
|
<el-input v-model="datas.DialogForm.telephone" placeholder="请输入联系电话" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="开启下单积分抵扣">
|
<el-form-item label="开启下单积分抵扣">
|
||||||
<el-switch v-model="datas.DialogForm.enableDeduction" :active-value="1" :inactive-value="0" />
|
<el-switch
|
||||||
|
v-model="datas.DialogForm.enableDeduction"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="额外价格">
|
<el-form-item label="额外价格">
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
@@ -43,128 +64,131 @@
|
|||||||
<el-input v-model="datas.DialogForm.remark" placeholder="请输入备注" type="textarea" />
|
<el-input v-model="datas.DialogForm.remark" placeholder="请输入备注" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</myDialog>
|
</my-dialog>
|
||||||
<!-- 选择图片 -->
|
<!-- 选择图片 -->
|
||||||
<AddImg ref="addImg" @successEvent="successEvent"></AddImg>
|
<AddImg ref="addImg" @successEvent="successEvent"></AddImg>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import Table from './component/Table.vue'
|
import myTable from "./component/my-table.vue";
|
||||||
import Paging from './component/Paging.vue'
|
import myPaging from "./component/my-paging.vue";
|
||||||
import myDialog from '@/components/mycomponents/myDialog.vue'
|
import myDialog from "@/components/mycomponents/myDialog.vue";
|
||||||
import eventBus from '@/utils/eventBus'
|
import eventBus from "@/utils/eventBus";
|
||||||
import API from './api'
|
import API from "./api";
|
||||||
|
|
||||||
const datas = reactive({
|
const datas = reactive({
|
||||||
tableData: [], // 表格数据
|
tableData: [], // 表格数据
|
||||||
title: '新增数据',
|
title: "新增数据",
|
||||||
pagingConfig: {
|
pagingConfig: {
|
||||||
total: 0, // 总数
|
total: 0, // 总数
|
||||||
pageSize: 10, // 每页数据数量
|
pageSize: 10, // 每页数据数量
|
||||||
pageNumber: 1, // 当前页码
|
pageNumber: 1, // 当前页码
|
||||||
},
|
},
|
||||||
DialogForm: { // 弹窗表单数据
|
DialogForm: {
|
||||||
|
// 弹窗表单数据
|
||||||
name: "",
|
name: "",
|
||||||
telephone: "",
|
telephone: "",
|
||||||
address: "",
|
address: "",
|
||||||
remark: "",
|
remark: "",
|
||||||
images: []
|
images: [],
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入供应商名称', trigger: 'blur' },
|
{ required: true, message: "请输入供应商名称", trigger: "blur" },
|
||||||
{ min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' },
|
{ min: 3, max: 5, message: "Length should be 3 to 5", trigger: "blur" },
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
const myDialogRef = ref(null)
|
const myDialogRef = ref(null);
|
||||||
const ruleFormRef = ref(null)
|
const ruleFormRef = ref(null);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList();
|
||||||
eventBus.on('search', (res) => {
|
eventBus.on("search", (res) => {
|
||||||
getList(res)
|
getList(res);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
eventBus.off('search')
|
eventBus.off("search");
|
||||||
})
|
});
|
||||||
|
|
||||||
async function getList(data = {}) {
|
async function getList(data = {}) {
|
||||||
const res = await API.getPage({ page: datas.pagingConfig.pageNumber, size: datas.pagingConfig.pageSize, ...data })
|
const res = await API.getPage({
|
||||||
datas.tableData = res.records
|
page: datas.pagingConfig.pageNumber,
|
||||||
datas.pagingConfig.total = res.totalRow
|
size: datas.pagingConfig.pageSize,
|
||||||
datas.pagingConfig.pageSize = res.pageSize
|
...data,
|
||||||
datas.pagingConfig.pageNumber = res.pageNumber
|
});
|
||||||
|
datas.tableData = res.records;
|
||||||
|
datas.pagingConfig.total = res.totalRow;
|
||||||
|
datas.pagingConfig.pageSize = res.pageSize;
|
||||||
|
datas.pagingConfig.pageNumber = res.pageNumber;
|
||||||
}
|
}
|
||||||
function add() {
|
function add() {
|
||||||
if (datas.DialogForm.id) {
|
if (datas.DialogForm.id) {
|
||||||
rest()
|
rest();
|
||||||
}
|
}
|
||||||
datas.title = '新增数据'
|
datas.title = "新增数据";
|
||||||
myDialogRef.value.open()
|
myDialogRef.value.open();
|
||||||
}
|
}
|
||||||
async function handleEdit(row) {
|
async function handleEdit(row) {
|
||||||
datas.title = '编辑数据'
|
datas.title = "编辑数据";
|
||||||
const res = await API.getinfo(row.id)
|
const res = await API.getinfo(row.id);
|
||||||
datas.DialogForm = res
|
datas.DialogForm = res;
|
||||||
// 有图片
|
// 有图片
|
||||||
// datas.DialogForm.goodsImageUrl = res.goodsImageUrl.split(',')
|
// datas.DialogForm.goodsImageUrl = res.goodsImageUrl.split(',')
|
||||||
myDialogRef.value.open()
|
myDialogRef.value.open();
|
||||||
}
|
}
|
||||||
async function confirm() {
|
async function confirm() {
|
||||||
ruleFormRef.value.validate(async valid => {
|
ruleFormRef.value.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let res = null
|
let res = null;
|
||||||
if (datas.title == '新增数据') {
|
if (datas.title == "新增数据") {
|
||||||
// 图片处理
|
// 图片处理
|
||||||
// datas.DialogForm.goodsImageUrl = datas.DialogForm.goodsImageUrl.join(',')
|
// datas.DialogForm.goodsImageUrl = datas.DialogForm.goodsImageUrl.join(',')
|
||||||
res = await API.add(datas.DialogForm)
|
res = await API.add(datas.DialogForm);
|
||||||
} else {
|
} else {
|
||||||
// datas.DialogForm.goodsImageUrl = datas.DialogForm.goodsImageUrl.join(',')
|
// datas.DialogForm.goodsImageUrl = datas.DialogForm.goodsImageUrl.join(',')
|
||||||
res = await API.update(datas.DialogForm)
|
res = await API.update(datas.DialogForm);
|
||||||
}
|
}
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '成功',
|
message: "成功",
|
||||||
type: 'success',
|
type: "success",
|
||||||
})
|
});
|
||||||
rest()
|
rest();
|
||||||
getList()
|
getList();
|
||||||
myDialogRef.value.close()
|
myDialogRef.value.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
// 重置
|
// 重置
|
||||||
function rest() {
|
function rest() {
|
||||||
datas.DialogForm = { sort: 1, images: [] }
|
datas.DialogForm = { sort: 1, images: [] };
|
||||||
}
|
}
|
||||||
async function handleDelete(id) {
|
async function handleDelete(id) {
|
||||||
ElMessageBox.confirm("是否删除数据项?", "提示", {
|
ElMessageBox.confirm("是否删除数据项?", "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(
|
}).then(async () => {
|
||||||
async () => {
|
let res = await API.deleteByIds(id);
|
||||||
let res = await API.deleteByIds(id)
|
if (res.code == 200) {
|
||||||
if (res.code == 200) {
|
ElMessage({
|
||||||
ElMessage({
|
message: "删除成功",
|
||||||
message: '删除成功',
|
type: "success",
|
||||||
type: 'success',
|
});
|
||||||
})
|
getList();
|
||||||
getList()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 图片
|
// 图片
|
||||||
const addImg = ref(null)
|
const addImg = ref(null);
|
||||||
function addimgEvent() {
|
function addimgEvent() {
|
||||||
(addImg.value)?.show()
|
addImg.value?.show();
|
||||||
}
|
}
|
||||||
function successEvent(d) {
|
function successEvent(d) {
|
||||||
datas.DialogForm['images'].push(d[0].url);
|
datas.DialogForm["images"].push(d[0].url);
|
||||||
}
|
}
|
||||||
function deleteEvent(d) {
|
function deleteEvent(d) {
|
||||||
let index = datas.DialogForm.images.findIndex((ele) => ele == d);
|
let index = datas.DialogForm.images.findIndex((ele) => ele == d);
|
||||||
@@ -172,14 +196,13 @@ function deleteEvent(d) {
|
|||||||
}
|
}
|
||||||
// 分页
|
// 分页
|
||||||
function sizeChange(val) {
|
function sizeChange(val) {
|
||||||
datas.pagingConfig.pageSize = val
|
datas.pagingConfig.pageSize = val;
|
||||||
getList()
|
getList();
|
||||||
}
|
}
|
||||||
function currentChange(val) {
|
function currentChange(val) {
|
||||||
datas.pagingConfig.pageNumber = val
|
datas.pagingConfig.pageNumber = val;
|
||||||
getList()
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.Table {
|
.Table {
|
||||||
@@ -223,10 +223,8 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.lose {
|
:deep(.lose .el-input__inner) {
|
||||||
&::v-deep .el-input__inner {
|
color: rgb(238, 29, 29);
|
||||||
color: rgb(238, 29, 29);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.shop_info {
|
.shop_info {
|
||||||
|
|||||||
@@ -26,19 +26,35 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #goods="scope">
|
<template #goods="scope">
|
||||||
<div class="goods_info">
|
<div class="goodslang">
|
||||||
<div class="row" v-for="item in scope.row.productList" :key="item.id">
|
<div class="goods-list">
|
||||||
<el-image :src="item.productImg" class="cover" lazy></el-image>
|
<el-button
|
||||||
<div class="info">
|
v-for="item in scope.row.productList"
|
||||||
<div class="name">
|
@click="toGoods(item.id)"
|
||||||
<span :class="[item.isVip == 1 ? 'colorStyle' : '']">
|
:key="item.productId"
|
||||||
{{ item.productName }}
|
type="text"
|
||||||
</span>
|
>
|
||||||
<span class="refund" v-if="item.refundNumber">(退 - {{ item.refundNumber }})</span>
|
{{ item.name }}
|
||||||
</div>
|
</el-button>
|
||||||
<div class="sku">{{ item.productSkuName }}</div>
|
<span v-if="scope.row.productList.length > 1">,</span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<el-dropdown trigger="click" v-if="scope.row.productList.length > 1" @command="toGoods">
|
||||||
|
<span class="el-dropdown-link" style="color: blue">
|
||||||
|
<el-icon><CaretBottom /></el-icon>
|
||||||
|
</span>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item
|
||||||
|
class="clearfix"
|
||||||
|
v-for="item in scope.row.productList"
|
||||||
|
:key="item.id"
|
||||||
|
:command="item.id"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -123,7 +139,6 @@ async function handleEditClick(row: IObject) {
|
|||||||
console.log({ ...row });
|
console.log({ ...row });
|
||||||
editModalRef.value?.setFormData({ ...row, url: [row.url] });
|
editModalRef.value?.setFormData({ ...row, url: [row.url] });
|
||||||
}
|
}
|
||||||
1;
|
|
||||||
// 其他工具栏
|
// 其他工具栏
|
||||||
function handleToolbarClick(name: string) {
|
function handleToolbarClick(name: string) {
|
||||||
console.log(name);
|
console.log(name);
|
||||||
@@ -180,7 +195,35 @@ const refDetail = ref();
|
|||||||
function showdetail(row: OrderInfoVo) {
|
function showdetail(row: OrderInfoVo) {
|
||||||
refDetail.value.show(row);
|
refDetail.value.show(row);
|
||||||
}
|
}
|
||||||
|
function toGoods(id: number) {
|
||||||
|
router.push({
|
||||||
|
path: "/product/index",
|
||||||
|
query: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.goodslang {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.goods-list {
|
||||||
|
overflow: hidden; //超出的文本隐藏
|
||||||
|
text-overflow: ellipsis; //溢出用省略号显示
|
||||||
|
white-space: nowrap; //溢出不换行
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.goods-list .el-button--text span) {
|
||||||
|
display: block;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.goods-list .el-button--text) {
|
||||||
|
white-space: break-spaces;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ const state = reactive({
|
|||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
cookiePass: "",
|
cookiePass: "",
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "ymf",
|
username: "",
|
||||||
password: "123456",
|
password: "",
|
||||||
// rememberMe: false,
|
// rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: "",
|
uuid: "",
|
||||||
|
|||||||
@@ -101,12 +101,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input--small .el-input__inner {
|
:deep(.el-input--small .el-input__inner) {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .image-slot {
|
:deep(.image-slot) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -150,12 +150,12 @@ export default {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::v-deep .el-input--small .el-input__inner {
|
:deep(.el-input--small .el-input__inner) {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .image-slot {
|
:deep(.image-slot) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user