代码更新
This commit is contained in:
@@ -2,32 +2,20 @@
|
||||
<view class="callRecord">
|
||||
<view v-for="item in datas.list" :key="item.id">
|
||||
<view>
|
||||
<view>
|
||||
{{item.callNum}}
|
||||
</view>
|
||||
<view>
|
||||
({{item.note}})
|
||||
</view>
|
||||
<view> {{item.callNum}} </view>
|
||||
<view> ({{item.note}})</view>
|
||||
</view>
|
||||
<view :class="[item.state==3?'rightTopstyle':'rightTop']">
|
||||
{{filterEvent(item.state)}}
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
时间
|
||||
</view>
|
||||
<view>
|
||||
{{item.callTime}}
|
||||
</view>
|
||||
<view> 时间 </view>
|
||||
<view> {{item.callTime}} </view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
手机号
|
||||
</view>
|
||||
<view>
|
||||
{{item.phone}}
|
||||
</view>
|
||||
<view> 手机号 </view>
|
||||
<view> {{item.phone}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -35,13 +23,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onMounted,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
callTablecallRecord,
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
|
||||
import { getCallRecord } from '@/api/callTable.js'
|
||||
let datas = reactive({
|
||||
list: ""
|
||||
})
|
||||
@@ -65,8 +49,7 @@
|
||||
}
|
||||
|
||||
function getList() {
|
||||
callTablecallRecord({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
getCallRecord({
|
||||
page: 1,
|
||||
size: 9999
|
||||
}).then((res) => {
|
||||
@@ -80,22 +63,12 @@
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
// * {
|
||||
// padding: 0;
|
||||
// margin: 0;
|
||||
// text-decoration: none;
|
||||
// outline: none;
|
||||
// }
|
||||
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
padding: 12rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.callRecord {
|
||||
|
||||
>view {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<view class="">
|
||||
<span></span>
|
||||
<span>取号</span>
|
||||
<up-icon @tap="confirm" name="close-circle-fill"></up-icon>
|
||||
<up-icon @tap="datas.show = false" name="close-circle-fill"></up-icon>
|
||||
</view>
|
||||
<view class="">
|
||||
选择桌型
|
||||
@@ -84,7 +84,7 @@
|
||||
手机号码
|
||||
</view>
|
||||
<view style="margin-bottom: 48rpx;">
|
||||
<input v-model="datas.phone" type="text" placeholder="填写号码" />
|
||||
<input v-model="datas.phone" type="text" placeholder="填写号码" maxlength="11"/>
|
||||
</view>
|
||||
<up-button text="确认取号" @tap="callTabletakeNumberEvent" type="primary" class="buttomStyle"
|
||||
shape="circle"></up-button>
|
||||
@@ -111,19 +111,11 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
import {
|
||||
callTable,
|
||||
callTablequeue,
|
||||
callTabletakeNumber,
|
||||
callTableput,
|
||||
callTablecall
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import { reactive, getCurrentInstance, onMounted } from 'vue';
|
||||
import go from '@/commons/utils/go.js'
|
||||
|
||||
import { getCallTableQueue, getCallTable, callTableTakeNumber, callTableCall, updateCallTableState } from '@/api/callTable.js'
|
||||
|
||||
let getrefs = getCurrentInstance()
|
||||
let datas = reactive({
|
||||
msgType: "",
|
||||
@@ -150,50 +142,21 @@
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
const confirm = () => {
|
||||
datas.show = false;
|
||||
};
|
||||
const confirmtow = () => {
|
||||
datas.showtwo = false;
|
||||
};
|
||||
|
||||
function dialogConfirm(value) {
|
||||
if (value == 1) {
|
||||
callTableput({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
state: 3,
|
||||
callQueueId: datas.dialId
|
||||
}).then((res) => {
|
||||
getList()
|
||||
})
|
||||
} else {
|
||||
// value=2完成
|
||||
callTableput({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
state: 2,
|
||||
callQueueId: datas.dialId
|
||||
}).then((res) => {
|
||||
getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function gettypeevent(d) {
|
||||
datas.selecttopType = d
|
||||
getList()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*/
|
||||
function getList() {
|
||||
callTable({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
getCallTable({
|
||||
page: 1,
|
||||
size: 10,
|
||||
size: 9999,
|
||||
callTableId: datas.selecttopType,
|
||||
state: 1
|
||||
}).then((res) => {
|
||||
datas.list = res
|
||||
datas.selectTabletype = res.records[0]
|
||||
})
|
||||
callTablequeue({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
getCallTableQueue({
|
||||
page: 1,
|
||||
size: 9999,
|
||||
callTableId: datas.selecttopType,
|
||||
@@ -202,25 +165,21 @@
|
||||
datas.listType = res
|
||||
})
|
||||
}
|
||||
|
||||
function quxiaoevent(item) {
|
||||
callTableput({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
state: -1,
|
||||
callQueueId: item.id
|
||||
}).then((res) => {
|
||||
getList()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择桌型
|
||||
* @param {Object} d
|
||||
*/
|
||||
function selectTypeEvent(d) {
|
||||
datas.selectTabletype = d
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取号
|
||||
*/
|
||||
function callTabletakeNumberEvent() {
|
||||
callTabletakeNumber({
|
||||
callTableTakeNumber({
|
||||
callTableId: datas.selectTabletype.id,
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
phone: datas.phone,
|
||||
note: datas.selectTabletype.note,
|
||||
name: datas.selectTabletype.name,
|
||||
@@ -236,23 +195,83 @@
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function showFalse() {
|
||||
datas.show = true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 叫号
|
||||
* @param {Object} item
|
||||
*/
|
||||
function profilepicture(item) {
|
||||
datas.dialId = item.id
|
||||
callTablecall({
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
callTableCall({
|
||||
callQueueId: item.id
|
||||
}).then((res) => {
|
||||
datas.profilepicturedata = res
|
||||
getrefs.ctx.$refs.alertDialog.open()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改叫号状态
|
||||
* @param {Object} value
|
||||
*/
|
||||
function dialogConfirm(value) {
|
||||
if (value == 1) {
|
||||
updateCallTableState({
|
||||
state: 3,
|
||||
callQueueId: datas.dialId
|
||||
}).then((res) => {
|
||||
getList()
|
||||
})
|
||||
} else {
|
||||
// value=2完成
|
||||
updateCallTableState({
|
||||
state: 2,
|
||||
callQueueId: datas.dialId
|
||||
}).then((res) => {
|
||||
getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换筛选桌型
|
||||
* @param {Object} d
|
||||
*/
|
||||
function gettypeevent(d) {
|
||||
datas.selecttopType = d
|
||||
getList()
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消排队
|
||||
* @param {Object} item
|
||||
*/
|
||||
function quxiaoevent(item) {
|
||||
updateCallTableState({
|
||||
state: -1,
|
||||
callQueueId: item.id
|
||||
}).then((res) => {
|
||||
getList()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取号
|
||||
*/
|
||||
function showFalse() {
|
||||
datas.show = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭取号成功弹窗
|
||||
*/
|
||||
const confirmtow = () => {
|
||||
datas.showtwo = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* 前往叫号记录
|
||||
*/
|
||||
function toUrl() {
|
||||
go.to('PAGES_CALLRE_CORD')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user