合同
This commit is contained in:
parent
0113bba6c0
commit
c44b46605d
@ -2,36 +2,75 @@ import api from './api'
|
||||
|
||||
|
||||
export function getContractPage(data) {
|
||||
return api.get('/crm/contract/page', data, { login: false })
|
||||
return api.get('/crm/contract/page', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
|
||||
export function getContractNo(data) {
|
||||
return api.get('/crm/contract/getCode', data, { login: false })
|
||||
return api.get('/crm/contract/getCode', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function createContract(data) {
|
||||
return api.post('/crm/contract/create', data, { login: false })
|
||||
return api.post('/crm/contract/create', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getContract(data) {
|
||||
return api.get('/crm/contract/get', data, { login: false })
|
||||
return api.get('/crm/contract/get', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getContractProductListByContractId(data) {
|
||||
return api.get('/crm/contract/contract-product/list-by-contract-id', data, { login: false })
|
||||
return api.get('/crm/contract/contract-product/list-by-contract-id', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function updateContract(data) {
|
||||
return api.put('/crm/contract/update', data, { login: false })
|
||||
return api.put('/crm/contract/update', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function check(data) {
|
||||
return api.post('/crm/contract/check', data, { login: false })
|
||||
return api.post('/crm/contract/check', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//改成OA之后的
|
||||
export function getOAContractPage(data) {
|
||||
return api.get('/bpm/oa/contract/page', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
//创建
|
||||
export function createOAContract(data) {
|
||||
return api.post('/bpm/oa/contract/create', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
//详情
|
||||
export function getOAContract(data) {
|
||||
return api.get('/bpm/oa/contract/get', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
//详情
|
||||
export function getByProcessInstanceId(data) {
|
||||
return api.get('/bpm/oa/contract/getByProcessInstanceId', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
||||
//获得同部门的合同审批
|
||||
export function getListByDeptId(data) {
|
||||
return api.get('/bpm/oa/contract/getListByDeptId', data, {
|
||||
login: false
|
||||
})
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export const VUE_APP_API_URL = 'http://192.168.0.179:48080/admin-api'
|
||||
export const VUE_APP_API_URL = 'http://192.168.0.107:48080/admin-api'
|
||||
export const VUE_APP_UPLOAD_URL = VUE_APP_API_URL + '/infra/file/upload'
|
||||
export const VUE_APP_UPLOAD_URL2 = VUE_APP_API_URL + '/system/user/profile/update-avatar'
|
||||
export const APP_ID = 'wx91fcb30adb2df321'
|
||||
|
@ -1,20 +1,15 @@
|
||||
<template>
|
||||
<uv-navbar
|
||||
:fixed="false"
|
||||
:title="title"
|
||||
left-arrow
|
||||
@leftClick="$onClickLeft"
|
||||
/>
|
||||
<uv-navbar :fixed="false" :title="title" left-arrow @leftClick="$onClickLeft" />
|
||||
<view style="overflow:hidden">
|
||||
<view class="set-box bg-white">
|
||||
<uv-alert type="warning" v-if="form.checkStatus == 1" description="合同正在审核中,不可以修改!"></uv-alert>
|
||||
<uv-alert type="warning" v-else-if="form.checkStatus == 2" description="合同已经审核通过,不可以修改!"></uv-alert>
|
||||
<uv-form :model="form" ref="uForm" :errorType="errorType" labelWidth="85" :rules="rules">
|
||||
<uv-form-item required label="合同编号:" prop="number">
|
||||
<uv-input v-model="form.number" :disabled="isCheck" />
|
||||
</uv-form-item>
|
||||
<uv-form-item required label="合同名称:" prop="name">
|
||||
<uv-input v-model="form.name" :disabled="isCheck" />
|
||||
<!-- <uv-form-item required label="合同编号:" prop="contractNo">
|
||||
<uv-input v-model="form.contractNo" :disabled="isCheck" />
|
||||
</uv-form-item> -->
|
||||
<uv-form-item required label="合同名称:" prop="contractName">
|
||||
<uv-input v-model="form.contractName" :disabled="isCheck" />
|
||||
</uv-form-item>
|
||||
<uv-form-item label="选择客户:" @click="type != 'check' ? selectShow() : ''" prop="customerName" required>
|
||||
<uv-input disabledColor="#ffffff" disabled v-model="form.customerName" placeholder="选择客户">
|
||||
@ -30,8 +25,8 @@
|
||||
</template>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-form-item label="合同金额:" prop="money" required >
|
||||
<uv-input type="number" v-model="form.money" :disabled="isCheck" />
|
||||
<uv-form-item label="合同金额:" prop="contractMoney" required>
|
||||
<uv-input type="number" v-model="form.contractMoney" :disabled="isCheck" />
|
||||
</uv-form-item>
|
||||
<uv-form-item label="下单时间 :" @click="type != 'check' ? createTimeShow() : ''">
|
||||
<uv-input v-model="orderTime" placeholder="选择下单时间 " disabled disabledColor="#ffffff">
|
||||
@ -68,9 +63,9 @@
|
||||
</template>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-form-item label="审批人:" >
|
||||
<!-- <uv-form-item label="审批人:">
|
||||
<uv-input disabledColor="#ffffff" disabled v-model="form.flowAdminIdName" placeholder="请去审批流程里配置合同审批" />
|
||||
</uv-form-item>
|
||||
</uv-form-item> -->
|
||||
<uv-form-item label="备注:">
|
||||
<uv-textarea v-model="form.remark" :disabled="isCheck" placeholder="请输入备注"></uv-textarea>
|
||||
</uv-form-item>
|
||||
@ -87,17 +82,19 @@
|
||||
<view class="item" v-for="(item,index) in selectList" :key="index">
|
||||
<view class="number flex">
|
||||
<view class="flex-1">序号: {{index+1}}</view>
|
||||
<uv-number-box :min="1" v-model="item.nums" :longPress="false" @change="isCheck ? valChange() : ''"></uv-number-box>
|
||||
<uv-number-box :min="1" v-model="item.nums" :longPress="false"
|
||||
@change="isCheck ? valChange() : ''"></uv-number-box>
|
||||
</view>
|
||||
<view class="content flex align-center">
|
||||
<view class="flex-1 name">{{item.storeName ? item.storeName : item.name}}({{item.sku}})</view>
|
||||
<view class="flex-1 storeName">{{item.storeName ? item.storeName : item.name}}({{item.sku}})</view>
|
||||
<view class="price flex align-center">
|
||||
<view class="pr-1" style="font-weight: 600;">¥</view>
|
||||
<uv-input type="number" :clearable="false" placeholder="请输入价格" v-model="item.price" @input="isCheck ? inputChang : ''" />
|
||||
<uv-input :disabled="true" type="number" :clearable="false" placeholder="请输入价格" v-model="item.price"
|
||||
@input="isCheck ? inputChang : ''" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="brief flex">
|
||||
<view class="">备注:</view>
|
||||
<view class="brief flex align-center">
|
||||
<view style="margin-right: 14rpx;">备注:</view>
|
||||
<uv-input v-model="item.remarks" :disabled="isCheck" />
|
||||
</view>
|
||||
<!-- 删除按钮 -->
|
||||
@ -109,15 +106,17 @@
|
||||
<uv-empty text="暂未选择产品" v-else margin-top="50" mode="list"></uv-empty>
|
||||
</view>
|
||||
<view class="flex mb-1 mt-1 align-center">
|
||||
<view class="mr-1" style="width:150rpx">优惠率%:</view>
|
||||
<view class="flex-1"><uv-input type="number" v-model="form.discountRate" :disabled="isCheck" placeholder="请填写0到100的数" @input="inputChang" /></view>
|
||||
<view class="mr-1" style="width:150rpx">优惠金额:</view>
|
||||
<view class="flex-1"><uv-input type="number" v-model="form.discountRate" :disabled="isCheck"
|
||||
placeholder="请填写0到100的数" @input="inputChang" /></view>
|
||||
</view>
|
||||
<view class="flex mb-1 mt-1 align-center">
|
||||
<view class="mr-1" style="width: 150rpx">总额:</view>
|
||||
<view class="flex mb-1 mt-3 align-center">
|
||||
<view class="mr-1" style="width: 150rpx">总额:</view>
|
||||
<view class="flex-1"><uv-input type="number" v-model="form.totalPrice" :disabled="isCheck" /></view>
|
||||
</view>
|
||||
<view class="mt-4" style="text-align: center;" v-if="!isCheck">
|
||||
<uv-button color="#09b4f1" @click="submit" :disabled="form.checkStatus == 1 || form.checkStatus == 2" :ripple="true">确定提交</uv-button>
|
||||
<uv-button color="#09b4f1" @click="submit" :disabled="form.checkStatus == 1 || form.checkStatus == 2"
|
||||
:ripple="true">确定提交</uv-button>
|
||||
</view>
|
||||
<view class="mt-4 flex justify-end" style="text-align: center;" v-else>
|
||||
<view style="width: 25%;margin-right: 10rpx;">
|
||||
@ -158,7 +157,8 @@
|
||||
<uv-icon name="close" color="#909399" size="30"></uv-icon>
|
||||
</view>
|
||||
</view>
|
||||
<uv-search margin="30rpx 20rpx" shape="square" v-model="keyword" :show-action="false" :clearabled="true" placeholder="输入客户名称搜索" @change="onSearch"></uv-search>
|
||||
<uv-search margin="30rpx 20rpx" shape="square" v-model="keyword" :show-action="false" :clearabled="true"
|
||||
placeholder="输入客户名称搜索" @change="onSearch"></uv-search>
|
||||
<scroll-view scroll-y style="height: 760rpx;width: 100%;" @scrolltolower="reachBottom">
|
||||
<view class="list">
|
||||
<block v-if="customerList.length > 0">
|
||||
@ -191,7 +191,8 @@
|
||||
<view class="list">
|
||||
<block v-if="customerContacts.length > 0">
|
||||
<view class="mb-4">
|
||||
<view class="item flex" v-for="(item,index) in customerContacts" :key="index" @click="onItem2(item,index)">
|
||||
<view class="item flex" v-for="(item,index) in customerContacts" :key="index"
|
||||
@click="onItem2(item,index)">
|
||||
<view class="title">{{item.customerName}}</view>
|
||||
<view class="check-icon">
|
||||
<uv-icon v-if="item.checked" name="checkmark" color="#09b4f1" size="28"></uv-icon>
|
||||
@ -214,7 +215,8 @@
|
||||
<uv-icon name="close" color="#909399" size="30"></uv-icon>
|
||||
</view>
|
||||
</view>
|
||||
<uv-search margin="30rpx 20rpx" shape="square" v-model="keyword3" :show-action="false" :clearabled="true" placeholder="输入用户名称搜索" @change="onSearch3"></uv-search>
|
||||
<uv-search margin="30rpx 20rpx" shape="square" v-model="keyword3" :show-action="false" :clearabled="true"
|
||||
placeholder="输入用户名称搜索" @change="onSearch3"></uv-search>
|
||||
<scroll-view scroll-y style="height: 760rpx;width: 100%;" @scrolltolower="reachBottom3">
|
||||
<view class="list">
|
||||
<block v-if="userList.length > 0">
|
||||
@ -260,9 +262,12 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uv-popup>
|
||||
<uv-datetime-picker ref="datetimePicker" v-model="timeValue" mode="datetime" @confirm="createTimeChange"></uv-datetime-picker>
|
||||
<uv-datetime-picker ref="datetimePicker2" v-model="timeValue2" mode="datetime" @confirm="createTimeChange2"></uv-datetime-picker>
|
||||
<uv-datetime-picker ref="datetimePicker3" v-model="timeValue2" mode="datetime" @confirm="createTimeChange3"></uv-datetime-picker>
|
||||
<uv-datetime-picker ref="datetimePicker" v-model="timeValue" mode="datetime"
|
||||
@confirm="createTimeChange"></uv-datetime-picker>
|
||||
<uv-datetime-picker ref="datetimePicker2" v-model="timeValue2" mode="datetime"
|
||||
@confirm="createTimeChange2"></uv-datetime-picker>
|
||||
<uv-datetime-picker ref="datetimePicker3" v-model="timeValue2" mode="datetime"
|
||||
@confirm="createTimeChange3"></uv-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -272,10 +277,14 @@ import {
|
||||
unref,
|
||||
computed
|
||||
} from 'vue'
|
||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
getCustomerListPage,
|
||||
getContactsPage
|
||||
getContactsPage,
|
||||
createOAContract
|
||||
} from '@/api/customer'
|
||||
import {
|
||||
getBusinessProductListByBusinessId,
|
||||
@ -295,11 +304,20 @@ import {
|
||||
getSimpleUserList2
|
||||
} from '@/api/user'
|
||||
import AddressSelect from '@/components/AddressSelect/index.vue'
|
||||
import { formatDateTime,prePage } from '@/utils/util'
|
||||
import { useMainStore } from '@/store/store'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import {
|
||||
formatDateTime,
|
||||
prePage
|
||||
} from '@/utils/util'
|
||||
import {
|
||||
useMainStore
|
||||
} from '@/store/store'
|
||||
import {
|
||||
storeToRefs
|
||||
} from 'pinia'
|
||||
const main = useMainStore()
|
||||
const { selectProductList } = storeToRefs(main)
|
||||
const {
|
||||
selectProductList
|
||||
} = storeToRefs(main)
|
||||
const title = ref('添加合同')
|
||||
const labelPosition = ref('left')
|
||||
const keyword = ref('')
|
||||
@ -324,19 +342,26 @@ const endTime = ref(formatDateTime(new Date()))
|
||||
const content = ref('')
|
||||
const customerName = ref('')
|
||||
const form = ref({
|
||||
customerId: '',
|
||||
customerName: '',
|
||||
name: '',
|
||||
nextTime: '',
|
||||
starTime: new Date(),
|
||||
orderTime: new Date(),
|
||||
endTime: new Date(),
|
||||
money: '',
|
||||
remark: '',
|
||||
discountRate: '',
|
||||
totalPrice: '',
|
||||
contactsName: '',
|
||||
orderAdminName: ''
|
||||
contractType: 1, // 合同类型
|
||||
contractNo: '', //合同编号
|
||||
contractName: '', //合同名称
|
||||
customerId: '', //客户ID
|
||||
customerName: '', //客户名称
|
||||
nextTime: '', //下次联系时间
|
||||
startDate: new Date(), //开始时间
|
||||
orderTime: new Date(), //下单时间
|
||||
endDate: new Date(), //结束时间
|
||||
remark: '', //备注
|
||||
discountRate: '', //整单折扣
|
||||
totalPrice: '', //产品总金额
|
||||
contactsName: '', //客户签约人
|
||||
contactsId: '', //签约人id
|
||||
orderAdminName: '', //签约人名称
|
||||
companyId: '', //签约公司编号
|
||||
businessId: '', //商机ID
|
||||
invoiceMoney: '', // 已开票金额
|
||||
returnMoney: '', // 已收/已付金额
|
||||
contractMoney: '', // 合同金额
|
||||
})
|
||||
const timeText = ref('')
|
||||
const errorType = ref('message')
|
||||
@ -370,12 +395,11 @@ onLoad((e) => {
|
||||
contractId.value = e.id
|
||||
getContractInfo()
|
||||
} else {
|
||||
getNumber()
|
||||
// getNumber()
|
||||
}
|
||||
console.log('isCheck.value:',isCheck.value)
|
||||
getCustomerList()
|
||||
getUserList()
|
||||
getFlowUsersList()
|
||||
// getFlowUsersList() 获取审批人的
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
@ -384,7 +408,9 @@ onShow(()=>{
|
||||
})
|
||||
|
||||
const getFlowUsersList = async () => {
|
||||
let data = await getFlowUsers({flowType: 'contract'})
|
||||
let data = await getFlowUsers({
|
||||
flowType: 'contract'
|
||||
})
|
||||
let users = await getSimpleUserList2()
|
||||
let userIdArr = []
|
||||
let userArr = []
|
||||
@ -396,18 +422,13 @@ const getFlowUsersList = async() => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
form.value.flowAdminIdName = userArr.join(',')
|
||||
form.value.flowAdminId = userIdArr
|
||||
|
||||
// console.log('userIdArr:',userIdArr)
|
||||
// console.log('userArr:',userArr)
|
||||
// console.log('flowAdminIdName:',form.value.flowAdminIdName)
|
||||
|
||||
}
|
||||
|
||||
//合同编号
|
||||
const getNumber = async () => {
|
||||
form.value.number = await getContractNo()
|
||||
form.value.contractNo = await getContractNo()
|
||||
}
|
||||
|
||||
const selectShowRef = ref()
|
||||
@ -436,7 +457,7 @@ const createTimeShow2 = () => {
|
||||
|
||||
// 选择时间
|
||||
const createTimeChange2 = (e) => {
|
||||
form.value.startTime = e.value
|
||||
form.value.startDate = e.value
|
||||
startTime.value = formatDateTime(e.value)
|
||||
}
|
||||
|
||||
@ -447,14 +468,18 @@ const createTimeShow3 = () => {
|
||||
|
||||
// 选择时间
|
||||
const createTimeChange3 = (e) => {
|
||||
form.value.endTime = e.value
|
||||
form.value.endDate = e.value
|
||||
endTime.value = formatDateTime(e.value)
|
||||
}
|
||||
// 获取商机数据详情
|
||||
const getContractInfo = async () => {
|
||||
form.value = await getContract({id:contractId.value})
|
||||
form.value = await getContract({
|
||||
id: contractId.value
|
||||
})
|
||||
form.value.flowAdminId = form.value.flowAdminId2
|
||||
selectList.value = await getContractProductListByContractId({contractId:contractId.value})
|
||||
selectList.value = await getContractProductListByContractId({
|
||||
contractId: contractId.value
|
||||
})
|
||||
}
|
||||
// 搜索
|
||||
const onSearch = () => {
|
||||
@ -582,13 +607,17 @@ const onItem = async(val,i) => {
|
||||
}
|
||||
})
|
||||
form.value.customerId = val.id
|
||||
//customerId.value = val.id
|
||||
|
||||
form.value.customerName = val.name ? val.name : ''
|
||||
//选择了客户 返回客户联系人
|
||||
let data = await getContactsPage({customerId:val.id})
|
||||
let data = await getContactsPage({
|
||||
customerId: val.id
|
||||
})
|
||||
customerContacts.value = data.list
|
||||
//根据客户查找商机
|
||||
let data2 = await getBusinessPage({customerId:val.id})
|
||||
let data2 = await getBusinessPage({
|
||||
customerId: val.id
|
||||
})
|
||||
businessList.value = data2.list
|
||||
selectShowClose()
|
||||
}
|
||||
@ -611,7 +640,7 @@ const onItem2 = async(val,i) => {
|
||||
}
|
||||
})
|
||||
form.value.contactsId = val.id
|
||||
//customerId.value = val.id
|
||||
|
||||
form.value.contactsName = val.name ? val.name : ''
|
||||
selectShowClose2()
|
||||
}
|
||||
@ -635,7 +664,6 @@ const onItem3 = async(val,i) => {
|
||||
}
|
||||
})
|
||||
form.value.orderAdminId = val.id
|
||||
//customerId.value = val.id
|
||||
form.value.orderAdminName = val.username ? val.username : ''
|
||||
selectShowClose3()
|
||||
}
|
||||
@ -658,10 +686,10 @@ const onItem4 = async(val,i) => {
|
||||
}
|
||||
})
|
||||
form.value.businessId = val.id
|
||||
//customerId.value = val.id
|
||||
form.value.businessName = val.name ? val.name : ''
|
||||
|
||||
selectList.value = await getBusinessProductListByBusinessId({businessId:val.id})
|
||||
selectList.value = await getBusinessProductListByBusinessId({
|
||||
businessId: val.id
|
||||
})
|
||||
|
||||
selectShowClose4()
|
||||
}
|
||||
@ -699,7 +727,6 @@ const count_price = () => {
|
||||
}
|
||||
form.value.totalPrice = total.toFixed(2)
|
||||
}, 500)
|
||||
|
||||
}
|
||||
|
||||
const submitCheck = async (type) => {
|
||||
@ -729,12 +756,11 @@ const submitCheck = async(type) => {
|
||||
// 提交跟进
|
||||
const uForm = ref()
|
||||
const submit = () => {
|
||||
if(form.value.name == ''){
|
||||
if (form.value.contractName == '') {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: '请填写合同名称'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
if (form.value.customerId == '') {
|
||||
@ -742,16 +768,13 @@ const submit = () => {
|
||||
icon: 'error',
|
||||
title: '请选择客户'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if(form.value.money == ''){
|
||||
if (form.value.contractMoney == '') {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title: '请填写合同金额'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@ -760,7 +783,6 @@ const submit = () => {
|
||||
icon: 'error',
|
||||
title: '请选择客户签约人'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
if (form.value.orderAdminIdName == '') {
|
||||
@ -768,7 +790,6 @@ const submit = () => {
|
||||
icon: 'error',
|
||||
title: '请选择公司签约人'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@ -777,11 +798,9 @@ const submit = () => {
|
||||
icon: 'error',
|
||||
title: '请选择产品'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
onSubmit()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -832,45 +851,52 @@ const onSubmit = async() => {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.set-box {
|
||||
padding: 0rpx 22rpx;
|
||||
padding: 0rpx 22rpx 34rpx 22rpx;
|
||||
margin-bottom: 80rpx;
|
||||
|
||||
.cif-title {
|
||||
padding: 22rpx 0;
|
||||
|
||||
.text {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
margin: 40rpx 15rpx 60rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
border-radius: 15rpx;
|
||||
box-shadow: 1px 0px 5px rgba(50, 50, 50, 0.3);
|
||||
padding: 25rpx 35rpx;
|
||||
margin-bottom: 45rpx;
|
||||
|
||||
.number {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.price {
|
||||
width: 245rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fa3534;
|
||||
}
|
||||
}
|
||||
|
||||
.brief {
|
||||
margin: 10rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: $uv-tips-color;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
right: -8px;
|
||||
@ -888,6 +914,7 @@ const onSubmit = async() => {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
.popup-title {
|
||||
display: flex;
|
||||
@ -900,27 +927,36 @@ const onSubmit = async() => {
|
||||
height: 50px;
|
||||
padding-right: 25rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
margin-bottom: 45rpx;
|
||||
|
||||
.item {
|
||||
padding: 0 25rpx;
|
||||
justify-content: space-between;
|
||||
height: 45px;
|
||||
|
||||
.title {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.check-icon {
|
||||
text-align: center;
|
||||
width: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom_btn {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 28rpx 10rpx 45rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.storeName {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
</style>
|
@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<uv-navbar
|
||||
:fixed="false"
|
||||
@leftClick="$onClickLeft"
|
||||
bgColor="#09b4f1"
|
||||
>
|
||||
<uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
|
||||
<template v-slot:left>
|
||||
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
|
||||
</template>
|
||||
@ -13,12 +9,14 @@
|
||||
</uv-navbar>
|
||||
<view class="container">
|
||||
<view class="pb-2 flex px-5" style="background-color: #09b4f1;">
|
||||
<uv-search placeholder="搜索合同名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle" :show-action="false" @change="onSearch"></uv-search>
|
||||
<uv-search placeholder="搜索合同名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle"
|
||||
:show-action="false" @change="onSearch"></uv-search>
|
||||
<!-- <uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon> -->
|
||||
</view>
|
||||
<view class="wrap">
|
||||
<uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs>
|
||||
<scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" @scroll="scroll" @scrolltolower="reachBottom">
|
||||
<scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" @scroll="scroll"
|
||||
@scrolltolower="reachBottom">
|
||||
<view class="page-box">
|
||||
<block v-if="dataList.length > 0">
|
||||
<view class="client" v-for="(items, index) in dataList" :key="index" @click="onItem(items.id)">
|
||||
@ -36,7 +34,8 @@
|
||||
</view>
|
||||
<view class="item align-center">
|
||||
<view class="content">
|
||||
<view class="title uv-line-2">¥{{items.money}} <text class="pl-1">回款:¥{{items.returnMoney}}</text> </view>
|
||||
<view class="title uv-line-2">¥{{items.money}} <text class="pl-1">回款:¥{{items.returnMoney}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">{{items.orderAdminName ? items.orderAdminName : '--'}}</view>
|
||||
</view>
|
||||
@ -69,24 +68,32 @@ import {
|
||||
ref,
|
||||
computed
|
||||
} from 'vue'
|
||||
import { onLoad,onShow ,onReady,onPageScroll} from '@dcloudio/uni-app'
|
||||
import {
|
||||
getContractPage
|
||||
onLoad,
|
||||
onShow,
|
||||
onReady,
|
||||
onPageScroll
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
getContractPage,
|
||||
getOAContractPage
|
||||
} from '@/api/contract'
|
||||
import { formatDateTime } from '@/utils/util'
|
||||
import {
|
||||
formatDateTime
|
||||
} from '@/utils/util'
|
||||
const title = ref('合同')
|
||||
const keyword = ref('')
|
||||
const oldScrollTop = ref(0)
|
||||
const scrollTop = ref(-1)
|
||||
const dataList = ref([])
|
||||
const relation = ref('my')
|
||||
const relation = ref(true)
|
||||
const list = ref(
|
||||
[{
|
||||
name: '我的合同',
|
||||
value: 'my'
|
||||
value: true
|
||||
}, {
|
||||
name: '下属合同',
|
||||
value: 'sub'
|
||||
value: false
|
||||
}]
|
||||
)
|
||||
|
||||
@ -100,7 +107,9 @@ const lastPage = ref(false)
|
||||
const listStatus = ref('loadmore')
|
||||
const isRefresh = ref(false)
|
||||
|
||||
defineExpose({isRefresh})
|
||||
defineExpose({
|
||||
isRefresh
|
||||
})
|
||||
|
||||
onReady(() => {
|
||||
uni.getSystemInfo({
|
||||
@ -116,19 +125,12 @@ onReady(()=>{
|
||||
})
|
||||
|
||||
onLoad((e) => {
|
||||
|
||||
})
|
||||
|
||||
onShow(()=>{
|
||||
//if (isRefresh.value) {
|
||||
isRefresh.value = false
|
||||
page.value = 1
|
||||
lastPage.value = false
|
||||
scrollTop.value = 0
|
||||
dataList.value = []
|
||||
getList()
|
||||
//}
|
||||
|
||||
})
|
||||
|
||||
const timeFormats = (val) => {
|
||||
@ -138,6 +140,7 @@ const timeFormats = (val) => {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
|
||||
const handleSelect = (key) => {
|
||||
relation.value = key.value
|
||||
getList()
|
||||
@ -154,16 +157,14 @@ const onCheck = (id,type) => {
|
||||
url: '/pages/components/pages/contract/add?id=' + id + '&type=check'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const getList = async (isNextPage, pages) => {
|
||||
|
||||
await getContractPage({
|
||||
await getOAContractPage({
|
||||
pageNo: page.value,
|
||||
pageSize: pageSize.value,
|
||||
relation: relation.value,
|
||||
name:keyword.value,
|
||||
isMyContract: relation.value,
|
||||
contractName: keyword.value,
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
if (res.list.length < 10) {
|
||||
@ -216,9 +217,6 @@ const onAdd = () => {
|
||||
url: '/pages/components/pages/contract/add'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -226,9 +224,11 @@ const onAdd = () => {
|
||||
background-color: #F7F7F7;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.page-box {
|
||||
padding: 20rpx 20rpx 45rpx;
|
||||
}
|
||||
|
||||
.client {
|
||||
width: 710rpx;
|
||||
background-color: #ffffff;
|
||||
@ -237,12 +237,15 @@ const onAdd = () => {
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
|
||||
.store {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
@ -250,43 +253,53 @@ const onAdd = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
margin: 20rpx 0 0;
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
||||
.type {
|
||||
margin: 10rpx 0;
|
||||
font-size: 24rpx;
|
||||
color: $uv-tips-color;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 10rpx;
|
||||
text-align: right;
|
||||
|
||||
.decimal {
|
||||
font-size: 24rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.number {
|
||||
color: $uv-tips-color;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.client_time {
|
||||
color: #777;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
line-height: 56rpx;
|
||||
padding: 0rpx 25rpx;
|
||||
@ -295,16 +308,19 @@ const onAdd = () => {
|
||||
text-align: center;
|
||||
color: $uv-info-dark;
|
||||
}
|
||||
|
||||
.entity {
|
||||
color: #fff;
|
||||
background-color: #FF6146;
|
||||
}
|
||||
|
||||
.primary {
|
||||
color: #FFF;
|
||||
background-color: #09b4f1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -332,6 +348,4 @@ const onAdd = () => {
|
||||
transition: opacity 0.4s;
|
||||
border: 1px solid #dcdfe6;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
@ -25,7 +25,9 @@
|
||||
</view>
|
||||
<!-- 标签 -->
|
||||
<view class="tap" v-if="customer.tags !='' ">
|
||||
<uv-tags :text="item" plain type="warning" size="mini" v-for="(item,i) in customer.tags" :key="i" />
|
||||
<view v-for="(item,i) in customer.tags" :key="i" style="margin-right: 10rpx;">
|
||||
<uv-tags :text="item" plain type="warning" size="mini" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relation flex">
|
||||
<view class="left">手机:<text class="dial" @click="call(customer.mobile)">{{customer.mobile}}</text></view>
|
||||
|
Loading…
Reference in New Issue
Block a user