复制项页面

master
sunzehua 8 months ago
parent d00b96672d
commit 2860badd7d

12
.env

@ -1,9 +1,9 @@
NODE_ENV=production NODE_ENV=production
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
# VUE_APP_TYPE = 'customer' # VUE_APP_TYPE = 'customer'
VUE_APP_TYPE = 'hechuan' # VUE_APP_TYPE = 'hechuan'
# VUE_APP_TYPE = 'yunyingduan' # VUE_APP_TYPE = 'yunyingduan'
# VUE_APP_TYPE = 'gangjie' VUE_APP_TYPE = 'gangjie'
# 打包部署的三个端 客户端customer 和川端hechuan 运营端djy # 打包部署的三个端 客户端customer 和川端hechuan 运营端djy
# 和川大简云正式 # 和川大简云正式
@ -11,8 +11,8 @@ VUE_APP_TYPE = 'hechuan'
# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 # VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345
# 和川大简云测试 # 和川大简云测试
VUE_APP_API_BASE_URL=http://60.209.125.238:35100 # VUE_APP_API_BASE_URL=http://60.209.125.238:35100
VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 # VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100
# 客户端测试 # 客户端测试
# VUE_APP_API_BASE_URL=http://60.209.125.238:30813 # VUE_APP_API_BASE_URL=http://60.209.125.238:30813
@ -23,8 +23,8 @@ VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100
# VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:30814 # VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:30814
# 港捷 # 港捷
# VUE_APP_API_BASE_URL=http://118.190.144.189:5001 VUE_APP_API_BASE_URL=http://118.190.144.189:5001
# VUE_APP_SOCKET_BASE_URL=http://118.190.144.189:5001 VUE_APP_SOCKET_BASE_URL=http://118.190.144.189:5001
# 客户端正式 # 客户端正式
# VUE_APP_API_BASE_URL=http://118.190.144.189:6001 # VUE_APP_API_BASE_URL=http://118.190.144.189:6001

@ -1,9 +1,9 @@
NODE_ENV=development NODE_ENV=development
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
# VUE_APP_TYPE = 'customer' # VUE_APP_TYPE = 'customer'
VUE_APP_TYPE = 'hechuan' # VUE_APP_TYPE = 'hechuan'
# VUE_APP_TYPE = 'yunyingduan' # VUE_APP_TYPE = 'yunyingduan'
# VUE_APP_TYPE = 'gangjie' VUE_APP_TYPE = 'gangjie'
# 打包部署的三个端 客户端customer 和川端hechuan 运营端yunyingduan # 打包部署的三个端 客户端customer 和川端hechuan 运营端yunyingduan
# 和川大简云正式 # 和川大简云正式
@ -11,8 +11,8 @@ VUE_APP_TYPE = 'hechuan'
# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 # VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345
# 和川大简云测试 # 和川大简云测试
VUE_APP_API_BASE_URL=http://60.209.125.238:35100 # VUE_APP_API_BASE_URL=http://60.209.125.238:35100
VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 # VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100
# 客户端测试 # 客户端测试
# VUE_APP_API_BASE_URL=http://60.209.125.238:30813 # VUE_APP_API_BASE_URL=http://60.209.125.238:30813
@ -26,8 +26,8 @@ VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100
# VUE_APP_SOCKET_BASE_URL=http://192.168.0.80:7373/ # VUE_APP_SOCKET_BASE_URL=http://192.168.0.80:7373/
# 港捷 # 港捷
# VUE_APP_API_BASE_URL=http://118.190.144.189:5001 VUE_APP_API_BASE_URL=http://118.190.144.189:5001
# VUE_APP_SOCKET_BASE_URL=http://118.190.144.189:5001 VUE_APP_SOCKET_BASE_URL=http://118.190.144.189:5001
# 运营端正式 # 运营端正式
# VUE_APP_API_BASE_URL=http://118.190.144.189:6002 # VUE_APP_API_BASE_URL=http://118.190.144.189:6002

