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> <template>
<div class="app-container home"> <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> </div>
</template> </template>

View File

@ -1,84 +1,140 @@
<template> <template>
<div> <div>
<el-table <el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 30px">
:data="tableData" <div slot="header" class="clearfix">
style="width: 100%"> <span>筛选搜索</span>
<el-table-column <el-button style="float: right; padding: 3px 30px" type="text" @click="findShop"></el-button>
prop="date" <el-button style="float: right; padding: 3px 10px" type="text" @click="chong"></el-button>
label="日期" </div>
width="150"> <div class="text item">
</el-table-column> <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 <el-card class="box-card" style="width: 94%;transform: translateX(3%);margin-top: 10px">
prop="name" <div slot="header" class="clearfix">
label="账号" <span>数据列表</span>
width="120"> <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>
<el-table-column <el-table-column label="购买信息">
prop="name" <el-table-column label="订单编号" width="150" align="center">
label="名称" <template slot-scope="scope">
width="120"> <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>
<el-table-column label="购买详情"> <el-table-column label="购买详情">
<el-table-column <el-table-column prop="province" label="购买接口" width="120" align="center">
prop="province" <template slot-scope="scope">
label="购买接口" <span style="margin-left: 10px">{{ scope.row.productName }}</span>
width="120"> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="city" <el-table-column label="订单金额" width="150" align="center">
label="购买类型" <template slot-scope="scope">
width="120"> <span style="margin-left: 10px">{{ scope.row.ordersPrice }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="订单规格" width="300" align="center">
prop="address" <template slot-scope="scope">
label="购买方式" <span style="margin-left: 10px">{{ scope.row.ordersSpecification }}</span>
width="300"> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="订单款项状态" width="150" align="center">
prop="zip" <template slot-scope="scope">
label="总金额" <span style="margin-left: 10px" v-if="scope.row.ordersState==0"></span>
width="120"> <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>
<el-table-column <el-table-column label="操作" align="center">
prop="zip" <template slot-scope="scope">
label="是否已经完成付款" <el-button
width="120"> 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-column>
</el-table-column> </el-table-column>
</el-table> </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> </div>
</template> </template>
<script> <script>
import { selectList, update } from '@/api/market/orders' import { selectList, update } from '@/api/market/orders'
import {handleDelete} from "@/api/market/product"; import {handleDelete} from "@/api/market/product";
import { diGui } from "@/api/market/orders"; import { diGui } from "@/api/market/orders";
//jsjsjson, //jsjsjson,
//import from ', //import from ',
import axios from 'axios'; // 使axiosHTTP
export default { export default {
dicts:[''], dicts:['pms_shop_typeid','pms_shop_publiststatus','pms_shop_brandid','pms_shop_verifystatus'],
//import使" //import使"
components: {}, components: {},
props: {}, props: {},
data() { data() {
//"
return { return {
orders:{ shop:{
pageNum:1, pageNum:1,
pageSize:5, pageSize:5,
total:1, total:1,
typeId:0 typeId:0
}, },
tableData: [], //
arr:[], arr:[],
type:[], type:[],
Cascader:{ expandTrigger:'hover',value:'id',label:'typeName',children:'parentPOS' }, Cascader:{ expandTrigger:'hover',value:'id',label:'typeName',children:'parentPOS' },
@ -94,20 +150,20 @@ export default {
// //
shopTypeId(){ shopTypeId(){
for (let i = 0; i < this.typeId.length; i++) { for (let i = 0; i < this.typeId.length; i++) {
this.orders.typeId=this.typeId[i] this.shop.typeId=this.typeId[i]
} }
}, },
/**递归*/ /**递归*/
diGui(){ diGui(){
diGui(this.orders.typeId).then( diGui(this.shop.typeId).then(
res => { res => {
this.type=res.data this.type=res.data
} }
) )
}, },
// //
handleDelete(orders){ handleDelete(shop){
handleDelete(orders.id).then( handleDelete(shop.id).then(
res => { res => {
this.$message.success(res.msg) this.$message.success(res.msg)
this.page() this.page()
@ -116,21 +172,21 @@ export default {
}, },
// //
chong(){ chong(){
this.orders={} this.shop={}
this.page() this.page()
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {
this.orders.pageSize=val this.shop.pageSize=val
this.page() this.page()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.orders.pageNum=val this.shop.pageNum=val
this.page() this.page()
}, },
// //
updateShop(orders){ updateShop(shop){
update(orders).then( update(shop).then(
res => { res => {
this.$message.success(res.msg) this.$message.success(res.msg)
this.page() this.page()
@ -138,15 +194,15 @@ export default {
) )
}, },
// //
handleEdit(orders){ handleEdit(shop){
if (this.orders.serviceIds && typeof this.orders.serviceIds === 'string') { if (this.shop.serviceIds && typeof this.shop.serviceIds === 'string') {
orders.serviceid = this.orders.serviceIds.split(','); shop.serviceid = this.shop.serviceIds.split(',');
// ... // ...
} }
console.log(JSON.stringify(orders)) console.log(JSON.stringify(shop))
orders.serviceid=orders.serviceIds.split(',').map(id => parseInt(id, 10)); shop.serviceid=shop.serviceIds.split(',').map(id => parseInt(id, 10));
console.log(JSON.stringify(orders)) console.log(JSON.stringify(shop))
this.$router.push({path:'/product/info/update',query:{orders:orders}}) this.$router.push({path:'/product/info/update',query:{shop:shop}})
}, },
// //
findShop(){ findShop(){
@ -161,34 +217,24 @@ export default {
this.multipleSelection = val; 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(){
selectList().then( selectList(data).then(
res=>{ res => {
this.typeList = res.data console.log(res)
this.arr=res.data.list
this.shop.total=res.data.total
} }
) )
} }
}, },
// - 访this", // - 访this",
created() { created() {
this.selectList() this.page()
this.diGui() this.diGui()
this.fetchData(); // this.selectList()
}, },
// - 访DOM", // - 访DOM",
mounted() { mounted() {
}, },
beforeCreate() { beforeCreate() {
}, // - ", }, // - ",

View File

@ -8,6 +8,101 @@
<el-step title="选择商品关联"></el-step> <el-step title="选择商品关联"></el-step>
</el-steps> </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> </div>
</template> </template>
<script> <script>