Browse Source

完善对账单

dev-xx
qb 9 months ago
parent
commit
a8868e5274
  1. 14
      src/option/finance/MerchantDepositSlip.js
  2. 28
      src/views/finance/MerchantDepositSlip.vue
  3. 95
      src/views/finance/TransactionInformation.vue

14
src/option/finance/MerchantDepositSlip.js

@ -201,6 +201,20 @@ export const columnList = [
sortable: true,
head: false,
},
{
prop: 'confirmStatisticsOrderName',
label: '对账单是否确认',
type: 1,
values: '',
width: '150',
checkarr: [
{ label: '是', value: '1' },
{ label: '否', value: '0' },
],
fixed: false,
sortable: true,
head: false,
},
// {
// prop: 'templateType',
// label: '预对账金额',

28
src/views/finance/MerchantDepositSlip.vue

@ -228,6 +228,7 @@ import {
handleClearTableQuery,
handleInputQuery,
handleSelectQuery,
handleTranslationDataSeclect,
} from '@/utils/util';
import { columnList } from '@/option/finance/MerchantDepositSlip';
import { useRouter } from 'vue-router';
@ -339,6 +340,10 @@ const onLoad = async (params = {}) => {
if (code !== 200) return;
details.data = data.records;
details.page.total = data.total;
handleTranslationDataSeclect(
details.data,
details.pageStatus === 1 ? details.columnList1 : details.columnList2
);
return res.data;
} catch (error) {
@ -443,6 +448,18 @@ const handleClickTab = async e => {
const handleConfirm = () => {
if (details.selectionList.length === 0) return ElMessage.warning('请选择需要确认的数据');
const _errorArr = [];
const _arr = [];
for (let index = 0; index < details.selectionList.length; index++) {
const value = details.selectionList[index];
if (Number(value.confirmStatisticsOrder) === 1) _errorArr.push(value.orderNo);
_arr.push(value.orderInfoId);
}
if (_errorArr.length > 0)
return ElMessage.warning(`订单【 ${_errorArr.join('、')} 】-- 已确认,请勿重复确认`);
ElMessageBox.confirm('是否确认对账单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -451,12 +468,6 @@ const handleConfirm = () => {
try {
details.loadingObj.pageLoading = true;
const _arr = [];
for (let index = 0; index < details.selectionList.length; index++) {
const value = details.selectionList[index];
_arr.push(value.orderInfoId);
}
const submitData = {
orderInfoIds: _arr,
};
@ -464,11 +475,12 @@ const handleConfirm = () => {
const res = await postCheckBalance(submitData);
const { code, msg } = res.data;
if (code !== 200) return;
onLoad();
if (code !== 200) return msg && ElMessage.warning(msg);
if (msg) ElMessage.success(msg);
} catch (error) {
console.log('error :>> ', error);
} finally {
onLoad();
details.loadingObj.pageLoading = false;
}
});

95
src/views/finance/TransactionInformation.vue

@ -35,7 +35,7 @@
</div>
<!-- 异动信息 -->
<div>
<div v-if="Number(details.pageInfo.confirmStatisticsOrder) === 0">
<!-- 标题 -->
<div class="header algin_center">
<span> </span>
@ -61,6 +61,7 @@
<el-form-item label="异动时间:" prop="changesTimeStr">
<el-date-picker
v-model="details.form.changesTimeStr"
:disabled-date="(value: Date) => !(value.getTime() <= new Date().getTime())"
type="datetime"
placeholder="请选择异动时间"
/>
@ -124,7 +125,11 @@
:columnList="details.columnList"
:tableData="details.data"
:loading="details.loadingObj.list"
/>
>
<template #default="slotProps">
<el-text @click="() => handleShowImg(slotProps.scope)">查看图片</el-text>
</template>
</tablecmt>
</div>
</div>
</div>
@ -137,7 +142,14 @@
<!-- 关闭 -->
<el-button icon="CircleClose" @click="handleClose"> </el-button>
<!-- 提交 -->
<el-button icon="Position" type="primary" @click="handleSubmit"> </el-button>
<el-button
v-if="Number(details.pageInfo.confirmStatisticsOrder) === 0"
icon="Position"
type="primary"
@click="handleSubmit"
>
</el-button>
</div>
</div>
</basic-container>
@ -145,6 +157,23 @@
<el-dialog v-model="details.popUpShow.imgVisited">
<img w-full :src="details.dialogImageUrl" alt="图片加载失败" />
</el-dialog>
<el-dialog v-model="details.popUpShow.showImgVisited">
<div class="dialog_img">
<el-image
v-for="(url, index) in details.imgList"
:key="url"
style="width: 100px; height: 100px"
:src="url"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:preview-src-list="details.imgList"
:initial-index="index"
fit="cover"
/>
</div>
</el-dialog>
</template>
<script setup lang="ts">
@ -158,7 +187,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import type { UploadUserFile, UploadProps } from 'element-plus';
import { useRoute, useRouter } from 'vue-router';
import { getOpenOrderAdvanceFindWarehouseList } from '@/api/distribution/CreateOrder.js';
import { debounce } from '@/utils/util';
import { debounce, getObjType } from '@/utils/util';
const $route = useRoute();
const $router = useRouter();
@ -178,6 +207,8 @@ const details = reactive({
/** 弹窗 */
popUpShow: {
imgVisited: false,
/** 显示异动图片 */
showImgVisited: false,
},
dialogImageUrl: '',
data: [],
@ -195,7 +226,7 @@ const details = reactive({
fixed: false,
},
{
prop: 'waybillNo',
prop: 'itemRecord',
label: '异动栏目',
type: 1,
values: '',
@ -205,21 +236,21 @@ const details = reactive({
sortable: true,
head: false,
},
{
prop: 'waybillNo',
label: '异动数值',
type: 1,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'waybillNo',
// {
// prop: 'waybillNo',
// label: '',
// type: 1,
// values: '',
// width: '150',
// checkarr: [],
// fixed: false,
// sortable: true,
// head: false,
// },
{
prop: 'changesPhotoEntityListStr',
label: '异动图片',
type: 1,
type: 6,
values: '',
width: '150',
checkarr: [],
@ -228,7 +259,7 @@ const details = reactive({
head: false,
},
{
prop: 'waybillNo',
prop: 'changesUserName',
label: '操作人',
type: 1,
values: '',
@ -239,7 +270,7 @@ const details = reactive({
head: false,
},
{
prop: 'waybillNo',
prop: 'createTime',
label: '异动操作时间',
type: 1,
values: '',
@ -493,6 +524,7 @@ const details = reactive({
{ required: true, message: '请选择结算网点', trigger: ['change', 'blur'] },
],
},
imgList: [],
});
//
@ -528,6 +560,8 @@ const onLoad = async () => {
if (code !== 200) return;
details.pageInfo = data || {};
console.log('details.pageInfo :>> ', details.pageInfo);
} catch (error) {
console.log('error :>> ', error);
} finally {
@ -614,6 +648,19 @@ const handleSubmit = () => {
const handleReset = () => {
formRef.value.resetFields();
};
/** 查看图片 */
const handleShowImg = ({ row }) => {
const { changesPhotoEntityList } = row;
if (!changesPhotoEntityList || getObjType(changesPhotoEntityList) !== 'array')
return ElMessage.warning('该异动信息没有图片');
details.imgList = changesPhotoEntityList.map(val => val.url) || [];
console.log('details.imgList :>> ', details.imgList);
details.popUpShow.showImgVisited = true;
};
</script>
<style scoped lang="scss">
@ -691,6 +738,12 @@ const handleReset = () => {
}
}
.dialog_img {
& > div {
margin: 10px;
}
}
//
.footer {
height: 60px;

Loading…
Cancel
Save