|
|
@@ -2,9 +2,9 @@
|
|
|
* @Author: liuzhenlin 461480418@qq.ocm
|
|
|
* @Date: 2023-01-12 11:57:48
|
|
|
* @LastEditors: liuzhenlin
|
|
|
- * @LastEditTime: 2023-02-21 19:28:18
|
|
|
+ * @LastEditTime: 2023-02-22 13:56:08
|
|
|
* @Description: file content
|
|
|
- * @FilePath: \frontend_mobile\pages\project\create.vue
|
|
|
+ * @FilePath: \oms\pages\project\create.vue
|
|
|
-->
|
|
|
<template>
|
|
|
<view class="home">
|
|
|
@@ -21,6 +21,19 @@
|
|
|
<view class="main">
|
|
|
<view class="step1" v-if="step == 1">
|
|
|
<u-form :model="addForm" :rules="rules" ref="addForm" label-width="0">
|
|
|
+ <u-form-item prop="custName" borderBottom customStyle="padding:40rpx 0 30rpx" @click="$refs.cust.open()">
|
|
|
+ <view class="form-label flex_l">
|
|
|
+ <view class="label-tag"></view>
|
|
|
+ 选择客户
|
|
|
+ </view>
|
|
|
+ <u-input
|
|
|
+ v-model="addForm.custName"
|
|
|
+ disabled
|
|
|
+ disabledColor="#ffffff"
|
|
|
+ placeholder="请选择关联客户"
|
|
|
+ border="none"></u-input>
|
|
|
+ <u-icon slot="right" name="arrow-right"></u-icon>
|
|
|
+ </u-form-item>
|
|
|
<u-form-item prop="nboName" borderBottom customStyle="padding:40rpx 0 30rpx">
|
|
|
<view class="form-label flex_l">
|
|
|
<view class="label-tag"></view>
|
|
|
@@ -34,19 +47,6 @@
|
|
|
clearable
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
- <u-form-item prop="custName" borderBottom customStyle="padding:40rpx 0 30rpx" @click="$refs.cust.open()">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 关联客户
|
|
|
- </view>
|
|
|
- <u-input
|
|
|
- v-model="addForm.custName"
|
|
|
- disabled
|
|
|
- disabledColor="#ffffff"
|
|
|
- placeholder="请选择关联客户"
|
|
|
- border="none"></u-input>
|
|
|
- <u-icon slot="right" name="arrow-right"></u-icon>
|
|
|
- </u-form-item>
|
|
|
<u-form-item
|
|
|
prop="nboSourceVal"
|
|
|
borderBottom
|
|
|
@@ -82,10 +82,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 职位
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">职位</view>
|
|
|
<u-input
|
|
|
placeholder="请输入职位"
|
|
|
v-model="addForm.contactPostion"
|
|
|
@@ -95,10 +92,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 联系电话
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">联系电话</view>
|
|
|
<u-input
|
|
|
placeholder="请输入联系电话"
|
|
|
v-model="addForm.contactTelephone"
|
|
|
@@ -107,7 +101,7 @@
|
|
|
clearable
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
- <u-form-item prop="saleName" borderBottom customStyle="padding:40rpx 0 30rpx" @click="$refs.user.open()">
|
|
|
+ <!-- <u-form-item prop="saleName" borderBottom customStyle="padding:40rpx 0 30rpx" @click="$refs.user.open()">
|
|
|
<view class="form-label flex_l">
|
|
|
<view class="label-tag"></view>
|
|
|
销售工程师
|
|
|
@@ -121,7 +115,7 @@
|
|
|
suffixIconStyle="color:#CDCDCD"
|
|
|
clearable
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
- </u-form-item>
|
|
|
+ </u-form-item> -->
|
|
|
<u-form-item prop="salesVal" borderBottom customStyle="padding:40rpx 0 30rpx" @click="showModel = true">
|
|
|
<view class="form-label flex_l">
|
|
|
<view class="label-tag"></view>
|
|
|
@@ -168,10 +162,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showSource = true">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 项目预算
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">项目预算</view>
|
|
|
<u-input
|
|
|
type="number"
|
|
|
placeholder="输入项目预算"
|
|
|
@@ -198,10 +189,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showEstTransDate = true">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 预计成交时间
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">预计成交时间</view>
|
|
|
<u-input
|
|
|
:readonly="true"
|
|
|
placeholder="请选择预计成交时间"
|
|
|
@@ -213,10 +201,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showPlanDate = true">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 计划采购时间
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">计划采购时间</view>
|
|
|
<u-input
|
|
|
:readonly="true"
|
|
|
placeholder="请选择计划采购时间"
|
|
|
@@ -228,10 +213,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showDate = true">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 风险情况
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">风险情况</view>
|
|
|
<u-input
|
|
|
placeholder="输入风险情况"
|
|
|
v-model="addForm.riskProfile"
|
|
|
@@ -241,10 +223,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showDate = true">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 困难点
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">困难点</view>
|
|
|
<u-input
|
|
|
placeholder="输入困难点"
|
|
|
v-model="addForm.difficulty"
|
|
|
@@ -254,10 +233,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showDate = true">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 竞争公司
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">竞争公司</view>
|
|
|
<u-input
|
|
|
placeholder="输入竞争公司"
|
|
|
v-model="addForm.competitor"
|
|
|
@@ -267,10 +243,7 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
<u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showDate = true">
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 介入情况
|
|
|
- </view>
|
|
|
+ <view class="form-label flex_l">介入情况</view>
|
|
|
<u-input
|
|
|
placeholder="输入介入情况"
|
|
|
v-model="addForm.intervention"
|
|
|
@@ -295,7 +268,7 @@
|
|
|
</view>
|
|
|
<view class="step2" v-else-if="step == 2">
|
|
|
<view class="step-tit">添加产品</view>
|
|
|
- <view class="add-btn" @click="$refs.product.open()">添加产品</view>
|
|
|
+ <view class="add-btn" @click="$refs.product.open()">+</view>
|
|
|
<view class="product-wrap">
|
|
|
<view class="product-item" v-for="(v, i) in productList" :key="v.id">
|
|
|
<view class="product-label flex_l">
|
|
|
@@ -325,7 +298,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="step3" v-else-if="step == 3">
|
|
|
+ <!-- <view class="step3" v-else-if="step == 3">
|
|
|
<u-form :model="addForm" :rules="rules" ref="addForm" label-width="0">
|
|
|
<u-form-item
|
|
|
prop="followTime"
|
|
|
@@ -378,11 +351,11 @@
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
</u-form>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="center">
|
|
|
<view class="handle-btn" v-if="step > 1" @click="previousStep">上一步</view>
|
|
|
- <view class="handle-btn" v-if="step < 3" @click="nextStep">下一步</view>
|
|
|
- <view class="handle-btn" v-if="step == 3" @click="handleAdd">保存</view>
|
|
|
+ <view class="handle-btn" v-if="step < 2" @click="nextStep">下一步</view>
|
|
|
+ <view class="handle-btn" v-if="step == 2" @click="handleAdd">保存</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 选择下次时间 -->
|
|
|
@@ -454,6 +427,8 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
+ import { mapGetters } from 'vuex'
|
|
|
+
|
|
|
import projectApi from 'api/project'
|
|
|
import customerApi from '../../api/customer'
|
|
|
import to from 'await-to-js'
|
|
|
@@ -524,17 +499,17 @@
|
|
|
competitor: '', //竞争公司
|
|
|
intervention: '', //介入情况
|
|
|
remark: '', //备注
|
|
|
- followTime: this.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), //跟进时间
|
|
|
- followUserId: '', //跟进用户id
|
|
|
- followUserName: '', //跟进用户id
|
|
|
- followContent: '', //跟进内容
|
|
|
+ // followTime: this.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), //跟进时间
|
|
|
+ // followUserId: '', //跟进用户id
|
|
|
+ // followUserName: '', //跟进用户id
|
|
|
+ // followContent: '', //跟进内容
|
|
|
},
|
|
|
rules: {
|
|
|
nboName: [{ required: true, trigger: ['blur', 'change'], message: '请输入项目名称' }],
|
|
|
custName: [{ required: true, trigger: ['blur', 'change'], message: '请选择关联客户' }],
|
|
|
nboSourceVal: [{ required: true, trigger: ['blur', 'change'], message: '请选择项目来源' }],
|
|
|
contactName: [{ required: true, trigger: ['blur', 'change'], message: '请选择主要联系人' }],
|
|
|
- saleName: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售工程师' }],
|
|
|
+ // saleName: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售工程师' }],
|
|
|
salesModelVal: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售模式' }],
|
|
|
distributorName: [
|
|
|
{ validator: validateDistributor, trigger: ['blur', 'change'], message: '请选择经销商/代理商' },
|
|
|
@@ -542,12 +517,15 @@
|
|
|
isBigVal: [{ required: true, trigger: ['blur', 'change'], message: '请选择是否大项目' }],
|
|
|
productLineVal: [{ required: true, trigger: ['blur', 'change'], message: '请选择产品线' }],
|
|
|
// 跟进
|
|
|
- followTime: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进时间' }],
|
|
|
- followContent: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进内容' }],
|
|
|
+ // followTime: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进时间' }],
|
|
|
+ // followContent: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进内容' }],
|
|
|
},
|
|
|
productList: [],
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['userId', 'username']),
|
|
|
+ },
|
|
|
onLoad(option) {
|
|
|
console.log(option.id) //打印出上个页面传递的参数。
|
|
|
this.addForm.custId = parseInt(option.id)
|
|
|
@@ -583,6 +561,7 @@
|
|
|
if (res && res.code == 200) {
|
|
|
console.log(res)
|
|
|
this.addForm.custName = res.data.list[0].custName
|
|
|
+ this.addForm.nboName = this.addForm.custName
|
|
|
}
|
|
|
},
|
|
|
// 打开主要联系人
|
|
|
@@ -620,6 +599,8 @@
|
|
|
console.log(user)
|
|
|
this.addForm.contactId = user.id
|
|
|
this.addForm.contactName = user.label
|
|
|
+ this.addForm.contactPostion = user.postion
|
|
|
+ this.addForm.contactTelephone = user.telephone
|
|
|
}
|
|
|
},
|
|
|
// 关闭选择销售
|
|
|
@@ -732,6 +713,8 @@
|
|
|
console.log(this.addForm)
|
|
|
let params = this.addForm
|
|
|
params.nboBudget = Number(params.nboBudget)
|
|
|
+ params.saleName = this.username
|
|
|
+ params.saleId = this.userId
|
|
|
let products = this.productList.map((item) => ({
|
|
|
ProdId: item.id,
|
|
|
ProdName: item.prodName,
|
|
|
@@ -829,9 +812,9 @@
|
|
|
.label-tag {
|
|
|
width: 15rpx;
|
|
|
height: 15rpx;
|
|
|
- background: rgba(62, 126, 248, 0.6);
|
|
|
+ background: #ff4d4f;
|
|
|
border-radius: 50%;
|
|
|
- margin-right: -4rpx;
|
|
|
+ margin-right: 10rpx;
|
|
|
}
|
|
|
}
|
|
|
.handle-btn {
|
|
|
@@ -846,8 +829,19 @@
|
|
|
line-height: 92rpx;
|
|
|
}
|
|
|
}
|
|
|
+ .step1 {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 124rpx);
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
.step2 {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 124rpx);
|
|
|
.product-wrap {
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ height: calc(100% - 150rpx);
|
|
|
+ overflow: auto;
|
|
|
.product-item {
|
|
|
margin: 30rpx 0;
|
|
|
padding: 20rpx;
|
|
|
@@ -867,8 +861,8 @@
|
|
|
background: #3c9cff;
|
|
|
border-radius: 3px;
|
|
|
text-align: center;
|
|
|
- line-height: 60rpx;
|
|
|
- font-size: 22rpx;
|
|
|
+ line-height: 58rpx;
|
|
|
+ font-size: 44rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|