添加合同和基础功能

main
suixy 2 months ago
parent 50ecc5a147
commit 1ff25eb88f

@ -1,18 +1,68 @@
<script> <script setup>
export default { import {
onLaunch: function() { onLaunch,
console.log('App Launch') onShow,
}, onHide,
onShow: function() { } from '@dcloudio/uni-app'
console.log('App Show') import {
}, getInfo,
onHide: function() { getRouters
console.log('App Hide') } from '@/api/user.js'
} import {
} setGlobalData
} from '@/store/index.js'
onLaunch(() => {
console.log('App Launch')
})
onShow(() => {
console.log('App Show')
getInfo().then(e => {
let data = e.data
setGlobalData('permissions', data.permissions)
setGlobalData('userInfo', data.user)
})
getRouters().then(e => {
let data = e.data.find(v => v.path === '/app')
setGlobalData('route', data.children)
})
})
onHide(() => {
console.log('App Hide')
})
</script> </script>
<style> <style lang="scss">
/*每个页面公共css */ .form-item {
* {} padding: 20rpx;
border-bottom: 1px solid #eee;
display: flex;
&:last-child {
margin-bottom: 10rpx;
}
}
.uni-input {
height: 60rpx;
line-height: 60rpx;
color: #aaa;
}
.moreFormItem-enter-active,
.moreFormItem-leave-active {
transition: max-height 0.3s ease, opacity 0.3s ease;
overflow: hidden;
}
.moreFormItem-enter-from,
.moreFormItem-leave-to {
max-height: 0;
opacity: 0;
}
.moreFormItem-enter-to,
.moreFormItem-leave-from {
max-height: 500rpx;
opacity: 1;
}
</style> </style>

@ -14,7 +14,7 @@
}) })
</script> </script>
<style scoped> <style scoped lang="scss">
.card { .card {
width: 630rpx; width: 630rpx;
border-radius: 10rpx; border-radius: 10rpx;

@ -45,23 +45,5 @@
</script> </script>
<style scoped> <style scoped lang="scss">
.card {
width: 630rpx;
border-radius: 10rpx;
background-color: #fff;
margin-left: 30rpx;
display: inline-block;
position: relative;
padding: 30rpx;
.title {
color: #333;
font-size: 32rpx
}
.content {
margin-top: 30rpx;
}
}
</style> </style>

@ -1,27 +0,0 @@
<template>
<view class="uni-form-item uni-column">
<view class="title">{{title}}</view>
<view class="item">
<slot></slot>
</view>
</view>
</template>
<script setup>
const props = defineProps(['title'])
console.log(props);
</script>
<style scoped>
.title {
display: inline-block;
}
.item {
width: 200rpx;
display: inline-block;
vertical-align: top;
border: 1px solid #ddd;
border-radius: 10rpx;
}
</style>

@ -1,7 +1,10 @@
import App from './App' import App from './App'
import Top from '@/components/Top.vue'
import Card from '@/components/Card.vue' import Card from '@/components/Card.vue'
import DictTag from '@/components/DictTag.vue' import DictTag from '@/components/DictTag.vue'
import FormItem from '@/components/FormItem.vue' import FormItem from '@/components/form/FormItem.vue'
import SearchInput from '@/components/SearchInput.vue'
import Picker from '@/components/form/Picker.vue'
// #ifndef VUE3 // #ifndef VUE3
import Vue from 'vue' import Vue from 'vue'
@ -20,9 +23,12 @@ import {
} from 'vue' } from 'vue'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
app.component('Top', Top)
app.component('Card', Card) app.component('Card', Card)
app.component('DictTag', DictTag) app.component('DictTag', DictTag)
app.component('FormItem', FormItem) app.component('FormItem', FormItem)
app.component('SearchInput', SearchInput)
app.component('Pickera', Picker)
return { return {
app app
} }

@ -23,13 +23,19 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/workHourReporting/index",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
"uniIdRouter": {} "uniIdRouter": {}
} }

