订单退单
This commit is contained in:
parent
861e62ce15
commit
ba7efac5d1
|
|
@ -37,3 +37,15 @@ export function payreturnOrder(data) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function cloudPrinterprint(params) {
|
||||||
|
return request({
|
||||||
|
method: "post",
|
||||||
|
url: "cloudPrinter/print",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ const loading = ref(false);
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
serialNumber: RandomNumBoth(1000, 9999),
|
serialNumber: RandomNumBoth(1000, 9999),
|
||||||
clientType: 'pc',
|
clientType: 'pc',
|
||||||
merchantName: '',
|
merchantName: '',//19191703856
|
||||||
loginName: "",
|
loginName: "",
|
||||||
password: "",
|
password: "",
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,12 @@
|
||||||
<div class="demo_tabs_box">
|
<div class="demo_tabs_box">
|
||||||
<div class="demo_tabs_boxitem" v-for="(item, index) in ordereData.list" :key="index"
|
<div class="demo_tabs_boxitem" v-for="(item, index) in ordereData.list" :key="index"
|
||||||
@click="clickitemboxshow(item)">
|
@click="clickitemboxshow(item)">
|
||||||
|
<div class="demo_tabs_boxitem_oneyt" v-if="item.status == 'refund'">已退款</div>
|
||||||
|
|
||||||
<div class="demo_tabs_boxitem_one">
|
<div class="demo_tabs_boxitem_one">
|
||||||
<div class="" style="width: 100px; height: 70px;border-radius: 10px; background:var( --primary-color); color: #fff; display: flex; justify-content: center; align-items: center;">
|
<div class=""
|
||||||
<div>{{ item.zdNo || "pos" }}</div>
|
style="width: 100px; height: 70px;border-radius: 10px; background:rgb(186 200 239); display: flex; justify-content: center; align-items: center;">
|
||||||
|
<div>{{ item.zdNo || "pos" }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-image style="width: 100px; height: 70px;border-radius: 10px;" :src="item.imgUrl" fit="scale-down" /> -->
|
<!-- <el-image style="width: 100px; height: 70px;border-radius: 10px;" :src="item.imgUrl" fit="scale-down" /> -->
|
||||||
<div class="demo_tabs_boxitem_oneone">
|
<div class="demo_tabs_boxitem_oneone">
|
||||||
|
|
@ -18,8 +21,8 @@
|
||||||
<div class="demo_tabs_boxitem_onetow">
|
<div class="demo_tabs_boxitem_onetow">
|
||||||
<div style="font-size: 16px; color: #757575;">{{ item.orderNo }}</div>
|
<div style="font-size: 16px; color: #757575;">{{ item.orderNo }}</div>
|
||||||
<div>
|
<div>
|
||||||
<span>{{item.names && item.names[0] }} </span>
|
<span>{{ item.names && item.names[0] }} </span>
|
||||||
<span style="margin-left: 6px;">等{{ item.names && item.names.length }}项</span>
|
<span style="margin-left: 6px;">{{ item.names && item.names.length }}项</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -45,8 +48,8 @@ const props = defineProps({
|
||||||
ordereData: {
|
ordereData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {
|
default: {
|
||||||
list:[{
|
list: [{
|
||||||
names:[]
|
names: []
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -70,14 +73,30 @@ const clickitemboxshow = (e) => {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
// background: #eeeeee;
|
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
|
position: relative;
|
||||||
|
.demo_tabs_boxitem_oneyt {
|
||||||
|
position: absolute;
|
||||||
|
top: 20%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
right: 200px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 3px solid red;
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
.demo_tabs_boxitem_one {
|
.demo_tabs_boxitem_one {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.demo_tabs_boxitem_oneone {
|
.demo_tabs_boxitem_oneone {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,14 @@
|
||||||
@current-change="handleCurrentChange" />
|
@current-change="handleCurrentChange" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="销售" name="closed">
|
<el-tab-pane label="销售" name="closed">
|
||||||
<add :ordereData="ordereData" v-if="ordereData.list.length"></add>
|
<add :ordereData="ordereData" @emititemboxshow="emititemboxshow" v-if="ordereData.list.length"></add>
|
||||||
<div v-else style="width: 100%; text-align: center; margin: 30px 0;">暂无数据</div>
|
<div v-else style="width: 100%; text-align: center; margin: 30px 0;">暂无数据</div>
|
||||||
<el-pagination v-if="ordereData.list.length" layout="prev, pager, next, jumper"
|
<el-pagination v-if="ordereData.list.length" layout="prev, pager, next, jumper"
|
||||||
style="margin-top: 20px;" :total="Number(ordereData.total)"
|
style="margin-top: 20px;" :total="Number(ordereData.total)"
|
||||||
@current-change="handleCurrentChange" />
|
@current-change="handleCurrentChange" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="退单" name="refund">
|
<el-tab-pane label="退单" name="refund">
|
||||||
<add :ordereData="ordereData" v-if="ordereData.list.length"></add>
|
<add :ordereData="ordereData" @emititemboxshow="emititemboxshow" v-if="ordereData.list.length"></add>
|
||||||
<div v-else style="width: 100%; text-align: center; margin: 30px 0;">暂无数据</div>
|
<div v-else style="width: 100%; text-align: center; margin: 30px 0;">暂无数据</div>
|
||||||
<el-pagination v-if="ordereData.list.length" layout="prev, pager, next, jumper"
|
<el-pagination v-if="ordereData.list.length" layout="prev, pager, next, jumper"
|
||||||
style="margin-top: 20px;" :total="Number(ordereData.total)"
|
style="margin-top: 20px;" :total="Number(ordereData.total)"
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
<span class="span">收银员:</span><span class="nunber">{{ orderDetaildata.userName }}</span>
|
<span class="span">收银员:</span><span class="nunber">{{ orderDetaildata.userName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderbox_right_item">
|
<div class="orderbox_right_item">
|
||||||
<span class="span">创建时间:</span><span class="nunber">{{ orderDetaildata.createdAt }}</span>
|
<span class="span">创建时间:</span><span class="nunber">{{dayjs( orderDetaildata.createdAt).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderbox_right_item">
|
<div class="orderbox_right_item">
|
||||||
<span class="span">终端:</span><span class="nunber">{{ orderDetaildata.zdNo }}</span>
|
<span class="span">终端:</span><span class="nunber">{{ orderDetaildata.zdNo }}</span>
|
||||||
|
|
@ -80,21 +80,22 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="orderbox_right_list_item" style="margin-top: 20px;"
|
<div class="orderbox_right_list_item" style="margin-top: 20px;"
|
||||||
v-for="(item, index) in orderDetaildata.detailList" :key="index">
|
v-for="(item, index) in orderDetaildata.detailList" :key="index">
|
||||||
<div>{{ item.productName }}-{{ item.productSkuName }}号商品</div>
|
<div>{{ item.productName }}-{{ item.productSkuName }}</div>
|
||||||
<div style="text-align: center;">{{ item.num }}</div>
|
<div style="text-align: center;">{{ item.num }}</div>
|
||||||
<div style="text-align: center;">{{ item.price }}</div>
|
<div style="text-align: center;">{{ item.price }}</div>
|
||||||
<div>{{ item.priceAmount }}</div>
|
<div v-if="item.status == 'refund'" ><span style="border: 2px solid red; color: red; padding: 4px 2px;">已退</span></div>
|
||||||
|
<div v-else>{{ item.priceAmount }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderbox_right_button">
|
<div class="orderbox_right_button">
|
||||||
<div class="orderbox_right_buttonbutton" v-if="orderDetaildata.status == 'refund'">
|
<el-button style="width: 100%;" v-if="orderDetaildata.status != 'refund'" type="primary" @click="recharge = true">退单</el-button>
|
||||||
<router-link to="/" style="width: 45%;">
|
<div class="orderbox_right_buttonbutton">
|
||||||
<el-button style="width: 100%;" type="primary">打票</el-button>
|
<router-link to="/" style="width: 45%;" type="danger">
|
||||||
|
<el-button style="width: 100%;" type="">重打收銀打票</el-button>
|
||||||
</router-link>
|
</router-link>
|
||||||
<el-button style="width: 45%;" type="danger" @click="recharge = true">退单</el-button>
|
<el-button style="width: 45%;" type="" @click="recharge = true">重打出品小票</el-button>
|
||||||
<!--payreturnOrderclick @click="recharge = true" -->
|
<!--payreturnOrderclick @click="recharge = true" -->
|
||||||
</div>
|
</div>
|
||||||
<el-button v-else style="width: 100%; margin-top: 10px;" type="primary" @click="onSubmit">结算</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderbox_rightbox" v-else>
|
<div class="orderbox_rightbox" v-else>
|
||||||
|
|
@ -161,7 +162,7 @@
|
||||||
单号:{{ orderDetaildata.orderNo }}
|
单号:{{ orderDetaildata.orderNo }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
下单时间:{{ orderDetaildata.createdAt }}
|
下单时间:{{ dayjs(orderDetaildata.createdAt).format("YYYY-MM-DD HH:mm:ss") }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>金额:¥{{ orderDetaildata.orderAmount }}</span>
|
<span>金额:¥{{ orderDetaildata.orderAmount }}</span>
|
||||||
|
|
@ -249,6 +250,7 @@ const payreturnOrderclick = async () => {
|
||||||
await payreturnOrder(arr)
|
await payreturnOrder(arr)
|
||||||
changechecked.value = false
|
changechecked.value = false
|
||||||
recharge.value = false
|
recharge.value = false
|
||||||
|
ElMessage.error('退款成功!')
|
||||||
asyncorderfindOrder()
|
asyncorderfindOrder()
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error('以没有退款项目!')
|
ElMessage.error('以没有退款项目!')
|
||||||
|
|
@ -722,7 +724,7 @@ onMounted(() => {
|
||||||
.tableDataclass {
|
.tableDataclass {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 75%;
|
height: 80%;
|
||||||
|
|
||||||
.orderbox_right_item {
|
.orderbox_right_item {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
|
|
@ -740,6 +742,7 @@ onMounted(() => {
|
||||||
bottom: 16px;
|
bottom: 16px;
|
||||||
|
|
||||||
.orderbox_right_buttonbutton {
|
.orderbox_right_buttonbutton {
|
||||||
|
margin-top: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue