diff --git a/pages/work/BusinessApproval/index.vue b/pages/work/BusinessApproval/index.vue
index 7bd82a9..5b965f8 100644
--- a/pages/work/BusinessApproval/index.vue
+++ b/pages/work/BusinessApproval/index.vue
@@ -57,10 +57,10 @@
>
序号
- 商业公司
- 货主
- 合同编号
- 订单金额
+ 商业公司
+ 货主
+ 合同编号
+ 订单金额
{{ index + 1 }}
@@ -130,6 +130,7 @@ const handleQuery = async () => {
const selected = ref([])
const totalMoney = ref(0)
+const popup = ref()
// const handleSelect = (payload) => {
// const {checked, data} = payload
// const id = data.saleid
@@ -155,35 +156,82 @@ onMounted(async () => {
const handleBack = async () => {
- submitLoading.value = true
- await Promise.allSettled(
- selected.value.map(id =>
- managerRefuse({
- saleIds: id,
- actionType: new Date().getDate() < 25 ? '1' : '0'
- })
- )
- )
- selected.value = []
- totalMoney.value = 0
- await handleQuery()
- submitLoading.value = false
+ uni.showModal({
+ title: '提示',
+ content: '是否要进行回退?',
+ success: async function (res) {
+ if (res.confirm) {
+ uni.showLoading({
+ title: '加载中'
+ });
+ await Promise.allSettled(
+ selected.value.map(id =>
+ managerRefuse({
+ saleIds: id,
+ actionType: new Date().getDate() < 25 ? '1' : '0'
+ })
+ )
+ )
+ selected.value = []
+ totalMoney.value = 0
+ await handleQuery()
+
+ uni.showToast({
+ title: '操作成功',
+ icon: 'none',
+ duration: 2000
+ });
+ uni.hideLoading()
+ } else if (res.cancel) {
+ uni.showToast({
+ title: '用户取消操作',
+ icon: 'none',
+ duration: 2000
+ });
+
+ }
+ }
+ });
}
const handleSubmit = async () => {
- submitLoading.value = true
- await Promise.allSettled(
- selected.value.map(id =>
- managerConfirm({
- saleIds: id,
- actionType: new Date().getDate() < 25 ? '1' : '0'
- })
- )
- )
- selected.value = []
- totalMoney.value = 0
- await handleQuery()
- submitLoading.value = false
+ uni.showModal({
+ title: '提示',
+ content: '是否要进行审核?',
+ success: async function (res) {
+ if (res.confirm) {
+ uni.showLoading({
+ title: '加载中'
+ });
+
+ await Promise.allSettled(
+ selected.value.map(id =>
+ managerConfirm({
+ saleIds: id,
+ actionType: new Date().getDate() < 25 ? '1' : '0'
+ })
+ )
+ )
+ selected.value = []
+ totalMoney.value = 0
+ await handleQuery()
+ uni.showToast({
+ title: '操作成功',
+ icon: 'none',
+ duration: 2000
+ });
+ uni.hideLoading()
+ } else if (res.cancel) {
+ uni.showToast({
+ title: '用户取消操作',
+ icon: 'none',
+ duration: 2000
+ });
+
+ }
+ }
+ });
+
}
const selectionChange = (payload) => {