This commit is contained in:
zhangwentao 2026-01-09 14:24:38 +08:00
parent 47c638bac8
commit 8908dc6806
4 changed files with 933 additions and 785 deletions

View File

@ -44,6 +44,14 @@
isTip:true,
num:0
},
{
pagePath: "/pages/index/contract/contract",
iconPath: "https://hls.huhakeji.top/uploads/20260108/46d0feeaa65e6c2dbd47054fc333c467.png",
selectedIconPath: "https://hls.huhakeji.top/uploads/20260108/8cab46fc021348dc5cd7b2177206cb8a.png",
text: "采购",
isTip:true,
num:0
},
{
pagePath: "/pages/news/news",
iconPath: BASE_IMG_URL+"tab3.png",

View File

@ -141,16 +141,20 @@
</view>
</uni-popup>
<!-- 创建用户图标 -->
<view class="icon_creat" @click="toCreateContract">
<image :src="BASE_IMG_URL+'1.png'" mode="scaleToFill"></image>
<!-- 创建采购悬浮按钮 -->
<view class="fab_btn" @click="toCreateContract">
<text class="fab_icon">采购</text>
</view>
<select-customer ref="customerChild" @getCustomerinfo="getCustomerinfo"></select-customer>
<!-- 底部导航 -->
<uniTabbar ></uniTabbar>
</view>
</template>
<script>
import uniTabbar from '@/components/tabbar/tabbar.vue'
import {
netCrmContractList,
netSearchStaffList
@ -161,6 +165,7 @@
export default {
components:{
uniTabbar,
selectCustomer,
searchItem
},
@ -593,9 +598,9 @@
.bot_total{
position: fixed;
left:0;
bottom:0;
bottom:calc(100rpx + env(safe-area-inset-bottom) / 2);
width:750rpx;
height:calc(80rpx + env(safe-area-inset-bottom) / 2);
height:80rpx;
background:#fff;
font-size:24rpx;
color:#333;
@ -603,7 +608,6 @@
line-height: 80rpx;
color:$uni-text-color;
border-top:1rpx solid #f5f5f5;
padding-bottom:calc(env(safe-area-inset-bottom) / 2);
}
.botwarp{
background:#fff;
@ -635,4 +639,45 @@
line-height: 100rpx;
}
}
//
.fab_btn {
position: fixed;
right: 40rpx;
bottom: calc(280rpx + env(safe-area-inset-bottom) / 2);
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background: #008eff;
box-shadow: 0 8rpx 24rpx rgba(0, 142, 255, 0.4);
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
animation: fab-pulse 2s ease-in-out infinite;
&:active {
transform: scale(0.9);
box-shadow: 0 4rpx 12rpx rgba(0, 142, 255, 0.3);
animation: none;
}
.fab_icon {
font-size: 32rpx;
color: #fff;
font-weight: 500;
line-height: 1;
}
}
@keyframes fab-pulse {
0%, 100% {
transform: scale(1);
box-shadow: 0 8rpx 24rpx rgba(0, 142, 255, 0.4);
}
50% {
transform: scale(1.05);
box-shadow: 0 12rpx 32rpx rgba(0, 142, 255, 0.6);
}
}
</style>

View File

@ -1,7 +1,8 @@
<template>
<view class="new_linkman">
<view class="top_required">
只展示<span style="color:#f00">必填</span>字段<switch :checked="isRequired" color="#008EFF" @change="changeRequired" />
只展示<span style="color:#f00">必填</span>字段
<switch :checked="isRequired" color="#008EFF" @change="changeRequired" />
</view>
<view class="fllow_form">
<view><text>*</text>门店名称</view>
@ -33,7 +34,8 @@
<view class="iconfont icon-arrows_right"></view>
</view>
</view> -->
<form-item v-for="(item,index) in listForm" :key="index" :isNotRequired="isRequired" :objInfo="item" @changeData="changeOtherData">
<form-item v-for="(item, index) in listForm" :key="index" :isNotRequired="isRequired" :objInfo="item"
@changeData="changeOtherData">
</form-item>
<!-- 添加产品 -->
<view class="fllow_form" v-if="!isRequired">
@ -47,30 +49,39 @@
<view class="cell_con">
<view class="cell_con_top">
<view class="contitle">{{ item.name }}</view>
<image :src="BASE_IMG_URL+'delete1.png'" @click="delProduct(index)" class="deleimg" mode=""></image>
<image :src="BASE_IMG_URL + 'delete1.png'" @click="delProduct(index)" class="deleimg" mode="">
</image>
</view>
<view class="pro_con_box">
<view class="boxleft">
<view class="context">编号{{ item.num }}</view>
<view class="context">单位{{ item.unit }}</view>
<view class="context">
零售价<input type="digit" v-model="item.price" class="productPrice" @blur="changeProductPrice" placeholder="产品价格">
零售价<input type="digit" v-model="item.price" class="productPrice"
@blur="changeProductPrice" placeholder="产品价格">
</view>
<view class="context">
批发价<input type="digit" v-model="item.wholesale" class="productPrice" placeholder="批发价">
批发价<input type="digit" v-model="item.wholesale" class="productPrice"
placeholder="批发价">
</view>
</view>
<view class="conbot">
<view class="conright">
<uni-number-box :min="1" :max="20000" v-model="item.number" @change="(e)=>{changeNumber(e,index)}"></uni-number-box>
<uni-number-box :min="1" :max="20000" v-model="item.number"
@change="(e) => { changeNumber(e, index) }"></uni-number-box>
</view>
</view>
</view>
<view class="remark-context">
<textarea :maxlength="-1" auto-height v-model="item.remark" class="remark-input" placeholder="请输入备注"/>
</view>
</view>
</view>
</view>
<!-- 分配业绩 -->
<view class="fllow_form" v-if="customerTeam.length != 1 && customerTeam.length != 0 && methodArr.length != 0 && !isRequired">
<view class="fllow_form"
v-if="customerTeam.length != 1 && customerTeam.length != 0 && methodArr.length != 0 && !isRequired">
<view>业绩分配方式</view>
<picker @change="changeMethod" :value="methodIndex" :range="methodArr" :range-key="'name'">
<view class="form_right">
@ -92,7 +103,8 @@
</view>
<view class="ach_staff" v-else>
<view class="delStaff" @click="delDisStaff(index)">×</view>
<image :src="item.staff.img?item.staff.img:BASE_IMG_URL+'/headImg.png'" style="border-radius: 50%;" class="uploadimg"></image>
<image :src="item.staff.img ? item.staff.img : BASE_IMG_URL + '/headImg.png'"
style="border-radius: 50%;" class="uploadimg"></image>
<view class="ach_t">{{ item.staff.name }}</view>
</view>
</view>
@ -126,8 +138,10 @@
<script>
import { BASE_IMG_URL } from '@/util/api.js'
import { netSetForm, netStaffDefaultReviewer, netApprovalProcess, netRelationBusiness,
netDistributionType, netTeamList, netBusinessDetail } from '@/api/index.js'
import {
netSetForm, netStaffDefaultReviewer, netApprovalProcess, netRelationBusiness,
netDistributionType, netTeamList, netBusinessDetail
} from '@/api/index.js'
import formItem from '@/components/form/formitem.vue'
import {
netPrevCustomer,
@ -252,6 +266,7 @@
let arr = res.data.product
arr.forEach(ele => {
ele.id = ele.product_id
ele.remark = ele.remark || ''
})
this.productList = arr
})
@ -443,6 +458,7 @@
arr.forEach(ele => {
ele.minprice = ele.price
ele.parts = []
ele.remark = ele.remark || ''
})
this.productList = this.deWeight(arr.concat(this.productList))
//
@ -523,9 +539,17 @@
contacts_id, //
remindPeople, //
} = this
if (!customer_id) {
uni.showToast({
title: '请选择所属门店',
icon: 'none'
})
return
}
if (!contacts_id) {
uni.showToast({
title: '请选择客户签约人',
title: '请选择门店签约人',
icon: 'none'
})
return
@ -563,7 +587,8 @@
number: ele.number,
parts: ele.parts,
cost_price: ele.cost_price,
wholesale: ele.wholesale
wholesale: ele.wholesale,
remark: ele.remark || ''
})
})
}
@ -618,12 +643,14 @@
.valueActive {
color: #333;
}
//
.ach_list {
background: #fff;
padding: 30rpx;
border-bottom: 1rpx solid #f5f5f5;
position: relative;
.deleimg {
position: absolute;
right: 30rpx;
@ -631,6 +658,7 @@
width: 44rpx;
height: 44rpx;
}
.ach_li {
display: flex;
justify-content: flex-start;
@ -638,23 +666,28 @@
padding-bottom: 24rpx;
margin-bottom: 24rpx;
border-bottom: 1rpx solid #f5f5f5;
&:last-child {
border-bottom: 0;
margin-bottom: 0;
}
.ach_rate {
font-size: 24rpx;
color: #666;
margin-right: 30rpx;
span {
color: $uni-text-color;
}
}
.ach_staff {
display: flex;
flex-direction: column;
text-align: center;
position: relative;
.delStaff {
position: absolute;
right: -10rpx;
@ -669,16 +702,19 @@
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
}
.uploadimg {
width: 80rpx;
height: 80rpx;
}
.staffinfo {
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 24rpx;
color: #666;
.staffimg {
width: 80rpx;
height: 80rpx;
@ -686,6 +722,7 @@
margin-right: 24rpx;
}
}
.ach_t {
font-size: 24rpx;
color: #666;
@ -694,6 +731,7 @@
}
}
}
.del {
width: 40rpx;
height: 40rpx;
@ -706,6 +744,7 @@
text-align: center;
line-height: 38rpx;
}
.add_in {
background-color: $uni-text-color;
color: #fff;
@ -715,36 +754,49 @@
font-size: 24rpx;
border-radius: 10rpx;
}
.pro_warp {
padding: 30rpx 24rpx 0 24rpx;
background: #fff;
border-bottom: 1rpx solid #f5f5f5;
.li_warp {
padding-bottom: 24rpx;
margin-bottom: 24rpx;
border-bottom: 2rpx solid #f5f5f5;
&:last-child {
border-bottom: 0;
}
.cell_con {
padding: 0 40rpx;
.cell_con_top {
display: flex;
justify-content: space-between;
align-items: center;
.contitle {
font-size: 28rpx;
color: #333;
}
.deleimg {
width: 44rpx;
height: 44rpx;
}
}
.pro_con_box {
display: flex;
justify-content: space-between;
align-items: center;
.boxleft {
flex: 1;
}
.context {
font-size: 26rpx;
color: #666;
@ -752,39 +804,49 @@
display: flex;
justify-content: flex-start;
align-items: center;
.productPrice {
width: 150rpx;
background: #f5f5f5;
text-align: center;
}
}
.conbot {
margin-top: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
.conmoney {
font-size: 26rpx;
color: #333;
}
}
}
.config_set {
margin-top: 24rpx;
.config_title {
font-size: 24rpx;
color: #333;
display: flex;
justify-content: flex-start;
align-items: center;
.addConimg {
width: 100rpx;
height: 40rpx;
margin-left: 10rpx;
}
}
.config_list {
margin-top: 24rpx;
.config_li {
display: flex;
justify-content: flex-start;
@ -792,12 +854,14 @@
margin-top: 24rpx;
border-bottom: 1rpx solid #f5f5f5;
padding-bottom: 24rpx;
.conimg {
width: 100rpx;
height: 100rpx;
border-radius: 10rpx;
margin-right: 20rpx;
}
.config_name {
width: 290rpx;
font-size: 24rpx;
@ -806,6 +870,7 @@
text-overflow: ellipsis;
white-space: nowrap;
}
.config_step {
margin-left: 24rpx;
@ -814,6 +879,7 @@
}
}
}
.right_del_btn {
width: 90rpx;
height: 240rpx;
@ -825,11 +891,29 @@
}
}
.remark-context {
margin-top: 14rpx;
width: 100%;
.remark-input {
width: 100%;
background: #f5f5f5;
border-radius: 15rpx;
padding: 16rpx 18rpx;
box-sizing: border-box;
font-size: 26rpx;
color: #333;
}
}
.new_linkman {
font-size: 28rpx;
.mar_top {
margin-top: 30rpx;
}
.info_head {
height: 80rpx;
line-height: 80rpx;
@ -837,6 +921,7 @@
font-size: 32rpx;
padding-left: 30rpx;
}
.fllow_form {
display: flex;
justify-content: space-between;
@ -846,27 +931,33 @@
padding: 30rpx 20rpx;
color: #999;
font-size: 32rpx;
.form_right {
display: flex;
align-items: center;
color: #999;
:first-child {
width: 450rpx;
text-align: right;
}
image {
width: 40rpx;
height: 40rpx;
margin: 28rpx 5rpx 0 0;
}
}
.theme {
color: #5ca9fe;
}
text {
color: #f00;
margin-left: 10rpx;
}
.form_input {
input {
height: 100rpx;
@ -910,6 +1001,7 @@
padding-left: 20rpx;
color: #999;
font-size: 32rpx;
text {
color: #f00;
margin-left: 10rpx;
@ -921,6 +1013,7 @@
text-align: center;
flex-wrap: wrap;
padding: 0 35rpx;
.aff_item {
width: 100rpx;
margin-right: 15rpx;
@ -954,6 +1047,7 @@
height: 48rpx;
border-radius: 50%;
text-align: center;
image {
width: 48rpx;
height: 48rpx;

View File

@ -36,6 +36,7 @@
</view>
<view class="context">零售价{{item.price}}</view>
<view class="context">批发价{{item.wholesale}}</view>
<view class="context" v-if="item.remark">备注{{item.remark}}</view>
</view>
</view>
</view>