新增客户按钮

dev
张同海 2 years ago
parent b197c0f0b0
commit 3143af8ed0

@ -171,7 +171,7 @@
v-model="details.etd"
@change="changeEtd"
>
<a-icon slot="suffixIcon" type="time" style="display: none;"/>
<a-icon slot="suffixIcon" type="time" style="display: none;" />
</a-date-picker>
<span class="week" v-if="etdWeek">W{{ etdWeek || '--' }}</span>
</div>
@ -194,7 +194,7 @@
placeholder="实际开船"
v-model="details.atd"
>
<a-icon slot="suffixIcon" type="time" style="display: none;"/>
<a-icon slot="suffixIcon" type="time" style="display: none;" />
</a-date-picker>
</div>
</a-form-item>
@ -348,20 +348,26 @@
import { XCard } from '@/components'
import { AutoComplete } from 'ant-design-vue'
import { DjyCustomerpage, GetCarrierlist, GetVessellist, GetSysUserPage, GetForwarderlist } from '@/api/modular/main/BookingLedger'
import {
DjyCustomerpage,
GetCarrierlist,
GetVessellist,
GetSysUserPage,
GetForwarderlist
} from '@/api/modular/main/BookingLedger'
export default {
name: 'BookingDetail',
components: {
XCard,
AutoComplete,
AutoComplete
},
props: {
details: {
type: Object,
default: () => {
return {}
},
}
},
ishd: {
type: Boolean,
@ -374,12 +380,12 @@ export default {
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
md: { span: 10 },
md: { span: 10 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 },
md: { span: 13 },
md: { span: 13 }
},
form: this.$form.createForm(this),
dataSource: ['Burns Bay Road', 'Downing Street', 'Wall Street'],
@ -400,14 +406,14 @@ export default {
customerModelconfirm: false,
rowStyleOption: {
clickHighlight: false,
hoverHighlight: false,
hoverHighlight: false
},
cellAutofillOption: true,
editOption: {
// cell value change
cellValueChange: ({ row, column }) => {
console.log('编辑', row, column)
},
}
},
checkboxOption: {
hideSelectAll: false,
@ -418,7 +424,7 @@ export default {
//
selectedAllChange: ({ isSelected, selectedRowKeys }) => {
console.log('全选', isSelected, selectedRowKeys)
},
}
},
columns: [
{
@ -428,7 +434,7 @@ export default {
title: '',
width: 50,
operationColumn: true,
align: 'center',
align: 'center'
},
{ field: 'col1', key: 'col1', title: '联系人', edit: true },
{ field: 'col2', key: 'col2', title: '邮箱', edit: true },
@ -443,12 +449,12 @@ export default {
return (
<a-checkbox
value={row['BC']}
on-change={(val) => {
on-change={val => {
console.log(val)
}}
/>
)
},
}
},
{
field: 'col6',
@ -459,12 +465,12 @@ export default {
return (
<a-checkbox
value={row['col6']}
on-change={(val) => {
on-change={val => {
console.log(val)
}}
/>
)
},
}
},
{
field: 'col7',
@ -475,16 +481,16 @@ export default {
return (
<a-checkbox
value={row['col7']}
on-change={(val) => {
on-change={val => {
console.log(val)
}}
/>
)
},
},
}
}
],
tableData: [],
etdWeek: '',
etdWeek: ''
// / - end
}
},
@ -634,7 +640,7 @@ export default {
} else {
return []
}
},
}
},
watch: {
details: {
@ -642,11 +648,11 @@ export default {
// console.log('', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'baseInfo',
type: 'baseInfo'
})
},
deep: true,
},
deep: true
}
},
created() {
this.init()
@ -673,15 +679,15 @@ export default {
SearchValue: name,
PropString: key
})
.then((res) => {
.then(res => {
if (res.code === 200) {
// this.customerData = res.data.rows
this[`${type}Data`] = res.data.rows
console.log(this[`${type}DataArr`])
console.log(this[`${type}DataArr`])
this.$forceUpdate()
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -706,15 +712,15 @@ export default {
// - start
getCarrier(name = '') {
GetCarrierlist({
CnName: name,
CnName: name
})
.then((res) => {
.then(res => {
if (res.code === 200) {
this.carrierData = res.data
this.$forceUpdate()
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -731,15 +737,15 @@ export default {
// - start
getForwarderlist(name = '') {
GetForwarderlist({
Name: name,
Name: name
})
.then((res) => {
.then(res => {
if (res.code === 200) {
this.shipagencyData = res.data
this.$forceUpdate()
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -755,15 +761,15 @@ export default {
// - start
getVessel(name = '') {
GetVessellist({
Name: name,
Name: name
})
.then((res) => {
.then(res => {
if (res.code === 200) {
this.vesselData = res.data
this.$forceUpdate()
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -808,9 +814,9 @@ export default {
// - start
getUserList(name = '', type) {
GetSysUserPage({
SearchValue: name,
SearchValue: name
})
.then((res) => {
.then(res => {
if (res.code === 200) {
if (type === 'sale') {
this.saleUserList = res.data.rows
@ -823,7 +829,7 @@ export default {
}
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -872,8 +878,13 @@ export default {
// - start
changeCustomer(type) {
this.customerType = type
this.customerVisible = true
if (type == 'add') {
this.$router.push({ name: 'CustomerInformationManagementAdd' })
localStorage.setItem('CustomerInformationManagementAdd', 'new')
} else {
this.customerType = type
this.customerVisible = true
}
},
handleModelSubmit() {
this.handleModelCancel()

Loading…
Cancel
Save