This commit is contained in:
parent
2176ca3ab1
commit
1dec68b589
|
|
@ -7,7 +7,8 @@
|
||||||
<el-input v-model="ordereData.orderNo" placeholder="请输入订单号查询" @input="inputChange" clearable />
|
<el-input v-model="ordereData.orderNo" placeholder="请输入订单号查询" @input="inputChange" clearable />
|
||||||
<!-- <el-button style="margin-left: 10px;" type="primary" @click="onSubmit">搜索</el-button> -->
|
<!-- <el-button style="margin-left: 10px;" type="primary" @click="onSubmit">搜索</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<add :loading="loadingboxshow" :ordereData="ordereData" @emititemboxshow="emititemboxshow" v-if="ordereData.list.length">
|
<add :loading="loadingboxshow" :ordereData="ordereData" @emititemboxshow="emititemboxshow"
|
||||||
|
v-if="ordereData.list.length">
|
||||||
</add>
|
</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"
|
||||||
|
|
@ -15,14 +16,16 @@
|
||||||
@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" @emititemboxshow="emititemboxshow" 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" @emititemboxshow="emititemboxshow" 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 +48,8 @@
|
||||||
<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">{{dayjs( orderDetaildata.createdAt).format("YYYY-MM-DD HH:mm:ss") }}</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>
|
||||||
|
|
@ -83,17 +87,18 @@
|
||||||
<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 v-if="item.status == 'refund'" ><span style="border: 2px solid red; color: red; padding: 4px 2px;">已退</span></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 v-else>{{ item.priceAmount }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderbox_right_button">
|
<div class="orderbox_right_button">
|
||||||
<el-button style="width: 100%;" v-if="orderDetaildata.status != 'refund'" type="primary" @click="recharge = true">退单</el-button>
|
<el-button style="width: 100%;" v-if="orderDetaildata.status != 'refund'" type="primary"
|
||||||
|
@click="recharge = true">退单</el-button>
|
||||||
<div class="orderbox_right_buttonbutton">
|
<div class="orderbox_right_buttonbutton">
|
||||||
<router-link to="/" style="width: 45%;" type="danger">
|
<!-- // -->
|
||||||
<el-button style="width: 100%;" type="">重打收銀打票</el-button>
|
<el-button @click="print('normal')" style="width: 45%;" type="">重打收銀打票</el-button>
|
||||||
</router-link>
|
<el-button @click="print('one')" style="width: 45%;" type="">重打出品小票</el-button>
|
||||||
<el-button style="width: 45%;" type="" @click="recharge = true">重打出品小票</el-button>
|
|
||||||
<!--payreturnOrderclick @click="recharge = true" -->
|
<!--payreturnOrderclick @click="recharge = true" -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -162,7 +167,7 @@
|
||||||
单号:{{ orderDetaildata.orderNo }}
|
单号:{{ orderDetaildata.orderNo }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
下单时间:{{ dayjs(orderDetaildata.createdAt).format("YYYY-MM-DD HH:mm:ss") }}
|
下单时间:{{ dayjs(orderDetaildata.createdAt).format("YYYY-MM-DD HH:mm:ss") }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>金额:¥{{ orderDetaildata.orderAmount }}</span>
|
<span>金额:¥{{ orderDetaildata.orderAmount }}</span>
|
||||||
|
|
@ -214,7 +219,7 @@ import { ref, onMounted, reactive } from 'vue'
|
||||||
import { ElMessage, dayjs } from 'element-plus'
|
import { ElMessage, dayjs } from 'element-plus'
|
||||||
import { useUser } from "@/store/user.js"
|
import { useUser } from "@/store/user.js"
|
||||||
import lodash from 'lodash'
|
import lodash from 'lodash'
|
||||||
import { orderfindOrder, orderorderDetail, payreturnOrder } from '@/api/order/index.js'
|
import { orderfindOrder, orderorderDetail, payreturnOrder, cloudPrinterprint } from '@/api/order/index.js'
|
||||||
import add from '@/views/order/components/add.vue'
|
import add from '@/views/order/components/add.vue'
|
||||||
const store = useUser()
|
const store = useUser()
|
||||||
const itemboxshow = ref(false)
|
const itemboxshow = ref(false)
|
||||||
|
|
@ -263,6 +268,22 @@ const payreturnOrderclick = async () => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const print = async (e) => {
|
||||||
|
try {
|
||||||
|
await cloudPrinterprint({
|
||||||
|
type: e,
|
||||||
|
orderId: orderDetaildata.value.id,
|
||||||
|
ispre: false
|
||||||
|
})
|
||||||
|
ElMessage({
|
||||||
|
message: '成功打票',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const loadingboxshow = ref(false);
|
const loadingboxshow = ref(false);
|
||||||
|
|
||||||
const emititemboxshow = async (e) => { //接收子组件值 并赋值给父组件
|
const emititemboxshow = async (e) => { //接收子组件值 并赋值给父组件
|
||||||
|
|
@ -729,6 +750,7 @@ onMounted(() => {
|
||||||
|
|
||||||
.orderbox_right_item {
|
.orderbox_right_item {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: var(--el-font-size-base);
|
font-size: var(--el-font-size-base);
|
||||||
// color: var(--primary-color);
|
// color: var(--primary-color);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue