Commit 595a0c07 authored by linxin's avatar linxin

add

parent 1487a12d
......@@ -37,7 +37,7 @@
<div slot="name">产品型号</div>
<input slot="content" v-model="saveInfo.product_id_n" readonly placeholder="请选择">
</item>
<item v-if="isReadOnly" :showArrow="true">
<item v-if="isReadOnly">
<div slot="name">产品型号</div>
<input slot="content" v-model="saveInfo.product_id_n" readonly>
</item>
......
......@@ -524,7 +524,7 @@ export default {
makeData () {
let obj = {}
this.selectUdertake.forEach((i, index, arr) => {
obj[`bp_id_guta_${index + 1}`] = i.bp_id
obj[`bp_id_guta_${index + 1}`] = i.bp_guta_id
})
return obj
},
......@@ -562,6 +562,34 @@ export default {
}
})
},
hasEmpty () {
let vm = this
if (vm.bp_class === 'NP') {
if (!vm.saveInfo.np_industry_exp_n) {
hlsPopup.showLongCenter('行业情况不能为空!')
} else if (!vm.saveInfo.np_occupation_n) {
hlsPopup.showLongCenter('职业情况不能为空!')
} else if (!vm.saveInfo.house_type_n) {
hlsPopup.showLongCenter('房产信息不能为空!')
} else if (!vm.saveInfo.equip_value) {
hlsPopup.showLongCenter('设备价值不能为空!')
} else {
return true
}
} else if (vm.bp_class === 'ORG') {
if (!vm.saveInfo.equip_num_n) {
hlsPopup.showLongCenter('设备保有量不能为空!')
} else if (!vm.saveInfo.engineer_con_n) {
hlsPopup.showLongCenter('工程合同不能为空!')
} else if (!vm.saveInfo.enterpriese_nature_n) {
hlsPopup.showLongCenter('企业性质不能为空!')
} else if (!vm.saveInfo.equip_value) {
hlsPopup.showLongCenter('设备价值不能为空!')
} else {
return true
}
}
},
save () {
let vm = this
if (vm.fromPutted) {
......@@ -572,36 +600,31 @@ export default {
salesEnter: vm.salesEnter,
},
})
} else if (!vm.saveInfo.np_industry_exp_n) {
hlsPopup.showLongCenter('行业情况不能为空!')
} else if (!vm.saveInfo.np_occupation_n) {
hlsPopup.showLongCenter('职业情况不能为空!')
} else if (!vm.saveInfo.house_type_n) {
hlsPopup.showLongCenter('房产信息不能为空!')
} else if (!vm.saveInfo.equip_value) {
hlsPopup.showLongCenter('设备价值不能为空!')
} else {
let url = process.env.basePath + 'prj_base_info_save'
let isEmpty = vm.hasEmpty()
let param = {
master: {...vm.saveInfo, ...vm.makeData()},
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.saveTed = true
vm.$router.push({
name: 'CreateRentInfo',
params: {
bp_agent_id: vm.bp_agent_id,
bp_name: vm.NPBaseInfo.bp_name,
salesEnter: vm.salesEnter,
},
})
} else {
hlsPopup.showLongCenter(res.message)
}
})
if (isEmpty) {
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.saveTed = true
vm.$router.push({
name: 'CreateRentInfo',
params: {
bp_agent_id: vm.bp_agent_id,
bp_name: vm.NPBaseInfo.bp_name,
salesEnter: vm.salesEnter,
},
})
} else {
hlsPopup.showLongCenter(res.message)
}
})
}
}
},
getBaseInfo () {
......
......@@ -86,7 +86,7 @@
</item>
<item @click.native="showTime('YYYY-MM-DD')">
<div slot="name" class="font-color">签约日期</div>
<input slot="content" v-model="salesInfo.dates" readonly>
<input slot="content" v-model="salesInfo.sale_date" readonly>
<img src="@/assets/contractCreate/date.png" alt="" class="date-pic">
</item>
</list-item>
......@@ -163,7 +163,7 @@ export default {
office_id: '', // 办事处id
factory: '', // 主机厂id
manu_manager: '', // 办事处业务员
dates: '请选择',
sale_date: '请选择',
project_id: '',
},
}
......@@ -211,7 +211,7 @@ export default {
office_id: '', // 办事处id
factory: '', // 主机厂id
manu_manager: '', // 办事处业务员
dates: '请选择',
sale_date: '请选择',
bp_type: window.localStorage.bp_type,
project_id: '',
}
......@@ -231,7 +231,7 @@ export default {
nowDate: (new Date()).format('yyyy-MM-dd'),
format: format,
callback: (date) => {
vm.salesInfo.dates = date
vm.salesInfo.sale_date = date
},
})
},
......@@ -470,7 +470,7 @@ export default {
hlsPopup.showLongCenter('主机厂不能为空!')
} else if (!vm.salesInfo.manu_manager) {
hlsPopup.showLongCenter('主机厂业务员不能为空!')
} else if (!vm.salesInfo.dates) {
} else if (!vm.salesInfo.sale_date) {
hlsPopup.showLongCenter('签约日期不能为空!')
} else {
let url = process.env.basePath + 'prj_sales_info_save'
......
......@@ -261,14 +261,14 @@ export default {
activated () {},
methods: {
openTest () {
// cordova.InAppBrowser.open('http://www.baidu.com', '_blank', 'location=yes')
// cordova.InAppBrowser.open('http://www.baidu.com', '_blank', 'location=yes')
var date = '2019.11.23'
var times = this.dateFormat(date)
console.log(times)
},
dateFormat(str){
// return `${str.substring(0,4)}-${str.substring(4,6)}-${str.substring(6)}`
return str.replace(/\./g,'-')
dateFormat (str) {
// return `${str.substring(0,4)}-${str.substring(4,6)}-${str.substring(6)}`
return str.replace(/\./g, '-')
},
// 查询头像
getHead () {
......@@ -481,7 +481,7 @@ export default {
window.localStorage.setItem('width', width)
window.localStorage.setItem('height', height)
vm.$router.push('/login')
// location.reload()
// location.reload()
}
},
})
......@@ -860,6 +860,12 @@ export default {
<style lang="less" scoped>
#my-info {
.content-wrap{
margin-left:40px;
}
.content-wrap:not(:nth-of-type(1)){
margin-left:70px;
}
.card-top {
width: 330px;
margin: 0 auto;
......@@ -999,8 +1005,9 @@ export default {
// width: 295px;
margin: 0 auto;
display: flex;
justify-content: space-around;
align-items: center;
// justify-content: space-around;
// align-items: center;
flex:1;
text-align: center;
.content-wrap {
position: relative;
......
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