Commit 179a7416 authored by huangjie's avatar huangjie

*

parent 0c3a98f6
...@@ -364,6 +364,7 @@ export default { ...@@ -364,6 +364,7 @@ export default {
}, },
//获取建设库客户 //获取建设库客户
getCompany(value){ getCompany(value){
this.queryParam.companyId = null
if (value.length>=2){ if (value.length>=2){
let param = { let param = {
keyword:value, keyword:value,
...@@ -381,15 +382,21 @@ export default { ...@@ -381,15 +382,21 @@ export default {
} }
}, },
selCompany(item){ selCompany(item){
console.log(item)
this.queryParam.companyId = item.jskEid this.queryParam.companyId = item.jskEid
this.queryParam.companyName = item.name.replace(/<[^>]+>/g, '') this.queryParam.companyName = item.name.replace(/<[^>]+>/g, '')
this.queryParam.legalPerson = item.legalPerson this.queryParam.legalPerson = item.legalPerson
this.queryParam.registerCapital = item.registeredCapitalStr let registeredCapitalStr = ""
if(item.registeredCapitalStr == "0" || item.registeredCapitalStr == 0){
registeredCapitalStr = ''
}else{
registeredCapitalStr = item.registeredCapitalStr
}
this.queryParam.registerCapital = registeredCapitalStr
this.queryParam.creditCode = item.creditCode this.queryParam.creditCode = item.creditCode
this.queryParam.provinceId = item.provinceId this.queryParam.provinceId = item.provinceId
this.queryParam.cityId = item.cityId this.queryParam.cityId = item.cityId
this.queryParam.districtId = item.cityId this.queryParam.districtId = item.cityId
let list = [] let list = []
if(item.provinceId != null && item.provinceId != "") if(item.provinceId != null && item.provinceId != "")
list.push(item.provinceId) list.push(item.provinceId)
...@@ -403,11 +410,11 @@ export default { ...@@ -403,11 +410,11 @@ export default {
}, },
//添加客户 //添加客户
submitForm(formName) { submitForm(formName) {
if(this.queryParam.companyId=="" || this.queryParam.companyId == null){ // if(this.queryParam.companyId=="" || this.queryParam.companyId == null){
this.$message.error({message:'请选择企业!',showClose:true}) // this.$message.error({message:'请选择企业!',showClose:true})
//
return; // return;
} // }
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
addCustomer(this.queryParam).then(result=>{ addCustomer(this.queryParam).then(result=>{
......
...@@ -249,10 +249,11 @@ export default { ...@@ -249,10 +249,11 @@ export default {
switch (type) { switch (type) {
case 1: case 1:
time = time.getDay() time = time.getDay()
// week.length = time time = time == 0?7:time
weekdata1.length = time weekdata1.length = time
weekdata2.length = time weekdata2.length = time
weekdata3.length = time weekdata3.length = time
console.log(time)
for(var i=0;i<7;i++){ for(var i=0;i<7;i++){
if(i > time){ if(i > time){
weekdata1.push('') weekdata1.push('')
...@@ -303,6 +304,8 @@ export default { ...@@ -303,6 +304,8 @@ export default {
default: default:
break; break;
} }
console.log(datas)
console.log(labels)
this.initDT(datas,labels) this.initDT(datas,labels)
}, },
resizeEcharts (){ resizeEcharts (){
......
<template> <template>
<div> <div id="jsnr">
<el-card class="box-card noborder"> <el-card class="box-card noborder">
<div class="cardtitles">基本信息</div> <div class="cardtitles">基本信息</div>
<div class="baseinfo" style="padding-bottom: 8px"> <div class="baseinfo" style="padding-bottom: 8px">
...@@ -208,7 +208,9 @@ ...@@ -208,7 +208,9 @@
type: Number, type: Number,
default: 0 default: 0
}, },
isDisabled:false, isDisabled:{
default: false
},
}, },
data(){ data(){
return{ return{
...@@ -233,7 +235,7 @@ ...@@ -233,7 +235,7 @@
watch:{ watch:{
}, },
mounted(){ mounted(){
document.addEventListener('mouseup',(e) => { document.getElementById('jsnr').addEventListener('mouseup',(e) => {
if(this.isDisabled == true) if(this.isDisabled == true)
return false return false
let j = 0 let j = 0
...@@ -305,19 +307,23 @@ ...@@ -305,19 +307,23 @@
}) })
}, },
changes(str){ changes(str){
this.nowedit = -1
let param = str let param = str
param.id = this.id param.id = this.id
if(this.isDisabled == true) if(this.isDisabled == true)
return false return false
editXMNR(param).then(result=>{ editXMNR(param).then(result=>{
if(result.code == 200) if(result.code == 200){
this.$message.success('修改成功!') this.$message.success('修改成功!')
if(param.investmentAmount){//修改项目阶段
this.$emit('Refrehmoney')
}
}
else{ else{
this.$message.error(res.msg) this.$message.error(result.msg)
this.getJSNR() this.getJSNR()
} }
}) })
this.nowedit = -1
}, },
//输入数字 //输入数字
number(value){ number(value){
......
<template> <template>
<div> <div id="xmsl">
<el-card class="box-card noborder"> <el-card class="box-card noborder">
<div class="cardtitles">基本信息</div> <div class="cardtitles">基本信息</div>
<div class="baseinfo"> <div class="baseinfo">
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
this.getXMSL() this.getXMSL()
}, },
mounted(){ mounted(){
document.addEventListener('mouseup',(e) => { document.getElementById('xmsl').addEventListener('mouseup',(e) => {
if(this.isDisabled == true) if(this.isDisabled == true)
return false return false
let j = 0 let j = 0
...@@ -236,13 +236,16 @@ ...@@ -236,13 +236,16 @@
param = {'constructionPrincipal':this.xmsldata.constructionPrincipal} param = {'constructionPrincipal':this.xmsldata.constructionPrincipal}
break; break;
case 6 : case 6 :
param = {'supervisorPhone':this.xmsldata.supervisorPhone} // param = {'supervisorPhone':this.xmsldata.supervisorPhone}
this.isphone(1,this.xmsldata.supervisorPhone)
break; break;
case 7 : case 7 :
param = {'constructionPhone':this.xmsldata.constructionPhone} // param = {'constructionPhone':this.xmsldata.constructionPhone}
this.isphone(1,this.xmsldata.constructionPhone)
break; break;
} }
this.editXMSL(param) if(this.nowedit!=6 && this.nowedit!=7)
this.editXMSL(param)
} }
this.nowedit = -1 this.nowedit = -1
} }
...@@ -285,7 +288,7 @@ ...@@ -285,7 +288,7 @@
//验证电话号码 //验证电话号码
isphone(type,value){ isphone(type,value){
var regPartton = /1[3-9]+\d{9}/; var regPartton = /1[3-9]+\d{9}/;
var regPartton1 = /^(0[0-9]{2,3}[\-]?[2-9][0-9]{6,7}[\-]?[0-9]?)$/; var regPartton1 = /0\d{2,3}-\d{7,8}|\(?0\d{2,3}[)-]?\d{7,8}|\(?0\d{2,3}[)-]*\d{7,8}/;
if (!regPartton.test(value) && !regPartton1.test(value)) { if (!regPartton.test(value) && !regPartton1.test(value)) {
this.$message.error("请输入正确的电话"); this.$message.error("请输入正确的电话");
} else { } else {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</div> </div>
<div class="det-con con" id="inputxt"> <div class="det-con con" id="inputxt">
<span>投资估算(万元):</span> <span>投资估算(万元):</span>
<div class="inputxt i" :class="{'nomar':nowedit != 3}"> <div class="inputxt i" :class="{'nomar':nowedit != 3}" :key="keys2">
<div class="flex" v-if="nowedit == 3 && isDisabled == false"> <div class="flex" v-if="nowedit == 3 && isDisabled == false">
<el-input v-model="ProjectData.investmentAmount" placeholder="待添加" @input="number"></el-input> <el-input v-model="ProjectData.investmentAmount" placeholder="待添加" @input="number"></el-input>
<div class="flex"> <div class="flex">
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<!--项目速览--> <!--项目速览-->
<xmsl v-if="thistag == 'xmsl'" :key="keys" @Refreshs="getsl" :detailId="detailId"></xmsl> <xmsl v-if="thistag == 'xmsl'" :key="keys" @Refreshs="getsl" :detailId="detailId"></xmsl>
<!--建设内容--> <!--建设内容-->
<jsnr v-if="thistag == 'jsnr'" :isDisabled='isDisabled' :detailId="detailId"></jsnr> <jsnr v-if="thistag == 'jsnr'" :key="keys1" :isDisabled='isDisabled' @Refrehmoney="getXMSL" :detailId="detailId"></jsnr>
<!--联系人--> <!--联系人-->
<lxr v-if="thistag == 'lxr'" :isDisabled='isDisabled' :detailId="detailId"></lxr> <lxr v-if="thistag == 'lxr'" :isDisabled='isDisabled' :detailId="detailId"></lxr>
<!--跟进记录--> <!--跟进记录-->
...@@ -177,6 +177,8 @@ ...@@ -177,6 +177,8 @@
ProjectData:{}, ProjectData:{},
isDisabled:false, isDisabled:false,
keys:1, keys:1,
keys1:2,
keys2:20,
} }
}, },
created(){ created(){
...@@ -247,6 +249,7 @@ ...@@ -247,6 +249,7 @@
} }
this.address = list.length>0?list:"待添加" this.address = list.length>0?list:"待添加"
this.addresstxt = txt == "" ? "待添加":txt this.addresstxt = txt == "" ? "待添加":txt
this.keys2 ++;
}) })
}, },
locks(isPrivate){ locks(isPrivate){
...@@ -263,6 +266,12 @@ ...@@ -263,6 +266,12 @@
editXMNR(JSON.stringify(params)).then(res=>{ editXMNR(JSON.stringify(params)).then(res=>{
if (res.code == 200){ if (res.code == 200){
this.$message.success('修改成功!') this.$message.success('修改成功!')
if(this.nowedit == 1){
let _this = this
setTimeout(function() {
_this.keys1++;
},1000)
}
}else{ }else{
this.$message.error(res.msg) this.$message.error(res.msg)
this.getXMSL() this.getXMSL()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment