From 5f5d9c32b7c81b6d92c2daa191182cdada071a49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com>
Date: Mon, 6 Mar 2023 17:58:13 +0800
Subject: [PATCH] 3/6
---
src/views/main/BookingTemplate/index.vue | 208 +++++++++++++++++------
src/views/main/EDI/addForm.vue | 160 ++++++++++-------
src/views/main/EDI/editForm.vue | 139 +++++++--------
src/views/main/EDI/index.vue | 41 +++--
4 files changed, 352 insertions(+), 196 deletions(-)
diff --git a/src/views/main/BookingTemplate/index.vue b/src/views/main/BookingTemplate/index.vue
index f5c772c..b789ec2 100644
--- a/src/views/main/BookingTemplate/index.vue
+++ b/src/views/main/BookingTemplate/index.vue
@@ -4,24 +4,28 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
-
-
-
- {{ item.name }}
-
-
-
-
-
+
- 查询
- (queryParam = {})">重置
+ 查询
+ 重置
@@ -29,11 +33,61 @@
-
+
+
+ 新增收发通模板
+
+
+
+
+
+
+
+ {{ FnRType(row[item.dataIndex]) }}
+ {{ row[item.dataIndex] }}
+
+
+
+
+ 编辑
+ {
+ BookingTemplateDelete(row)
+ }
+ "
+ >
+ 删除
+
+
+
+
+
+
+
@@ -70,6 +124,7 @@ export default {
data() {
return {
queryParam: {},
+ loading: false,
columns: [
{
title: '代码',
@@ -79,8 +134,7 @@ export default {
{
title: '类型',
align: 'center',
- dataIndex: 'type',
- scopedSlots: { customRender: 'typescopedSlots' }
+ dataIndex: 'type'
},
{
title: '创建人',
@@ -105,44 +159,94 @@ export default {
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// 加载数据方法 必须为 Promise 对象
- loadData: parameter => {
- return BookingTemplatePage(Object.assign(parameter, this.queryParam)).then(res => {
- return res.data
- })
- },
+ // loadData: parameter => {
+ // this.loading = true
+ // return BookingTemplatePage(Object.assign(parameter, this.queryParam)).then(res => {
+ // this.loading = false
+ // return res.data
+ // })
+ // },
+ loadData: [],
typeData: [],
selectedRowKeys: [],
selectedRows: []
}
},
created() {
- this.columns.push({
- title: '操作',
- width: '150px',
- dataIndex: 'action',
- scopedSlots: { customRender: 'action' }
- })
-
- this.typeData = [
- {
- code: 10,
- name: '收货人'
- },
- {
- code: 20,
- name: '发货人'
- },
- {
- code: 30,
- name: '通知人'
- },
- {
- code: 40,
- name: '第二通知人'
- }
- ]
+ this.init()
},
methods: {
+ FnRType(e) {
+ let fn = e => {
+ let Rdata = ''
+ this.typeData.forEach(item => {
+ if (item.code == e) {
+ Rdata = item.name
+ }
+ })
+ return Rdata
+ }
+ let RData = ''
+ if (e.split(']').length == 1) {
+ RData = fn(e.split(']')[0])
+ } else {
+ e.split(']').forEach(item => {
+ if (item) {
+ if (RData == '') {
+ RData = fn(item.split('[')[1])
+ } else {
+ RData = `${RData},${fn(item.split('[')[1])}`
+ }
+ }
+ })
+ }
+
+ return RData
+ },
+ init() {
+ Object.assign(this.$data, this.$options.data())
+ // this.columns.push({
+ // title: '操作',
+ // width: '150px',
+ // dataIndex: 'action',
+ // scopedSlots: { customRender: 'action' }
+ // })
+
+ this.typeData = [
+ {
+ code: 10,
+ name: '收货人'
+ },
+ {
+ code: 20,
+ name: '发货人'
+ },
+ {
+ code: 30,
+ name: '通知人'
+ },
+ {
+ code: 40,
+ name: '第二通知人'
+ }
+ ]
+ this.FnGetData()
+ },
+ FnGetData() {
+ this.loading = true
+ BookingTemplatePage(this.queryParam).then(res => {
+ this.loadData = res.data.rows
+ this.loading = false
+ this.queryParam.currentPage = res.data.pageNo
+ this.queryParam.pageSize = res.data.pageSize
+ this.queryParam.totalResult = res.data.totalRows
+ })
+ },
+ handlePageChange({ currentPage, pageSize }) {
+ this.queryParam.pageNo = currentPage
+ this.queryParam.pageSize = pageSize
+ this.FnGetData()
+ },
/**
* 查询参数组装
*/
@@ -154,14 +258,14 @@ export default {
BookingTemplateDelete(record).then(res => {
if (res.success) {
this.$message.success('删除成功')
- this.$refs.table.refresh()
+ this.FnGetData()
} else {
this.$message.error('删除失败') // + res.message
}
})
},
handleOk() {
- this.$refs.table.refresh()
+ this.init()
},
onSelectChange(selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys
diff --git a/src/views/main/EDI/addForm.vue b/src/views/main/EDI/addForm.vue
index 578c9fe..f141b4b 100644
--- a/src/views/main/EDI/addForm.vue
+++ b/src/views/main/EDI/addForm.vue
@@ -10,6 +10,43 @@
+ 基础信息
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ {{ item.cnName }}
+
+
+
+
+ 发送方
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+ 接收方
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+ 收发通
-
-
+
+
@@ -127,48 +167,11 @@
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
- {{ item.cnName }}
-
-
-
-
@@ -241,6 +244,37 @@ export default {
}
]
},
+ copy(record) {
+ this.visible = true
+ const typeOption = this.$options
+ this.typeData = typeOption.filters['dictData']('edi_type')
+ setTimeout(() => {
+ this.form.setFieldsValue({
+ edicode: record.edicode,
+ serverip: record.serverip,
+ foldername: record.foldername,
+ username: record.username,
+ password: record.password,
+ sendname: record.sendname,
+ sendcode: record.sendcode,
+ sendattn: record.sendattn,
+ sendtel: record.sendtel,
+ sendemail: record.sendemail,
+ receivecode: record.receivecode,
+ receiveemail: record.receiveemail,
+ receiveop: record.receiveop,
+ receivesale: record.receivesale,
+ receivedept: record.receivedept,
+ shippertel: record.shippertel,
+ consigneetel: record.consigneetel,
+ notifypartytel: record.notifypartytel,
+ tenantName: record.tenantName,
+ carrierid: record.carrierid,
+ sendcompanycode: record.sendcompanycode,
+ sendsubcompanycode: record.sendsubcompanycode
+ })
+ }, 100)
+ },
/**
* 提交表单
*/
diff --git a/src/views/main/EDI/editForm.vue b/src/views/main/EDI/editForm.vue
index 296caf4..aac8788 100644
--- a/src/views/main/EDI/editForm.vue
+++ b/src/views/main/EDI/editForm.vue
@@ -10,15 +10,52 @@
+ 基础信息
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ {{ item.cnName }}
+
+
+
+
- {{
- item.name
- }}
+
+ {{ item.name }}
+
@@ -38,8 +75,7 @@
/>
-
-
+
+ 发送方
-
-
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+ 接收方
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+ 收发通
-
-
+
+
@@ -127,48 +167,11 @@
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
- {{ item.cnName }}
-
-
-
-
diff --git a/src/views/main/EDI/index.vue b/src/views/main/EDI/index.vue
index 1cbf24e..d7749fb 100644
--- a/src/views/main/EDI/index.vue
+++ b/src/views/main/EDI/index.vue
@@ -91,6 +91,7 @@
+ 复制
编辑
{
+ this.SysTenantData = res.data.rows
+ })
+ this.EdiNameData = this.$options.filters['dictData']('edi_type')
+ commondbCarrierlist().then(res => {
+ this.CodeData = res.data
+ })
},
handlePageChange({ currentPage, pageSize }) {
this.queryParam.pageNo = currentPage
@@ -397,4 +406,10 @@ button {
height: 45px;
overflow: hidden;
}
+.ant-select-selection {
+ height: 32px;
+}
+.ant-input:placeholder-shown {
+ height: 32px;
+}