|
@@ -17,7 +17,7 @@
|
|
|
</template>
|
|
|
</van-nav-bar>
|
|
|
|
|
|
- <van-form @submit="onSubmit">
|
|
|
+ <van-form>
|
|
|
<van-field
|
|
|
v-model="name"
|
|
|
name="客户姓名"
|
|
@@ -38,7 +38,7 @@
|
|
|
<van-picker
|
|
|
show-toolbar
|
|
|
title="选择访问类型"
|
|
|
- value-key="keyValue"
|
|
|
+ value-key="name"
|
|
|
:columns="visitTypeData"
|
|
|
@cancel="showVisitType = false"
|
|
|
@confirm="onConfirm"
|
|
@@ -60,6 +60,8 @@
|
|
|
title="选择年月日"
|
|
|
:min-date="minDate"
|
|
|
:max-date="maxDate"
|
|
|
+ @cancel="showVisitDate = false"
|
|
|
+ @confirm="onConfirmVisitDate"
|
|
|
/>
|
|
|
</van-popup>
|
|
|
<van-cell
|
|
@@ -77,6 +79,8 @@
|
|
|
title="选择时间"
|
|
|
:min-hour="10"
|
|
|
:max-hour="20"
|
|
|
+ @cancel="showTime = false"
|
|
|
+ @confirm="onConfirmVisitTime"
|
|
|
/>
|
|
|
</van-popup>
|
|
|
<van-cell
|
|
@@ -91,10 +95,9 @@
|
|
|
<van-picker
|
|
|
show-toolbar
|
|
|
title="选择意向强度"
|
|
|
- value-key="keyValue"
|
|
|
:columns="intentionData"
|
|
|
@cancel="showintention = false"
|
|
|
- @confirm="onConfirmHouse"
|
|
|
+ @confirm="onConfirmIntention"
|
|
|
/>
|
|
|
</van-popup>
|
|
|
<van-field
|
|
@@ -120,6 +123,8 @@
|
|
|
title="选择年月日"
|
|
|
:min-date="minDate"
|
|
|
:max-date="maxDate"
|
|
|
+ @cancel="showPlanVisitDate = false"
|
|
|
+ @confirm="onConfirmPlanVisitDate"
|
|
|
/>
|
|
|
</van-popup>
|
|
|
<van-cell
|
|
@@ -137,20 +142,18 @@
|
|
|
title="选择年月日"
|
|
|
:min-date="minDate"
|
|
|
:max-date="maxDate"
|
|
|
+ @cancel="showNextReceiveDate = false"
|
|
|
+ @confirm="onConfirmNextReceiveDate"
|
|
|
/>
|
|
|
</van-popup>
|
|
|
- <div style="margin: 16px">
|
|
|
- <van-button round block type="info" native-type="submit"
|
|
|
- >提交</van-button
|
|
|
- >
|
|
|
- </div>
|
|
|
+
|
|
|
|
|
|
<van-row class="bottom">
|
|
|
- <van-col span="12" class="bgGrey">
|
|
|
- <van-icon name="edit" />{{ completion }}
|
|
|
+ <van-col span="12" class="bgGrey" @click="cancel">
|
|
|
+ <van-icon name="close" />取消
|
|
|
</van-col>
|
|
|
- <van-col span="12" class="bgRed"
|
|
|
- ><van-icon name="add-o" />新增跟进
|
|
|
+ <van-col span="12" class="bgRed" @click="save"
|
|
|
+ ><van-icon name="passed" />保存
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
</van-form>
|
|
@@ -159,10 +162,11 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- GetSaClientContactList,
|
|
|
- GetSaClientInfo,
|
|
|
+ GetVisitTypeList,
|
|
|
+ AddSaClientContact
|
|
|
} from "@/common/api/loginApi.js";
|
|
|
import Decimal from "decimal.js";
|
|
|
+import '../assets/css/resetvant.css';
|
|
|
export default {
|
|
|
name: "login",
|
|
|
data() {
|
|
@@ -183,13 +187,13 @@ export default {
|
|
|
minDate: new Date(2005, 0, 1),
|
|
|
maxDate: new Date(2025, 10, 1),
|
|
|
currentDate: new Date(),
|
|
|
- currentTime: "",
|
|
|
+ currentTime: '',
|
|
|
showTime: false,
|
|
|
- intentionData: [],
|
|
|
+ intentionData: [0,1,2,3,4,5],
|
|
|
showPlanVisitDate: false,
|
|
|
- planVisitDateSel: "",
|
|
|
+ planVisitDateSel: new Date(),
|
|
|
showNextReceiveDate: false,
|
|
|
- nextReceiveDateSel: "",
|
|
|
+ nextReceiveDateSel: new Date(),
|
|
|
showVisitDate: false,
|
|
|
showintention: false,
|
|
|
};
|
|
@@ -200,37 +204,106 @@ export default {
|
|
|
this.$util.persistLogin(this);
|
|
|
this.id = this.$route.query.id;
|
|
|
this.name = this.$route.query.name;
|
|
|
-
|
|
|
- //this.GetSaClientInfo();
|
|
|
+ let date=new Date();
|
|
|
+ this.visitDate=this.$util.getCurrentDate();
|
|
|
+ this.currentTime="10:11";
|
|
|
+ console.info('created currentTime',this.currentTime);
|
|
|
+ this.GetVisitTypeList();
|
|
|
},
|
|
|
computed: {
|
|
|
//计算属性
|
|
|
completion: function () {},
|
|
|
},
|
|
|
methods: {
|
|
|
- //获取客户信息
|
|
|
- GetSaClientInfo: function () {
|
|
|
- var that = this;
|
|
|
+ onConfirm: function (item,index) {
|
|
|
+ console.info('onConfirm',item);
|
|
|
+ this.visitType=item.name;
|
|
|
+ this.showVisitType=false;
|
|
|
+ },
|
|
|
+ onConfirmVisitTime:function (time,index) { //接待时间
|
|
|
+ console.info('onConfirmVisitTime',time);
|
|
|
+ this.visitTime=time;
|
|
|
+ console.info('onConfirmVisitTime visitTime',this.visitTime);
|
|
|
+ this.showTime=false;
|
|
|
+ },
|
|
|
+ onConfirmVisitDate: function (date,index) { //接待日期
|
|
|
+ console.info('onConfirmVisitDate',date);
|
|
|
+ this.visitDate=this.$util.getDate(date);
|
|
|
+ console.info('onConfirmVisitDate visitDate',this.visitDate);
|
|
|
+ this.showTime=false;
|
|
|
+ },
|
|
|
+ onConfirmIntention:function (value,index) { //意向强度
|
|
|
+ console.info('onConfirmIntention',value);
|
|
|
+ this.intention=value;
|
|
|
+ console.info('onConfirmIntention intention',this.intention);
|
|
|
+ this.showintention=false;
|
|
|
+ },
|
|
|
+ onConfirmPlanVisitDate:function (date,index) { //来访计划日期
|
|
|
+ console.info('onConfirmPlanVisitDate',date);
|
|
|
+ this.planVisitDate=this.$util.getDate(date);
|
|
|
+ console.info('onConfirmPlanVisitDate visitDate',this.planVisitDate);
|
|
|
+ this.showPlanVisitDate=false;
|
|
|
+ },
|
|
|
+ onConfirmNextReceiveDate:function (date,index) { //下次接待日期
|
|
|
+ console.info('onConfirmNextReceiveDate',date);
|
|
|
+ this.nextReceiveDate=this.$util.getDate(date);
|
|
|
+ console.info('onConfirmNextReceiveDate nextReceiveDate',this.nextReceiveDate);
|
|
|
+ this.showNextReceiveDate=false;
|
|
|
+ },
|
|
|
+ onSubmit(values) {
|
|
|
+ //提交表单
|
|
|
+ console.log("submit", values);
|
|
|
+
|
|
|
+ },
|
|
|
+ GetVisitTypeList:function(){ //取访问类型
|
|
|
+ var that = this;
|
|
|
var data = {
|
|
|
- userCode: that.$store.state.data.userCode,
|
|
|
- projectId: that.$store.state.projectId,
|
|
|
- clientId: that.id,
|
|
|
+ projectId: that.$store.state.projectId
|
|
|
};
|
|
|
console.info("data", data);
|
|
|
- GetSaClientInfo(data).then((res) => {
|
|
|
- console.info("GetSaClientInfo", res);
|
|
|
+ GetVisitTypeList(data).then((res)=>{
|
|
|
+ console.info("GetVisitTypeList", res);
|
|
|
if (!res.result) {
|
|
|
that.$toast(res.msg);
|
|
|
return;
|
|
|
}
|
|
|
- that.data2 = res.data;
|
|
|
+ res.data.forEach(function(item,index,array) {
|
|
|
+ that.visitTypeData.push(item);
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
- onConfirm: function () {},
|
|
|
- onConfirmHouse: function () {},
|
|
|
- onSubmit(values) {
|
|
|
- //提交表单
|
|
|
- console.log("submit", values);
|
|
|
+ cancel:function(){
|
|
|
+ this.$router.go(-1);
|
|
|
+ },
|
|
|
+ save:function(){
|
|
|
+ let that=this;
|
|
|
+ let jsonData={
|
|
|
+ visitType:that.visitType,
|
|
|
+ intention:that.intention,
|
|
|
+ remark:that.remark,
|
|
|
+ planVisitDate:that.planVisitDate,
|
|
|
+ nextReceiveDate:that.nextReceiveDate,
|
|
|
+ visitDate:that.visitDate,
|
|
|
+ visitTime:that.visitTime,
|
|
|
+ actionType:''
|
|
|
+ };
|
|
|
+ let data={
|
|
|
+ userCode:that.$store.state.data.userCode,
|
|
|
+ projectId: that.$store.state.projectId,
|
|
|
+ clientId:that.id,
|
|
|
+ jsonData:JSON.stringify(jsonData)
|
|
|
+ };
|
|
|
+ console.info('save',data);
|
|
|
+ AddSaClientContact(data).then((res)=>{
|
|
|
+ console.info('AddSaClientContact',res);
|
|
|
+ that.$dialog.alert({
|
|
|
+ message: res.msg,
|
|
|
+ }).then(() => {
|
|
|
+ // on close
|
|
|
+ that.$router.go(-1);
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
},
|
|
|
onClickLeft() {
|
|
|
// this.$toast('返回')
|
|
@@ -245,80 +318,80 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
-<style scoped lang = "sass">
|
|
|
-.title1
|
|
|
- color: #ccc
|
|
|
- font-size: 15px
|
|
|
-
|
|
|
- text-align: left
|
|
|
- height: 30px
|
|
|
-
|
|
|
-.title2
|
|
|
- color: #ff0000
|
|
|
- text-align: left
|
|
|
- font-size: 13px
|
|
|
-
|
|
|
-.infoTitle
|
|
|
- color: #aaa
|
|
|
- text-align: left
|
|
|
-
|
|
|
-.value1
|
|
|
- color: #ff0000
|
|
|
- font-size: 13px
|
|
|
-
|
|
|
-.infoValue
|
|
|
- color: #0606af
|
|
|
-
|
|
|
-.size
|
|
|
- font-size: 16px
|
|
|
-
|
|
|
-.header
|
|
|
- margin-top: 10px
|
|
|
- height: 70px
|
|
|
- border-bottom: #cfcfcf solid 3px
|
|
|
+<style scoped >
|
|
|
|
|
|
-.titleClass
|
|
|
- border-bottom: #000 solid 1px
|
|
|
+.title1{
|
|
|
+ color: #aaa;
|
|
|
+ font-size:15px;
|
|
|
|
|
|
-.van-tab
|
|
|
- color: #ff0000
|
|
|
-
|
|
|
-.redColor
|
|
|
- color: #ff0000
|
|
|
-
|
|
|
-.bgBlue
|
|
|
- background: #a0a0f7
|
|
|
- height: 30px
|
|
|
- margin-top: 5px
|
|
|
- padding-top: 5px
|
|
|
-
|
|
|
-.bgBill
|
|
|
- height: 30px
|
|
|
- border-bottom: #aaa solid 1px
|
|
|
- padding-top: 5px
|
|
|
-
|
|
|
-.bottom
|
|
|
+ text-align:left;
|
|
|
+ height:30px;
|
|
|
+}
|
|
|
+.title2{
|
|
|
+ color: #ff0000;
|
|
|
+ text-align:left;
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
+.infoTitle{
|
|
|
+ color: #aaa;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+.value1{
|
|
|
+ color: #000;
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
+.infoValue{
|
|
|
+ color: #0606af;
|
|
|
+}
|
|
|
+.size{
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+.header{
|
|
|
+ margin-top: 10px;
|
|
|
+ height: 70px;
|
|
|
+ border-bottom: #cfcfcf solid 3px;
|
|
|
+}
|
|
|
+.titleClass{
|
|
|
+ border-bottom: #000 solid 1px;
|
|
|
+}
|
|
|
+.van-tab{
|
|
|
+ color: #ff0000;
|
|
|
+}
|
|
|
+.redColor{
|
|
|
+ color: #ff0000;
|
|
|
+}
|
|
|
+.bgBlue{
|
|
|
+ background: #a0a0f7;
|
|
|
+ height: 30px;
|
|
|
+ margin-top: 5px;
|
|
|
+ padding-top: 5px;
|
|
|
+}
|
|
|
+.bgBill{
|
|
|
+ height: 30px;
|
|
|
+ border-bottom: #aaa solid 1px;
|
|
|
+ padding-top: 5px;
|
|
|
+}
|
|
|
+.bottom{
|
|
|
/* left:0; */
|
|
|
- bottom: 0px
|
|
|
- position: absolute
|
|
|
- width: 100%
|
|
|
-
|
|
|
-.bgGrey
|
|
|
- background: #999999
|
|
|
- height: 35px
|
|
|
- justify-content: center
|
|
|
- padding-top: 5px
|
|
|
-
|
|
|
-.bgRed
|
|
|
- background: #ff0000
|
|
|
- height: 35px
|
|
|
- justify-content: center
|
|
|
- color: #ffffff
|
|
|
- font-weight: 900
|
|
|
- padding-top: 5px
|
|
|
-
|
|
|
-/deep/ .van-field__label {
|
|
|
- color: #ccc
|
|
|
- font-size: 15px
|
|
|
+ bottom: 0px;
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.bgGrey{
|
|
|
+ background: #999999;
|
|
|
+ height: 35px;
|
|
|
+ justify-content: center;
|
|
|
+ padding-top: 5px;
|
|
|
+}
|
|
|
+.bgRed{
|
|
|
+ background: #ff0000;
|
|
|
+ height: 35px;
|
|
|
+ justify-content: center;
|
|
|
+ color: #ffffff;
|
|
|
+ font-weight: 900;
|
|
|
+ padding-top: 5px;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|
|
|
+
|
|
|
|