wangmingchuan321@qq.com 1 month ago
parent cccd57792f
commit 11c4f1d9b9
  1. 13
      api/api.js
  2. 57
      pages/users/lanhu/lanhu_cunjiujilu/index.vue
  3. 50
      pages/users/lanhu/lanhu_cunjiujilu2/index.vue
  4. 57
      pages/users/lanhu/lanhu_lijiyuding/index.vue

@ -249,6 +249,19 @@ export function bindingUserPhone(data) {
return request.post('user/binding', data);
}
export function getcunjiu() {
return request.get('v2/getcunjiu');
}
export function getqujiu() {
return request.get('v2/getcunjiu');
}
export function tableYuDing(data) {
return request.post('v2/tableYuDing',data);
}
/**
* 退出登錄
*

@ -19,23 +19,30 @@
<view class="block_1 flex-col">
<view class="list_1 flex-col">
<view class="list-items_1 flex-col" v-for="(item, index) in loopData0" :key="index">
<view class="list-items_1 flex-col" v-for="(item, index) in list" :key="index"
v-if="list.length>0">
<view class="text-wrapper_1 flex-row justify-between">
<text class="text_2">2号台桌</text>
<text class="text_3">取酒码1111</text>
<text class="text_2">{{item.product_name}}</text>
<text class="text_3">取酒码{{item.code}}</text>
</view>
<view class="text-wrapper_2 flex-row justify-between">
<text class="text_4">到期时间1231</text>
<text class="text_5">x1</text>
<text class="text_4">到期时间:{{item.out_time}}</text>
<text class="text_5">x{{item.now_num}}</text>
</view>
<view class="text-wrapper_3 flex-row">
<text class="text_6">存酒时间200000</text>
<text class="text_6">存酒时间:{{item.c_time}}</text>
</view>
</view>
<view v-if="list.length==0">
<view style="color: white;text-align: center;font-size: 20px;">暂无记录</view>
</view>
</view>
</view>
</view>
@ -45,29 +52,43 @@
</template>
<script>
import {
getcunjiu
} from '@/api/api.js'
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default {
data() {
return {
imgHost: HTTP_REQUEST_URL,
getHeight: this.$util.getWXStatusHeight(),
list: [],
loopData0: [{
lanhutext0: '2号桌台',
lanhutext1: '取酒码:0301',
lanhutext2: '到期时间:2024-10-26',
lanhutext3: 'x2',
lanhutext4: '存酒时间:2024-10-26&nbsp;&nbsp;15:00:00'
}
],
lanhutext0: '2号桌台',
lanhutext1: '取酒码:0301',
lanhutext2: '到期时间:2024-10-26',
lanhutext3: 'x2',
lanhutext4: '存酒时间:2024-10-26&nbsp;&nbsp;15:00:00'
}],
constants: {}
};
},
onLoad() {
this.getData()
},
methods: {
goarrow() {
uni.navigateBack()
},
getData() {
console.log(4555)
getcunjiu().then(res => {
this.list = res.data
}).catch(err => {
})
}
}
}

@ -19,23 +19,29 @@
<view class="block_1 flex-col">
<view class="list_1 flex-col">
<view class="list-items_1 flex-col" v-for="(item, index) in loopData0" :key="index">
<view class="list-items_1 flex-col" v-for="(item, index) in list" :key="index"
v-if="list.length>0">
<view class="text-wrapper_1 flex-row justify-between">
<text class="text_2">2号台桌</text>
<text class="text_3">台号1111</text>
<text class="text_2">{{item.product_name}}</text>
<text class="text_3" style="text-align: right;">台号{{item.table_number}}</text>
</view>
<view class="text-wrapper_2 flex-row justify-between">
<text class="text_4">到期时间1231</text>
<text class="text_5">x1</text>
<text class="text_4">到期时间:{{item.out_time}}</text>
<text class="text_5">x{{item.num}}</text>
</view>
<view class="text-wrapper_3 flex-row">
<text class="text_6">存酒时间200000</text>
<text class="text_6">存酒时间:{{item.c_time}}</text>
</view>
</view>
<view v-if="list.length==0">
<view style="color: white;text-align: center;font-size: 20px;">暂无记录</view>
</view>
</view>
</view>
</view>
@ -45,6 +51,9 @@
</template>
<script>
import {
getqujiu
} from '@/api/api.js'
import {
HTTP_REQUEST_URL
} from '@/config/app';
@ -54,20 +63,25 @@
return {
imgHost: HTTP_REQUEST_URL,
getHeight: this.$util.getWXStatusHeight(),
loopData0: [{
lanhutext0: '2号桌台',
lanhutext1: '台号:0301',
lanhutext2: '到期时间:2024-10-26',
lanhutext3: 'x2',
lanhutext4: '存酒时间:2024-10-26&nbsp;&nbsp;15:00:00'
}
],
list: [],
constants: {}
};
},
onLoad() {
this.getData()
},
methods: {
goarrow() {
uni.navigateBack()
},
getData() {
console.log(4555)
getqujiu().then(res => {
this.list = res.data
}).catch(err => {
})
}
}
}

@ -113,6 +113,9 @@
</view>
</template>
<script>
import {
tableYuDing
} from '@/api/api.js'
import {
HTTP_REQUEST_URL
} from '@/config/app';
@ -149,8 +152,9 @@
}
},
onLoad(id) {
this.table_id = id.table_id
this.table_id = 12
console.log('xxx', id)
var that = this
uni.request({
url: this.imgHost + '/api/v2/getTableDetail/' + this.table_id,
@ -179,35 +183,32 @@
});
return
}
var data = {
table_id: this.table_id,
phone: this.phone,
yuding_date: this.date,
come_date: this.time,
admin_id: admin_id,
remark: this.remark,
}
tableYuDing(data).then(res => {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 5000 // 5
});
}).catch(err => {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 5000 // 5
});
})
uni.request({
url: this.imgHost + '/api/v2/tableYuDing',
method: 'POST',
data: {
admin_id: admin_id,
table_id: this.table_id,
date: this.date,
time: this.time,
phone: this.phone,
remark: this.remark,
},
success: (res) => {
uni.showToast({
title: res.data.msg,
icon: 'none',
duration: 5000 // 5
});
},
fail: (err) => {
uni.showToast({
title: res.data.msg,
icon: 'none',
duration: 5000 // 5
});
console.error('请求错误:', err);
}
});
},
bindDateChange: function(e) {
this.date = e.detail.value
},

Loading…
Cancel
Save