jwg 7 months ago
commit 9a8000a035

@ -27,10 +27,11 @@ export function deleteVendorReceipt(id) {
}
// 获得对公收款
export function getVendorReceipt(id) {
export function getVendorReceipt(query) {
return request({
url: '/bs/vendor-receipt/get?id=' + id,
method: 'get'
url: '/bs/vendor-receipt/get',
method: 'get',
params: query
})
}

@ -7,8 +7,28 @@
<div class="bt">{{}}</div>
</div> -->
<div class="box-cr">
<div class="cr-bt" style="margin-top: 0.6rem;">
<div class="tags" :style="`border: 1px solid ${handleFilterStatus(DICT_TYPE.BS_EXPENSE_APPLY_STATUS,itemData.status).color};color:${handleFilterStatus(DICT_TYPE.BS_EXPENSE_APPLY_STATUS,itemData.status).color}`"> {{handleFilterStatus(DICT_TYPE.BS_EXPENSE_APPLY_STATUS,itemData.status).label}}</div>
<div class="cr-bt" style="margin-top: 0.6rem">
<div
class="tags"
:style="`border: 1px solid ${
handleFilterStatus(
DICT_TYPE.BS_EXPENSE_APPLY_STATUS,
itemData.status
).color
};color:${
handleFilterStatus(
DICT_TYPE.BS_EXPENSE_APPLY_STATUS,
itemData.status
).color
}`"
>
{{
handleFilterStatus(
DICT_TYPE.BS_EXPENSE_APPLY_STATUS,
itemData.status
).label
}}
</div>
</div>
<div class="ct-md">
<div class="mt5" style="color: #333">
@ -27,24 +47,67 @@
项目负责人{{ itemData.projectManager }}
</div>
<div style="margin-top: 0.3rem; color: #333">
账户类型{{getDictDataLabel(DICT_TYPE.BS_BANK_TYPE,itemData.accountType) || ''}}
账户类型{{
getDictDataLabel(
DICT_TYPE.BS_BANK_TYPE,
itemData.accountType
) || ''
}}
</div>
<div style="margin-top: 0.3rem; color: #333">
收款金额{{ itemData.amount }}
</div>
<div style="margin-top: 0.3rem; color: #333">
审批节点
<span v-for="(items,index) in itemData.taskNames" :key="index">{{ items }} </span>
<span v-for="(items, index) in itemData.taskNames" :key="index"
>{{ items }}
</span>
</div>
<div style="margin-top: 0.3rem; color: #333">
创建时间{{ dayjs(itemData.createTime).format('YYYY/MM/DD') }}
</div>
</div>
</div>
<!-- 操作按钮 查看 编辑 删除 -->
<div class="box-rt">
<van-icon class="icon-box" v-hasPermi="['bs:vendor-receipt:query']" @click="handleShow(itemData.id)" name="eye-o" color="#05A9FF" size="25" />
<van-icon class="icon-box" v-hasPermi="['bs:vendor-receipt:update']" @click="handleEdit(itemData.id, itemData.status, itemData.creator)" name="edit" :color="!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator)) ?'#ccc':''" size="25" />
<van-icon class="icon-box" v-hasPermi="['bs:vendor-receipt:delete']" @click="handleDel(itemData.id, itemData.status, itemData.creator)" name="delete-o" :color="!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator)) ?'#ccc':'#EC3359'" size="25" />
<van-icon
class="icon-box"
v-hasPermi="['bs:vendor-receipt:query']"
@click="handleShow(itemData.id)"
name="eye-o"
color="#05A9FF"
size="25"
/>
<van-icon
class="icon-box"
v-hasPermi="['bs:vendor-receipt:update']"
@click="handleEdit(itemData.id, itemData.status, itemData.creator)"
name="edit"
:color="
!(
itemData.status == 0 ||
(itemData.status == 3 && userInfo.id == itemData.creator)
)
? '#ccc'
: ''
"
size="25"
/>
<van-icon
class="icon-box"
v-hasPermi="['bs:vendor-receipt:delete']"
@click="handleDel(itemData.id, itemData.status, itemData.creator)"
name="delete-o"
:color="
!(
itemData.status == 0 ||
(itemData.status == 3 && userInfo.id == itemData.creator)
)
? '#ccc'
: '#EC3359'
"
size="25"
/>
<!-- <van-icon class="icon-box" v-hasPermi="['bs:supplier-contract:delete']" @click="handleMerge(itemData.id, itemData.status, itemData.creator)" name="envelop-o" :color="!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator)) ?'#05A9FF':'#ccc'" :size="25" /> -->
</div>
</div>
@ -53,34 +116,30 @@
</template>
<script>
import { getDictDataLabel, handleFilterStatus } from "@/utils/dict";
import { deleteVendorReceipt } from "@/api/bs/vendorReceipt"
import { getDictDataLabel, handleFilterStatus } from '@/utils/dict'
import { deleteVendorReceipt } from '@/api/bs/vendorReceipt'
import dayjs from 'dayjs'
import { Dialog } from 'vant'
export default {
props: {
itemData: {
required: true,
default: () => { }
default: () => {},
},
},
components: {
isApproval: Boolean,
},
components: {},
data() {
return {
jumoStudentId: null
jumoStudentId: null,
}
},
activated() {
/* activated() {
if (this.jumoStudentId) {
this.handleUpdataInfo()
}
},
mounted() {
},
}, */
mounted() {},
computed: {
userInfo() {
return JSON.parse(window.localStorage.getItem('userInfo') || { dept: {} })
@ -93,13 +152,14 @@ export default {
}
},
handleEdit(id, status, creator) {
console.log(id, status, creator, 'id, status,creator')
if (!(status == 0 || (status == 3 && this.userInfo.id == creator))) {
return
}
this.jumoStudentId = id
this.$router.push({
path: '/receipts',
query: { id, type: 'edit' }
query: { id, type: 'edit' },
})
},
handleDel(id, status, creator) {
@ -109,8 +169,7 @@ export default {
Dialog.confirm({
title: '提示',
message: '你确定要删除吗?',
})
.then(() => {
}).then(() => {
deleteVendorReceipt(id).then(() => {
this.$emit('onAllRefresh')
})
@ -122,16 +181,16 @@ export default {
this.jumoStudentId = id
this.$router.push({
path: '/receipts',
query: { id, type: 'show' }
query: { id, type: 'show', isApproval: this.isApproval },
})
},
dayjs,
handleUpdataInfo() {
/* handleUpdataInfo() {
this.jumoStudentId = null
this.$emit('onUpdataInfo', this.itemData.id)
}, */
},
}
}
</script>
<style lang="scss" scoped>

@ -1,4 +1,5 @@
<template>
<!-- 同行人弹窗 -->
<van-popup
v-model="isShow"
position="bottom"
@ -98,6 +99,7 @@
<script>
import { listUser } from '@/api/system/user'
import { getDept } from '@/api/system/dept'
export default {
props: {
isOpen: Boolean,
@ -124,11 +126,12 @@ export default {
userTable: [],
isShow: false,
form: {
//
tripPartners: [
{
dept: null,
userId: [],
userList: [],
dept: null, //id
userId: [], //id
userList: [], //
},
],
},
@ -204,7 +207,9 @@ export default {
})
})
},
//
handleConfirm() {
console.log('handleConfirm')
this.$nextTick(() => {
if (this.type == 1) {
this.$refs.form
@ -220,7 +225,7 @@ export default {
// arr = arr.concat(this.tripPartners)
// }
let newArr = arr.concat(this.allTripPartners)
let repeatId = this.getisRepeat(newArr)
let repeatId = this.getisRepeat(newArr) //
if (repeatId) {
const { nickname } =
this.userList.find((item) => item.id == repeatId) || {}
@ -243,6 +248,7 @@ export default {
handleDept(val, index) {
if (val) {
this.getList(val).then((res) => {
console.log(res, 257)
this.$set(this.form.tripPartners[index], 'userList', res || [])
})
} else {

@ -1,14 +1,34 @@
<!-- 上传附件 -->
<template>
<div class="upload-box">
<div :class="`header-box ${['PayConfirmToast'].includes(typeStr) && 'mrNone'}`">
<div class="header-item-box" v-for="(item,index) in list" :key="index" @click.stop="handleToShow(item)">
<div
:class="`header-box ${['PayConfirmToast'].includes(typeStr) && 'mrNone'}`"
>
<div
class="header-item-box"
v-for="(item, index) in list"
:key="index"
@click.stop="handleToShow(item)"
>
{{ item.name }}
<van-icon name="cross" size="10" @click.stop="handleDel(index)" v-if="['edit','add','PayConfirmToast'].includes(typeStr)" />
<van-icon
name="cross"
size="10"
@click.stop="handleDel(index)"
v-if="['edit', 'add', 'PayConfirmToast'].includes(typeStr)"
/>
</div>
</div>
<van-uploader accept="*" multiple :before-read="beforeRead" :after-read="handleAfterRead" v-if="['edit','add','PayConfirmToast'].includes(typeStr)">
<van-button icon="plus" size="small" round type="info">上传文件</van-button>
<van-uploader
accept="*"
multiple
:before-read="beforeRead"
:after-read="handleAfterRead"
v-if="['edit', 'add', 'PayConfirmToast'].includes(typeStr)"
>
<van-button icon="plus" size="small" round type="info"
>上传文件</van-button
>
</van-uploader>
</div>
</template>
@ -28,16 +48,16 @@ export default {
this.list = list
},
deep: true,
immediate: true
immediate: true,
},
isOpen: {
/* isOpen: {
handler(val) {
if (val) {
}
},
deep: true
}
} */
},
data() {
return {
@ -50,39 +70,47 @@ export default {
computed: {},
methods: {
beforeRead(file) {
const supportedFormats = ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'jpg', 'png', 'jpeg'];
const supportedFormats = [
'pdf',
'doc',
'docx',
'xls',
'xlsx',
'jpg',
'png',
'jpeg',
]
//
console.log('file....', file);
console.log('file....', file)
if (Array.isArray(file)) {
for (let index = 0; file < file.length; index++) {
const element = file[index];
const fileExtension = element.name.split('.').pop().toLowerCase();
const element = file[index]
const fileExtension = element.name.split('.').pop().toLowerCase()
//
if (!supportedFormats.includes(fileExtension)) {
this.$fm('只允许上传PDF、Word、Excel、JPG、PNG和JPEG格式的文件!')
return false;
return false
}
}
} else {
const fileExtension = file.name.split('.').pop().toLowerCase();
const fileExtension = file.name.split('.').pop().toLowerCase()
//
if (!supportedFormats.includes(fileExtension)) {
this.$fm('只允许上传PDF、Word、Excel、JPG、PNG和JPEG格式的文件!')
return false;
return false
}
}
return true;
return true
},
handleToShow(item) {
this.$emit('onShow')
this.$router.push({
path: '/fileShow',
query: {
url: item.url
}
url: item.url,
},
})
},
handleDel(index) {
@ -92,40 +120,43 @@ export default {
uploadFile(params) {
return new Promise((resolve, reject) => {
let FormDatas = new FormData()
FormDatas.append('file', params.file);
FormDatas.append('path', params.file.name);
uploadFileApi(FormDatas).then((res) => {
FormDatas.append('file', params.file)
FormDatas.append('path', params.file.name)
uploadFileApi(FormDatas)
.then((res) => {
resolve({
name: params.file.name,
url: res.data
});
}).catch((err) => {
url: res.data.url,
})
})
.catch((err) => {
reject(err)
})
});
})
},
uploadFiles(fileList) {
let promises = fileList.map((item) => this.uploadFile(item));
return Promise.all(promises);
let promises = fileList.map((item) => this.uploadFile(item))
return Promise.all(promises)
},
handleAfterRead(list) {
let newList = Array.isArray(list) ? list : [list]
this.$loading(true, 'file')
this.uploadFiles(newList).then((res) => {
(res || []).map(item => {
this.uploadFiles(newList)
.then((res) => {
;(res || []).map((item) => {
this.list.push(item)
})
this.$loading(false, 'file')
this.$emit('onConfirm', this.list)
}).catch(() => {
})
.catch(() => {
this.$loading(false, 'file')
this.$fm('文件上传失败!')
})
// console.log('list...', list);
},
},
}
}
}
</script>
<style lang='scss' scoped>
.upload-box {

@ -2,16 +2,47 @@
<template>
<div class="upload-box">
<div class="box-lf">
<van-uploader accept="*" :disabled="isChecked" v-model="localFileList" @click-preview="handleClickUpload" :before-read="handleFileBeforeRead" :before-delete="handleBeforeDel" :max-count="1" :after-read="handleAfterRead">
<template #preview-cover="{ file }" v-if="checkFileType(localFileList)">
<div class="preview-cover">{{handleFilter(localFileList)}}</div>
<van-uploader
accept="*"
:disabled="isChecked"
v-model="localFileList"
@click-preview="handleClickUpload"
:before-read="handleFileBeforeRead"
:before-delete="handleBeforeDel"
:max-count="1"
:after-read="handleAfterRead"
>
<template #preview-cover="{ file }">
<div class="preview-cover">{{ localFileList[0].name }}</div>
</template>
</van-uploader>
<div class="up-tt">支持pngpdfjpg格式上传</div>
</div>
<div class="box-rt">
<van-button type="info" icon="scan" :disabled="isChecked || disabled" @click="handleScan" native-type="button" class="btn-box" round size="small">发票识别</van-button>
<van-button v-if="type == '01'" type="info" icon="label-o" :disabled="isChecked || disabled" @click="handleCheck" native-type="button" class="btn-box" round size="small"> {{isChecked ? '' : ''}}</van-button>
<van-button
type="info"
icon="scan"
:disabled="isChecked || disabled"
@click="handleScan"
native-type="button"
class="btn-box"
round
size="small"
>发票识别</van-button
>
<van-button
v-if="type == '01'"
type="info"
icon="label-o"
:disabled="isChecked || disabled"
@click="handleCheck"
native-type="button"
class="btn-box"
round
size="small"
>
{{ isChecked ? '已验真' : '验真' }}</van-button
>
</div>
</div>
</template>
@ -44,7 +75,7 @@ import {
getInvoice05,
invoiceScanApi05,
invoiceCheckApi05,
} from "@/api/bs/invoice";
} from '@/api/bs/invoice'
export default {
name: '',
props: {
@ -54,22 +85,22 @@ export default {
// isChecked: Boolean,
disabled: Boolean,
scanRes: Object,
type: String
type: String,
},
watch: {
fileList: {
handler(list) {
this.localFileList = list //使list
// this.localFileList = list
this.localFileList = list
// if (Array.isArray(this.localFileList) && this.localFileList.length) {
// let url = localFileList[0].url
// if ()
// console.log('localFileList...', this.localFileList);
// }
this.uploadList = list
// this.uploadList = list
},
deep: true,
immediate: true
immediate: true,
},
},
data() {
@ -78,7 +109,7 @@ export default {
imgTypeArr: ['image/jpeg', 'image/jpg', 'image/png', 'application/pdf'],
localFileList: [], //
uploadList: [], //
isChecked: false
isChecked: false,
}
},
@ -86,26 +117,27 @@ export default {
computed: {},
methods: {
handleFilter(file) {
/* handleFilter(file) {
let str = ''
if (file.length) {
let url = file[0].url
str = url.split('/baoxiao/')[1]
}
return str
},
checkFileType(file) {
}, */
// pdf
/* checkFileType(file) {
console.log(file, '.file132')
let flag = false
if (file.length) {
let url = file[0].url
if (url.indexOf('pdf') > -1) {
let name = file[0].file.name
if (name.indexOf('pdf') > -1) {
flag = true
}
}
return flag
},
}, */
handleClickUpload(file) {
const { url } = file
if (url) {
@ -113,8 +145,8 @@ export default {
this.$router.push({
path: '/fileShow',
query: {
url: url
}
url: url,
},
})
}
}
@ -127,11 +159,20 @@ export default {
return true
},
beginCheck() {
console.log('我进来验证了')
this.$loading(true)
let form = {}
const invoiceCheckApi = this.type == '01' ? invoiceCheckApi01 : this.type == '02' ? invoiceCheckApi02 : this.type == '03' ? invoiceCheckApi03 : this.type == '04' ? invoiceCheckApi04 : invoiceCheckApi05;
invoiceCheckApi(this.scanRes).then((res) => {
const invoiceCheckApi =
this.type == '01'
? invoiceCheckApi01
: this.type == '02'
? invoiceCheckApi02
: this.type == '03'
? invoiceCheckApi03
: this.type == '04'
? invoiceCheckApi04
: invoiceCheckApi05
invoiceCheckApi(this.scanRes)
.then((res) => {
// if (res.data) {
// form.checkCode = 2
// form.isChecked = true
@ -148,7 +189,8 @@ export default {
}
this.$emit('endCheck', res.data)
this.$loading(false)
}).catch(() => {
})
.catch(() => {
this.isChecked = false
// this.form.status = 0
// form.status = 0
@ -172,12 +214,23 @@ export default {
const { url } = this.uploadList[0]
// let url = 'https://p8.itc.cn/q_70/images03/20210420/b5e2b7a15457406bb48135828b8fea03.jpeg'
this.$loading(true)
const invoiceScanApi = this.type == '01' ? invoiceScanApi01 : this.type == '02' ? invoiceScanApi02 : this.type == '03' ? invoiceScanApi03 : this.type == '04' ? invoiceScanApi04 : invoiceScanApi05;
invoiceScanApi({ url, type: this.type }).then((res) => {
const invoiceScanApi =
this.type == '01'
? invoiceScanApi01
: this.type == '02'
? invoiceScanApi02
: this.type == '03'
? invoiceScanApi03
: this.type == '04'
? invoiceScanApi04
: invoiceScanApi05
invoiceScanApi({ url, type: this.type })
.then((res) => {
// this.scanRes = res.data
this.$emit('scanRes', res)
this.$loading(false)
}).catch(() => {
})
.catch(() => {
this.$loading(false)
})
}
@ -190,44 +243,57 @@ export default {
this.localFileList = []
this.$emit('onConfirm', this.uploadList)
},
//
uploadFile(params) {
return new Promise((resolve, reject) => {
let FormDatas = new FormData()
FormDatas.append('file', params.file);
FormDatas.append('path', params.file.name);
uploadFileApi(FormDatas).then((res) => {
FormDatas.append('file', params.file)
FormDatas.append('path', params.file.name)
//
uploadFileApi(FormDatas)
.then((res) => {
// res
resolve({
name: params.file.name,
url: res.data
});
}).catch((err) => {
url: res.data,
})
})
.catch((err) => {
reject(err)
})
});
})
},
uploadFiles(fileList) {
let promises = fileList.map((item) => this.uploadFile(item));
return Promise.all(promises);
let promises = fileList.map((item) => this.uploadFile(item))
return Promise.all(promises)
},
//
handleAfterRead(list) {
let newList = Array.isArray(list) ? list : [list]
this.$loading(true, 'file')
this.uploadFiles(newList).then((res) => {
(res || []).map(item => {
//
this.uploadFiles(newList)
.then((res) => {
let newRes = res.map((i) => {
return {
name: i.name,
url: i.url.url,
}
})
;(newRes || []).map((item) => {
this.uploadList.push(item)
})
this.$loading(false, 'file')
this.$emit('onConfirm', this.uploadList)
}).catch((err) => {
console.log('err', err);
})
.catch((err) => {
this.$loading(false, 'file')
this.$fm('文件上传失败!')
})
// console.log('list...', list);
},
},
}
}
}
</script>
<style lang='scss' scoped>
::v-deep .preview-cover {

@ -1,13 +1,5 @@
<template>
<div v-if="qw">
<div style="padding-top: 150px; text-align: center">
<img style="width: 100px; height: 100px" src="@/assets/chahao.png" />
</div>
<div style="padding-top: 20px; text-align: center">
<h4>请在客户端打开链接</h4>
</div>
</div>
<div v-else class="layout-contain">
<div class="layout-contain">
<div
class="layout-view"
:style="`padding-bottom: ${isTabeRouter ? safeHeight : 0}px;`"
@ -63,7 +55,6 @@ export default {
},
data() {
return {
qw: false,
safeHeight: 0,
active: 'home-index',
aliveArr: [],
@ -84,16 +75,6 @@ export default {
}),
},
created() {
if (/wxwork/i.test(navigator.userAgent)) {
//
} else {
//
this.qw = true
alert('请在企业微信中打开此页面!')
//
return
// window.location.href = 'https://your-company-wechat-url'
}
this.handleInit()
this.handleAlive()
},

@ -3,7 +3,7 @@ import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import VConsole from "vconsole"
// import VConsole from "vconsole"
import { setLocalStorage, compressFile } from '@/utils'
import msgAlert, { handleForceCloseLoading } from './plugin/msgAlert'
import pluginPermission from '@/plugin/permission'
@ -34,9 +34,9 @@ Vue.use(directive)
Vue.prototype.$forceCloseLoading = handleForceCloseLoading
Vue.use(pluginPermission)
Vue.use(VueClipboard)
if (window.location.href.indexOf('localhost') === -1 && window.location.href.indexOf('www.joineast.com') === -1) {
/* if (window.location.href.indexOf('localhost') === -1 && window.location.href.indexOf('www.joineast.com') === -1) {
new VConsole()
}
} */
Vue.prototype.$EventBus = new Vue() // 注册全局EventBus
Vue.prototype.$compressFile = compressFile

@ -18,6 +18,7 @@ export default {
{ path: '/custom', name: `${pre}custom`, component: () => import('@/views/contract/custom'), meta: { cache: true, title: '客户合同审批' } },
{ path: '/pay', name: `${pre}pay`, component: () => import('@/views/contract/pay'), meta: { cache: true, title: '付款审批' } },
{ path: '/corporateReceipts', name: `${pre}corporateReceipts`, component: () => import('@/views/contract/corporateReceipts'), meta: { cache: true, title: '对公收款' } },
{ path: '/corporateReceiptsApproval', name: `${pre}corporateReceipts`, component: () => import('@/views/contract/corporateReceipts'), meta: { cache: true, title: '对公收款' } },
{ path: '/receipts', name: `${pre}receipts`, component: () => import('@/views/contract/receipts'), meta: { cache: true, title: '收款审批' } },
{ path: '/corporatePayment', name: `${pre}corporatePayment`, component: () => import('@/views/contract/corporatePayment'), meta: { cache: true, title: '对公付款' } },
{ path: '/payment', name: `${pre}payment`, component: () => import('@/views/contract/payment'), meta: { cache: true, title: '付款审批' } },

@ -189,7 +189,7 @@ export default {
* @param {Object} param password {String} 密码
* @param {Object} param route {Object} 登录成功后定向的路由对象 任何 vue-router 支持的格式
*/
login({ dispatch, commit }, data) {
login({ dispatch, commit }, data,) {
return new Promise((resolve, reject) => {
getLocalStorage('accessToken').then(async res => {
if (!res) {
@ -205,6 +205,7 @@ export default {
return
}
setLocalStorage('userInfo', JSON.stringify(res.data))
let res1 = res.data
commit('SET_USERINFO', res.data)
getAreaTree().then(res => {
let tree = res.data || []
@ -218,7 +219,9 @@ export default {
listUser({
pageNo: 1,
pageSize: 100,
deptId: deptOptions[0].id,
// 查询所有人员,不带部门参数
// deptId: deptOptions[0].id,
// deptId: res1.deptId
}).then((ns) => {
commit('SET_USERLIST', ns.data && ns.data.list || [])
dispatch('GetAuthInfo').then(() => {

@ -1,4 +1,5 @@
<template>
<!-- 出差报销 -->
<div class="common-list-contain">
<div class="common-form">
<van-form
@ -427,7 +428,7 @@
</van-field>
<van-field
v-model="nitem.invoiceCount"
:disabled="true"
:disabled="disabled"
placeholder="关联发票自动读取"
required
:rules="[{ required: true, message: '请输入' }]"
@ -631,7 +632,7 @@
</van-field>
<van-field
v-model="nitem.invoiceCount"
:disabled="true"
:disabled="disabled"
placeholder="关联发票自动读取"
required
:rules="[{ required: true, message: '请输入' }]"
@ -749,14 +750,14 @@
</div>
</div>
<!-- <div class="section mt5" v-if="['show'].includes(typeStr)">
<div class="section mt5" v-if="['show'].includes(typeStr)">
<span class="line"> </span>审批流程
</div>
<ApprovalProcess
v-if="['show'].includes(typeStr)"
:processInstanceId="form.processInstanceId"
@onSetId="handleSetAccessId"
/> -->
/>
<!-- 申请单关联 -->
<div class="section mt5"><span class="line"> </span>申请单关联</div>

@ -667,6 +667,7 @@
</div>
</van-form>
</div>
<!-- 提交按钮 -->
<div class="sumbit-box" v-if="['edit', 'add'].includes(typeStr)">
<div
class="item-box"
@ -996,6 +997,7 @@ export default {
}
this.scanRes = res.data || {}
},
//
handleImgConfirm(list) {
this.fileList = list
},
@ -1176,6 +1178,7 @@ export default {
this.$loading(false, 'form')
})
.catch(() => {
console.log(2423424234)
this.$loading(false, 'form')
})
return
@ -1190,13 +1193,18 @@ export default {
: this.invoiceType == '04'
? createInvoice04
: createInvoice05
createInvoice(newForm).then(() => {
createInvoice(newForm)
.then(() => {
this.$loading(false, 'form')
this.$sm(`${this.form.id ? '修改成功!' : '新增成功!'}`)
//
this.$EventBus.$emit('handleResetLive', 'company-myInvoice')
history.back()
})
.catch((err) => {
this.$loading(false, 'form')
console.log(err)
})
})
.catch((err) => {
this.$loading(false, 'form')

@ -1,25 +1,44 @@
<template>
<!-- 出差列表 -->
<div>
<HeaderFilter :listType="listType" @onListQuery="handleListQuery" :paramProp="listQuery" />
<HeaderFilter
:listType="listType"
@onListQuery="handleListQuery"
:paramProp="listQuery"
/>
<van-tabs v-model="authorisedType" @click="authorisedChange">
<van-tab name="1" title="我的报销单" />
<van-tab name="0" title="全部报销单" />
<van-tab name="1" title="待审批" />
<van-tab name="0" title="全部审批单" />
</van-tabs>
<RMList :moreLoading.sync="moreLoading" :refreshing.sync="refreshing" :finished.sync="finished" @onLoad="handleLoad" @onRefresh="handleRefresh" isMore :tableList="tableList">
<RMList
:moreLoading.sync="moreLoading"
:refreshing.sync="refreshing"
:finished.sync="finished"
@onLoad="handleLoad"
@onRefresh="handleRefresh"
isMore
:tableList="tableList"
>
<div>
<MyClaimListCard v-for="(item,index) in tableList" :key="item.id" :itemData="item" :listType="listType" @onUpdataInfo="handleUpdataInfo($event, index)" @onAllRefresh="handleAllRefresh" />
<MyClaimListCard
v-for="(item, index) in tableList"
:key="item.id"
:itemData="item"
:listType="listType"
@onUpdataInfo="handleUpdataInfo($event, index)"
@onAllRefresh="handleAllRefresh"
/>
</div>
</RMList>
<div class="common-bottom-btns" style="bottom: 8rem">
<div class="common-bottom-btn" @click="handleTopPage">
<img src="@/assets/images/icons/top.png" alt="">
<img src="@/assets/images/icons/top.png" alt="" />
<span>回到顶部</span>
</div>
</div>
<div class="common-bottom-btns" style="bottom: 6rem">
<div class="common-bottom-btn" @click="handleBack">
<img src="@/assets/images/icons/home.png" alt="">
<img src="@/assets/images/icons/home.png" alt="" />
<span>返回首页</span>
</div>
</div>
@ -37,11 +56,17 @@
import { getScrollTop, findAreaIdName } from '@/utils'
// import { getOrderListApi, getDataStatisticsApi, updateOrderSingleListApi } from '@/api/potentialGuest/order'
import { mapState, mapMutations } from 'vuex'
import { createExpenseClaim, updateExpenseClaim, deleteExpenseClaim, getExpenseClaim, getExpenseClaimPage } from "@/api/bs/expenseClaim";
import {
createExpenseClaim,
updateExpenseClaim,
deleteExpenseClaim,
getExpenseClaim,
getExpenseClaimPage,
} from '@/api/bs/expenseClaim'
import dayjs from 'dayjs'
export default {
props: {
listType: String // EnrollmentOrder: EnrollmentCollection: ShiftRecord: WaitPay:
listType: String, // EnrollmentOrder: EnrollmentCollection: ShiftRecord: WaitPay:
},
components: {
HeaderFilter: () => import('./HeaderFilter.vue'),
@ -74,14 +99,14 @@ export default {
costDeptId: null,
invoiceIds: null,
},
authorisedType:'1'
authorisedType: '1',
}
},
computed: {
...mapState({
singlePageSize: state => state.common.setting.singlePageSize,
pageSize: state => state.common.setting.pageSize,
})
singlePageSize: (state) => state.common.setting.singlePageSize,
pageSize: (state) => state.common.setting.pageSize,
}),
},
activated() {
this.handleScrollInit()
@ -102,22 +127,28 @@ export default {
pageNo: 1,
pageSize: this.singlePageSize,
}
getExpenseClaimPage(listQuery).then((res) => {
let arr = (res.data && res.data.list || []).filter(item => item.id == id)
getExpenseClaimPage(listQuery)
.then((res) => {
let arr = ((res.data && res.data.list) || []).filter(
(item) => item.id == id
)
resolve(arr)
}).catch((err) => {
})
.catch((err) => {
reject(err)
})
})
},
handleUpdataInfo(id, index) {
this.$loading(true, 'singleReset')
this.handleSetSingle(id).then(arr => {
this.handleSetSingle(id)
.then((arr) => {
if (arr.length) {
this.tableList.splice(index, 1, arr[0])
}
this.$loading(false, 'singleReset')
}).catch(() => {
})
.catch(() => {
this.$loading(false, 'singleReset')
})
},
@ -129,7 +160,7 @@ export default {
this.handleRefresh()
},
handleScroll() {
getScrollTop().then(height => {
getScrollTop().then((height) => {
this.height = height
})
},
@ -147,8 +178,8 @@ export default {
this.$router.push({
path: '/claim',
query: {
type: 'add'
}
type: 'add',
},
})
},
handleAllRefresh() {
@ -179,12 +210,13 @@ export default {
// const { shellIdsLocal, collegeInfoIdLocal, startDate, endDate, keyword, type, method, targets, usePersonId, teacherIds, chargePersonIds } = this.listQuery
const query = {
...this.listQuery,
...{authorisedType:this.authorisedType}
...{ authorisedType: this.authorisedType },
}
this.moreLoading = true
this.$loading(true, 'tableLoading')
getExpenseClaimPage(query).then(res => {
let resList = res.data && res.data.list || []
getExpenseClaimPage(query)
.then((res) => {
let resList = (res.data && res.data.list) || []
if (['init', 'refresh'].includes(val)) {
this.tableList = resList
this.handleScrollToTop()
@ -194,7 +226,8 @@ export default {
if (resList.length < this.pageSize) {
this.finished = true
}
}).finally(() => {
})
.finally(() => {
this.$nextTick(() => {
this.moreLoading = false
this.refreshing = false
@ -207,8 +240,8 @@ export default {
this.listQuery.pageNo = 1
this.finished = false
this.getTableList('refresh')
}
}
},
},
}
</script>
<style scoped lang="scss">

@ -1,4 +1,5 @@
<template>
<!-- 出差申请 -->
<div class="common-list-contain">
<div class="common-form">
<van-form
@ -359,6 +360,8 @@ import {
} from '@/api/bs/expenseApply'
import { listData } from '@/api/system/dict/data'
import VerifyFunc from '@/utils/verify'
import { getAreaTree } from '@/api/system/area'
import { handleAreaLoop } from '@/utils'
export default {
//import使
name: 'company-trips',
@ -381,9 +384,9 @@ export default {
})
return arr
},
areaTree() {
/* areaTree() {
return this.$store.getters.areaTree
},
}, */
userDeptTree() {
return this.$store.getters.userDeptTree
},
@ -407,6 +410,7 @@ export default {
created() {
this.handleInitList()
this.handleInitForm()
this.getTree()
},
// 访DOM
mounted() {
@ -414,6 +418,8 @@ export default {
},
data() {
return {
//
areaTree: [],
VerifyFunc,
accessId: null,
isAuthorised: false,
@ -470,6 +476,14 @@ export default {
watch: {},
//
methods: {
//
getTree() {
getAreaTree().then((res) => {
let tree = res.data || []
handleAreaLoop(tree)
this.areaTree = tree
})
},
handleClear(index, type) {
if (type === 1) {
this.$set(this.form.expenseApplyTrips[index], 'time', null)

@ -1,27 +1,55 @@
<template>
<!-- 对公收款 -->
<div>
<HeaderFilter :listType="listType" :spList="spList" @onListQuery="handleListQuery" :paramProp="listQuery" />
<RMList :moreLoading.sync="moreLoading" :refreshing.sync="refreshing" :finished.sync="finished" @onLoad="handleLoad" @onRefresh="handleRefresh" isMore :tableList="tableList">
<HeaderFilter
:listType="listType"
:spList="spList"
@onListQuery="handleListQuery"
:paramProp="listQuery"
/>
<RMList
:moreLoading.sync="moreLoading"
:refreshing.sync="refreshing"
:finished.sync="finished"
@onLoad="handleLoad"
@onRefresh="handleRefresh"
isMore
:tableList="tableList"
>
<div>
<CorporateReceiptsCard v-for="(item,index) in tableList" :key="item.id" :itemData="item" :listType="listType" @onUpdataInfo="handleUpdataInfo($event, index)" @onAllRefresh="handleAllRefresh" />
<CorporateReceiptsCard
v-for="(item, index) in tableList"
:key="index"
:itemData="item"
:listType="listType"
@onAllRefresh="handleAllRefresh"
:isApproval="isApproval"
/>
<!-- @onUpdataInfo="handleUpdataInfo($event, index)" -->
</div>
</RMList>
<div class="common-bottom-btns" style="bottom: 8rem">
<div class="common-bottom-btn" @click="handleTopPage">
<img src="@/assets/images/icons/top.png" alt="">
<img src="@/assets/images/icons/top.png" alt="" />
<span>回到顶部</span>
</div>
</div>
<div class="common-bottom-btns" v-hasPermi="['bs:vendor-receipt:create']" style="bottom:10rem">
<div v-if="isAdd">
<div
class="common-bottom-btns"
v-hasPermi="['bs:vendor-receipt:create']"
style="bottom: 10rem"
>
<div class="common-bottom-btn" @click="handleToAdd">
<img src="@/assets/images/icons/add.png" alt="">
<img src="@/assets/images/icons/add.png" alt="" />
<span>添加收款</span>
</div>
</div>
</div>
<div class="common-bottom-btns" style="bottom: 6rem">
<div class="common-bottom-btn" @click="handleBack">
<img src="@/assets/images/icons/home.png" alt="">
<img src="@/assets/images/icons/home.png" alt="" />
<span>返回首页</span>
</div>
</div>
@ -30,13 +58,13 @@
<script>
import { getScrollTop } from '@/utils'
import { getSupplierCompanyPage } from "@/api/bs/quotationSheet";
import { getVendorReceiptPage } from "@/api/bs/vendorReceipt";
import { getSupplierCompanyPage } from '@/api/bs/quotationSheet'
import { getVendorReceiptPage } from '@/api/bs/vendorReceipt'
import { mapState } from 'vuex'
import dayjs from 'dayjs'
export default {
props: {
listType: String // EnrollmentOrder: EnrollmentCollection: ShiftRecord: WaitPay:
listType: String, // EnrollmentOrder: EnrollmentCollection: ShiftRecord: WaitPay:
},
components: {
HeaderFilter: () => import('./HeaderFilter.vue'),
@ -74,22 +102,33 @@ export default {
files: null,
createTime: [],
},
isApproval: false,
degreeOfInquiry: 2,
isAdd: true,
}
},
computed: {
...mapState({
singlePageSize: state => state.common.setting.singlePageSize,
pageSize: state => state.common.setting.pageSize,
})
singlePageSize: (state) => state.common.setting.singlePageSize,
pageSize: (state) => state.common.setting.pageSize,
}),
},
activated() {
this.handleScrollInit()
this.handleInit()
},
deactivated() {
window.removeEventListener('scroll', this.handleScroll)
},
created() {
console.log(this.$route.path, 'path')
if (this.$route.path == '/corporateReceiptsApproval') {
this.isApproval = true //
this.degreeOfInquiry = 1 // 1 2
this.isAdd = false //
}
this.handleInit()
// this.handleUpdataInfo()
},
methods: {
handleBack() {
@ -104,41 +143,53 @@ export default {
this.spList = res.data.list || []
})
},
handleSetSingle(id) {
/* handleSetSingle(id) {
return new Promise((resolve, reject) => {
let listQuery = {
pageNo: 1,
pageSize: this.singlePageSize,
degreeOfInquiry: this.degreeOfInquiry,
}
getVendorReceiptPage(listQuery).then((res) => {
let arr = (res.data && res.data.list || []).filter(item => item.id == id)
resolve(arr)
}).catch((err) => {
console.log(this.degreeOfInquiry, 'this.degreeOfInquiry')
getVendorReceiptPage(listQuery)
.then((res) => {
console.log(res)
// let arr = ((res.data && res.data.list) || []).filter(
// (item) => item.id == id
// )
resolve(res.data.list)
})
.catch((err) => {
reject(err)
})
})
},
handleUpdataInfo(id, index) {
}, */
/* handleUpdataInfo(id, index) {
this.$loading(true, 'singleReset')
this.handleSetSingle(id).then(arr => {
this.handleSetSingle(id)
.then((arr) => {
if (arr.length) {
this.tableList.splice(index, 1, arr[0])
this.tableList.push(...arr)
}
this.$loading(false, 'singleReset')
}).catch(() => {
})
.catch(() => {
this.$loading(false, 'singleReset')
})
},
}, */
handleListQuery(paramProp) {
this.listQuery = {
...paramProp,
invoiceDate: paramProp.startDate && [dayjs(paramProp.startDate).format('YYYY-MM-DD HH:ss:mm'), dayjs(paramProp.endDate).format('YYYY-MM-DD HH:ss:mm')]
invoiceDate: paramProp.startDate && [
dayjs(paramProp.startDate).format('YYYY-MM-DD HH:ss:mm'),
dayjs(paramProp.endDate).format('YYYY-MM-DD HH:ss:mm'),
],
}
this.finished = false
this.handleRefresh()
},
handleScroll() {
getScrollTop().then(height => {
getScrollTop().then((height) => {
this.height = height
})
},
@ -156,8 +207,8 @@ export default {
this.$router.push({
path: '/receipts',
query: {
type: 'add'
}
type: 'add',
},
})
},
handleAllRefresh() {
@ -188,12 +239,14 @@ export default {
getTableList(val) {
// const { shellIdsLocal, collegeInfoIdLocal, startDate, endDate, keyword, type, method, targets, usePersonId, teacherIds, chargePersonIds } = this.listQuery
const query = {
...this.listQuery
...this.listQuery,
degreeOfInquiry: this.degreeOfInquiry,
}
this.moreLoading = true
this.$loading(true, 'tableLoading')
getVendorReceiptPage(query).then(res => {
let resList = res.data && res.data.list || []
getVendorReceiptPage(query)
.then((res) => {
let resList = (res.data && res.data.list) || []
if (['init', 'refresh'].includes(val)) {
this.tableList = resList
this.handleScrollToTop()
@ -203,7 +256,8 @@ export default {
if (resList.length < this.pageSize) {
this.finished = true
}
}).finally(() => {
})
.finally(() => {
this.$nextTick(() => {
this.moreLoading = false
this.refreshing = false
@ -212,7 +266,7 @@ export default {
// this.$loading(false, `cTableLoading_${this.listType}`)
})
},
}
},
}
</script>
<style scoped lang="scss">

@ -1,45 +1,213 @@
<template>
<div class="common-list-contain">
<div class="common-form">
<van-form ref="form" :show-error-message="false" validate-trigger="" :submit-on-enter="false" label-width="8rem">
<van-form
ref="form"
:show-error-message="false"
validate-trigger=""
:submit-on-enter="false"
label-width="8rem"
>
<div class="section"><span class="line"> </span> 基本信息</div>
<div class="trips-box">
<div class="item-box">
<van-field v-model="form.vendorReceiptNo" v-if="form.vendorReceiptNo" disabled label="单号" clear-trigger="always" input-align="right" />
<van-field v-model="cn" disabled label="公司名称" clear-trigger="always" input-align="right" />
<van-field v-model="form.projectName" :disabled="disabled" label="项目名称" clear-trigger="always" placeholder="请输入" input-align="right" />
<van-field v-model="userInfo.nickname" disabled label="申请人" clear-trigger="always" input-align="right" maxlength="50" placeholder="请输入" />
<van-field v-model="userInfo.dept.name" disabled label="申请部门" clear-trigger="always" input-align="right" maxlength="50" placeholder="请输入" />
<RePick v-model="form.accountType" :disabled="disabled" label="账户类型" name="accountType" :list="accountList" title="账户类型" titleKey="label" idKey="value" isCell clearable />
<RePick v-model="form.currency" :disabled="disabled" label="收取币种" name="currency" :list="moneyList" title="收取币种" titleKey="label" idKey="value" isCell clearable />
<van-field v-model="form.amount" type="number" name="amount" :disabled="disabled" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '收款金额格式错误',validator: VerifyFunc.validatorMoney }]" label="收款金额" />
<van-field v-model="form.projectManager" :disabled="disabled" label="项目负责人" :rules="[{ required: true, message: '请输入' }]" required placeholder="请输入" clear-trigger="always" input-align="right" />
<RePick v-model="form.vendorIds" isRequrie :rules="[{ required: true, message: '请选择' }]" required :disabled="disabled" label="关联供应商" name="vendorIds" isShowSearch :list="allGysList" title="关联供应商" :isUseLimitPage="allGysList.length > 300" isCell clearable />
<RePick v-model="form.receiptBankIds" isRequrie :rules="[{ required: true, message: '请选择' }]" required :disabled="disabled" label="关收款账户" name="currency" isShowSearch :list="allBankList" title="关收款账户" :isUseLimitPage="allBankList.length > 300" isCell clearable />
<van-field v-model="form.reason" laceholder="请输入" :disabled="disabled" autosize rows="1" type="textarea" :rules="[{ required: true, message: '请输入' }]" label="申请事由" required clear-trigger="always" input-align="right" />
<van-field v-model="form.remark" placeholder="请输入" :disabled="disabled" autosize rows="1" type="textarea" label="备注信息" clear-trigger="always" input-align="right" />
<van-field
v-model="form.vendorReceiptNo"
v-if="form.vendorReceiptNo"
disabled
label="单号"
clear-trigger="always"
input-align="right"
/>
<van-field
v-model="cn"
disabled
label="公司名称"
clear-trigger="always"
input-align="right"
/>
<van-field
v-model="form.projectName"
:disabled="disabled"
label="项目名称"
clear-trigger="always"
placeholder="请输入"
input-align="right"
/>
<van-field
v-model="form.createName"
disabled
label="申请人"
clear-trigger="always"
input-align="right"
maxlength="50"
placeholder="请输入"
/>
<!-- <van-field
v-model="userInfo.dept.name"
disabled
label="申请部门"
clear-trigger="always"
input-align="right"
maxlength="50"
placeholder="请输入"
/> -->
<van-field
v-model="form.deptName"
disabled
label="申请部门"
clear-trigger="always"
input-align="right"
maxlength="50"
placeholder="请输入"
/>
<RePick
v-model="form.accountType"
:disabled="disabled"
label="账户类型"
name="accountType"
:list="accountList"
title="账户类型"
titleKey="label"
idKey="value"
isCell
clearable
/>
<RePick
v-model="form.currency"
:disabled="disabled"
label="收取币种"
name="currency"
:list="moneyList"
title="收取币种"
titleKey="label"
idKey="value"
isCell
clearable
/>
<van-field
v-model="form.amount"
type="number"
name="amount"
:disabled="disabled"
placeholder="请输入"
input-align="right"
required
:rules="[
{
required: true,
message: '收款金额格式错误',
validator: VerifyFunc.validatorMoney,
},
]"
label="收款金额"
/>
<van-field
v-model="form.projectManager"
:disabled="disabled"
label="项目负责人"
:rules="[{ required: true, message: '请输入' }]"
required
placeholder="请输入"
clear-trigger="always"
input-align="right"
/>
<RePick
v-model="form.vendorIds"
isRequrie
:rules="[{ required: true, message: '请选择' }]"
required
:disabled="disabled"
label="关联供应商"
name="vendorIds"
isShowSearch
:list="allGysList"
title="关联供应商"
:isUseLimitPage="allGysList.length > 300"
isCell
clearable
/>
<RePick
v-model="form.receiptBankIds"
isRequrie
:rules="[{ required: true, message: '请选择' }]"
required
:disabled="disabled"
label="关收款账户"
name="currency"
isShowSearch
:list="allBankList"
title="关收款账户"
:isUseLimitPage="allBankList.length > 300"
isCell
clearable
/>
<van-field
v-model="form.reason"
laceholder="请输入"
:disabled="disabled"
autosize
rows="1"
type="textarea"
:rules="[{ required: true, message: '请输入' }]"
label="申请事由"
required
clear-trigger="always"
input-align="right"
/>
<van-field
v-model="form.remark"
placeholder="请输入"
:disabled="disabled"
autosize
rows="1"
type="textarea"
label="备注信息"
clear-trigger="always"
input-align="right"
/>
</div>
</div>
<div class="section mt5"><span class="line"> </span>附件</div>
<div class="trips-box">
<div class="item-box">
<UploadFile :typeStr="typeStr" @onConfirm="handleUpload" :fileList="fileList" />
<UploadFile
:typeStr="typeStr"
@onConfirm="handleUpload"
:fileList="fileList"
/>
</div>
</div>
<div class="section mt5" v-if="['show'].includes(typeStr)">
<span class="line"> </span>审批流程
</div>
<div class="section mt5" v-if="['show'].includes(typeStr)"> <span class="line"> </span>审批流程</div>
<ApprovalProcess v-if="['show'].includes(typeStr)" :processInstanceId="form.processInstanceId" @onSetId="handleSetAccessId" />
<ApprovalProcess
v-if="['show'].includes(typeStr)"
:processInstanceId="form.processInstanceId"
@onSetId="handleSetAccessId"
/>
</van-form>
</div>
<BottomBtn ref="BottomBtn" :isAuthorised="isAuthorised" @onBtConfirm="handleBtConfirm" :accessId="accessId" />
<BottomBtn
ref="BottomBtn"
:isAuthorised="isAuthorised"
@onBtConfirm="handleBtConfirm"
:accessId="accessId"
/>
</div>
</template>
<script>
import { createVendorReceipt, getVendorReceipt, updateVendorReceipt } from "@/api/bs/vendorReceipt";
import {
createVendorReceipt,
getVendorReceipt,
updateVendorReceipt,
} from '@/api/bs/vendorReceipt'
import VerifyFunc from '@/utils/verify'
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getVendorPage } from "@/api/bs/vendor";
import { getBankAccountInfoPage } from "@/api/bs/bankAccountInfo";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { getVendorPage } from '@/api/bs/vendor'
import { getBankAccountInfoPage } from '@/api/bs/bankAccountInfo'
export default {
//import使
props: {},
@ -52,16 +220,24 @@ export default {
},
// 访this
created() {
this.isApproval = this.$route.query.isApproval == 'true' ? true : false
this.handleInitList().then(() => {
this.handleInitForm()
})
},
// 访DOM
mounted() {
},
mounted() {},
data() {
return {
form: {},
isApproval: false,
form: {
createName: JSON.parse(
window.localStorage.getItem('userInfo') || { dept: {} }
).nickname,
deptName: JSON.parse(
window.localStorage.getItem('userInfo') || { dept: {} }
).dept.name,
},
allBankList: [],
allGysList: [],
isAuthorised: false,
@ -71,12 +247,12 @@ export default {
typeStr: null, // show: edit: :
fileList: [],
btnList: [
{ title: '暂存', icon: 'star-o', color: "#909399", key: 0 },
{ title: '提交', icon: 'edit', color: "#ff9900", key: 1 },
{ title: '同意', icon: 'certificate', color: "#19be6b", key: 2 },
{ title: '驳回', icon: 'exchange', color: "#fa3534", key: 3 },
{ title: '暂存', icon: 'star-o', color: '#909399', key: 0 },
{ title: '提交', icon: 'edit', color: '#ff9900', key: 1 },
{ title: '同意', icon: 'certificate', color: '#19be6b', key: 2 },
{ title: '驳回', icon: 'exchange', color: '#fa3534', key: 3 },
],
};
}
},
//
// bs_fee_type
@ -104,7 +280,7 @@ export default {
},
disabled() {
return ['show'].includes(this.$route.query.type)
}
},
},
//
methods: {
@ -112,43 +288,55 @@ export default {
this.fileList = list
},
handleBtConfirm(key, ignoreFeeTip) {
console.log(key, 1)
if (key == 2 || key == 3) {
return
}
console.log(key, 2)
this.$nextTick(() => {
this.$refs.form.validate().then(() => {
this.$refs.form
.validate()
.then(() => {
console.log(key, 3)
// /
let newForm = {
...this.form,
files: this.fileList,
receiptBankIds: [this.form.receiptBankIds],
vendorIds: [this.form.vendorIds],
status: key
status: key,
}
this.$loading(true, 'form')
let api = newForm.id ? updateVendorReceipt : createVendorReceipt
api(newForm).then(() => {
api(newForm)
.then(() => {
this.$loading(false, 'form')
this.$sm(`${this.form.id ? '修改成功!' : '新增成功!'}`)
//
if (!newForm.id) {
this.$EventBus.$emit('handleResetLive', 'contract-corporateReceipts')
this.$EventBus.$emit(
'handleResetLive',
'contract-corporateReceipts'
)
}
history.back()
}).catch(() => {
})
.catch(() => {
this.$loading(false, 'form')
})
}).catch((err) => {
})
.catch((err) => {
this.$loading(false, 'form')
if (err && err.length > 0 && err[0].name) {
if (err[0].name === 'amount') {
this.$fm(err[0].message)
}
const fieldElement = this.$refs.form.$el.querySelector(`[name="${err[0].name}"]`);
const fieldHeight = fieldElement.offsetHeight;
const scrollHeight = fieldHeight + 50; // 50px
this.$refs.form.scrollToField(err[0].name, scrollHeight);
const fieldElement = this.$refs.form.$el.querySelector(
`[name="${err[0].name}"]`
)
const fieldHeight = fieldElement.offsetHeight
const scrollHeight = fieldHeight + 50 // 50px
this.$refs.form.scrollToField(err[0].name, scrollHeight)
}
})
})
@ -163,18 +351,27 @@ export default {
if (this.$route.query.id) {
this.$loading(true, 'loadingSb')
let api = getVendorReceipt
api(this.$route.query.id).then((res) => {
api({ id: this.$route.query.id, isApproval: this.isApproval })
.then((res) => {
this.form = {
...(res.data || {}),
receiptBankIds: Array.isArray(res.data.receiptBankIds) && res.data.receiptBankIds.length ? Number(res.data.receiptBankIds[0]) : null,
vendorIds: Array.isArray(res.data.vendorIds) && res.data.vendorIds.length ? Number(res.data.vendorIds[0]) : null
receiptBankIds:
Array.isArray(res.data.receiptBankIds) &&
res.data.receiptBankIds.length
? Number(res.data.receiptBankIds[0])
: null,
vendorIds:
Array.isArray(res.data.vendorIds) && res.data.vendorIds.length
? Number(res.data.vendorIds[0])
: null,
}
this.fileList = res.data.files || []
this.isAuthorised = res.data.isAuthorised
this.$nextTick(() => {
this.$refs.BottomBtn.handleFilterBtnList()
})
}).finally(() => {
})
.finally(() => {
this.$loading(false, 'loadingSb')
})
}
@ -185,28 +382,30 @@ export default {
return new Promise((resolve) => {
Promise.all([
getVendorPage({ pageNo: 1, pageSize: 999 }),
getBankAccountInfoPage({ pageNo: 1, pageSize: 999 })
]).then(responses => {
getBankAccountInfoPage({ pageNo: 1, pageSize: 999 }),
])
.then((responses) => {
//
this.allGysList = (responses[0].data.list || []).map(item => {
this.allGysList = (responses[0].data.list || []).map((item) => {
return {
id: item.id,
title: item.vendorName
title: item.vendorName,
}
});
this.allBankList = (responses[1].data.list || []).map(item => {
})
this.allBankList = (responses[1].data.list || []).map((item) => {
return {
id: item.id,
title: `${item.bankName}-收款账户:${item.bankAccount}`
title: `${item.bankName}-收款账户:${item.bankAccount}`,
}
});
})
resolve()
}).catch(error => {
})
.catch((error) => {
//
console.error('Error:', error);
});
console.error('Error:', error)
})
}
})
},
},
}
</script>

@ -126,47 +126,6 @@ export default {
handleFilterList() {
this.roterList = []
let arr = [
{
row: [
/* {
route: '/mySupplier',
title: '供应商合同审批',
icon: 'friends-o',
show: this.permission_btns.includes('procurement:supplierCt:list')
},
{
route: '/myCustom',
title: '客户合同审批',
icon: 'manager-o',
show: this.permission_btns.includes('bs:customer-contract:query')
},
{
route: '/myBidder',
title: '中标审批',
icon: 'bookmark-o',
show: this.permission_btns.includes('bs:quotation-sheet:create')
},
{
route: '/myPay',
title: '付款审批',
icon: 'refund-o',
show: this.permission_btns.includes('procurement:payApply:list')
}, */
{
route: '/corporateReceipts',
title: '对公收款',
icon: 'friends-o',
show: this.permission_btns.includes('bs:vendor-receipt:query'),
},
{
route: '/corporatePayment',
title: '对公付款',
icon: 'friends-o',
show: this.permission_btns.includes('bs:vendor-payment:query'),
},
],
title: '合同审批',
},
{
row: [
// {
@ -212,7 +171,7 @@ export default {
show: checkPermission('bs/invoice/index'),
},
],
title: '企业办公',
title: '报销',
},
{
row: [
@ -228,9 +187,56 @@ export default {
icon: 'qr-invalid',
show: checkPermission('bs/expenseClaim/index'),
},
{
route: '/corporateReceiptsApproval', //
title: '对公收款审批',
icon: 'friends-o',
show: this.permission_btns.includes('bs:vendor-receipt:query'),
},
],
title: '审批',
},
{
row: [
/* {
route: '/mySupplier',
title: '供应商合同审批',
icon: 'friends-o',
show: this.permission_btns.includes('procurement:supplierCt:list')
},
{
route: '/myCustom',
title: '客户合同审批',
icon: 'manager-o',
show: this.permission_btns.includes('bs:customer-contract:query')
},
{
route: '/myBidder',
title: '中标审批',
icon: 'bookmark-o',
show: this.permission_btns.includes('bs:quotation-sheet:create')
},
{
route: '/myPay',
title: '付款审批',
icon: 'refund-o',
show: this.permission_btns.includes('procurement:payApply:list')
}, */
{
route: '/corporateReceipts',
title: '对公收款',
icon: 'friends-o',
show: this.permission_btns.includes('bs:vendor-receipt:query'),
},
/* {
route: '/corporatePayment',
title: '对公付款',
icon: 'friends-o',
show: this.permission_btns.includes('bs:vendor-payment:query'),
}, */
],
title: '对公',
},
]
this.roterList = arr.map((item) => {
return {

@ -8,6 +8,7 @@
</div>
</div>
<div v-else class="login-mobile-contain">
<!-- <div class="login-mobile-contain"> -->
<div class="login-contaion flex-c flex-c-center">
<div class="contain-topbg flex flex-center flex-c flex-c-center">
<img class="logo-img" src="@/assets/logo.png" alt="" />
@ -16,7 +17,7 @@
<div class="round"></div>
</div>
<!-- 密码登录 -->
<div v-if="firstLogin" style="width: 90%; z-index: 10">
<div style="width: 90%; z-index: 10">
<div class="login-form">
<div
style="border-bottom: 0.0125rem solid #ddd; padding-bottom: 24px"
@ -65,7 +66,6 @@
<van-button
type="primary"
@click="handleWxLogin"
:class="{ mtop: !firstLogin }"
style="left: 50%; transform: translateX(-50%); width: 90%"
>企业微信登录</van-button
>
@ -102,7 +102,6 @@ export default {
tenantEnable: false,
captchaEnable: false,
isRemeber: false,
firstLogin: false,
code: '',
state: '',
}
@ -183,7 +182,6 @@ export default {
forbidClick: false,
message: '请输入账号密码首次绑定',
})
this.firstLogin = true
this.$nextTick(() => {
return
})
@ -284,7 +282,6 @@ export default {
}
window.localStorage.setItem('loginInfo', JSON.stringify(obj))
}
this.firstLogin = false
//
if (window.location.href.includes('code')) {
userBind({ code: this.code, state: this.state, type: 40 })

Loading…
Cancel
Save