@ -1,58 +1,96 @@
<template> <template>
<view style="background-color: #F2F3F5;" :style="{height:pageHeight+'px'}"> <view :style="{marginTop:barHeight+'px'}">
<Card class="searchForm" :hideTitle="true"> <Top text="合同查询" />
<form @submit="onSubmit"> <scroll-view scroll-y="" style="background-color: #F2F3F5;"
<FormItem :title="'合同编号'"> :style="{height:`calc(${pageHeight+'px'} - 30rpx - 100rpx)`,paddingBottom:'30rpx'}"
<input class="uni-input" name="contractCode" /> @scrolltolower="onScrollToLower">
</FormItem> <view id="contain" ref="containRef">
<button form-type="submit">Submit</button> <Card class="searchForm" :hideTitle="true">
</form> <form @submit="getList" @reset="searchFormReset">
</Card> <FormItem :title="'合同编号'" v-if="!moreFormItem">
<Card class="table" :hideTitle="true"> <SearchInput v-model="searchForm.contractCode" @search="getList" />
<uni-collapse> </FormItem>
<uni-collapse-item v-for="i in list"> <FormItem :title="'合同编号'" width="180rpx" v-if="moreFormItem">
<template v-slot:title> <input class="uni-input" v-model="searchForm.contractCode" />
<view class="list-item-title"> </FormItem>
<view class="leftText"> <transition name="moreFormItem">
{{i.contractName}} <view v-show="moreFormItem">
<FormItem :title="'客户合同编号'" width="201rpx">
<input class="uni-input" v-model="searchForm.customerContractCode" />
</FormItem>
<FormItem :title="'合同名称'" width="180rpx">
<input class="uni-input" v-model="searchForm.contractName" />
</FormItem>
<FormItem :title="'业务方向'" width="180rpx">
<Pickera key="label" :data="business_direction" :value="searchForm.businessDirection"
@change="e=>searchForm.businessDirection =e" />
</FormItem>
<FormItem :title="'合同状态'" width="180rpx">
<Pickera key="label" :data="contract_status" :value="searchForm.contractStatus"
@change="e=>searchForm.contractStatus =e" />
</FormItem>
</view> </view>
<view class="rightText"> </transition>
<DictTag :options="contract_category" :value="i.contractCategory" /> <view style="text-align: center;">
<button style="height:60rpx;width: 150rpx;line-height: 60rpx;display: inline-block;" v-if="moreFormItem"
form-type="submit" type="primary">搜索</button>
<button style="height:60rpx;width: 150rpx;line-height: 60rpx;display: inline-block;margin-left: 20rpx;"
v-if="moreFormItem" form-type="reset" plain="true" type="primary">重置</button>
</view>
<view class="toggle" @tap="toggleForm">
<view class="icon" :style="{transform: `rotate(${moreFormItem ? 180 : 0}deg)`}"></view>
</view>
</form>
</Card>
<Picker key="label" :data="business_direction" :value="searchForm.businessDirection"
@change="e=>searchForm.businessDirection =e" />
<Card class="table" :hideTitle="true">
<uni-collapse>
<uni-collapse-item v-for="i in list">
<template v-slot:title>
<view class="list-item-title">
<view class="leftText">
{{i.contractName}}
</view>
<view class="rightText">
<DictTag :options="contract_category" :value="i.contractCategory" />
</view>
</view>
</template>
<view style="padding:20rpx 0 " @tap="itemOperation(i)">
<view class="is-open-text">有无合同{{i.contractFlag}}
</view>
<view class="is-open-text">合同编号{{i.contractCode}}
</view>
<view class="is-open-text">业务方向
<DictTag :options="business_direction" :value="i.businessDirection" type="text" />
</view>
<view class="is-open-text">部门{{i.deptName}}</view>
<view class="is-open-text">合同签订日期{{i.contractDate}}
</view>
<view class="is-open-text">合同总价{{i.totalPrice}}
</view>
<view class="is-open-text">
甲方公司{{i.oneCustomerName}}
</view>
<view class="is-open-text">
乙方公司{{i.twoCustomerName}}
</view>
<view class="is-open-text">合同状态
<DictTag :options="contract_status" :value="i.contractStatus" type="text" />
</view>
<view class="is-open-text">流程状态{{i.flowStatus}}
</view>
<view class="is-open-text">
内部合同号{{i.internalContractCode}}</view>
<view class="is-open-text">
外部合同号{{i.externalContractCode}}</view>
</view> </view>
</view> </uni-collapse-item>
</template> </uni-collapse>
<view style="padding:20rpx 0 " @tap="itemOperation(i)"> </Card>
<view class="is-open-text">有无合同{{i.contractFlag}} </view>
</view> </scroll-view>
<view class="is-open-text">合同编号{{i.contractCode}}
</view>
<view class="is-open-text">业务方向
<DictTag :options="business_direction" :value="i.businessDirection" type="text" />
</view>
<view class="is-open-text">部门{{i.deptName}}</view>
<view class="is-open-text">合同签订日期{{i.contractDate}}
</view>
<view class="is-open-text">合同总价{{i.totalPrice}}
</view>
<view class="is-open-text">
甲方公司{{i.oneCustomerName}}
</view>
<view class="is-open-text">
乙方公司{{i.twoCustomerName}}
</view>
<view class="is-open-text">合同状态
<DictTag :options="contract_status" :value="i.contractStatus" type="text" />
</view>
<view class="is-open-text">流程状态{{i.flowStatus}}
</view>
<view class="is-open-text">
内部合同号{{i.internalContractCode}}</view>
<view class="is-open-text">
外部合同号{{i.externalContractCode}}</view>
</view>
</uni-collapse-item>
</uni-collapse>
</Card>
</view> </view>
</template> </template>
@ -61,10 +99,17 @@
ref, ref,
toRefs, toRefs,
onMounted, onMounted,
nextTick,
} from 'vue'; } from 'vue';
import { import {
useDict useDict
} from '@/utils/dict.js' } from '@/utils/dict.js'
import {
listContractInfo
} from '@/api/contractInfo';
import {
getHeight
} from '@/utils/index.js'
const { const {
contract_category, contract_category,
@ -78,380 +123,59 @@
'contract_status' 'contract_status'
]) ])
); );
const containRef = ref(null)
const moreFormItem = ref(false)
const toggleForm = () => {
moreFormItem.value = !moreFormItem.value
}
const searchForm = ref({
pageNum: 1,
pageSize: 10,
})
const list = ref([])
const total = ref(0)
const list = ref([{ const checkFull = () => {
"contractId": "2001118586166714370", let res = false
"contractFlag": "1", return new Promise(resolve => {
"contractCode": "HT202512170005", uni.createSelectorQuery()
"customerContractCode": null, .select('#contain') // .in(proxy)
"contractName": "13", .boundingClientRect(rect => {
"contractCategory": "1", resolve(rect?.height < pageHeight.value)
"contractType": null, })
"businessDirection": "1", .exec()
"contractDeptId": 100, })
"contractDate": null, }
"totalPrice": "0.00", const search = async () => {
"oneCustomerId": null, const res = await listContractInfo(searchForm.value);
"oneRepresent": null, list.value = list.value.concat(res.rows);
"oneDate": null, total.value = res.total;
"twoCustomerId": null, await nextTick()
"twoRepresent": null, if (await checkFull()) {
"twoDate": null, if (searchForm.value.pageNum * searchForm.value.pageSize < total.value) {
"contractStatus": "1", searchForm.value.pageNum += 1
"flowStatus": "draft", search()
"templateId": null, }
"ossId": null,
"paymentMethod": null,
"signatureAppendix": null,
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": null,
"twoCustomerName": null,
"deptName": "青岛海威物联科技有限公司"
},
{
"contractId": "2000863577393192962",
"contractFlag": "1",
"contractCode": "HT202512160002",
"customerContractCode": null,
"contractName": "合同20251216",
"contractCategory": "1",
"contractType": null,
"businessDirection": "5",
"contractDeptId": 107,
"contractDate": null,
"totalPrice": "20.00",
"oneCustomerId": 2,
"oneRepresent": "甲方",
"oneDate": "2025-12-11 00:00:00",
"twoCustomerId": 1,
"twoRepresent": "乙方授",
"twoDate": "2025-12-09 00:00:00",
"contractStatus": "1",
"flowStatus": "draft",
"templateId": "1976189070472728577",
"ossId": null,
"paymentMethod": null,
"signatureAppendix": null,
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": "某一集团股份有限公司",
"twoCustomerName": "青岛海威物联科技有限公司",
"deptName": "软件产品部"
},
{
"contractId": "2000481472066621442",
"contractFlag": "1",
"contractCode": "HT202512150001",
"customerContractCode": null,
"contractName": "产品销售合同1215",
"contractCategory": "2",
"contractType": null,
"businessDirection": "5",
"contractDeptId": 107,
"contractDate": "2025-12-15 00:00:00",
"totalPrice": "80000.00",
"oneCustomerId": 2,
"oneRepresent": "甲方",
"oneDate": "2025-12-18 00:00:00",
"twoCustomerId": 1,
"twoRepresent": "乙方",
"twoDate": "2025-12-31 00:00:00",
"contractStatus": "3",
"flowStatus": "finish",
"templateId": null,
"ossId": "2000506818547793921",
"paymentMethod": null,
"signatureAppendix": null,
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": "某一集团股份有限公司",
"twoCustomerName": "青岛海威物联科技有限公司",
"deptName": "软件产品部"
},
{
"contractId": "1997918929098559489",
"contractFlag": "1",
"contractCode": "HT202512080003",
"customerContractCode": null,
"contractName": "同名称",
"contractCategory": "1",
"contractType": "2",
"businessDirection": "3",
"contractDeptId": 100,
"contractDate": null,
"totalPrice": "23840.00",
"oneCustomerId": 3,
"oneRepresent": null,
"oneDate": null,
"twoCustomerId": 1,
"twoRepresent": null,
"twoDate": null,
"contractStatus": "1",
"flowStatus": "draft",
"templateId": "1976189070472728577",
"ossId": null,
"paymentMethod": "3-3-3-1",
"signatureAppendix": null,
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": "某一集团山东分公司",
"twoCustomerName": "青岛海威物联科技有限公司",
"deptName": "青岛海威物联科技有限公司"
},
{
"contractId": "1996824342348529665",
"contractFlag": "1",
"contractCode": "HT202512050001",
"customerContractCode": null,
"contractName": "测试合同001",
"contractCategory": "1",
"contractType": "2",
"businessDirection": "1",
"contractDeptId": 107,
"contractDate": "2025-12-19 00:00:00",
"totalPrice": "1350.00",
"oneCustomerId": 2,
"oneRepresent": "甲方",
"oneDate": "2025-12-18 00:00:00",
"twoCustomerId": 1,
"twoRepresent": " 乙方",
"twoDate": "2025-12-11 00:00:00",
"contractStatus": "3",
"flowStatus": "finish",
"templateId": "1976189070472728577",
"ossId": null,
"paymentMethod": "3-3-3-1",
"signatureAppendix": "1996829163566764034",
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": "某一集团股份有限公司",
"twoCustomerName": "青岛海威物联科技有限公司",
"deptName": "软件产品部"
},
{
"contractId": "1996466907519762434",
"contractFlag": "1",
"contractCode": "HT202512040001",
"customerContractCode": null,
"contractName": "市场实施合同一",
"contractCategory": "1",
"contractType": "2",
"businessDirection": "1",
"contractDeptId": 107,
"contractDate": "2025-12-12 00:00:00",
"totalPrice": "3810.00",
"oneCustomerId": 2,
"oneRepresent": "甲方授",
"oneDate": "2025-12-16 00:00:00",
"twoCustomerId": 1,
"twoRepresent": "乙方",
"twoDate": "2025-12-18 00:00:00",
"contractStatus": "3",
"flowStatus": "finish",
"templateId": "1976189070472728577",
"ossId": null,
"paymentMethod": "3-3-3-1",
"signatureAppendix": "1996470593947987969",
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": "某一集团股份有限公司",
"twoCustomerName": "青岛海威物联科技有限公司",
"deptName": "软件产品部"
},
{
"contractId": "1994225942858510338",
"contractFlag": "1",
"contractCode": "HT202511280001",
"customerContractCode": null,
"contractName": "合同名称1",
"contractCategory": "1",
"contractType": "2",
"businessDirection": null,
"contractDeptId": 100,
"contractDate": null,
"totalPrice": "27.00",
"oneCustomerId": null,
"oneRepresent": null,
"oneDate": null,
"twoCustomerId": null,
"twoRepresent": null,
"twoDate": null,
"contractStatus": "1",
"flowStatus": "draft",
"templateId": null,
"ossId": null,
"paymentMethod": "3-3-3-1",
"signatureAppendix": null,
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": null,
"twoCustomerName": null,
"deptName": "青岛海威物联科技有限公司"
},
{
"contractId": "1991418792844570626",
"contractFlag": "1",
"contractCode": null,
"customerContractCode": "A",
"contractName": "备件销售合同1120",
"contractCategory": "2",
"contractType": "2",
"businessDirection": "7",
"contractDeptId": 106,
"contractDate": "2025-11-05 00:00:00",
"totalPrice": "6090.00",
"oneCustomerId": 3,
"oneRepresent": "甲方",
"oneDate": "2025-11-19 00:00:00",
"twoCustomerId": 1,
"twoRepresent": "乙方",
"twoDate": "2025-11-13 00:00:00",
"contractStatus": "3",
"flowStatus": "finish",
"templateId": "1976189070472728577",
"ossId": null,
"paymentMethod": "3-3-3-1",
"signatureAppendix": null,
"internalContractCode": "E",
"externalContractCode": "S",
"orderContractCode": "T",
"projectContractCode": "Y",
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": "某一集团山东分公司",
"twoCustomerName": "青岛海威物联科技有限公司",
"deptName": "市场部"
},
{
"contractId": "1991345844477517825",
"contractFlag": "1",
"contractCode": "HT202511200002",
"customerContractCode": null,
"contractName": "产品销售合同1120",
"contractCategory": "2",
"contractType": "2",
"businessDirection": "1",
"contractDeptId": 106,
"contractDate": "2025-11-08 00:00:00",
"totalPrice": "1100.00",
"oneCustomerId": 2,
"oneRepresent": "甲方A",
"oneDate": "2025-11-19 00:00:00",
"twoCustomerId": 1,
"twoRepresent": "乙方",
"twoDate": "2025-11-18 00:00:00",
"contractStatus": "4",
"flowStatus": "invalid",
"templateId": "1976189070472728577",
"ossId": null,
"paymentMethod": "3-3-3-1",
"signatureAppendix": null,
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": "某一集团股份有限公司",
"twoCustomerName": "青岛海威物联科技有限公司",
"deptName": "市场部"
},
{
"contractId": "1988899504180830209",
"contractFlag": "2",
"contractCode": null,
"customerContractCode": null,
"contractName": "合同名称AS",
"contractCategory": null,
"contractType": null,
"businessDirection": null,
"contractDeptId": null,
"contractDate": null,
"totalPrice": null,
"oneCustomerId": null,
"oneRepresent": null,
"oneDate": null,
"twoCustomerId": null,
"twoRepresent": null,
"twoDate": null,
"contractStatus": "1",
"flowStatus": "draft",
"templateId": null,
"ossId": null,
"paymentMethod": "3-3-3-1",
"signatureAppendix": null,
"internalContractCode": null,
"externalContractCode": null,
"orderContractCode": null,
"projectContractCode": null,
"warrantyPeriod": null,
"taxRate": null,
"remark": null,
"activeFlag": "1",
"contractMaterialList": null,
"oneCustomerName": null,
"twoCustomerName": null,
"deptName": null
} }
]) }
const getList = () => {
searchForm.value.pageNum = 1
list.value = []
search()
}
const searchFormReset = () => {
searchForm.value = {
pageNum: 1,
pageSize: 10,
}
}
const onScrollToLower = () => {
if (searchForm.value.pageNum * searchForm.value.pageSize < total.value) {
searchForm.value.pageNum += 1
search()
}
}
const itemOperation = (e) => { const itemOperation = (e) => {
console.log(e);
if (e.contractStatus !== '1') { if (e.contractStatus !== '1') {
uni.navigateTo({ uni.navigateTo({
url: '/pages/contract/info?type=1&id=' + e.contractId url: '/pages/contract/info?type=1&id=' + e.contractId
@ -463,31 +187,57 @@
}) })
} }
} }
const onSubmit = (e) => {
console.log(e.detail.value);
}
const pageHeight = ref(0) const pageHeight = ref(0)
const barHeight = ref(0)
const sys = uni.getSystemInfoSync() const sys = uni.getSystemInfoSync()
onMounted(() => { onMounted(() => {
pageHeight.value = sys.windowHeight setTimeout(() => {
if ((process.env.UNI_PLATFORM === 'app-plus' || process.env.UNI_PLATFORM === 'app')) {
const statusBarHeight = plus.navigator.getStatusbarHeight()
barHeight.value = statusBarHeight
pageHeight.value = sys.windowHeight - statusBarHeight
} else {
pageHeight.value = sys.windowHeight
}
search()
}, 100)
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/uni.scss";
.searchForm { .searchForm {
margin-top: 30rpx; margin-top: 30rpx;
padding-top: 0 !important; padding-top: 0 !important;
display: inline-block;
:deep(.content) { :deep(.content) {
margin-top: 0 !important; margin-top: 0 !important;
} }
.toggle {
width: 100%;
height: 30rpx;
text-align: center;
padding: 10rpx 0;
.icon {
display: inline-block;
background-image: url(#{$img-url}/icon/toggle.png);
background-size: 100% 100%;
background-repeat: no-repeat;
width: 30rpx;
height: 30rpx;
transition: transform 0.3s;
}
}
} }
.table { .table {
margin-top: 30rpx; margin-top: 30rpx;
padding-top: 0 !important; padding-top: 0 !important;
display: inline-block;
:deep(.content) { :deep(.content) {
margin-top: 0 !important; margin-top: 0 !important;

@ -1,8 +1,82 @@
<template> <template>
<Card>
<form>
<FormItem :title="'有无合同'">
<input class="uni-input" v-model="searchForm.contractCode" />
</FormItem>
<FormItem :title="'合同编号'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'合同名称'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'合同大类'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'业务方向'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'部门'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'合同签订日期'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'合同总价'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'甲方公司'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'乙方公司'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'甲方授权代表'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'乙方授权代表'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'甲方签字日期'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'乙方签字日期'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'合同状态'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'合同模板标识'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'合同负责人'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'合同模板'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'附件'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
<FormItem :title="'备注'">
<input class="uni-input" v-model="form.contractCode" />
</FormItem>
</form>
</Card>
</template> </template>
<script> <script setup>
import {
onLoad
} from '@dcloudio/uni-app'
import {
ref
} from 'vue'
onLoad((options) => {
console.log(options.id)
})
const id = ref('')
</script> </script>
<style> <style lang="scss" scoped>
</style> </style>

@ -1,5 +1,5 @@
<template> <template>
<view style="background-color: #F2F3F5;"> <view style="background-color: #F2F3F5;" :style="{marginTop:barHeight+'px'}">
<scroll-view scroll-y="true" :style="{height:pageHeight+'px'}" style="position: relative"> <scroll-view scroll-y="true" :style="{height:pageHeight+'px'}" style="position: relative">
<view class="workbenchIcon"></view> <view class="workbenchIcon"></view>
<view class="headPortrait"></view> <view class="headPortrait"></view>
@ -44,7 +44,8 @@
{ {
icon: `${imgUrl}/icon/oa.png`, icon: `${imgUrl}/icon/oa.png`,
name: 'OA审批', name: 'OA审批',
color: '#FFEBE9' color: '#FFEBE9',
path: '/pages/workHourReporting/index'
}, },
] ]
}) })
@ -55,9 +56,18 @@
} }
const pageHeight = ref() const pageHeight = ref()
const barHeight = ref()
const sys = uni.getSystemInfoSync() const sys = uni.getSystemInfoSync()
onMounted(() => { onMounted(() => {
pageHeight.value = sys.windowHeight setTimeout(() => {
if ((process.env.UNI_PLATFORM === 'app-plus' || process.env.UNI_PLATFORM === 'app')) {
const statusBarHeight = plus.navigator.getStatusbarHeight()
barHeight.value = statusBarHeight
pageHeight.value = sys.windowHeight - statusBarHeight
} else {
pageHeight.value = sys.windowHeight
}
}, 1000)
}) })
</script> </script>
@ -106,6 +116,7 @@
.card1 { .card1 {
margin-top: 300rpx; margin-top: 300rpx;
position: relative; position: relative;
display: inline-block;
.viewMore { .viewMore {
position: absolute; position: absolute;
@ -162,5 +173,6 @@
.card2 { .card2 {
margin-top: 30rpx; margin-top: 30rpx;
display: inline-block;
} }
</style> </style>

@ -1,20 +1,43 @@
const globaldata = { import {
ref,
computed
} from 'vue'
const globaldata = ref({
encryptHeader: 'encrypt-key', encryptHeader: 'encrypt-key',
clientId: '428a8310cd442757ae699df5d894f051', clientId: '428a8310cd442757ae699df5d894f051',
RSA_PUBLIC_KEY: 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==', RSA_PUBLIC_KEY: 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==',
RSA_PRIVATE_KEY: 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmc3CuPiGL/LcIIm7zryCEIbl1SPzBkr75E2VMtxegyZ1lYRD+7TZGAPkvIsBcaMs6Nsy0L78n2qh+lIZMpLH8wIDAQABAkEAk82Mhz0tlv6IVCyIcw/s3f0E+WLmtPFyR9/WtV3Y5aaejUkU60JpX4m5xNR2VaqOLTZAYjW8Wy0aXr3zYIhhQQIhAMfqR9oFdYw1J9SsNc+CrhugAvKTi0+BF6VoL6psWhvbAiEAxPPNTmrkmrXwdm/pQQu3UOQmc2vCZ5tiKpW10CgJi8kCIFGkL6utxw93Ncj4exE/gPLvKcT+1Emnoox+O9kRXss5AiAMtYLJDaLEzPrAWcZeeSgSIzbL+ecokmFKSDDcRske6QIgSMkHedwND1olF8vlKsJUGK3BcdtM8w4Xq7BpSBwsloE=' RSA_PRIVATE_KEY: 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmc3CuPiGL/LcIIm7zryCEIbl1SPzBkr75E2VMtxegyZ1lYRD+7TZGAPkvIsBcaMs6Nsy0L78n2qh+lIZMpLH8wIDAQABAkEAk82Mhz0tlv6IVCyIcw/s3f0E+WLmtPFyR9/WtV3Y5aaejUkU60JpX4m5xNR2VaqOLTZAYjW8Wy0aXr3zYIhhQQIhAMfqR9oFdYw1J9SsNc+CrhugAvKTi0+BF6VoL6psWhvbAiEAxPPNTmrkmrXwdm/pQQu3UOQmc2vCZ5tiKpW10CgJi8kCIFGkL6utxw93Ncj4exE/gPLvKcT+1Emnoox+O9kRXss5AiAMtYLJDaLEzPrAWcZeeSgSIzbL+ecokmFKSDDcRske6QIgSMkHedwND1olF8vlKsJUGK3BcdtM8w4Xq7BpSBwsloE=',
} permissions: [],
userInfo: {},
route: []
})
export const getGlobalData = (key) => { export const getGlobalData = (key) => {
if (Array.isArray(key)) { if (Array.isArray(key)) {
let res = {} let res = {}
key.forEach(e => { key.forEach(e => {
res[e] = globaldata[e] || '' res[e] = globaldata.value[e] || ''
}) })
return res return res
} else { } else {
return globaldata[key] || '' return globaldata.value[key] || ''
} }
} }
export const syncGlobalData = (key) => {
if (!key) return
let keys = []
if (typeof key === 'string') {
keys = [key]
} else if (Array.isArray(key)) {
keys = key
} else {
return
}
const res = {}
keys.forEach((e) => {
res[key] = computed(() => globaldata.value[key])
});
return res
}
export const setGlobalData = (key, value) => { export const setGlobalData = (key, value) => {
globaldata[key] = value globaldata.value[key] = value
} }
Loading…
Cancel
Save