增加合同审批模块,未完成

main
jwg 7 months ago
parent 9a8000a035
commit 447b83c3e3

@ -7,37 +7,110 @@
<div class="bt">{{}}</div> <div class="bt">{{}}</div>
</div> --> </div> -->
<div class="box-cr"> <div class="box-cr">
<div class="cr-bt" style="margin-top: 0.6rem;"> <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="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>
<div class="ct-md"> <div class="ct-md">
<div class="mt5" style="color:#333"> <div class="mt5" style="color: #333">
合同编号 {{itemData.contractNumber}} 合同编号 {{ itemData.contractNumber }}
</div>
<div style="margin-top: 0.3rem; color: #333">
合同名称{{ itemData.contractName }}
</div> </div>
<div style="margin-top: 0.3rem;color:#333 "> <div style="margin-top: 0.3rem; color: #333">
合同名称{{itemData.contractName}} 供应商名称{{ itemData.supplierName }}
</div> </div>
<div style="margin-top: 0.3rem;color:#333 "> <div style="margin-top: 0.3rem; color: #333">
供应商名称{{itemData.supplierName}} 签约人员{{ itemData.signatoryName }}
</div> </div>
<div style="margin-top: 0.3rem;color:#333 "> <div style="margin-top: 0.3rem; color: #333">
签约人员{{itemData.signatoryName}} 合同金额{{ itemData.amount }}
</div> </div>
<div style="margin-top: 0.3rem;color:#333 "> <div style="margin-top: 0.3rem; color: #333">
合同金额{{itemData.amount}} 合同起止时间
{{
itemData.startTime &&
dayjs(itemData.startTime).format('YY/MM/DD')
}}
~
{{
itemData.endTime && dayjs(itemData.endTime).format('YY/MM/DD')
}}
</div> </div>
<div style="margin-top: 0.3rem;color:#333 "> <div style="margin-top: 0.3rem; color: #333">
合同起止时间 {{itemData.startTime && dayjs(itemData.startTime).format('YY/MM/DD')}} ~ {{itemData.endTime && dayjs(itemData.endTime).format('YY/MM/DD')}} <div
class="tags"
:style="`border: 1px solid ;color:#05A9FF;width: 6rem;`"
>
{{
getDictDataLabel(
DICT_TYPE.SR_CT_TYPE,
itemData.contractType
) || '未知'
}}
</div> </div>
<div style="margin-top: 0.3rem;color:#333 ">
<div class="tags" :style="`border: 1px solid ;color:#05A9FF;width: 6rem;`">{{getDictDataLabel(DICT_TYPE.SR_CT_TYPE,itemData.contractType) || '未知'}} </div>
</div> </div>
</div> </div>
</div> </div>
<div class="box-rt"> <div class="box-rt">
<van-icon class="icon-box" v-hasPermi="['bs:supplier-contract:show']" @click="handleShow(itemData.id)" name="eye-o" color="#05A9FF" size="25" /> <van-icon
<van-icon class="icon-box" v-hasPermi="['bs:supplier-contract: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" /> class="icon-box"
<van-icon class="icon-box" v-hasPermi="['bs:supplier-contract: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" /> v-hasPermi="['bs:supplier-contract:query']"
@click="handleShow(itemData.id)"
name="eye-o"
color="#05A9FF"
size="25"
/>
<van-icon
class="icon-box"
v-hasPermi="['procurement:supplierCt: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="['procurement:supplierCt:del']"
@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" /> --> <!-- <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>
</div> </div>
@ -46,24 +119,21 @@
</template> </template>
<script> <script>
import { getDictDataLabel, handleFilterStatus } from "@/utils/dict"; import { getDictDataLabel, handleFilterStatus } from '@/utils/dict'
import { deleteSupplierContract } from '@/api/bs/supplierContract'; import { deleteSupplierContract } from '@/api/bs/supplierContract'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { Dialog } from 'vant' import { Dialog } from 'vant'
export default { export default {
props: { props: {
itemData: { itemData: {
required: true, required: true,
default: () => { } default: () => {},
}, },
},
components: {
}, },
components: {},
data() { data() {
return { return {
jumoStudentId: null jumoStudentId: null,
} }
}, },
activated() { activated() {
@ -71,9 +141,7 @@ export default {
this.handleUpdataInfo() this.handleUpdataInfo()
} }
}, },
mounted() { mounted() {},
},
computed: { computed: {
userInfo() { userInfo() {
return JSON.parse(window.localStorage.getItem('userInfo') || { dept: {} }) return JSON.parse(window.localStorage.getItem('userInfo') || { dept: {} })
@ -85,25 +153,24 @@ export default {
return return
} }
}, },
handleEdit(id, status,creator) { handleEdit(id, status, creator) {
if (!(status==0 || (status ==3 && this.userInfo.id ==creator)) ) { if (!(status == 0 || (status == 3 && this.userInfo.id == creator))) {
return return
} }
this.jumoStudentId = id this.jumoStudentId = id
this.$router.push({ this.$router.push({
path: '/supplier', path: '/supplier',
query: { id, type: 'edit' } query: { id, type: 'edit' },
}) })
}, },
handleDel(id, status,creator) { handleDel(id, status, creator) {
if (!(status==0 || (status ==3 && this.userInfo.id ==creator)) ) { if (!(status == 0 || (status == 3 && this.userInfo.id == creator))) {
return return
} }
Dialog.confirm({ Dialog.confirm({
title: '提示', title: '提示',
message: '你确定要删除吗?', message: '你确定要删除吗?',
}) }).then(() => {
.then(() => {
deleteSupplierContract(id).then(() => { deleteSupplierContract(id).then(() => {
this.$emit('onAllRefresh') this.$emit('onAllRefresh')
}) })
@ -115,7 +182,7 @@ export default {
this.jumoStudentId = id this.jumoStudentId = id
this.$router.push({ this.$router.push({
path: '/supplier', path: '/supplier',
query: { id, type: 'show' } query: { id, type: 'show' },
}) })
}, },
dayjs, dayjs,
@ -123,7 +190,7 @@ export default {
this.jumoStudentId = null this.jumoStudentId = null
this.$emit('onUpdataInfo', this.itemData.id) this.$emit('onUpdataInfo', this.itemData.id)
}, },
} },
} }
</script> </script>

@ -1,27 +1,51 @@
<template> <template>
<!-- 中标审批列表 --> <!-- 中标审批列表 -->
<div> <div>
<HeaderFilter :listType="listType" :spList="spList" @onListQuery="handleListQuery" :paramProp="listQuery" /> <HeaderFilter
<RMList :moreLoading.sync="moreLoading" :refreshing.sync="refreshing" :finished.sync="finished" @onLoad="handleLoad" @onRefresh="handleRefresh" isMore :tableList="tableList"> :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> <div>
<MySupplierListCard v-for="(item,index) in tableList" :key="item.id" :itemData="item" :listType="listType" @onUpdataInfo="handleUpdataInfo($event, index)" @onAllRefresh="handleAllRefresh" /> <MySupplierListCard
v-for="(item, index) in tableList"
:key="item.id"
:itemData="item"
:listType="listType"
@onUpdataInfo="handleUpdataInfo($event, index)"
@onAllRefresh="handleAllRefresh"
/>
</div> </div>
</RMList> </RMList>
<div class="common-bottom-btns" style="bottom:8rem"> <div class="common-bottom-btns" style="bottom: 8rem">
<div class="common-bottom-btn" @click="handleTopPage"> <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> <span>回到顶部</span>
</div> </div>
</div> </div>
<div class="common-bottom-btns" v-hasPermi="['bs:supplier-contract:create']" style="bottom:10rem"> <div
class="common-bottom-btns"
v-hasPermi="['bs:supplier-contract:create']"
style="bottom: 10rem"
>
<div class="common-bottom-btn" @click="handleToAdd"> <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> <span>添加申请</span>
</div> </div>
</div> </div>
<div class="common-bottom-btns" style="bottom:6rem"> <div class="common-bottom-btns" style="bottom: 6rem">
<div class="common-bottom-btn" @click="handleBack"> <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> <span>返回首页</span>
</div> </div>
</div> </div>
@ -30,13 +54,13 @@
<script> <script>
import { getScrollTop } from '@/utils' import { getScrollTop } from '@/utils'
import { getSupplierCompanyPage } from "@/api/bs/quotationSheet"; import { getSupplierCompanyPage } from '@/api/bs/quotationSheet'
import { getSupplierContractPage } from "@/api/bs/supplierContract"; import { getSupplierContractPage } from '@/api/bs/supplierContract'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import dayjs from 'dayjs' import dayjs from 'dayjs'
export default { export default {
props: { props: {
listType: String // EnrollmentOrder: EnrollmentCollection: ShiftRecord: WaitPay: listType: String, // EnrollmentOrder: EnrollmentCollection: ShiftRecord: WaitPay:
}, },
components: { components: {
HeaderFilter: () => import('./HeaderFilter.vue'), HeaderFilter: () => import('./HeaderFilter.vue'),
@ -60,7 +84,6 @@ export default {
contractName: null, contractName: null,
contractType: null, contractType: null,
supplierName: null, supplierName: null,
status: null,
amount: null, amount: null,
receivedAmount: null, receivedAmount: null,
projectId: null, projectId: null,
@ -81,9 +104,9 @@ export default {
}, },
computed: { computed: {
...mapState({ ...mapState({
singlePageSize: state => state.common.setting.singlePageSize, singlePageSize: (state) => state.common.setting.singlePageSize,
pageSize: state => state.common.setting.pageSize, pageSize: (state) => state.common.setting.pageSize,
}) }),
}, },
activated() { activated() {
this.handleScrollInit() this.handleScrollInit()
@ -113,35 +136,44 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: this.singlePageSize, pageSize: this.singlePageSize,
} }
getSupplierContractPage(listQuery).then((res) => { getSupplierContractPage(listQuery)
let arr = (res.data && res.data.list || []).filter(item => item.id == id) .then((res) => {
let arr = ((res.data && res.data.list) || []).filter(
(item) => item.id == id
)
resolve(arr) resolve(arr)
}).catch((err) => { })
.catch((err) => {
reject(err) reject(err)
}) })
}) })
}, },
handleUpdataInfo(id, index) { handleUpdataInfo(id, index) {
this.$loading(true, 'singleReset') this.$loading(true, 'singleReset')
this.handleSetSingle(id).then(arr => { this.handleSetSingle(id)
.then((arr) => {
if (arr.length) { if (arr.length) {
this.tableList.splice(index, 1, arr[0]) this.tableList.splice(index, 1, arr[0])
} }
this.$loading(false, 'singleReset') this.$loading(false, 'singleReset')
}).catch(() => { })
.catch(() => {
this.$loading(false, 'singleReset') this.$loading(false, 'singleReset')
}) })
}, },
handleListQuery(paramProp) { handleListQuery(paramProp) {
this.listQuery = { this.listQuery = {
...paramProp, ...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.finished = false
this.handleRefresh() this.handleRefresh()
}, },
handleScroll() { handleScroll() {
getScrollTop().then(height => { getScrollTop().then((height) => {
this.height = height this.height = height
}) })
}, },
@ -159,8 +191,8 @@ export default {
this.$router.push({ this.$router.push({
path: '/supplier', path: '/supplier',
query: { query: {
type: 'add' type: 'add',
} },
}) })
}, },
handleAllRefresh() { handleAllRefresh() {
@ -191,12 +223,13 @@ export default {
getTableList(val) { getTableList(val) {
// const { shellIdsLocal, collegeInfoIdLocal, startDate, endDate, keyword, type, method, targets, usePersonId, teacherIds, chargePersonIds } = this.listQuery // const { shellIdsLocal, collegeInfoIdLocal, startDate, endDate, keyword, type, method, targets, usePersonId, teacherIds, chargePersonIds } = this.listQuery
const query = { const query = {
...this.listQuery ...this.listQuery,
} }
this.moreLoading = true this.moreLoading = true
this.$loading(true, 'tableLoading') this.$loading(true, 'tableLoading')
getSupplierContractPage(query).then(res => { getSupplierContractPage(query)
let resList = res.data && res.data.list || [] .then((res) => {
let resList = (res.data && res.data.list) || []
if (['init', 'refresh'].includes(val)) { if (['init', 'refresh'].includes(val)) {
this.tableList = resList this.tableList = resList
this.handleScrollToTop() this.handleScrollToTop()
@ -206,7 +239,8 @@ export default {
if (resList.length < this.pageSize) { if (resList.length < this.pageSize) {
this.finished = true this.finished = true
} }
}).finally(() => { })
.finally(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.moreLoading = false this.moreLoading = false
this.refreshing = false this.refreshing = false
@ -215,7 +249,7 @@ export default {
// this.$loading(false, `cTableLoading_${this.listType}`) // this.$loading(false, `cTableLoading_${this.listType}`)
}) })
}, },
} },
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

@ -198,19 +198,21 @@ export default {
}, },
{ {
row: [ row: [
/* { {
route: '/mySupplier', route: '/mySupplier',
title: '供应商合同审批', title: '供应商合同审批',
icon: 'friends-o', icon: 'friends-o',
show: this.permission_btns.includes('procurement:supplierCt:list') show: this.permission_btns.includes(
'procurement:supplierCt:list'
),
}, },
{ {
route: '/myCustom', route: '/myCustom',
title: '客户合同审批', title: '客户合同审批',
icon: 'manager-o', icon: 'manager-o',
show: this.permission_btns.includes('bs:customer-contract:query') show: this.permission_btns.includes('bs:customer-contract:query'),
}, },
{ /* {
route: '/myBidder', route: '/myBidder',
title: '中标审批', title: '中标审批',
icon: 'bookmark-o', icon: 'bookmark-o',

Loading…
Cancel
Save