1、基础数据修复bug
2、客商模块修复bug
This commit is contained in:
@@ -24,10 +24,9 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
v-if="hasPermission('common_address_add')"
|
||||
@click="$refs.crud.rowAdd()"
|
||||
>新增
|
||||
>新建常用地址
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -188,7 +187,6 @@
|
||||
/>
|
||||
<el-input
|
||||
v-model="form.detailAddress"
|
||||
readonly
|
||||
maxlength="255"
|
||||
placeholder="点击后弹出地图组件"
|
||||
suffix-icon="el-icon-location"
|
||||
@@ -389,10 +387,96 @@ export default {
|
||||
column.rules = rules;
|
||||
}
|
||||
},
|
||||
setColumnSpan(prop, span) {
|
||||
const column = this.findColumn(this.option.column, prop);
|
||||
if (column) {
|
||||
column.span = span;
|
||||
}
|
||||
},
|
||||
setColumnRow(prop, row) {
|
||||
const column = this.findColumn(this.option.column, prop);
|
||||
if (column) {
|
||||
column.row = row;
|
||||
}
|
||||
},
|
||||
setColumnOrder(prop, order) {
|
||||
const column = this.findColumn(this.option.column, prop);
|
||||
if (column) {
|
||||
column.order = order;
|
||||
}
|
||||
},
|
||||
syncSourceFormLayout(addressType) {
|
||||
const isPortTerminal = addressType === '港口/码头';
|
||||
const isRailwayStation = addressType === '铁路车站';
|
||||
const isAirport = addressType === '空港机场';
|
||||
const isRegularAddress = addressType === '常规地址';
|
||||
this.setColumnSpan(
|
||||
'addressName',
|
||||
isRegularAddress || isPortTerminal || isRailwayStation || isAirport ? 12 : 24
|
||||
);
|
||||
this.setColumnRow('addressName', true);
|
||||
this.setColumnSpan('stationId', isRailwayStation ? 12 : 24);
|
||||
this.setColumnSpan('airportId', isAirport ? 12 : 24);
|
||||
this.setColumnRow('stationId', isRailwayStation);
|
||||
this.setColumnRow('airportId', isAirport);
|
||||
const formOrders = {
|
||||
addressType: 100,
|
||||
addressName: 70,
|
||||
contactName: 60,
|
||||
contactPhone: 50,
|
||||
detailAddress: 40,
|
||||
remark: 30,
|
||||
};
|
||||
if (isPortTerminal) {
|
||||
Object.assign(formOrders, {
|
||||
addressType: 80,
|
||||
portId: 70,
|
||||
terminalId: 60,
|
||||
addressName: 50,
|
||||
contactName: 40,
|
||||
contactPhone: 30,
|
||||
detailAddress: 20,
|
||||
remark: 10,
|
||||
});
|
||||
} else if (isRailwayStation) {
|
||||
Object.assign(formOrders, {
|
||||
addressType: 80,
|
||||
stationId: 70,
|
||||
addressName: 60,
|
||||
contactName: 50,
|
||||
contactPhone: 40,
|
||||
detailAddress: 30,
|
||||
remark: 20,
|
||||
});
|
||||
} else if (isAirport) {
|
||||
Object.assign(formOrders, {
|
||||
addressType: 80,
|
||||
airportId: 70,
|
||||
addressName: 60,
|
||||
contactName: 50,
|
||||
contactPhone: 40,
|
||||
detailAddress: 30,
|
||||
remark: 20,
|
||||
});
|
||||
}
|
||||
[
|
||||
'addressType',
|
||||
'portId',
|
||||
'terminalId',
|
||||
'stationId',
|
||||
'airportId',
|
||||
'addressName',
|
||||
'contactName',
|
||||
'contactPhone',
|
||||
'detailAddress',
|
||||
'remark',
|
||||
].forEach(prop => this.setColumnOrder(prop, formOrders[prop]));
|
||||
},
|
||||
syncSourceColumnDisplay(addressType) {
|
||||
const isPortTerminal = addressType === '港口/码头';
|
||||
const isRailwayStation = addressType === '铁路车站';
|
||||
const isAirport = addressType === '空港机场';
|
||||
this.syncSourceFormLayout(addressType);
|
||||
this.setColumnDisplay('portId', isPortTerminal);
|
||||
this.setColumnDisplay('terminalId', isPortTerminal);
|
||||
this.setColumnDisplay('stationId', isRailwayStation);
|
||||
@@ -1183,6 +1267,17 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.common-address-page :deep(.avue-crud__dialog .avue-form__row),
|
||||
.common-address-page :deep(.avue-crud__dialog .el-row) {
|
||||
margin-right: -16px;
|
||||
margin-left: -16px;
|
||||
}
|
||||
|
||||
.common-address-page :deep(.avue-crud__dialog .el-col) {
|
||||
padding-right: 16px;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.common-address-page {
|
||||
&__map-address {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user