@ -144,7 +144,8 @@ export default {
'setCodeCountryList', 'setCodeCountryList',
'setdpTreeList', 'setdpTreeList',
'setStatusDict', 'setStatusDict',
'setProjectDict' 'setProjectDict',
'setCopySet'
]), ]),
// //
setMenus() { setMenus() {
@ -183,6 +184,9 @@ export default {
this.setdpTreeList() this.setdpTreeList()
this.setStatusDict() this.setStatusDict()
this.setProjectDict() this.setProjectDict()
if (!localStorage.getItem('booking_form_copy')) {
this.setCopySet()
}
} }
} }
} }

@ -58,6 +58,7 @@ export default {
background-color: #ffffff; background-color: #ffffff;
background-image: url('../assets/login.jpg'); background-image: url('../assets/login.jpg');
background-attachment: fixed; background-attachment: fixed;
background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: top left; background-position: top left;
padding: 110px 0 144px; padding: 110px 0 144px;

@ -13,7 +13,7 @@ import {
GetEnableStatusDictTreeList, GetEnableStatusDictTreeList,
GetEnableProjectDictTreeList GetEnableProjectDictTreeList
} from '@/api/modular/main/BookingLedger' } from '@/api/modular/main/BookingLedger'
import { DjyTenantConfigGet } from '@/api/modular/main/TenantConfig'
const booking = { const booking = {
state: { state: {
inBookingDetailsSave: false, inBookingDetailsSave: false,
@ -191,6 +191,15 @@ const booking = {
}) })
}) })
}, },
setCopySet() {
DjyTenantConfigGet({ Type: 'booking_form_copy' }).then(res => {
if (res.code == 200) {
if (res.data) {
localStorage.setItem('booking_form_copy', res.data.configJson)
}
}
})
},
setStatusDict({ commit }, obj) { setStatusDict({ commit }, obj) {
return new Promise(resolve => { return new Promise(resolve => {
GetEnableStatusDictTreeList() GetEnableStatusDictTreeList()

@ -226,6 +226,9 @@ const user = {
Vue.ls.remove(DICT_TYPE_TREE_DATA) Vue.ls.remove(DICT_TYPE_TREE_DATA)
Vue.ls.remove('FIRSTFLAG') Vue.ls.remove('FIRSTFLAG')
localStorage.removeItem('formTableData'); localStorage.removeItem('formTableData');
localStorage.removeItem('bookingSetting');
localStorage.removeItem('booking_form_copy');
localStorage.removeItem('vesselinfoSetting');
}) })
}) })
}, },

