完善订单

This commit is contained in:
魏啾
2024-03-07 18:29:29 +08:00
parent fc810fd02f
commit f0b7169a29
6 changed files with 61 additions and 98 deletions

View File

@@ -13,8 +13,11 @@
</div>
</div>
<div class="demo_tabs_boxitem_onetow">
<div style="width: 80%;">{{item.names && item.names.join(',') }}</div>
<div style="font-size: 16px; color: #757575;">{{ item.orderNo }}</div>
<div>
<span>{{item.names && item.names[0] }} </span>
<span style="margin-left: 6px;">{{ item.names && item.names.length }}</span>
</div>
</div>
</div>
<div class="demo_tabs_boxitem_tow">
@@ -38,7 +41,11 @@ import { dayjs } from 'element-plus'
const props = defineProps({
ordereData: {
type: Object,
default: {}
default: {
list:[{
names:[]
}]
}
}
})
const emit = defineEmits(["emititemboxshow"])
@@ -77,6 +84,9 @@ const clickitemboxshow = (e) => {
}
.demo_tabs_boxitem_onetow {
display: flex;
flex-direction: column;
justify-content: space-around;
flex: 1;
margin-left: 20px;
}

View File

@@ -179,7 +179,9 @@
<div class="recharge_footer_itemright_botton_item"
v-for="(item, index) in orderDetaildata.detailList" :key="index">
<div class="recharge_footer_itemright_botton_itemone">
<el-checkbox @change="changezong(item, index, 1)" v-model="item.checked" size="large" />
<el-checkbox @change="changezong(item, index, 1)"
:disabled="item.status == 'closed' ? false : true" v-model="item.checked"
size="large" />
<span style="margin-left: 10px;">{{ item.productName }}</span>
</div>
<div class="recharge_footer_itemright_botton_itemtow">
@@ -233,10 +235,9 @@ const payreturnOrderclick = async () => {
return false
}
try {
let result = orderDetaildata.value.detailList.map(item => {
let obj = {}
if (item.checked) {
obj = {
let arr = orderDetaildata.value.detailList.filter(item => {
if (item.checked && item.status == 'closed') {
var obj = {
id: item.id,
orderId: orderDetaildata.value.id,
remark: remark.value
@@ -244,12 +245,19 @@ const payreturnOrderclick = async () => {
}
return obj
})
await payreturnOrder(result)
recharge.value = false
asyncorderfindOrder()
if (arr.length != 0) {
await payreturnOrder(arr)
changechecked.value = false
recharge.value = false
asyncorderfindOrder()
}else{
ElMessage.error('以没有退款项目!')
}
} catch (error) {
}
}
const emititemboxshow = async (e) => { //接收子组件值 并赋值给父组件
@@ -428,6 +436,7 @@ onMounted(() => {
.demo_tabs_boxitem_one {
display: flex;
justify-content: flex-start;
.demo_tabs_boxitem_oneone {
display: flex;
margin-left: 20px;

View File

@@ -60,9 +60,9 @@
</div>
<div class="box_content_left_bottom">
<el-table :data="infoData.detailList" style="width: 100%;" height="400px">
<el-table-column prop="productName" label="商品名称" width="200" />
<el-table-column prop="skuName" label="规格名称" width="200" />
<el-table-column prop="amount" label="商品数量" width="200" />
<el-table-column prop="productName" label="商品名称"/>
<el-table-column prop="skuName" label="规格名称"/>
<el-table-column prop="amount" label="商品数量"/>
<el-table-column prop="num" label="商品金额" />
</el-table>
</div>