Commit fd6ab3c7 by liuliufashi

update

parent 8a9ab000
<template>
<div class="good-page">
<div class="good-search" v-if="!isShowGoods">
<div>
<a-radio-group v-model:value="status">
<a-radio-button value="0" class="status" @click="onSearch">全部</a-radio-button>
<a-radio-button value="1" class="status" @click="onSearch">正常</a-radio-button>
<a-radio-button value="2" class="status" @click="onSearch">已下架</a-radio-button>
</a-radio-group>
<a-input-search v-model:value="value" placeholder="请输入商品名称" style="width: 200px; margin-left: 10px"
@search="onSearch" />
</div>
<div class="good-cad">
<a-button type="primary" class="mr10" @click="onGoods(0)">新建商品</a-button>
<a-button type="primary" @click="onGoods(1)">新建商品包</a-button>
</div>
</div>
<div class="goods-list" v-if="!isShowGoods">
<a-table :columns="columns" :data-source="list">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'tags'">
<a-button type="primary">编辑</a-button>
<a-button type="primary" style="margin-left:20px;">统计</a-button>
<a-button type="primary" style="margin-left:20px;">下架</a-button>
<a-button type="primary" style="margin-left:20px;">删除</a-button>
</template>
</template>
</a-table>
</div>
<div v-if="isShowGoods">
<div style="display: flex; align-items: center; justify-content: space-between" v-if="isShowGoods">
<a-button class="small left" @click="onBack">
<template #icon>
<LeftOutlined />
</template>
</a-button>
</div>
<GoodsBags :props="{ propsData }" v-if="propsData.isCad == 0" @onBack="onBack"></GoodsBags>
<GoodsBagSubs :props="{ propsData }" v-else @onBack="onBack"> </GoodsBagSubs>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, onMounted } from "vue";
import { LeftOutlined } from "@ant-design/icons-vue";
import GoodsBags from "./components/goods/index.vue";
import GoodsBagSubs from "./components/goodsubs/index.vue";
import { onSelectGoods,onfindby } from '@/api/index'
import { getUid } from "@/utils/userInfo";
const columns = [
{
title: "商品编号",
dataIndex: "goodsid",
key: "goodsid",
},
{
title: "商品名称",
dataIndex: "shortname",
key: "shortname",
},
{
title: "商品类型",
dataIndex: "sellingmodel",
key: "sellingmodel",
},
{
title: "商品售卖数",
key: "markingprice",
dataIndex: "markingprice",
},
{
title: "默认金额售卖数",
key: "price",
dataIndex: "price",
},
{
title: "已售金额",
key: "price",
dataIndex: "price",
},
{
title: "商品状态",
key: "status",
dataIndex: "status",
},
{
title: "操作",
key: "tags",
dataIndex: "tags",
},
];
interface props {
isCad: Number;
}
const list = ref<Array<Object>>([])
const value = ref<string>("");
const status = ref<string>("0")
const propsData = reactive<props>({
isCad: 0,
});
const isShowGoods = ref<Boolean>(false);
const onSearch = async() => {
const params = {
status:status.value,
name:value.value,
uid:getUid()
}
const data = await onfindby(params)
list.value = data.data
};
const onGoods = (e: Number) => {
propsData.isCad = e;
isShowGoods.value = true;
};
const onBack = (e: Number) => {
isShowGoods.value = !isShowGoods.value;
const uid = getUid()
const data = await onSelectGoods(uid)
list.value = data.data
};
onMounted(async () => {
const uid = getUid()
const data = await onSelectGoods(uid)
list.value = data.data
return list
})
defineExpose({
status,
value,
columns,
isShowGoods,
propsData,
onBack,
onSearch,
onGoods,
});
</script>
<style lang="less" scoped>
.good-page {
.good-search {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.status{
margin-right: 20px;
width: 80px;
border-radius: 5px;
border: 1px solid rgba(0, 0, 0, 0.65);
}
.status::before{
display: none;
}
.ant-radio-button-wrapper-checked{
border: 1px solid @primary-color;
}
.ood-cad {
width: 100%;
}
.ml10 {
margin-left: 10px;
}
.mr10 {
margin-right: 10px;
}
}
.goods-list {
margin-top: 10px;
}
.small {
border: none;
height: 30px;
width: 50px;
}
.left {
border-left: 1px solid rgb(236, 236, 236);
border-top: 1px solid rgb(236, 236, 236);
border-bottom: 1px solid rgb(236, 236, 236);
border-right-width: 80%;
border-right: 1px solid rgb(236, 236, 236);
border-bottom-left-radius: 25px;
border-top-left-radius: 25px;
}
}
</style>
<style lang="less">
.ant-layout-content{
overflow-y: scroll;
}
</style>
<template>
<div class="good-page">
<div class="good-search" v-if="!isShowGoods">
<div>
<a-radio-group v-model:value="status">
<a-radio-button value="0" class="status" @click="onSearch">全部</a-radio-button>
<a-radio-button value="1" class="status" @click="onSearch">正常</a-radio-button>
<a-radio-button value="2" class="status" @click="onSearch">已下架</a-radio-button>
</a-radio-group>
<a-input-search v-model:value="value" placeholder="请输入商品名称" style="width: 200px; margin-left: 10px"
@search="onSearch" />
</div>
<div class="good-cad">
<a-button type="primary" class="mr10" @click="onGoods(0)">新建商品</a-button>
<a-button type="primary" @click="onGoods(1)">新建商品包</a-button>
</div>
</div>
<div class="goods-list" v-if="!isShowGoods">
<a-table :columns="columns" :data-source="list">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'tags'">
<a-button type="primary">编辑</a-button>
<a-button type="primary" style="margin-left:20px;">统计</a-button>
<a-button type="primary" style="margin-left:20px;">下架</a-button>
<a-button type="primary" style="margin-left:20px;">删除</a-button>
</template>
</template>
</a-table>
</div>
<div v-if="isShowGoods">
<div style="display: flex; align-items: center; justify-content: space-between" v-if="isShowGoods">
<a-button class="small left" @click="onBack">
<template #icon>
<LeftOutlined />
</template>
</a-button>
</div>
<GoodsBags :props="{ propsData }" v-if="propsData.isCad == 0" @onBack="onBack"></GoodsBags>
<GoodsBagSubs :props="{ propsData }" v-else @onBack="onBack"> </GoodsBagSubs>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, onMounted } from "vue";
import { LeftOutlined } from "@ant-design/icons-vue";
import GoodsBags from "./components/goods/index.vue";
import GoodsBagSubs from "./components/goodsubs/index.vue";
import { onSelectGoods,onfindby } from '@/api/index'
import { getUid } from "@/utils/userInfo";
const columns = [
{
title: "商品编号",
dataIndex: "goodsid",
key: "goodsid",
},
{
title: "商品名称",
dataIndex: "shortname",
key: "shortname",
},
{
title: "商品类型",
dataIndex: "sellingmodel",
key: "sellingmodel",
},
{
title: "商品售卖数",
key: "markingprice",
dataIndex: "markingprice",
},
{
title: "默认金额售卖数",
key: "price",
dataIndex: "price",
},
{
title: "已售金额",
key: "price",
dataIndex: "price",
},
{
title: "商品状态",
key: "status",
dataIndex: "status",
},
{
title: "操作",
key: "tags",
dataIndex: "tags",
},
];
interface props {
isCad: Number;
}
const list = ref<Array<Object>>([])
const value = ref<string>("");
const status = ref<string>("0")
const propsData = reactive<props>({
isCad: 0,
});
const isShowGoods = ref<Boolean>(false);
const onSearch = async() => {
const params = {
status:status.value,
name:value.value,
uid:getUid()
}
const data = await onfindby(params)
list.value = data.data
};
const onGoods = (e: Number) => {
propsData.isCad = e;
isShowGoods.value = true;
};
const onBack = async(e: Number) => {
isShowGoods.value = !isShowGoods.value;
const uid = getUid()
const data = await onSelectGoods(uid)
list.value = data.data
};
onMounted(async () => {
const uid = getUid()
const data = await onSelectGoods(uid)
list.value = data.data
return list
})
defineExpose({
status,
value,
columns,
isShowGoods,
propsData,
onBack,
onSearch,
onGoods,
});
</script>
<style lang="less" scoped>
.good-page {
.good-search {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.status{
margin-right: 20px;
width: 80px;
border-radius: 5px;
border: 1px solid rgba(0, 0, 0, 0.65);
}
.status::before{
display: none;
}
.ant-radio-button-wrapper-checked{
border: 1px solid @primary-color;
}
.ood-cad {
width: 100%;
}
.ml10 {
margin-left: 10px;
}
.mr10 {
margin-right: 10px;
}
}
.goods-list {
margin-top: 10px;
}
.small {
border: none;
height: 30px;
width: 50px;
}
.left {
border-left: 1px solid rgb(236, 236, 236);
border-top: 1px solid rgb(236, 236, 236);
border-bottom: 1px solid rgb(236, 236, 236);
border-right-width: 80%;
border-right: 1px solid rgb(236, 236, 236);
border-bottom-left-radius: 25px;
border-top-left-radius: 25px;
}
}
</style>
<style lang="less">
.ant-layout-content{
overflow-y: scroll;
}
</style>
<template>
<div class="good-page">
<div class="good-search" v-if="!isShowGoods">
<div>
<a-radio-group v-model:value="status">
<a-radio-button value="0" class="status" @click="onSearch">全部</a-radio-button>
<a-radio-button value="1" class="status" @click="onSearch">正常</a-radio-button>
<a-radio-button value="2" class="status" @click="onSearch">已下架</a-radio-button>
</a-radio-group>
<a-input-search v-model:value="value" placeholder="请输入商品名称" style="width: 200px; margin-left: 10px"
@search="onSearch" />
</div>
<div class="good-cad">
<a-button type="primary" class="mr10" @click="onGoods(0)">新建商品</a-button>
<a-button type="primary" @click="onGoods(1)">新建商品包</a-button>
</div>
</div>
<div class="goods-list" v-if="!isShowGoods">
<a-table :columns="columns" :data-source="list">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'tags'">
<a-button type="primary">编辑</a-button>
<a-button type="primary" style="margin-left:20px;">统计</a-button>
<a-button type="primary" style="margin-left:20px;">下架</a-button>
<a-button type="primary" style="margin-left:20px;">删除</a-button>
</template>
</template>
</a-table>
</div>
<div v-if="isShowGoods">
<div style="display: flex; align-items: center; justify-content: space-between" v-if="isShowGoods">
<a-button class="small left" @click="onBack">
<template #icon>
<LeftOutlined />
</template>
</a-button>
</div>
<GoodsBags :props="{ propsData }" v-if="propsData.isCad == 0" @onBack="onBack"></GoodsBags>
<GoodsBagSubs :props="{ propsData }" v-else @onBack="onBack"> </GoodsBagSubs>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, onMounted } from "vue";
import { LeftOutlined } from "@ant-design/icons-vue";
import GoodsBags from "./components/goods/index.vue";
import GoodsBagSubs from "./components/goodsubs/index.vue";
import { onSelectGoods,onfindby } from '@/api/index'
import { getUid } from "@/utils/userInfo";
const columns = [
{
title: "商品编号",
dataIndex: "goodsid",
key: "goodsid",
},
{
title: "商品名称",
dataIndex: "shortname",
key: "shortname",
},
{
title: "商品类型",
dataIndex: "sellingmodel",
key: "sellingmodel",
},
{
title: "商品售卖数",
key: "markingprice",
dataIndex: "markingprice",
},
{
title: "默认金额售卖数",
key: "price",
dataIndex: "price",
},
{
title: "已售金额",
key: "price",
dataIndex: "price",
},
{
title: "商品状态",
key: "status",
dataIndex: "status",
},
{
title: "操作",
key: "tags",
dataIndex: "tags",
},
];
interface props {
isCad: Number;
}
const list = ref<Array<Object>>([])
const value = ref<string>("");
const status = ref<string>("0")
const propsData = reactive<props>({
isCad: 0,
});
const isShowGoods = ref<Boolean>(false);
const onSearch = async() => {
const params = {
status:status.value,
name:value.value,
uid:getUid()
}
const data = await onfindby(params)
list.value = data.data
};
const onGoods = (e: Number) => {
propsData.isCad = e;
isShowGoods.value = true;
};
const onBack = async(e: Number) => {
isShowGoods.value = !isShowGoods.value;
const uid = getUid()
const data = await onSelectGoods(uid)
list.value = data.data
};
onMounted(async () => {
const uid = getUid()
const data = await onSelectGoods(uid)
list.value = data.data
return list
})
defineExpose({
status,
value,
columns,
isShowGoods,
propsData,
onBack,
onSearch,
onGoods,
});
</script>
<style lang="less" scoped>
.good-page {
.good-search {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.status{
margin-right: 20px;
width: 80px;
border-radius: 5px;
border: 1px solid rgba(0, 0, 0, 0.65);
}
.status::before{
display: none;
}
.ant-radio-button-wrapper-checked{
border: 1px solid @primary-color;
}
.ood-cad {
width: 100%;
}
.ml10 {
margin-left: 10px;
}
.mr10 {
margin-right: 10px;
}
}
.goods-list {
margin-top: 10px;
}
.small {
border: none;
height: 30px;
width: 50px;
}
.left {
border-left: 1px solid rgb(236, 236, 236);
border-top: 1px solid rgb(236, 236, 236);
border-bottom: 1px solid rgb(236, 236, 236);
border-right-width: 80%;
border-right: 1px solid rgb(236, 236, 236);
border-bottom-left-radius: 25px;
border-top-left-radius: 25px;
}
}
</style>
<style lang="less">
.ant-layout-content{
overflow-y: scroll;
}
</style>
<template>
<a-table :columns="columns" :data-source="props.list" :pagination="false">
<template #bodyCell="{ text, record, index, column }">
<div v-if="record.paytype == '1'&& column.key === 'name' ">
<div class="flex">
<WechatFilled :style="{ fontSize: '24px' }"></WechatFilled
><span class="ml20">微信支付</span>
</div>
</div>
<div v-else-if="record.paytype == '2'&& column.key === 'name' ">
<div class="flex">
<AlipaySquareFilled :style="{ fontSize: '24px' }"></AlipaySquareFilled
><span class="ml20">支付宝</span>
</div>
</div>
<div v-else-if="record.paytype == '3'&& column.key === 'name' ">
<div class="flex">
<DollarCircleFilled :style="{ fontSize: '24px' }"></DollarCircleFilled
><span class="ml20">京东白条</span>
</div>
</div>
<div v-else-if="record.paytype == '4'&& column.key === 'name' ">
<div class="flex">
<CreditCardFilled :style="{ fontSize: '24px' }"></CreditCardFilled
><span class="ml20">花呗</span>
</div>
</div>
<div v-else-if="record.paytype == '5'&& column.key === 'name' ">
<div class="flex">
<SkypeFilled :style="{ fontSize: '24px' }"></SkypeFilled
><span class="ml20">京东白条</span>
</div>
</div>
<div v-if="record.status== '0' &&column.key === 'status'">
<span class="ml20" style="color: rgba(12,191,33,1)">良好</span>
</div>
<div v-else-if="record.status== '1' &&column.key === 'status'">
<span class="ml20" style="color: rgb(250, 116, 116)">预警</span>
</div>
<div v-else-if="column.key === 'tags'">
<a-button type="primary" @click="onOpenInfo(record, index, column)">查看</a-button>
<a-popconfirm placement="top" ok-text="Yes" cancel-text="No" @confirm="confirm(record, index, column)">
<template #title>
<p>确任删除这条数据</p>
</template>
</a-popconfirm>
</div>
</template>
</a-table>
</template>
<script lang="ts" setup>
import { defineExpose,defineProps } from "vue";
import { useRouter } from "vue-router";
import {
AlipaySquareFilled,
WechatFilled,
DollarCircleFilled,
CreditCardFilled,
SkypeFilled,
} from "@ant-design/icons-vue";
import { message } from 'ant-design-vue';
const columns = [
{
title: "支付渠道",
name: "Name",
dataIndex: "name",
key: "name",
},
{
title: "绑定账户数",
dataIndex: "amount",
key: "amount",
},
{
title: "当前预警",
dataIndex: "status",
key: "status",
},
{
title: "操作",
key: "tags",
dataIndex: "tags",
},
];
const router=useRouter()
const props = defineProps({
list:{
type:Object
}
})
const onOpenInfo = (record:any, index:any, column:any) => {
router.push({
path:'/home/paybind',
query:{
isShow:1,
paytype:record.paytype
}
})
};
const confirm = (record:any, index:any, column:any)=>{
console.log(record,index,column,"record");
}
defineExpose({
props,
onOpenInfo,
confirm
});
</script>
<style lang="less" scoped>
.flex {
display: flex;
align-items: center;
}
.ml20 {
margin-left: 20px;
}
</style>
<template>
<a-table :columns="columns" :data-source="props.list" :pagination="false">
<template #bodyCell="{ text, record, index, column }">
<div v-if="record.paytype == '1'&& column.key === 'name' ">
<div class="flex">
<WechatFilled :style="{ fontSize: '24px' }"></WechatFilled
><span class="ml20">微信支付</span>
</div>
</div>
<div v-else-if="record.paytype == '2'&& column.key === 'name' ">
<div class="flex">
<AlipaySquareFilled :style="{ fontSize: '24px' }"></AlipaySquareFilled
><span class="ml20">支付宝</span>
</div>
</div>
<div v-else-if="record.paytype == '3'&& column.key === 'name' ">
<div class="flex">
<DollarCircleFilled :style="{ fontSize: '24px' }"></DollarCircleFilled
><span class="ml20">京东白条</span>
</div>
</div>
<div v-else-if="record.paytype == '4'&& column.key === 'name' ">
<div class="flex">
<CreditCardFilled :style="{ fontSize: '24px' }"></CreditCardFilled
><span class="ml20">花呗</span>
</div>
</div>
<div v-else-if="record.paytype == '5'&& column.key === 'name' ">
<div class="flex">
<SkypeFilled :style="{ fontSize: '24px' }"></SkypeFilled
><span class="ml20">京东白条</span>
</div>
</div>
<div v-if="record.status== '0' &&column.key === 'status'">
<span class="ml20" style="color: rgba(12,191,33,1)">良好</span>
</div>
<div v-else-if="record.status== '1' &&column.key === 'status'">
<span class="ml20" style="color: rgb(250, 116, 116)">预警</span>
</div>
<div v-else-if="column.key === 'tags'">
<a-button type="primary" @click="onOpenInfo(record, index, column)">查看</a-button>
<a-popconfirm placement="top" ok-text="Yes" cancel-text="No" @confirm="confirm(record, index, column)">
<template #title>
<p>确任删除这条数据</p>
</template>
</a-popconfirm>
</div>
</template>
</a-table>
</template>
<script lang="ts" setup>
import { defineExpose,defineProps } from "vue";
import { useRouter } from "vue-router";
import {
AlipaySquareFilled,
WechatFilled,
DollarCircleFilled,
CreditCardFilled,
SkypeFilled,
} from "@ant-design/icons-vue";
import { message } from 'ant-design-vue';
const columns = [
{
title: "支付渠道",
name: "Name",
dataIndex: "name",
key: "name",
},
{
title: "绑定账户数",
dataIndex: "amount",
key: "amount",
},
{
title: "当前预警",
dataIndex: "status",
key: "status",
},
{
title: "操作",
key: "tags",
dataIndex: "tags",
},
];
const router=useRouter()
const props = defineProps({
list:{
type:Object
}
})
const onOpenInfo = (record:any, index:any, column:any) => {
router.push({
path:'/home/paybind',
query:{
isShow:1,
paytype:record.paytype
}
})
};
const confirm = (record:any, index:any, column:any)=>{
console.log(record,index,column,"record");
}
defineExpose({
props,
onOpenInfo,
confirm
});
</script>
<style lang="less" scoped>
.flex {
display: flex;
align-items: center;
}
.ml20 {
margin-left: 20px;
}
</style>
<template>
<a-table :columns="columns" :data-source="props.list" :pagination="false">
<template #bodyCell="{ text, record, index, column }">
<div v-if="record.paytype == '1'&& column.key === 'name' ">
<div class="flex">
<WechatFilled :style="{ fontSize: '24px' }"></WechatFilled
><span class="ml20">微信支付</span>
</div>
</div>
<div v-else-if="record.paytype == '2'&& column.key === 'name' ">
<div class="flex">
<AlipaySquareFilled :style="{ fontSize: '24px' }"></AlipaySquareFilled
><span class="ml20">支付宝</span>
</div>
</div>
<div v-else-if="record.paytype == '3'&& column.key === 'name' ">
<div class="flex">
<DollarCircleFilled :style="{ fontSize: '24px' }"></DollarCircleFilled
><span class="ml20">京东白条</span>
</div>
</div>
<div v-else-if="record.paytype == '4'&& column.key === 'name' ">
<div class="flex">
<CreditCardFilled :style="{ fontSize: '24px' }"></CreditCardFilled
><span class="ml20">花呗</span>
</div>
</div>
<div v-else-if="record.paytype == '5'&& column.key === 'name' ">
<div class="flex">
<SkypeFilled :style="{ fontSize: '24px' }"></SkypeFilled
><span class="ml20">京东白条</span>
</div>
</div>
<div v-if="record.status== '0' &&column.key === 'status'">
<span class="ml20" style="color: rgba(12,191,33,1)">良好</span>
</div>
<div v-else-if="record.status== '1' &&column.key === 'status'">
<span class="ml20" style="color: rgb(250, 116, 116)">预警</span>
</div>
<div v-else-if="column.key === 'tags'">
<a-button type="primary" @click="onOpenInfo(record, index, column)">查看</a-button>
</div>
</template>
</a-table>
</template>
<script lang="ts" setup>
import { defineExpose,defineProps } from "vue";
import { useRouter } from "vue-router";
import {
AlipaySquareFilled,
WechatFilled,
DollarCircleFilled,
CreditCardFilled,
SkypeFilled,
} from "@ant-design/icons-vue";
import { message } from 'ant-design-vue';
const columns = [
{
title: "支付渠道",
name: "Name",
dataIndex: "name",
key: "name",
},
{
title: "绑定账户数",
dataIndex: "amount",
key: "amount",
},
{
title: "当前预警",
dataIndex: "status",
key: "status",
},
{
title: "操作",
key: "tags",
dataIndex: "tags",
},
];
const router=useRouter()
const props = defineProps({
list:{
type:Object
}
})
const onOpenInfo = (record:any, index:any, column:any) => {
router.push({
path:'/home/paybind',
query:{
isShow:1,
paytype:record.paytype
}
})
};
const confirm = (record:any, index:any, column:any)=>{
console.log(record,index,column,"record");
}
defineExpose({
props,
onOpenInfo,
confirm
});
</script>
<style lang="less" scoped>
.flex {
display: flex;
align-items: center;
}
.ml20 {
margin-left: 20px;
}
</style>
......@@ -112,8 +112,11 @@ const onGoods = (e: Number) => {
propsData.isCad = e;
isShowGoods.value = true;
};
const onBack = (e: Number) => {
const onBack = async(e: Number) => {
isShowGoods.value = !isShowGoods.value;
const uid = getUid()
const data = await onSelectGoods(uid)
list.value = data.data
};
onMounted(async () => {
const uid = getUid()
......
......@@ -228,6 +228,7 @@ const onSubmit = async () => {
let data: any = {};
const prarms = {
paytype: query.value.paytype,
uid:getUid(),
...toRaw(modelRef),
};
if (status.value === 1) {
......
......@@ -40,12 +40,6 @@
</div>
<div v-else-if="column.key === 'tags'">
<a-button type="primary" @click="onOpenInfo(record, index, column)">查看</a-button>
<a-popconfirm placement="top" ok-text="Yes" cancel-text="No" @confirm="confirm(record, index, column)">
<template #title>
<p>确任删除这条数据</p>
</template>
<a-button type="primary" style="margin-left:20px">删除</a-button>
</a-popconfirm>
</div>
</template>
......
......@@ -31,7 +31,7 @@
<a-radio-group v-model:value="formState.paymentmodel" name="radioGroup" class="pay">
<div style="display: flex;height: 50px;">
<a-radio value="0" style="width:150px;">商品默认金额</a-radio>
<a-input-number style="width:200px;height: 40px;" v-model:value="optionss[formState.subject.index].price" />
<a-input-number style="width:200px;height: 40px;" v-model:value="price" />
<div style="width:50px;"></div>
</div>
<div style="display: flex;height: 50px">
......@@ -99,7 +99,7 @@
</div>
</template>
<script lang="ts" setup>
import { reactive, ref, defineEmits, defineExpose, toRaw, onMounted, } from "vue";
import { reactive, ref, defineEmits, defineExpose, toRaw, onMounted, watch } from "vue";
import dayjs, { Dayjs } from 'dayjs';
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
import { message, UploadProps, Upload } from "ant-design-vue";
......@@ -185,7 +185,7 @@ const onSubmit = () => {
const expireendtime = (moment(toRaw(formState).expireendtime.$d).format('YYYY-MM-DD'))+(moment(endvalue.value.$d).format('THH:mm:[00][Z]'))
let payment
if(formState.paymentmodel == '1'){
payment= optionss[formState.subject.index].price
payment= price.value
}else{
payment =priceSet
}
......@@ -260,6 +260,11 @@ onMounted(async () => {
optionss.value = data.data
return optionss
})
watch(formState,(newVal,oldVal) => {
if(newVal.paymentmodel =='0'){
price.value = optionss.value[newVal.subject.index].price
}
})
defineExpose({
optionss,
......
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