@ -459,15 +459,12 @@ export default {
if (nVal == '1-1') { if (nVal == '1-1') {
document.querySelector('#tab1').checked = true document.querySelector('#tab1').checked = true
document.querySelector('#tab2').checked = false document.querySelector('#tab2').checked = false
document.querySelector('#tab3').checked = false
} }
if (nVal == '2-2') { if (nVal == '2-2') {
document.querySelector('#tab2').checked = true document.querySelector('#tab2').checked = true
document.querySelector('#tab1').checked = false document.querySelector('#tab1').checked = false
document.querySelector('#tab3').checked = false
} }
if (nVal == '3-3') { if (nVal == '3-3') {
document.querySelector('#tab3').checked = true
document.querySelector('#tab1').checked = false document.querySelector('#tab1').checked = false
document.querySelector('#tab2').checked = false document.querySelector('#tab2').checked = false
} }
@ -872,22 +869,22 @@ export default {
}) })
} }
if (this.isCopy && !$data.isCopy) { if (this.isCopy && !$data.isCopy) {
const arr = localStorage.getItem('booking_form_copy') ? JSON.parse(localStorage.getItem('booking_form_copy')) : []
const copyData = { const copyData = {
customername: $data.bookingDetails.customername, bookingEDIExt: {}
portloadid: $data.bookingDetails.portloadid,
carrierid: $data.bookingDetails.carrierid,
carrier: $data.bookingDetails.carrier,
portload: $data.bookingDetails.portload,
issueplace: $data.bookingDetails.issueplace,
prepardat: $data.bookingDetails.prepardat,
route: $data.bookingDetails.route,
shippingMethod: $data.bookingDetails.shippingMethod,
shipper: $data.bookingDetails.shipper,
consignee: $data.bookingDetails.consignee,
notifyparty: $data.bookingDetails.notifyparty,
goodsStatus: $data.bookingDetails.goodsStatus,
sale: $data.bookingDetails.sale
} }
arr.forEach(item => {
if (item.includes('bookingEDIExt')) {
const str = item.replace('bookingEDIExt.', '')
copyData.bookingEDIExt[str] = $data.bookingDetails.bookingEDIExt[str]
} else {
copyData[item] = $data.bookingDetails[item]
}
})
if (arr.includes('ctnall')) {
copyData.ctnInputs = $data.bookingDetails.ctnInputs
}
console.log($data)
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData } this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails)) this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
} else { } else {
@ -1312,18 +1309,20 @@ export default {
let newData = res.data let newData = res.data
if (this.$route.query.isCopy && !overSet) { if (this.$route.query.isCopy && !overSet) {
delete res.data.id delete res.data.id
const arr = localStorage.getItem('booking_form_copy') ? JSON.parse(localStorage.getItem('booking_form_copy')) : []
const copyData = { const copyData = {
customername: res.data.customername, bookingEDIExt: {}
portloadid: res.data.portloadid, }
portload: res.data.portload, arr.forEach(item => {
issueplace: res.data.issueplace, if (item.includes('bookingEDIExt')) {
prepardat: res.data.prepardat, const str = item.replace('bookingEDIExt.', '')
route: res.data.route, copyData.bookingEDIExt[str] = res.data.bookingEDIExt[str]
shippingMethod: res.data.shippingMethod, } else {
shipper: res.data.shipper, copyData[item] = res.data[item]
consignee: res.data.consignee, }
notifyparty: res.data.notifyparty, })
sale: res.data.sale if (arr.includes('ctnall')) {
copyData.ctnInputs = res.data.ctnInputs
} }
newData = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData } newData = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
} }

@ -0,0 +1,173 @@
[
{
"title": "基本信息",
"children": [
{ "name": "委托单位", "code": "customername","copyName":"customerid" },
{ "code": "customerid","noShow":true },
{ "name": "提单号", "code": "mblno" },
{ "name": "船公司", "code": "carrierid","copyName":"carrier" },
{ "code": "carrier","noShow":true },
{ "name": "订舱代理", "code": "forwarder","copyName":"forwarderid" },
{ "code": "forwarderid","noShow":true },
{ "name": "PO NO", "code": "pono" },
{ "name": "分提单号", "code": "hblno" },
{ "name": "订舱编号", "code": "custno" },
{ "name": "EP号", "code": "EPCode" },
{ "name": "运费协议号", "code": "contractno" },
{ "name": "真提单号", "code": "tmblno" },
{ "name": "船名", "code": "vessel" },
{ "name": "内部航次", "code": "voynoinner" },
{ "name": "航次/海关航次", "code": "voyno" },
{ "name": "开船日期", "code": "etd" },
{ "name": "是否占舱", "code": "zhanCangFlag" },
{ "name": "船司航线", "code": "lanename" },
{ "name": "船代", "code": "shipagency","copyName":"shipagencyid" },
{ "code": "shipagencyid","noShow":true },
{ "name": "航线", "code": "lineName" },
{ "name": "揽货人", "code": "sale","copyName":"saleid" },
{ "code": "saleid","noShow":true },
{ "name": "操作", "code": "op","copyName":"opid" },
{ "code": "opid","noShow":true },
{ "name": "单证", "code": "doc","copyName":"docid" },
{ "code": "docid","noShow":true },
{ "name": "客服", "code": "custservice","copyName":"custserviceid" },
{ "code": "custserviceid","noShow":true },
{ "name": "航线操作", "code": "route","copyName":"routeid" },
{ "code": "routeid","noShow":true },
{ "name": "航线管理", "code": "lineManage","copyName":"lineManageID" },
{ "code": "lineManageID","noShow":true },
{ "name": "单证备注", "code": "dzRemark" },
{ "name": "操作备注", "code": "czRemark" }
]
},
{
"title": "收发通信息",
"children": [
{ "name": "发货人", "code": "shipper" },
{ "name": "收货人", "code": "consignee" },
{ "name": "通知人", "code": "notifyparty" },
{ "name": "场站", "code": "yard","copyName":"yardid" },
{ "code": "yardid","noShow":true },
{ "name": "场站费自结", "code": "feeself" },
{ "name": "报关行", "code": "customser","copyName":"customserid" },
{ "code": "customserid","noShow":true },
{ "name": "车队", "code": "trucker","copyName":"truckerid" },
{ "code": "truckerid","noShow":true },
{ "name": "国外代理", "code": "agentname","copyName":"agentid" },
{ "code": "agentid","noShow":true },
{ "name": "仓库", "code": "warehouse","copyName":"warehouseID" },
{ "code": "warehouseID","noShow":true },
{ "name": "装运方式", "code": "shippingMethod" },
{ "name": "截港时间", "code": "closingdate" },
{ "name": "截单时间", "code": "closedocdate" },
{ "name": "VGM时间", "code": "closevgmdate" },
{ "name": "收货地代码", "code": "placereceiptid" },
{ "name": "收货地", "code": "placereceipt" },
{ "name": "装货港代码", "code": "portloadid" },
{ "name": "装货港", "code": "portload" },
{ "name": "中转港代码", "code": "transportid" },
{ "name": "中转港", "code": "transport" },
{ "name": "卸货港代码", "code": "portdischargeid" },
{ "name": "卸货港", "code": "portdischarge" },
{ "name": "目的地代码", "code": "destinationid" },
{ "name": "目的地", "code": "destination" },
{ "name": "交货地代码", "code": "placedeliveryid" },
{ "name": "交货地", "code": "placedelivery" },
{ "name": "件数", "code": "pkgs" },
{ "name": "包装", "code": "kindpkgs" },
{ "name": "毛重", "code": "kgs" },
{ "name": "尺寸", "code": "cbm" }
]
},
{
"title": "货物信息",
"children": [
{ "name": "Seal No.(封志号) Marks & Nos.(标记与号码)", "code": "marks" },
{ "name": "Description of Goods(包装种类与货名)", "code": "description" },
{ "name": "品名", "code": "goodsname","copyName":"goodscode" },
{ "code": "goodscode","noShow":true },
{ "name": "货物标志", "code": "cargoid" },
{ "name": "HS编码", "code": "hscode" }
]
},
{
"title": "签单信息",
"children": [
{ "name": "签单方式", "code": "issuetype" },
{ "name": "签单日期", "code": "issuedate" },
{ "name": "签单地点", "code": "issueplace" },
{ "name": "签单地代码", "code": "issueplaceid" },
{ "name": "提单份数", "code": "nobill" },
{ "name": "副本份数", "code": "copynobill" },
{ "name": "预付地点", "code": "prepardat","copyName":"prepardatid" },
{ "code": "prepardatid","noShow":true },
{ "name": "到付地点", "code": "payableat","copyName":"payableatid" },
{ "code": "payableatid","noShow":true },
{ "name": "付费方式", "code": "blfrt" },
{ "name": "第三付款地", "code": "thirdpayaddr" },
{ "name": "运输条款", "code": "service" },
{ "name": "冷藏通风量", "code": "reeferf" },
{ "name": "设置温度", "code": "tempset" },
{ "name": "温度单位", "code": "tempid" },
{ "name": "最低温度", "code": "tempmin" },
{ "name": "最高温度", "code": "tempmax" },
{ "name": "湿度", "code": "humidity" },
{ "name": "危险品等级", "code": "dclass" },
{ "name": "危险品编号", "code": "dunno" },
{ "name": "危险品页号", "code": "dpage" },
{ "name": "危险品标签", "code": "dlabel" },
{ "name": "危险品联系人", "code": "linkman" }
]
},
{
"title": "备注信息",
"children": [
{ "name": "订舱备注", "code": "soremark" },
{ "name": "截单备注", "code": "siremark" }
]
},
{
"title": "箱信息",
"children": [
{ "name": "箱信息", "code": "ctnall" }
]
},
{
"title": "EDI补充信息",
"children": [
{ "name": "发送方EDI代码", "code": "bookingEDIExt.sendCode" },
{ "name": "接收方EDI代码", "code": "bookingEDIExt.receiveCode" },
{ "name": "EDI联系人名称", "code": "bookingEDIExt.ediAttn" },
{ "name": "EDI联系人电话", "code": "bookingEDIExt.ediAttnTel" },
{ "name": "EDI联系人邮箱", "code": "bookingEDIExt.ediAttnMail" },
{ "name": "AMS收货人", "code": "bookingEDIExt.amsConsignee" },
{ "name": "AMS通知人", "code": "bookingEDIExt.amsNotifyParty" },
{ "name": "操作英文名称", "code": "bookingEDIExt.opEName" },
{ "name": "操作电话", "code": "bookingEDIExt.opTel" },
{ "name": "操作邮箱", "code": "bookingEDIExt.opEmail" },
{ "name": "商品名称", "code": "bookingEDIExt.goodsName" },
{ "name": "SOC箱", "code": "iscontainersoc" },
{ "name": "SCAC代码", "code": "scaccode" },
{ "name": "ITN编号", "code": "itncode" },
{ "name": "订舱人说明", "code": "bookingEDIExt.orderRemark" },
{ "name": "付款方", "code": "freightpayer" },
{ "name": "第一层包装皮重", "code": "bookingEDIExt.kingTareweight" },
{ "name": "委托方", "code": "bookingEDIExt.weiTuoFang" },
{ "name": "辅助字段1", "code": "bookingEDIExt.exRemark1" },
{ "name": "辅助字段2", "code": "bookingEDIExt.exRemark2" },
{ "name": "辅助字段3", "code": "bookingEDIExt.exRemark3" },
{ "name": "辅助字段4", "code": "bookingEDIExt.exRemark4" },
{ "name": "收货人EDI代码", "code": "bookingEDIExt.consigneeEdiCode" },
{ "name": "发货人EDI代码", "code": "bookingEDIExt.shipperEdiCode" },
{ "name": "通知方EDI代码", "code": "bookingEDIExt.notifyCdoe" },
{ "name": "太平销售EDI代码", "code": "bookingEDIExt.salerCode" },
{ "name": "EMANIFEST HBL", "code": "bookingEDIExt.emanifestHbl" },
{ "name": "Master Bol Indicator", "code": "bookingEDIExt.masterBolIndicator" },
{ "name": "S0C C0C", "code": "bookingEDIExt.s0CC0C" },
{ "name": "欧盟港口、伊朗港口、KHI", "code": "bookingEDIExt.ckhi" },
{ "name": "南美东", "code": "bookingEDIExt.cncm" },
{ "name": "巴西线木质包装情况", "code": "bookingEDIExt.wncm" },
{ "name": "ACI HBL", "code": "bookingEDIExt.acihbl" }
]
}
]

@ -0,0 +1,88 @@
<template>
<div>
<a-card :bordered="false">
<a-row>
<a-col :span="2" :offset="22">
<a-button @click="handleSubmit" type="primary">
保存
</a-button>
</a-col>
<a-col :span="24">
<a-checkbox-group v-model="WebData" :style="{ width: '100%', marginTop: '10px' }">
<a-row v-for="item in Data" :key="item.title">
<a-divider orientation="left">
{{ item.title }}
</a-divider>
<a-col v-show="!item2.noShow" :span="6" v-for="item2 in item.children" :key="item2.code">
<a-checkbox @change="onChange($event,item2)" :value="item2.code">{{ item2.name }}</a-checkbox>
</a-col>
</a-row>
</a-checkbox-group>
</a-col>
</a-row>
</a-card>
</div>
</template>
<script>
import { DjyTenantConfigGet, DjyTenantConfigSave } from '@/api/modular/main/TenantConfig'
import Data from './Data.json'
export default {
data() {
return {
Data,
WebData: [],
id: '',
queryParam: {
Type: 'booking_form_copy'
}
}
},
created() { },
mounted() {
this.init()
},
methods: {
init() {
Object.assign(this.$data, this.$options.data())
this.FnGetData()
},
onChange(val, item) {
if (val.target.checked) {
this.WebData.push(item.copyName)
} else {
if (item.copyName) {
this.WebData.splice(this.WebData.indexOf(item.copyName), 1)
}
this.$forceUpdate()
}
},
FnGetData() {
DjyTenantConfigGet(this.queryParam).then(res => {
if (res.code == 200) {
if (res.data) {
this.WebData = JSON.parse(res.data.configJson)
this.id = res.data.id
}
} else {
this.WebData = []
this.$message.warning(res.message)
}
})
},
handleSubmit() {
DjyTenantConfigSave({ id: this.id ? this.id : null, configJson: JSON.stringify(this.WebData), type: 'booking_form_copy' }).then(
res => {
if (res.success) {
this.$message.success('保存成功')
localStorage.setItem('booking_form_copy', JSON.stringify(this.WebData))
this.FnGetData()
} else {
this.$message.error(`保存失败,${res.message}`)
}
}
)
}
}
}
</script>
<style lang="less"></style>

@ -1,139 +0,0 @@
<template>
<a-modal
class="CsModal"
title="新增配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<!-- <a-col :span="12">
<a-form-item label="类型" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择类型"
v-decorator="['type', { rules: [{ required: true, message: '请选择类型!' }] }]"
show-search
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in TypeData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col> -->
<a-col :span="24">
<a-form-item label="必填项" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-checkbox-group v-decorator="['WebData']" :style="{ width: '100%', marginTop: '-10px' }">
<a-row v-for="item in Data" :key="item.title">
<a-divider orientation="left">
{{ item.title }}
</a-divider>
<a-col :span="6" v-for="item2 in item.children" :key="item2.code">
<a-checkbox :value="item2.code">{{ item2.name }}</a-checkbox>
</a-col>
</a-row>
</a-checkbox-group>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { DjyTenantConfigAdd } from '@/api/modular/main/TenantConfig'
import Data from './Data.json'
export default {
data() {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 18 }
},
Data,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {},
methods: {
//
add(record) {
this.visible = true
},
/**
* 提交表单
*/
FnChangeCtnCategory(e) {
console.log(e)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(values)
if (!errors) {
for (const key in values) {
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
values.configJson = values.WebData
DjyTenantConfigAdd({ ...values, type: 'booking_form_col' })
.then(res => {
if (res.success) {
this.$message.success('新增成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`新增失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>
<style lang="less">
.CsModal {
height: 40vh;
.ant-modal-body {
height: 600px;
overflow-y: auto;
}
}
</style>

@ -1,124 +0,0 @@
<template>
<a-modal
class="CsModal"
title="编辑配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="24">
<a-form-item label="必填项" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-checkbox-group v-decorator="['WebData']" :style="{ width: '100%', marginTop: '10px' }">
<a-row v-for="item in Data" :key="item.title">
<a-divider orientation="left">
{{ item.title }}
</a-divider>
<a-col :span="6" v-for="item2 in item.children" :key="item2.code">
<a-checkbox :value="item2.code">{{ item2.name }}</a-checkbox>
</a-col>
</a-row>
</a-checkbox-group>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { DjyTenantConfigEdit } from '@/api/modular/main/TenantConfig'
import Data from './Data.json'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 18 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
Data
}
},
mounted() {},
methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
WebData: JSON.parse(record.configJson)
})
}, 100)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
for (const key in values) {
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
values.id = this.data.id
values.configJson = values.WebData
DjyTenantConfigEdit({ ...values, type: 'booking_form_col' })
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`编辑失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>
<style lang="less">
.CsModal {
height: 40vh;
.ant-modal-body {
height: 600px;
overflow-y: auto;
}
}
</style>

@ -1,203 +0,0 @@
<template>
<div>
<!-- <a-card :bordered="false" :bodyStyle="tstyle">
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="租户:">
<a-select v-model="queryParam.tenantId">
<a-select-option v-for="item in TenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</a-col>
<a-col :md="6" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
<a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'" />
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
</a-card> -->
<a-card :bordered="false">
<vxe-toolbar>
<template #buttons>
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">
新增配置
</a-button>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" height="670px" empty-text="">
<vxe-column type="seq" width="50" fixed="left"></vxe-column>
<!-- <vxe-column
v-for="item in columns"
:key="item.dataIndex"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
:show-overflow="true"
>
</vxe-column> -->
<vxe-column title="租户" align="center" width="150">
<template #default="{ row }">
{{ FnRtenant(row.tenantId) }}
</template>
</vxe-column>
<vxe-column title="必填项" align="center">
<template #default="{ row }">
{{ FnRjson(row.configJson) }}
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
<a-popconfirm title="是否确认删除?" ok-text="" cancel-text="" @confirm="confirm(row)">
<vxe-button type="text">删除</vxe-button>
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import { DjyTenantConfigPage, DjyTenantConfigDelete, SysTenantPage } from '@/api/modular/main/TenantConfig'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
import Data from './Data.json'
export default {
components: {
addForm,
editForm
},
data() {
return {
// /
advanced: false,
loading: false,
setVisible: false,
setVisible1: false,
queryParam: {
Type: 'booking_form_col'
},
ColumnsQuery: [],
columns: [
{
title: '租户',
align: 'center',
dataIndex: 'tenantId'
},
{
title: '必填项',
align: 'center',
dataIndex: 'configJson'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
WCodeData: [],
ModulesData: [],
carrierCodeData: [],
UserList: [],
TenantData: [],
Data
}
},
created() {},
mounted() {
this.init()
},
methods: {
FnRtenant(id) {
let RData = '-'
this.TenantData.forEach(item => {
if (item.id == id) {
RData = item.name
}
})
return RData
},
FnRjson(data) {
let Rdata = ''
JSON.parse(data).forEach(item => {
console.log(item)
Data.forEach(ele => {
ele.children.forEach(e => {
if (item == e.code) {
Rdata ? (Rdata = `${Rdata},${e.name}`) : (Rdata = e.name)
}
})
})
})
return Rdata
},
confirm(e) {
this.FnDel(e)
},
FnDel(data) {
DjyTenantConfigDelete({ id: data.id }).then(res => {
this.$message.success('删除成功')
this.FnGetData()
})
},
toggleAdvanced() {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()
SysTenantPage().then(res => {
this.TenantData = res.data.rows
})
},
FnGetData() {
this.loading = true
DjyTenantConfigPage(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data.rows
} else {
this.loadData = []
this.$message.warning(res.message)
}
this.loading = false
})
},
handleOk() {
this.FnGetData()
}
}
}
</script>
<style lang="less">
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
.Open {
}
.Close {
height: 45px;
overflow: hidden;
}
</style>

@ -163,7 +163,7 @@
height="600px" height="600px"
empty-text="没有更多数据了!"> empty-text="没有更多数据了!">
<template #caozuo="{ row }"> <template #caozuo="{ row }">
<a-icon type="form" style="cursor: pointer;" :style="{ color: '#13c2c2' }" /> <a-icon @click="handleEdit(row.id)" type="form" style="cursor: pointer;" :style="{ color: '#13c2c2' }" />
<a-popconfirm <a-popconfirm
title="请确认删除?" title="请确认删除?"
ok-text="是" ok-text="是"
@ -684,7 +684,7 @@ export default {
}) })
}, },
handledbclick(row) { handledbclick(row) {
this.$refs.editForm.edit(row.row) this.$refs.mskBookingOrder.init(row.row.id)
}, },
resizableChange(e) { resizableChange(e) {
this.columns[e.columnIndex].width = e.resizeWidth this.columns[e.columnIndex].width = e.resizeWidth

Loading…
Cancel
Save