feat: 新增账期价格复审 · 价格终审
This commit is contained in:
parent
7c8f107849
commit
da5084d1d8
@ -27,4 +27,31 @@ export const directorLastReviewPayment = (query) => {
|
||||
url: '/bussiness/baseusercredithistory/goods-credit-period-repeatedly-review',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export const getCreditPerRepeatReviewlist = (data, query) => {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/bussiness/baseusercredithistory/goods-credit-line-repeatedly-review-list',
|
||||
params: query,
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 价格终审 的回退
|
||||
export const putBackDataLastPrice = (data) => {
|
||||
return request({
|
||||
method: 'put',
|
||||
url: '/bussiness/businessgoods/goods-credit-line-repeatedly-review-back',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
/// 价格终审(副总监初审)
|
||||
export const directorLastReviewPrice = (data)=> {
|
||||
return request({
|
||||
method: 'put',
|
||||
url: '/bussiness/businessgoods/goods-credit-line-repeatedly-review',
|
||||
data,
|
||||
})
|
||||
}
|
||||
111
pages/work/AccountPriceFinallReview/children/PriceFinal.vue
Normal file
111
pages/work/AccountPriceFinallReview/children/PriceFinal.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<uni-drawer ref="drawerContainerRef" :width="width" mode="right">
|
||||
|
||||
<uni-nav-bar
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
left-icon="left"
|
||||
status-bar
|
||||
title="价格审核"
|
||||
@clickLeft="hideDrawer"
|
||||
/>
|
||||
|
||||
<uni-collapse ref="collapse">
|
||||
<uni-collapse-item
|
||||
v-for="row in tableData"
|
||||
:key="row.creditHistId"
|
||||
:title="`商品名称: ${row.shortName}`"
|
||||
open
|
||||
>
|
||||
<view class="padding">
|
||||
<view class="context">
|
||||
<view class="label">
|
||||
<text>发货仓库:</text>
|
||||
<text>{{ row.warehouseName }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>新考核价(元,含税):</text>
|
||||
<text>{{ row.checkPrice }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>新开票价(元,含税):</text>
|
||||
<text>{{ row.invoicePrice }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>原考核价(元,无税):</text>
|
||||
<text>{{ row.oldCheckPrice }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>原开票价(元,无税):</text>
|
||||
<text>{{ row.oldInvoicePrice }}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="label">
|
||||
<text>状态:</text>
|
||||
<text>{{ row.state }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>更新日期:</text>
|
||||
<text>{{ row.updateTime }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text></text>
|
||||
<button class="mini-btn" size="mini" type="primary" @click="handleFinalReview(row)">查看</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</uni-drawer>
|
||||
<PriceFinalReview ref="PriceFinalReviewRef" @refresh="handleQuery"/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineExpose, defineOptions, ref} from 'vue'
|
||||
import {getCreditPerRepeatReviewlist} from "../../../../api/AccountPriceFinallReview";
|
||||
import PriceFinalReview from "./components/PriceFinalReview.vue";
|
||||
|
||||
defineOptions({
|
||||
name: "PriceFinal"
|
||||
})
|
||||
|
||||
const width = ref(document.documentElement.clientWidth || document.body.clientWidth)
|
||||
const queryParams = ref({})
|
||||
const tableData = ref([])
|
||||
const total = ref()
|
||||
const paging = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
})
|
||||
|
||||
const drawerContainerRef = ref()
|
||||
const PriceFinalReviewRef = ref()
|
||||
|
||||
const handleQuery = async () => {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
const {rows, total: count} = await getCreditPerRepeatReviewlist(queryParams.value, paging.value)
|
||||
tableData.value = rows
|
||||
total.value = count
|
||||
uni.hideLoading()
|
||||
}
|
||||
const openDrawer = async (item) => {
|
||||
drawerContainerRef.value.open()
|
||||
queryParams.value = {
|
||||
userId: item.userId,
|
||||
type: 0
|
||||
}
|
||||
await handleQuery()
|
||||
}
|
||||
|
||||
defineExpose({openDrawer})
|
||||
|
||||
const hideDrawer = () => {
|
||||
drawerContainerRef.value.close()
|
||||
}
|
||||
const handleFinalReview = (item) => {
|
||||
PriceFinalReviewRef.value.openDrawer(item)
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,181 @@
|
||||
<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.toString()" 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.toString()" title="税率:" type="line"/>
|
||||
<uni-section :subTitle="queryParams.taxLessPrice.toString()" title="销售价(元,无税):" type="line"/>
|
||||
<uni-section :subTitle="queryParams.remark" title="备注:" type="line"/>
|
||||
|
||||
|
||||
<uni-section class="margin-bottom" title="上传审核附件:" type="line">
|
||||
<uni-file-picker ref="uploadFile" file-mediatype="all" limit="1" @select="handleSelect"/>
|
||||
</uni-section>
|
||||
|
||||
<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 {directorLastReviewPrice, putBackDataLastPrice} from "../../../../../api/AccountPriceFinallReview";
|
||||
import config from "../../../../../config";
|
||||
import {getToken} from "../../../../../utils/auth";
|
||||
|
||||
defineOptions({
|
||||
name: 'PriceFinalReview'
|
||||
})
|
||||
|
||||
|
||||
const emit = defineEmits(['refresh'])
|
||||
|
||||
const width = ref(document.documentElement.clientWidth || document.body.clientWidth)
|
||||
const queryParams = ref({})
|
||||
const drawerContainerRef = ref()
|
||||
const uploadFile = ref()
|
||||
|
||||
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 putBackDataLastPrice({
|
||||
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 directorLastReviewPrice({
|
||||
businessGoodsHistId: queryParams.value.businessGoodsHistId,
|
||||
execDate:queryParams.value.execDate,
|
||||
urlFilePath:queryParams.value.urlFilePath
|
||||
})
|
||||
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
hideDrawer()
|
||||
emit('refresh')
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleSelect = (files) => {
|
||||
const {tempFilePaths, tempFiles} = files
|
||||
console.log(tempFiles)
|
||||
|
||||
uni.uploadFile({
|
||||
header: {
|
||||
Authorization: "Bearer " + getToken()
|
||||
},
|
||||
url: `${config.baseUrl}/common/uploadSecurityFileByType?uploadType=jiageshenqingfujian`, // 上传图片的接口
|
||||
filePath: tempFilePaths[0],
|
||||
formData: {
|
||||
name: 'file'
|
||||
},
|
||||
success: async (uploadFileRes) => {
|
||||
const content = JSON.parse(uploadFileRes.data)
|
||||
console.log(uploadFileRes)
|
||||
if(content.code === 200){
|
||||
queryParams.value.urlFilePath = content.fileName
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: '上传失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
uploadFile.value.clearFiles(0)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
Loading…
x
Reference in New Issue
Block a user