|
|
@ -165,7 +165,7 @@
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
</a-card>
|
|
|
|
</a-card>
|
|
|
|
<a-modal v-model="ExcelVisible" width="800px" title="详细设置">
|
|
|
|
<a-modal v-model="ExcelVisible" width="1100px" title="详细设置">
|
|
|
|
<vxe-toolbar>
|
|
|
|
<vxe-toolbar>
|
|
|
|
<template #buttons>
|
|
|
|
<template #buttons>
|
|
|
|
<vxe-button @click="insertEvent(-1)">添加一行</vxe-button>
|
|
|
|
<vxe-button @click="insertEvent(-1)">添加一行</vxe-button>
|
|
|
@ -184,28 +184,27 @@
|
|
|
|
:edit-config="{ trigger: 'click', mode: 'row', icon: 'vxe-icon-edit', showStatus: true }"
|
|
|
|
:edit-config="{ trigger: 'click', mode: 'row', icon: 'vxe-icon-edit', showStatus: true }"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
|
|
<vxe-column field="fieldName" title="字段名称" :edit-render="{}">
|
|
|
|
<vxe-column field="Ffield" title="对象名" :edit-render="{}">
|
|
|
|
<template #edit="{ row }">
|
|
|
|
<template #edit="{ row }">
|
|
|
|
<!-- <vxe-input v-model="row.field" type="text"></vxe-input> -->
|
|
|
|
<vxe-select v-model="row.Ffield" style="width: 100%" placeholder="请选择对象名">
|
|
|
|
<!-- <a-select v-model="row.field" style="width: 100%" placeholder="请选择分类" allow-clear>
|
|
|
|
|
|
|
|
<a-select-option v-for="(item, index) in fieldData" :key="index" :value="item.name">
|
|
|
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
|
|
|
</a-select-option>
|
|
|
|
|
|
|
|
</a-select> -->
|
|
|
|
|
|
|
|
<!-- <vxe-select v-model="row.field" style="width: 100%" placeholder="请选择分类">
|
|
|
|
|
|
|
|
<vxe-option
|
|
|
|
<vxe-option
|
|
|
|
v-for="(item, index) in fieldData"
|
|
|
|
v-for="(item, index) in fieldList"
|
|
|
|
:key="index"
|
|
|
|
:key="index"
|
|
|
|
:value="item.name"
|
|
|
|
:value="item.name"
|
|
|
|
:label="item.name"
|
|
|
|
:label="item.name"
|
|
|
|
></vxe-option>
|
|
|
|
></vxe-option>
|
|
|
|
</vxe-select> -->
|
|
|
|
</vxe-select>
|
|
|
|
<vxe-pulldown v-model="visible1">
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-column>
|
|
|
|
|
|
|
|
<vxe-column field="fieldName" title="字段名称" width="300" :edit-render="{}">
|
|
|
|
|
|
|
|
<template #edit="{ row }">
|
|
|
|
|
|
|
|
<vxe-pulldown v-model="visible1" style="width: 100%">
|
|
|
|
<template #default>
|
|
|
|
<template #default>
|
|
|
|
<vxe-input
|
|
|
|
<vxe-input
|
|
|
|
v-model="row.fieldName"
|
|
|
|
v-model="row.fieldName"
|
|
|
|
placeholder="请选择分类"
|
|
|
|
placeholder="请选择字段名称"
|
|
|
|
@focus="focusEvent1"
|
|
|
|
:disabled="!row.Ffield"
|
|
|
|
|
|
|
|
@focus="focusEvent1(row)"
|
|
|
|
@keyup="keyupEvent1(row)"
|
|
|
|
@keyup="keyupEvent1(row)"
|
|
|
|
></vxe-input>
|
|
|
|
></vxe-input>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -259,12 +258,11 @@ import addForm from './addForm.vue'
|
|
|
|
import editForm from './editForm.vue'
|
|
|
|
import editForm from './editForm.vue'
|
|
|
|
import columnSetting from '@/components/tableColumnSetting'
|
|
|
|
import columnSetting from '@/components/tableColumnSetting'
|
|
|
|
const columns = [
|
|
|
|
const columns = [
|
|
|
|
// {
|
|
|
|
{
|
|
|
|
// title: '类型',
|
|
|
|
title: '类型',
|
|
|
|
// align: 'center',
|
|
|
|
align: 'center',
|
|
|
|
// dataIndex: 'CateName'
|
|
|
|
dataIndex: 'CateName'
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '租户名称',
|
|
|
|
title: '租户名称',
|
|
|
|
align: 'center',
|
|
|
|
align: 'center',
|
|
|
@ -304,8 +302,15 @@ export default {
|
|
|
|
loadData: [],
|
|
|
|
loadData: [],
|
|
|
|
ExcelPid: '',
|
|
|
|
ExcelPid: '',
|
|
|
|
fieldData: [],
|
|
|
|
fieldData: [],
|
|
|
|
|
|
|
|
fieldData1: [],
|
|
|
|
visible1: false,
|
|
|
|
visible1: false,
|
|
|
|
SysTenantData: []
|
|
|
|
SysTenantData: [],
|
|
|
|
|
|
|
|
fieldList: [
|
|
|
|
|
|
|
|
{ code: 'order', name: '主单' },
|
|
|
|
|
|
|
|
{ code: 'ctn', name: '箱信息' },
|
|
|
|
|
|
|
|
{ code: 'edi', name: 'edi信息' },
|
|
|
|
|
|
|
|
{ code: 'userinfo', name: '用户信息' }
|
|
|
|
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -323,27 +328,57 @@ export default {
|
|
|
|
this.SysTenantData = res.data.rows
|
|
|
|
this.SysTenantData = res.data.rows
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
focusEvent1() {
|
|
|
|
focusEvent1(row) {
|
|
|
|
this.visible1 = false
|
|
|
|
this.visible1 = false
|
|
|
|
|
|
|
|
this.fieldData = []
|
|
|
|
|
|
|
|
let fieldData = []
|
|
|
|
|
|
|
|
Object.keys(this.data1).forEach(ele => {
|
|
|
|
|
|
|
|
this.fieldList.forEach(e => {
|
|
|
|
|
|
|
|
if (e.name == row.Ffield) {
|
|
|
|
|
|
|
|
if (ele == e.code) {
|
|
|
|
|
|
|
|
Object.keys(this.data1[ele]).forEach(item => {
|
|
|
|
|
|
|
|
fieldData.push({
|
|
|
|
|
|
|
|
code: item,
|
|
|
|
|
|
|
|
name: this.data1[ele][item]
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.fieldData = fieldData
|
|
|
|
|
|
|
|
this.fieldData1 = fieldData
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
this.visible1 = true
|
|
|
|
this.visible1 = true
|
|
|
|
console.log('点击')
|
|
|
|
console.log('点击')
|
|
|
|
}, 200)
|
|
|
|
}, 200)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
keyupEvent1(data) {
|
|
|
|
keyupEvent1(data) {
|
|
|
|
this.fieldData = data.fieldName ? this.data1.filter(item => item.name.indexOf(data.fieldName) > -1) : this.data1
|
|
|
|
this.fieldData = data.fieldName
|
|
|
|
|
|
|
|
? this.fieldData1.filter(item => item.name.indexOf(data.fieldName) > -1)
|
|
|
|
|
|
|
|
: this.fieldData1
|
|
|
|
},
|
|
|
|
},
|
|
|
|
selectEvent1(item, data) {
|
|
|
|
selectEvent1(item, data) {
|
|
|
|
data.fieldName = item.name
|
|
|
|
data.fieldName = item.name
|
|
|
|
data.field = item.code
|
|
|
|
data.field = item.code
|
|
|
|
this.visible1 = false
|
|
|
|
this.visible1 = false
|
|
|
|
this.fieldData = this.data1
|
|
|
|
this.fieldData = this.fieldData1
|
|
|
|
},
|
|
|
|
},
|
|
|
|
saveEvent() {
|
|
|
|
saveEvent() {
|
|
|
|
const $table = this.$refs.xTable
|
|
|
|
const $table = this.$refs.xTable
|
|
|
|
const { insertRecords, removeRecords, updateRecords } = $table.getRecordset()
|
|
|
|
const { insertRecords, removeRecords, updateRecords } = $table.getRecordset()
|
|
|
|
console.log(this.tableData, insertRecords, removeRecords)
|
|
|
|
let tableData = []
|
|
|
|
let children = [...this.tableData, ...insertRecords]
|
|
|
|
this.tableData.forEach(item => {
|
|
|
|
|
|
|
|
this.fieldList.forEach(item2 => {
|
|
|
|
|
|
|
|
if (item.Ffield == item2.name) {
|
|
|
|
|
|
|
|
tableData.push({
|
|
|
|
|
|
|
|
...item,
|
|
|
|
|
|
|
|
field: `${item2.code}.${item.field}`
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
let children = [...tableData, ...insertRecords]
|
|
|
|
if (removeRecords.length) {
|
|
|
|
if (removeRecords.length) {
|
|
|
|
children.forEach((item, index) => {
|
|
|
|
children.forEach((item, index) => {
|
|
|
|
removeRecords.forEach(ele => {
|
|
|
|
removeRecords.forEach(ele => {
|
|
|
@ -375,15 +410,38 @@ export default {
|
|
|
|
await $table.setActiveCell(newRow, 'name')
|
|
|
|
await $table.setActiveCell(newRow, 'name')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
FnExcel(data) {
|
|
|
|
FnExcel(data) {
|
|
|
|
console.log(data)
|
|
|
|
|
|
|
|
this.ExcelPid = data.id
|
|
|
|
this.ExcelPid = data.id
|
|
|
|
this.tableData = []
|
|
|
|
this.tableData = []
|
|
|
|
BookingTemplateBookingExcelTemplateList({ id: this.ExcelPid }).then(res => {
|
|
|
|
BookingTemplateBookingExcelTemplateList({ id: this.ExcelPid }).then(res => {
|
|
|
|
res.data.forEach(item => {
|
|
|
|
res.data.forEach(item => {
|
|
|
|
this.data1.forEach(ele => {
|
|
|
|
this.fieldList.forEach(item2 => {
|
|
|
|
if (item.field == ele.code) {
|
|
|
|
if (item2.code == item.field.split('.')[0]) {
|
|
|
|
item.fieldName = ele.name
|
|
|
|
item.Ffield = item2.name
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
item.field = item.field.split('.')[1]
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
// fieldName
|
|
|
|
|
|
|
|
Object.keys(this.data1).forEach(item => {
|
|
|
|
|
|
|
|
res.data.forEach(item2 => {
|
|
|
|
|
|
|
|
this.fieldList.forEach(ele => {
|
|
|
|
|
|
|
|
if (ele.name == item2.Ffield) {
|
|
|
|
|
|
|
|
if (ele.code == item) {
|
|
|
|
|
|
|
|
console.log(item, ele, item2)
|
|
|
|
|
|
|
|
console.log(this.data1, this.data1[item], 1111)
|
|
|
|
|
|
|
|
Object.keys(this.data1[item]).forEach(e => {
|
|
|
|
|
|
|
|
if (e.split('.')[1] == item2.field) {
|
|
|
|
|
|
|
|
item2.fieldName = this.data1[item][e]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
// this.data1[item].forEach(e => {
|
|
|
|
|
|
|
|
// if (e.code == item2.field) {
|
|
|
|
|
|
|
|
// item2.fieldName = e.name
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.tableData = res.data
|
|
|
|
this.tableData = res.data
|
|
|
@ -402,7 +460,6 @@ export default {
|
|
|
|
return Text
|
|
|
|
return Text
|
|
|
|
},
|
|
|
|
},
|
|
|
|
FnDFile(Data) {
|
|
|
|
FnDFile(Data) {
|
|
|
|
console.log(Data)
|
|
|
|
|
|
|
|
window.open(` http://60.209.125.238:25805/BookingPrintTemplate/download?id=${Data.id}`, '_blank')
|
|
|
|
window.open(` http://60.209.125.238:25805/BookingPrintTemplate/download?id=${Data.id}`, '_blank')
|
|
|
|
|
|
|
|
|
|
|
|
// BookingPrintTemplateDownload({ id: Data.id }).then(res => {
|
|
|
|
// BookingPrintTemplateDownload({ id: Data.id }).then(res => {
|
|
|
@ -461,17 +518,35 @@ export default {
|
|
|
|
this.ColumnsQuery.push({ ...item, checked: true })
|
|
|
|
this.ColumnsQuery.push({ ...item, checked: true })
|
|
|
|
})
|
|
|
|
})
|
|
|
|
BookingOrderGetFieldName().then(res => {
|
|
|
|
BookingOrderGetFieldName().then(res => {
|
|
|
|
let Arr = []
|
|
|
|
console.log(res.data)
|
|
|
|
Object.keys(res.data[0]).forEach(ele => {
|
|
|
|
this.data1 = res.data
|
|
|
|
Arr.push({ code: ele, name: res.data[0][ele] })
|
|
|
|
// let fieldList = [
|
|
|
|
})
|
|
|
|
// { code: 'order', name: '主表' },
|
|
|
|
|
|
|
|
// { code: 'ctn', name: 'ctn' },
|
|
|
|
|
|
|
|
// { code: 'edi', name: 'edi' },
|
|
|
|
|
|
|
|
// { code: 'userinfo', name: 'userinfo' }
|
|
|
|
|
|
|
|
// ]
|
|
|
|
|
|
|
|
// Object.keys(res.data).forEach(ele => {
|
|
|
|
|
|
|
|
// this.fieldListData.forEach(item => {
|
|
|
|
|
|
|
|
// if (ele == item.code) {
|
|
|
|
|
|
|
|
// fieldList.push({
|
|
|
|
|
|
|
|
// code: ele,
|
|
|
|
|
|
|
|
// name: item.name
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// this.fieldList = fieldList
|
|
|
|
|
|
|
|
// Object.keys(res.data[0]).forEach(ele => {
|
|
|
|
|
|
|
|
// Arr.push({ code: ele, name: res.data[0][ele] })
|
|
|
|
|
|
|
|
// })
|
|
|
|
// res.data.forEach(item => {
|
|
|
|
// res.data.forEach(item => {
|
|
|
|
// Object.keys(item).forEach(ele => {
|
|
|
|
// Object.keys(item).forEach(ele => {
|
|
|
|
// Arr.push({ code: ele, name: item[ele] })
|
|
|
|
// Arr.push({ code: ele, name: item[ele] })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
this.fieldData = Arr
|
|
|
|
// this.fieldData = Arr
|
|
|
|
this.data1 = Arr
|
|
|
|
// this.data1 = Arr
|
|
|
|
})
|
|
|
|
})
|
|
|
|
DjyCustomerGet({ type: 'printing_list_col' }).then(res => {
|
|
|
|
DjyCustomerGet({ type: 'printing_list_col' }).then(res => {
|
|
|
|
if (res.data && JSON.parse(res.data.configJson).length) {
|
|
|
|
if (res.data && JSON.parse(res.data.configJson).length) {
|
|
|
|