Browse Source

库位在库数展示,财务导出

pre-production
马远东 11 months ago
parent
commit
a2b22eb61b
  1. 16
      src/utils/poptxt.js
  2. 88
      src/views/Pricesystem/ListOfPriceSystems.vue
  3. 9
      src/views/basicdata/brand/basicdataFreight.vue
  4. 7
      src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocationDetails.vue
  5. 37
      src/views/distribution/inventory/distributionStockListDetails.vue
  6. 79
      src/views/financialsector/CustomerBaseprice.vue

16
src/utils/poptxt.js

@ -1,15 +1,5 @@
import { ElMessage } from 'element-plus' // 引入 ElMessage 组件
export function popmsg(res) {
// 显示成功消息
if (res.msg == '导入成功') {
ElMessage({
message: res.msg,
type: 'success',
});
return;
}else{
// 创建包含 p 标签的内容的 div 元素
var fragment = document.createDocumentFragment();
var div = document.createElement('div');
@ -23,14 +13,14 @@ export function popmsg(res) {
div.style.left = '50%';
div.style.transform = 'translate(-50%, -50%)';
div.style.width = '50%';
div.style.height = '200px';
div.style.height = '50%';
div.style.backgroundColor = '#ffffff';
div.style.borderRadius = '4px';
div.style.overflow = 'scroll';
div.style.border = '1px solid #ccc';
div.style.padding = '10px';
// 将后端返回的内容作为 HTML 插入到 div 中
div.innerHTML = res.msg;
div.innerHTML = res.data;
// 遍历所有的 <p> 标签并设置首行缩进
var pTags = div.querySelectorAll('p');
pTags.forEach(function (pTag) {
@ -63,5 +53,5 @@ export function popmsg(res) {
// 添加点击事件监听
document.addEventListener('click', closePopupOnClickOutside);
}
}

88
src/views/Pricesystem/ListOfPriceSystems.vue

@ -16,7 +16,14 @@
<!-- 控件模块 -->
<div class="flex-c-sb">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left"></div>
<div class="avue-crud__left">
<el-button type="primary" @click="exporTemp">
<el-icon><Download /></el-icon></el-button
>
<el-button type="primary" @click="ImportTemplate">
<el-icon><Download /></el-icon></el-button
>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
@ -143,7 +150,32 @@
</span>
</template>
</el-dialog>
<!-- 导入模板 -->
<el-dialog v-model="dialogTemp" title="导入模板" width="500">
<el-upload
class="upload-demo"
drag
action="/api/logpm-basicdata/basicdataPrice/upload"
:headers="headers"
:on-success="handleSuccess"
:before-upload="beforeAvatarUpload"
method="post"
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">点击上传 <em>或者拖拽上传</em></div>
<template #tip>
<div class="el-upload__tip">请上传Excel模板文件</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogTemp = false">关闭</el-button>
<el-button type="primary" @click="dialogVisible"> 确定 </el-button>
</div>
</template>
</el-dialog>
<div id="createdDiv"></div>
<!-- 列表配置显示 -->
<edittablehead
@setcolum="setnewcolum"
@ -156,18 +188,21 @@
<script setup>
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue';
import { columnList } from '@/option/Pricesystem/index.js';
import { $_getpriceTemplate, $_deletelpriceTemplate } from '@/api/financialsector/index'; //
import { $_getpriceTemplate, $_deletelpriceTemplate , $_getexport} from '@/api/financialsector/index'; //
import { getBasicdataPrice, postBasicdataPrice } from '@/api/Pricesystem/index'; //
import { getDictionaryBiz } from '@/api/system/dict'; //
import { processRowProperty, setNodeHeight } from '@/utils/util';
import { getToken } from 'utils/auth'; // Token
import functions from '@/utils/functions.js';
import { ElMessageBox, ElMessage } from 'element-plus';
import { popmsg } from '@/utils/poptxt';
import { downloadXls, deepClone } from '@/utils/util';
import { useStore } from 'vuex';
import dayjs from 'dayjs';
const $router = useRouter(); //
const $useStore = useStore(); //
const $route = useRoute(); //
const dialogTemp=ref(false)
const details = reactive({
/** 是否开启搜索 */
search: false,
@ -239,7 +274,56 @@ const details = reactive({
/** 价格模板数组 */
templateArr: [],
});
const headers = computed(() => {
return { 'Blade-Auth': 'Bearer ' + getToken() };
});
const handleSuccess = res => {
if (res.code == 200 && !res.data) {
ElMessage({
message: res.msg,
type: 'success',
});
} else if (res.code == 200 && res.data) {
ElMessage({
message: '导入失败,请查看原因重新导入!',
type: 'warning',
});
popmsg(res);
} else{
ElMessage({
message: res.msg,
type: 'warning',
});
}
console.log(res, 'datas');
};
//
const beforeAvatarUpload= (rawFile) => {
console.log(rawFile,'rawFile');
if (rawFile.type !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
ElMessage.error('请上传EXCEL文件!')
return false
}
return true
}
//
const exporTemp = () => {
ElMessageBox.confirm('是否导出价格模板', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
$_getexport().then(res => {
downloadXls(res.data, `价格模板.xlsx`);
});
});
};
//
const ImportTemplate = () => {
dialogTemp.value = true;
};
/** 生效时间 -- 生效时间不能大于到期时间 */
const time1 = time => {
if (!details.form.expiryTime) return false;

9
src/views/basicdata/brand/basicdataFreight.vue

@ -735,8 +735,15 @@ export default {
methods: {
//
async doubledCountSuce(res) {
await popmsg(res);
if (res.msg == '导入成功') {
ElMessage({
message: res.msg,
type: 'success',
});
}else{
await popmsg(res);
this.onLoad(this.page);
}
},
uploadAfter(res, done, loading, column) {
console.log('121221');

7
src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocationDetails.vue

@ -617,14 +617,7 @@ async function onLoad(page, params = {}) {
default:
break;
}
let query= JSON.parse($route.query.info)
console.log(query,'结构参数');
data.areaType =details.pageInfo.areaType
let response = await geturl(url, data);
if (response.data.code == 200) {
console.log('res', response.data);

37
src/views/distribution/inventory/distributionStockListDetails.vue

@ -41,6 +41,14 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="在库数:">
<span>{{ stockquantity || 0 }}</span>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="10">
<el-form-item label="库位信息:">
@ -305,6 +313,7 @@ export default {
data() {
return {
dialogVisibleF: false,
stockquantity:0,//
html: '',
columnListarrs: {
//
@ -564,17 +573,17 @@ export default {
sortable: true,
head: false,
},
{
prop: 'quantityStock',
label: '在库数',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
// {
// prop: 'quantityStock',
// label: '',
// type: 2,
// values: '',
// width: '150',
// checkarr: [],
// fixed: false,
// sortable: true,
// head: false,
// },
{
prop: 'num',
label: '货位数',
@ -1162,9 +1171,15 @@ export default {
// this.selectionClear();
// });
let a = await getList(page.currentPage, page.pageSize, Object.assign(params, this.query));
console.log(a,'aaaa===>>');
if(a.data.code !=200){
return
}
console.log('aaaa', a.data.data.records);
this.queryOwn = a.data.data.records[0] || {};
console.log(this.queryOwn, '参数');
this.stockquantity= this.queryOwn.quantityStock ;//
if (!this.queryOwn.pid) {
console.log('11111111111');
//

79
src/views/financialsector/CustomerBaseprice.vue

@ -85,42 +85,7 @@
</el-row>
</div>
<!-- 导入模板 -->
<el-dialog
v-model="dialogTemp"
title="导入模板"
width="500"
>
<el-upload
class="upload-demo"
drag
action="/api/logpm-basicdata/basicdataPrice/upload"
multiple
:headers="headers"
:on-success="handleSuccess"
method="post"
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">
点击上传 <em>或者拖拽上传</em>
</div>
<template #tip>
<div class="el-upload__tip">
请上传Excel模板文件
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogTemp = false">关闭</el-button>
<el-button type="primary" @click="dialogVisible">
确定
</el-button>
</div>
</template>
</el-dialog>
</basic-container>
<!-- 列表配置显示 -->
<edittablehead
@ -129,6 +94,9 @@
:drawerShow="drawerShow"
:columnList="details.columnList"
></edittablehead>
</template>
<script setup>
@ -136,20 +104,20 @@ import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue
import { columnList } from '@/option/financialsector/index.js';
import {
$_getpriceTemplate,
$_deletelpriceTemplate,
$_getexport,
$_deletelpriceTemplate
} from '@/api/financialsector/index'; //
import { getDictionaryBiz } from '@/api/system/dict'; //
import { processRowProperty, setNodeHeight, deepClone, downloadXls } from '@/utils/util';
import { getToken } from 'utils/auth'; // Token
import functions from '@/utils/functions.js';
import { ElMessageBox, ElMessage } from 'element-plus';
import { popmsg } from '@/utils/poptxt';
import { useStore } from 'vuex';
import dayjs from 'dayjs';
const $router = useRouter(); //
const $useStore = useStore(); //
const $route = useRoute(); //
const dialogTemp=ref(true);//
const dialogTemp = ref(false); //
const details = reactive({
/** 是否开启搜索 */
search: false,
@ -282,19 +250,7 @@ const timesc = (index, row) => {
}
};
const headers = computed(() => {
return { 'Blade-Auth': 'Bearer ' + getToken() };
});
const handleSuccess=(data)=>{
console.log(data,'datas');
if(data.code==200 && data.data=='请维护客户信息中的基础数据'){
ElMessage({
message: data.data,
type: 'warning',
})
};
}
/** 表格表头输入框搜索 */
const btnsc = val => {
console.log(val);
@ -429,28 +385,13 @@ const Modifytemplate = row => {
path: '/financialsector/FinanceHome',
});
};
//
const exporTemp = () => {
ElMessageBox.confirm('是否导出价格模板', 'Warning', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
$_getexport().then(res => {
downloadXls(res.data, `价格模板.xlsx`);
});
});
};
//
const ImportTemplate=()=>{
dialogTemp.value=true
}
const ImportTemplate = () => {
dialogTemp.value = true;
};
//
const dialogVisible=()=>{
}
const dialogVisible = () => {};
</script>
<style scoped lang="scss">

Loading…
Cancel
Save