pull/4/head
Aaaaaaaa 2024-08-27 15:26:26 +08:00
parent 0907d1c436
commit a62d49e078
3 changed files with 230 additions and 88 deletions

View File

@ -1,6 +1,7 @@
<template>
<div class="app-container home">
<iframe width="680" height="260" frameborder="0" scrolling="no" hspace="0" src="https://i.tianqi.com/?c=code&a=getcode&id=13&icon=1&py=pudong"/>
<iframe width="550" height="300" frameborder="0" scrolling="no" hspace="0" src=" https://www.beijing-time.org/"/>
</div>
</template>

View File

@ -1,84 +1,140 @@
<template>
<div>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="150">
</el-table-column>
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 30px">
<div slot="header" class="clearfix">
<span>筛选搜索</span>
<el-button style="float: right; padding: 3px 30px" type="text" @click="findShop"></el-button>
<el-button style="float: right; padding: 3px 10px" type="text" @click="chong"></el-button>
</div>
<div class="text item">
<el-form ref="form" :model="shop" label-width="100px">
<el-form-item>
输入搜索<el-input v-model="shop.shopName" placeholder="商品名称" style="width: 180px;margin-right: 50px"></el-input>
订单编号<el-input v-model="shop.shopNum" placeholder="编号" style="width: 180px;margin-right: 50px"></el-input>
订单分类<el-cascader
placeholder="请选择"
v-model="typeId"
:options="type"
:props=Cascader
@change="shopTypeId(shop.typeId)" clearable
></el-cascader>
<el-select v-model="shop.brandId" placeholder="请选择商品" style="margin-right: 30px" clearable>
<el-option v-for="item in dict.type.pms_shop_brandid" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
订单状态<el-select v-model="shop.publishStatus" placeholder="请选择上架状态" style="margin-right: 30px" clearable>
<el-option v-for="item in dict.type.pms_shop_publiststatus" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
审核状态<el-select v-model="shop.verifyStatus" placeholder="请选择审核状态" style="margin-right: 30px" clearable>
<el-option v-for="item in dict.type.pms_shop_verifystatus" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
</el-card>
<el-table-column label="购买信息">
<el-table-column
prop="name"
label="账号"
width="120">
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 10px">
<div slot="header" class="clearfix">
<span>数据列表</span>
<button @click="add" style="float: right; padding: 3px 10px" type="text">添加</button>
</div>
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="日期" width="120" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.ordersLaunchdate }}</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="名称"
width="120">
</el-table-column>
<el-table-column label="购买信息">
<el-table-column label="订单编号" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">订单编号: {{ scope.row.ordersNum }}</span>
</template>
</el-table-column>
<el-table-column label="订单所属人" width="120" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.userName }}</span>
</template>
</el-table-column>
<el-table-column label="购买详情">
<el-table-column
prop="province"
label="购买接口"
width="120">
</el-table-column>
<el-table-column
prop="city"
label="购买类型"
width="120">
</el-table-column>
<el-table-column
prop="address"
label="购买方式"
width="300">
</el-table-column>
<el-table-column
prop="zip"
label="总金额"
width="120">
</el-table-column>
<el-table-column
prop="zip"
label="是否已经完成付款"
width="120">
</el-table-column>
<el-table-column prop="province" label="购买接口" width="120" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.productName }}</span>
</template>
</el-table-column>
</el-table-column>
</el-table>
<el-table-column label="订单金额" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.ordersPrice }}</span>
</template>
</el-table-column>
<el-table-column label="订单规格" width="300" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.ordersSpecification }}</span>
</template>
</el-table-column>
<el-table-column label="订单款项状态" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px" v-if="scope.row.ordersState==0"></span>
<span style="margin-left: 10px" v-if="scope.row.ordersState==1"></span>
<span style="margin-left: 10px" v-if="scope.row.ordersState==2"></span>
<span style="margin-left: 10px" v-if="scope.row.ordersState==4">(退)</span>
<span style="margin-left: 10px" v-if="scope.row.ordersState==5">退</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table-column>
</el-table-column>
</el-table>
</el-card>
<!-- <el-pagination style="float: right"-->
<!-- @size-change="handleSizeChange"-->
<!-- @current-change="handleCurrentChange"-->
<!-- :current-page="shop.pageNum"-->
<!-- :page-sizes="[2, 4, 6, 8]"-->
<!-- :page-size="shop.pageSize"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- :total="shop.total">-->
<!-- </el-pagination>-->
</div>
</template>
<script>
import { selectList, update } from '@/api/market/orders'
import {handleDelete} from "@/api/market/product";
import { diGui } from "@/api/market/orders";
//jsjsjson,
//import from ',
import axios from 'axios'; // 使axiosHTTP
export default {
dicts:[''],
dicts:['pms_shop_typeid','pms_shop_publiststatus','pms_shop_brandid','pms_shop_verifystatus'],
//import使"
components: {},
props: {},
data() {
//"
return {
orders:{
shop:{
pageNum:1,
pageSize:5,
total:1,
typeId:0
},
tableData: [], //
arr:[],
type:[],
Cascader:{ expandTrigger:'hover',value:'id',label:'typeName',children:'parentPOS' },
@ -94,20 +150,20 @@ export default {
//
shopTypeId(){
for (let i = 0; i < this.typeId.length; i++) {
this.orders.typeId=this.typeId[i]
this.shop.typeId=this.typeId[i]
}
},
/**递归*/
diGui(){
diGui(this.orders.typeId).then(
diGui(this.shop.typeId).then(
res => {
this.type=res.data
}
)
},
//
handleDelete(orders){
handleDelete(orders.id).then(
handleDelete(shop){
handleDelete(shop.id).then(
res => {
this.$message.success(res.msg)
this.page()
@ -116,21 +172,21 @@ export default {
},
//
chong(){
this.orders={}
this.shop={}
this.page()
},
//
handleSizeChange(val) {
this.orders.pageSize=val
this.shop.pageSize=val
this.page()
},
handleCurrentChange(val) {
this.orders.pageNum=val
this.shop.pageNum=val
this.page()
},
//
updateShop(orders){
update(orders).then(
updateShop(shop){
update(shop).then(
res => {
this.$message.success(res.msg)
this.page()
@ -138,15 +194,15 @@ export default {
)
},
//
handleEdit(orders){
if (this.orders.serviceIds && typeof this.orders.serviceIds === 'string') {
orders.serviceid = this.orders.serviceIds.split(',');
handleEdit(shop){
if (this.shop.serviceIds && typeof this.shop.serviceIds === 'string') {
shop.serviceid = this.shop.serviceIds.split(',');
// ...
}
console.log(JSON.stringify(orders))
orders.serviceid=orders.serviceIds.split(',').map(id => parseInt(id, 10));
console.log(JSON.stringify(orders))
this.$router.push({path:'/product/info/update',query:{orders:orders}})
console.log(JSON.stringify(shop))
shop.serviceid=shop.serviceIds.split(',').map(id => parseInt(id, 10));
console.log(JSON.stringify(shop))
this.$router.push({path:'/product/info/update',query:{shop:shop}})
},
//
findShop(){
@ -161,34 +217,24 @@ export default {
this.multipleSelection = val;
},
//
// selectList(){
// selectList(this.orders).then(
// res => {
// console.log(res)
// this.arr=res.data.list
// this.orders.total=res.data.total
// }
// )
// }.
selectList(){
selectList().then(
res=>{
this.typeList = res.data
selectList(){
selectList(data).then(
res => {
console.log(res)
this.arr=res.data.list
this.shop.total=res.data.total
}
)
}
},
// - 访this",
created() {
this.selectList()
this.page()
this.diGui()
this.fetchData(); //
this.selectList()
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",

View File

@ -8,6 +8,101 @@
<el-step title="选择商品关联"></el-step>
</el-steps>
<el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 30px">
<el-table :data="arr" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="编号" width="80" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column label="商品图片" width="150" align="center">
<template slot-scope="scope">
<img :src="scope.row.picImg" alt="图片损坏">
</template>
</el-table-column>
<el-table-column label="商品名称" width="400" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.shopName }}</span>
<br>
品牌<span style="margin-left: 10px">{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="货号" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">货号{{ scope.row.shopNum }}</span>
</template>
</el-table-column>
<el-table-column label="标签" width="150" align="center">
<template slot-scope="scope">
上架
<el-switch
v-model="scope.row.publishStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
新品
<el-switch
v-model="scope.row.newStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
推荐
<el-switch
v-model="scope.row.recommandStatus"
@change="updateShop(scope.row)"
active-color="#409EFF"
inactive-color="#C0CCDA"
:active-value="1"
:inactive-value="0">
</el-switch>
<br>
</template>
</el-table-column>
<el-table-column label="排序" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.sort }}</span>
</template>
</el-table-column>
<el-table-column label="销量" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.sale }}</span>
</template>
</el-table-column>
<el-table-column label="审核状态" width="150" align="center">
<template slot-scope="scope">
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==0"></span>
<span style="margin-left: 10px" v-if="scope.row.verifyStatus==1"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>