Commit 595a0c07 authored by linxin's avatar linxin

add

parent 1487a12d
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div slot="name">产品型号</div> <div slot="name">产品型号</div>
<input slot="content" v-model="saveInfo.product_id_n" readonly placeholder="请选择"> <input slot="content" v-model="saveInfo.product_id_n" readonly placeholder="请选择">
</item> </item>
<item v-if="isReadOnly" :showArrow="true"> <item v-if="isReadOnly">
<div slot="name">产品型号</div> <div slot="name">产品型号</div>
<input slot="content" v-model="saveInfo.product_id_n" readonly> <input slot="content" v-model="saveInfo.product_id_n" readonly>
</item> </item>
......
...@@ -524,7 +524,7 @@ export default { ...@@ -524,7 +524,7 @@ export default {
makeData () { makeData () {
let obj = {} let obj = {}
this.selectUdertake.forEach((i, index, arr) => { 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 return obj
}, },
...@@ -562,6 +562,34 @@ export default { ...@@ -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 () { save () {
let vm = this let vm = this
if (vm.fromPutted) { if (vm.fromPutted) {
...@@ -572,19 +600,13 @@ export default { ...@@ -572,19 +600,13 @@ export default {
salesEnter: vm.salesEnter, 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 { } else {
let url = process.env.basePath + 'prj_base_info_save' let url = process.env.basePath + 'prj_base_info_save'
let isEmpty = vm.hasEmpty()
let param = { let param = {
master: {...vm.saveInfo, ...vm.makeData()}, master: {...vm.saveInfo, ...vm.makeData()},
} }
if (isEmpty) {
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
...@@ -603,6 +625,7 @@ export default { ...@@ -603,6 +625,7 @@ export default {
} }
}) })
} }
}
}, },
getBaseInfo () { getBaseInfo () {
this.getEquipInfo() this.getEquipInfo()
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</item> </item>
<item @click.native="showTime('YYYY-MM-DD')"> <item @click.native="showTime('YYYY-MM-DD')">
<div slot="name" class="font-color">签约日期</div> <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"> <img src="@/assets/contractCreate/date.png" alt="" class="date-pic">
</item> </item>
</list-item> </list-item>
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
office_id: '', // 办事处id office_id: '', // 办事处id
factory: '', // 主机厂id factory: '', // 主机厂id
manu_manager: '', // 办事处业务员 manu_manager: '', // 办事处业务员
dates: '请选择', sale_date: '请选择',
project_id: '', project_id: '',
}, },
} }
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
office_id: '', // 办事处id office_id: '', // 办事处id
factory: '', // 主机厂id factory: '', // 主机厂id
manu_manager: '', // 办事处业务员 manu_manager: '', // 办事处业务员
dates: '请选择', sale_date: '请选择',
bp_type: window.localStorage.bp_type, bp_type: window.localStorage.bp_type,
project_id: '', project_id: '',
} }
...@@ -231,7 +231,7 @@ export default { ...@@ -231,7 +231,7 @@ export default {
nowDate: (new Date()).format('yyyy-MM-dd'), nowDate: (new Date()).format('yyyy-MM-dd'),
format: format, format: format,
callback: (date) => { callback: (date) => {
vm.salesInfo.dates = date vm.salesInfo.sale_date = date
}, },
}) })
}, },
...@@ -470,7 +470,7 @@ export default { ...@@ -470,7 +470,7 @@ export default {
hlsPopup.showLongCenter('主机厂不能为空!') hlsPopup.showLongCenter('主机厂不能为空!')
} else if (!vm.salesInfo.manu_manager) { } else if (!vm.salesInfo.manu_manager) {
hlsPopup.showLongCenter('主机厂业务员不能为空!') hlsPopup.showLongCenter('主机厂业务员不能为空!')
} else if (!vm.salesInfo.dates) { } else if (!vm.salesInfo.sale_date) {
hlsPopup.showLongCenter('签约日期不能为空!') hlsPopup.showLongCenter('签约日期不能为空!')
} else { } else {
let url = process.env.basePath + 'prj_sales_info_save' let url = process.env.basePath + 'prj_sales_info_save'
......
...@@ -266,9 +266,9 @@ export default { ...@@ -266,9 +266,9 @@ export default {
var times = this.dateFormat(date) var times = this.dateFormat(date)
console.log(times) console.log(times)
}, },
dateFormat(str){ dateFormat (str) {
// return `${str.substring(0,4)}-${str.substring(4,6)}-${str.substring(6)}` // return `${str.substring(0,4)}-${str.substring(4,6)}-${str.substring(6)}`
return str.replace(/\./g,'-') return str.replace(/\./g, '-')
}, },
// 查询头像 // 查询头像
getHead () { getHead () {
...@@ -860,6 +860,12 @@ export default { ...@@ -860,6 +860,12 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
#my-info { #my-info {
.content-wrap{
margin-left:40px;
}
.content-wrap:not(:nth-of-type(1)){
margin-left:70px;
}
.card-top { .card-top {
width: 330px; width: 330px;
margin: 0 auto; margin: 0 auto;
...@@ -999,8 +1005,9 @@ export default { ...@@ -999,8 +1005,9 @@ export default {
// width: 295px; // width: 295px;
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
justify-content: space-around; // justify-content: space-around;
align-items: center; // align-items: center;
flex:1;
text-align: center; text-align: center;
.content-wrap { .content-wrap {
position: relative; 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