|
@@ -77,15 +77,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</basic-container>
|
|
|
- <basic-container>
|
|
|
+ <basic-container v-if="key>0">
|
|
|
<avue-crud
|
|
|
:data="goodsList"
|
|
|
:option="entrustOptionTwoT"
|
|
|
:table-loading="loading"
|
|
|
:page.sync="page"
|
|
|
- ref="crudContact"
|
|
|
+ ref="crud"
|
|
|
@on-load="onLoad"
|
|
|
+ @resetColumn="resetColumn"
|
|
|
+ @saveColumn="saveColumn"
|
|
|
@search-change="searchChange"
|
|
|
+ @search-criteria-switch="searchCriteriaSwitch"
|
|
|
@row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
|
|
|
@row-update="rowSave">
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
@@ -111,6 +114,12 @@
|
|
|
>取消派车
|
|
|
</el-button>
|
|
|
</template>
|
|
|
+ <template slot="addressDetail" slot-scope="{ row,index}">
|
|
|
+ <el-tooltip class="item" effect="dark" placement="top">
|
|
|
+ <div v-html="ToBreak(row.addressDetail)" slot="content"></div>
|
|
|
+ <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</div>
|
|
@@ -123,13 +132,14 @@ import {
|
|
|
driverQueryCollection,
|
|
|
fleetList,
|
|
|
motorcadeDriver,
|
|
|
- fleetDriverSave
|
|
|
+ fleetDriverSave, telephone
|
|
|
} from "@/api/landTransportation";
|
|
|
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
|
return {
|
|
|
+ key:0,
|
|
|
form: {},
|
|
|
loading: false,
|
|
|
page: {
|
|
@@ -140,7 +150,8 @@ export default {
|
|
|
},
|
|
|
roleName: localStorage.getItem("roleName").split(',')[0],
|
|
|
goodsList: [],
|
|
|
- entrustOptionTwoT: {
|
|
|
+ entrustOptionTwoT: {},
|
|
|
+ optionList: {
|
|
|
stripe: true,
|
|
|
align: 'center',
|
|
|
menuAlign: 'center',
|
|
@@ -151,8 +162,9 @@ export default {
|
|
|
cancelBtn: false,
|
|
|
editBtn: false,
|
|
|
addRowBtn: false,
|
|
|
- searchMenuPosition: "right",
|
|
|
- searchMenuSpan: 6,
|
|
|
+ searchIcon: true,
|
|
|
+ searchIndex: 2,
|
|
|
+ searchSpan: 8,
|
|
|
height: "auto",
|
|
|
showSummary: true,
|
|
|
summaryText: "合计",
|
|
@@ -178,6 +190,7 @@ export default {
|
|
|
overHidden: true,
|
|
|
width: 200,
|
|
|
type: 'select',
|
|
|
+ index: 1,
|
|
|
dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
|
|
|
props: {
|
|
|
label: "dictValue",
|
|
@@ -189,6 +202,7 @@ export default {
|
|
|
label: '车队',
|
|
|
width: 200,
|
|
|
search: true,
|
|
|
+ index: 2,
|
|
|
type: 'select',
|
|
|
cascader: ['plateNo'],
|
|
|
overHidden: true,
|
|
@@ -201,12 +215,27 @@ export default {
|
|
|
}, {
|
|
|
label: '尺寸箱型',
|
|
|
width: 100,
|
|
|
+ index: 3,
|
|
|
search: true,
|
|
|
overHidden: true,
|
|
|
- prop: 'ctnType'
|
|
|
+ prop: 'ctnType',
|
|
|
+ type: 'select',
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ },
|
|
|
+ }, {
|
|
|
+ label: '提单号',
|
|
|
+ width: 100,
|
|
|
+ index: 3,
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ prop: 'billNo'
|
|
|
}, {
|
|
|
label: '箱量',
|
|
|
width: 50,
|
|
|
+ index: 4,
|
|
|
overHidden: true,
|
|
|
prop: 'ctnQuantity'
|
|
|
}, {
|
|
@@ -215,15 +244,18 @@ export default {
|
|
|
prop: 'landWeight',
|
|
|
controls: false,
|
|
|
overHidden: true,
|
|
|
+ index: 5,
|
|
|
precision: 6,
|
|
|
type: 'number'
|
|
|
}, {
|
|
|
label: '车号',
|
|
|
width: 150,
|
|
|
cell: true,
|
|
|
+ search: true,
|
|
|
+ index: 6,
|
|
|
prop: 'vehicleId',
|
|
|
overHidden: true,
|
|
|
- filterable:true,
|
|
|
+ filterable: true,
|
|
|
cascader: ['driverId'],
|
|
|
type: 'select',
|
|
|
dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
|
|
@@ -232,7 +264,6 @@ export default {
|
|
|
value: "id"
|
|
|
},
|
|
|
change: (data) => {
|
|
|
- console.log(data)
|
|
|
fleetList().then(res => {
|
|
|
for (let item in res.data.data) {
|
|
|
if (data.value === res.data.data[item].id) {
|
|
@@ -250,7 +281,8 @@ export default {
|
|
|
// prop: 'driverId'
|
|
|
overHidden: true,
|
|
|
cell: true,
|
|
|
- filterable:true,
|
|
|
+ filterable: true,
|
|
|
+ index: 7,
|
|
|
prop: 'driverId',
|
|
|
type: 'select',
|
|
|
dicUrl: "/api/blade-client/land-driver/driver-list?vehicleId={{key}}",
|
|
@@ -258,42 +290,161 @@ export default {
|
|
|
label: "name",
|
|
|
value: "id"
|
|
|
},
|
|
|
+ change: (data) => {
|
|
|
+ telephone().then(res => {
|
|
|
+ for (let item in res.data.data) {
|
|
|
+ if (data.value === res.data.data[item].id) {
|
|
|
+ this.goodsList[data.index].tel = res.data.data[item].tel
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}, {
|
|
|
label: '电话',
|
|
|
overHidden: true,
|
|
|
width: 160,
|
|
|
+ search: true,
|
|
|
cell: true,
|
|
|
+ index: 8,
|
|
|
prop: 'tel'
|
|
|
}, {
|
|
|
- label: '陆运费(D)',
|
|
|
+ label: '货物名称',
|
|
|
overHidden: true,
|
|
|
- prop: 'landAmountD'
|
|
|
+ width: 160,
|
|
|
+ search: true,
|
|
|
+ index: 9,
|
|
|
+ prop: 'goods'
|
|
|
}, {
|
|
|
- label: '陆运费(C)',
|
|
|
+ label: '箱号',
|
|
|
overHidden: true,
|
|
|
- cell: true,
|
|
|
- prop: 'landAmountC'
|
|
|
+ width: 160,
|
|
|
+ search: true,
|
|
|
+ prop: 'ctnNo'
|
|
|
}, {
|
|
|
- label: '委托备注',
|
|
|
+ label: '场站',
|
|
|
+ prop: 'station',
|
|
|
overHidden: true,
|
|
|
- prop: 'remarks'
|
|
|
+ index: 10,
|
|
|
+ width: 140,
|
|
|
+ search: true,
|
|
|
}, {
|
|
|
- label: '车队备注',
|
|
|
- cell: true,
|
|
|
+ label: '到厂时间',
|
|
|
+ prop: 'arrivalTime',
|
|
|
overHidden: true,
|
|
|
- prop: 'fleetRemarks'
|
|
|
+ type: "date",
|
|
|
+ searchRange: true,
|
|
|
+ defaultTime: ['00:00:00', '23:59:59'],
|
|
|
+ format: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ index: 11,
|
|
|
+ width: 140,
|
|
|
+ search: true,
|
|
|
}, {
|
|
|
- label: '司机备注',
|
|
|
+ label: '制单日期',
|
|
|
overHidden: true,
|
|
|
- prop: 'driverRemarks'
|
|
|
- }
|
|
|
+ prop: 'createTime',
|
|
|
+ type: "date",
|
|
|
+ searchRange: true,
|
|
|
+ defaultTime: ['00:00:00', '23:59:59'],
|
|
|
+ format: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ index: 12,
|
|
|
+ width: 140,
|
|
|
+ search: true,
|
|
|
+ }, {
|
|
|
+ label: '船名航次',
|
|
|
+ prop: 'factory',
|
|
|
+ overHidden: true,
|
|
|
+ index: 13,
|
|
|
+ width: 140,
|
|
|
+ search: true,
|
|
|
+ }, {
|
|
|
+ label: '路线',
|
|
|
+ index: 14,
|
|
|
+ width: 160,
|
|
|
+ search: true,
|
|
|
+ prop: 'addressDetail'
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '陆运费(D)',
|
|
|
+ // overHidden: true,
|
|
|
+ // prop: 'landAmountD'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '陆运费(C)',
|
|
|
+ overHidden: true,
|
|
|
+ index: 15,
|
|
|
+ cell: true,
|
|
|
+ prop: 'landAmountC'
|
|
|
+ }, {
|
|
|
+ label: '委托备注',
|
|
|
+ overHidden: true,
|
|
|
+ index: 16,
|
|
|
+ prop: 'remarks'
|
|
|
+ }, {
|
|
|
+ label: '车队备注',
|
|
|
+ cell: true,
|
|
|
+ index: 17,
|
|
|
+ overHidden: true,
|
|
|
+ prop: 'fleetRemarks'
|
|
|
+ }, {
|
|
|
+ label: '司机备注',
|
|
|
+ overHidden: true,
|
|
|
+ index: 8,
|
|
|
+ prop: 'driverRemarks'
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
totalData: {},
|
|
|
activeName: ''
|
|
|
}
|
|
|
},
|
|
|
+ async created() {
|
|
|
+ this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(87), this.optionList);
|
|
|
+ this.key++
|
|
|
+ let i = 0;
|
|
|
+ this.entrustOptionTwoT.column.forEach(item => {
|
|
|
+ if (item.search) i++
|
|
|
+ })
|
|
|
+ if (i % 3 !== 0) {
|
|
|
+ const num = 3 - Number(i % 3)
|
|
|
+ this.entrustOptionTwoT.searchMenuSpan = num * 8;
|
|
|
+ this.entrustOptionTwoT.searchMenuPosition = "right";
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumn() {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(87), this.entrustOptionTwoT);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumn() {
|
|
|
+ this.entrustOptionTwoT = this.optionList;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(87), this.optionList);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获得高度
|
|
|
+ searchCriteriaSwitch(type) {
|
|
|
+ if (type) {
|
|
|
+ this.entrustOptionTwoT.height = this.entrustOptionTwoT.height - 184
|
|
|
+ } else {
|
|
|
+ this.entrustOptionTwoT.height = this.entrustOptionTwoT.height + 184
|
|
|
+ }
|
|
|
+ this.$refs.crud.getTableHeight()
|
|
|
+ },
|
|
|
//箱信息保存
|
|
|
rowSave(row, index, done, loading) {
|
|
|
done()
|
|
@@ -323,6 +474,7 @@ export default {
|
|
|
driverQueryCollection(queryParams).then(res => {
|
|
|
this.goodsList = res.data.data.records
|
|
|
this.page.total = res.data.data.total
|
|
|
+ this.entrustOptionTwoT.height = window.innerHeight - 365;
|
|
|
}).finally(() => {
|
|
|
this.loading = false;
|
|
|
})
|
|
@@ -330,11 +482,11 @@ export default {
|
|
|
//箱信息保存
|
|
|
rowSaveT(row, index, done, loading) {
|
|
|
if (row.$cellEdit) {
|
|
|
- fleetDriverSave(row).then(res=>{
|
|
|
+ fleetDriverSave(row).then(res => {
|
|
|
this.$message.success("保存成功");
|
|
|
})
|
|
|
}
|
|
|
- this.$refs.crudContact.rowCell(row, index)
|
|
|
+ this.$refs.crud.rowCell(row, index)
|
|
|
},
|
|
|
//切换订单状态
|
|
|
handleClick(tab) {
|
|
@@ -381,6 +533,9 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ ToBreak (val) {
|
|
|
+ if (val)return val.replace('\n', '<br/>')
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|