169 lines
5.0 KiB
Vue
169 lines
5.0 KiB
Vue
|
|
<template>
|
|||
|
|
<uni-drawer ref="drawerContainerRef" :width="width" mode="right">
|
|||
|
|
|
|||
|
|
<uni-nav-bar
|
|||
|
|
:border="false"
|
|||
|
|
:fixed="true"
|
|||
|
|
left-icon="left"
|
|||
|
|
status-bar
|
|||
|
|
title="价格审核"
|
|||
|
|
@clickLeft="hideDrawer"
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
<view class="padding">
|
|||
|
|
<uni-section :subTitle="queryParams.cbusinessname" title="商业公司名称:" type="line"/>
|
|||
|
|
<uni-section :subTitle="queryParams.goodsName" title="商品:" type="line"/>
|
|||
|
|
<uni-section :subTitle="queryParams.warehouseName" title="发货仓库:" type="line"/>
|
|||
|
|
<uni-section :subTitle="queryParams.execDate" title="新价格执行日期:" type="line"/>
|
|||
|
|
<uni-section :subTitle="`${queryParams.checkPrice} - 原考核价(元,含税):${queryParams.oldCheckPrice ?? 0}`"
|
|||
|
|
title="考核价(元,含税):" type="line"/>
|
|||
|
|
<uni-section :subTitle="`${queryParams.invoicePrice} - 原销售价(元,含税):${queryParams.oldInvoicePrice ?? 0}`"
|
|||
|
|
title="销售价(元,含税):" type="line"/>
|
|||
|
|
<uni-section :subTitle="`${queryParams.middlePrice} - 原中标价(元,含税):${queryParams.oldMiddlePrice ?? 0}`"
|
|||
|
|
title="中标价(元,含税):" type="line"/>
|
|||
|
|
<uni-section :subTitle="queryParams.taxRate" title="税率:" type="line"/>
|
|||
|
|
<uni-section :subTitle="queryParams.taxLessPrice" title="销售价(元,无税):" type="line"/>
|
|||
|
|
<uni-section :subTitle="queryParams.remark" title="备注:" type="line"/>
|
|||
|
|
|
|||
|
|
<uni-section class="margin-bottom" title="回退原因:" type="line">
|
|||
|
|
<uni-easyinput v-model="queryParams.backReasonCredit" placeholder="请输入回退内容"/>
|
|||
|
|
</uni-section>
|
|||
|
|
|
|||
|
|
<view class="flex">
|
|||
|
|
<button class="mini-btn" size="mini" type="primary" @click="handleBack">回退</button>
|
|||
|
|
<button class="mini-btn" size="mini" type="default" @click="handleSubmit">额度终审</button>
|
|||
|
|
</view>
|
|||
|
|
|
|||
|
|
</view>
|
|||
|
|
|
|||
|
|
</uni-drawer>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script setup>
|
|||
|
|
import {defineEmits, defineExpose, defineOptions, ref} from 'vue'
|
|||
|
|
import {
|
|||
|
|
directorLastReviewQuota,
|
|||
|
|
directorReviewPrice,
|
|||
|
|
putBackDataLastPaymentOrQuota,
|
|||
|
|
putBackDataPrice
|
|||
|
|
} from "../../../../../api/AccountPricePreliminaryRreview";
|
|||
|
|
|
|||
|
|
// 价格审核
|
|||
|
|
|
|||
|
|
defineOptions({
|
|||
|
|
name: 'PriceReview'
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
|
|||
|
|
const emit = defineEmits(['refresh'])
|
|||
|
|
|
|||
|
|
const width = ref(document.documentElement.clientWidth || document.body.clientWidth)
|
|||
|
|
const queryParams = ref({})
|
|||
|
|
const drawerContainerRef = ref()
|
|||
|
|
|
|||
|
|
const tableData = ref([])
|
|||
|
|
const total = ref(0)
|
|||
|
|
const paging = ref({
|
|||
|
|
pageNum: 1,
|
|||
|
|
pageSize: 100,
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
// 选择公司后 获取该公司的标题进行显示
|
|||
|
|
const onCompanySelect = (type) => {
|
|||
|
|
switch (type) {
|
|||
|
|
case '1':
|
|||
|
|
return 'ZOP信用期限(万元)'
|
|||
|
|
case '2':
|
|||
|
|
return 'GOP信用期限(万元)'
|
|||
|
|
case '3':
|
|||
|
|
return 'LOP信用期限(万元)'
|
|||
|
|
case '4':
|
|||
|
|
return 'HOP信用期限(万元)'
|
|||
|
|
default:
|
|||
|
|
return '';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const openDrawer = (data) => {
|
|||
|
|
drawerContainerRef.value.open()
|
|||
|
|
queryParams.value = {
|
|||
|
|
...data,
|
|||
|
|
cbusinessname: data.userName
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
defineExpose({openDrawer})
|
|||
|
|
|
|||
|
|
const hideDrawer = () => {
|
|||
|
|
drawerContainerRef.value.close()
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const handleBack = () => {
|
|||
|
|
if (!queryParams.value.backReasonCredit) {
|
|||
|
|
return uni.showToast({
|
|||
|
|
title: '请填写回退内容',
|
|||
|
|
icon: 'none',
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
uni.showModal({
|
|||
|
|
title: '提示',
|
|||
|
|
content: '您确定是否要回退记录?',
|
|||
|
|
success: async function (res) {
|
|||
|
|
if (res.confirm) {
|
|||
|
|
|
|||
|
|
uni.showLoading({
|
|||
|
|
title: '加载中'
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
await putBackDataPrice({
|
|||
|
|
backReasonCredit: queryParams.value.backReasonCredit,
|
|||
|
|
businessGoodsHistId: queryParams.value.businessGoodsHistId,
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
uni.showToast({
|
|||
|
|
title: '操作成功',
|
|||
|
|
icon: 'none',
|
|||
|
|
duration: 2000
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
uni.hideLoading()
|
|||
|
|
|
|||
|
|
hideDrawer()
|
|||
|
|
emit('refresh')
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const handleSubmit = () => {
|
|||
|
|
uni.showModal({
|
|||
|
|
title: '提示',
|
|||
|
|
content: '您确认要进行审核通过吗?',
|
|||
|
|
success: async function (res) {
|
|||
|
|
if (res.confirm) {
|
|||
|
|
uni.showLoading({
|
|||
|
|
title: '加载中'
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
await directorReviewPrice({
|
|||
|
|
businessGoodsHistId: queryParams.value.businessGoodsHistId
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
uni.showToast({
|
|||
|
|
title: '操作成功',
|
|||
|
|
icon: 'none',
|
|||
|
|
duration: 2000
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
uni.hideLoading()
|
|||
|
|
|
|||
|
|
hideDrawer()
|
|||
|
|
emit('refresh')
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
</script>
|