合并分支

dev
lilu 2 years ago
commit 1a03bb85bf

@ -95,7 +95,7 @@
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" /> <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
<% } %> <% } %>
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_3756681_tfuuuqzywo8.css" /> <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3756681_zq5v6ks4ruf.css" />
<!-- 1.8K仔百度收录 --> <!-- 1.8K仔百度收录 -->
<meta name="baidu-site-verification" content="code-QVfBYJ5laQ" /> <meta name="baidu-site-verification" content="code-QVfBYJ5laQ" />
</head> </head>

@ -36,7 +36,17 @@ export function DjyCustomerpage(parameter) {
params: parameter params: parameter
}) })
} }
/**
* 获取分页查询客户
* @params keyword
*/
export function DjyCustomerSuggest(parameter) {
return axios({
url: '/DjyCustomer/Suggest',
method: 'get',
params: parameter
})
}
/** /**
* 获取船公司 * 获取船公司
* @params CnName * @params CnName
@ -568,3 +578,11 @@ export function BookingOrderAddOrUpdate(parameter) {
data: parameter data: parameter
}) })
} }
export function BookingOrderPrintTemplateList(parameter) {
return axios({
url: '/BookingOrder/PrintTemplateList',
method: 'get',
params: parameter
})
}
//

@ -0,0 +1,53 @@
import { axios } from '@/utils/request'
/**
* 分页查询网站账号维护租户公司
*
* @author Myshipping
*/
export function DjyWebsiteAccountConfigPageTenant(parameter) {
return axios({
url: '/DjyWebsiteAccountConfig/PageTenant',
method: 'get',
params: parameter
})
}
/**
* 增加网站账号维护同一租户同类型账号不允许重复
*
* @author Myshipping
*/
export function DjyWebsiteAccountConfigAddTenant(parameter) {
return axios({
url: '/DjyWebsiteAccountConfig/AddTenant',
method: 'post',
data: parameter
})
}
/**
* 更新网站账号维护租户公司
*
* @author Myshipping
*/
export function DjyWebsiteAccountConfigEditTenant(parameter) {
return axios({
url: '/DjyWebsiteAccountConfig/EditTenant',
method: 'post',
data: parameter
})
}
/**
* 删除网站账号维护租户公司
*
* @author Myshipping
*/
export function DjyWebsiteAccountConfigDeleteTenant(parameter) {
return axios({
url: '/DjyWebsiteAccountConfig/DeleteTenant',
method: 'post',
data: parameter
})
}

@ -42,20 +42,29 @@ export default {
}, },
methods: { methods: {
onEdit(targetKey, action) { onEdit(targetKey, action) {
// let _that = this let _that = this
// if (targetKey.split('?')[0] == '/BookingDetail') { let data = Object.fromEntries(new URLSearchParams(targetKey.split('?')[1]))
// this.$confirm({ console.log(targetKey.split('?')[0] == '/BookingDetail')
// title: '', console.log(localStorage.getItem(data.id))
// content: ' ', console.log(localStorage.getItem(data.id) == 'true')
// onOk() { console.log(data.id != null)
// _that[action](targetKey) console.log(
// }, targetKey.split('?')[0] == '/BookingDetail' && data.id != null && localStorage.getItem(data.id) == 'true'
// onCancel() {} )
// }) if (targetKey.split('?')[0] == '/BookingDetail' && data.id != null && localStorage.getItem(data.id) == 'true') {
// } else { this.$confirm({
// this[action](targetKey) title: '请确认无未保存数据!',
// } content: '当点击确定按钮时,此页面 将会关闭。',
this[action](targetKey) onOk() {
_that[action](targetKey)
localStorage.removeItem(data.id)
},
onCancel() {}
})
} else {
this[action](targetKey)
localStorage.removeItem(data.id)
}
console.log('关闭?', targetKey, action) console.log('关闭?', targetKey, action)
}, },
remove(targetKey) { remove(targetKey) {

@ -140,13 +140,11 @@ export default {
moreStr: '', moreStr: '',
tabActiveKey: '1', tabActiveKey: '1',
historyData: {}, historyData: {},
noSave: false
} }
}, },
computed: { computed: {
...mapGetters(['bookingList', 'needSavePages']), ...mapGetters(['bookingList', 'needSavePages']),
Showtabs() { Showtabs() {
console.log(this.bookingDetails, 'bookingDetails')
let Rdata = true let Rdata = true
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length) { if (this.bookingDetails.hbList && this.bookingDetails.hbList.length) {
Rdata = false Rdata = false
@ -159,8 +157,7 @@ export default {
watch: { watch: {
bookingDetails: { bookingDetails: {
handler(nval, oval) { handler(nval, oval) {
this.noSave = true localStorage.setItem(`${this.id}`, true)
// console.log(' -- ', nval)
}, },
deep: true deep: true
} }
@ -168,6 +165,9 @@ export default {
created() { created() {
this.init() this.init()
}, },
updated() {
localStorage.setItem(`${this.id}`, false)
},
beforeRouteUpdate(to, from, next) { beforeRouteUpdate(to, from, next) {
if (!Object.keys(this.historyData).includes(this.$route.query.id)) { if (!Object.keys(this.historyData).includes(this.$route.query.id)) {
const hisData = { const hisData = {
@ -202,11 +202,7 @@ export default {
next() next()
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
console.log('进入 beforeRouteEnter: to', to.name)
console.log('进入 beforeRouteEnter: from', from.name)
next(vm => { next(vm => {
console.log('vm', vm)
console.log('进入路由之后: ', vm.$route.query.id)
vm.getRouterHis() vm.getRouterHis()
}) })
}, },
@ -215,11 +211,6 @@ export default {
getRouterHis() { getRouterHis() {
const newId = this.$route.query.id const newId = this.$route.query.id
if (Object.keys(this.historyData).includes(newId)) { if (Object.keys(this.historyData).includes(newId)) {
// const newType = this.$route.query.type
// const newIsCopy = this.$route.query.isCopy || false
// if (newType === this.historyData[newId].type && newIsCopy === this.historyData[newId].isCopy) {
// }
console.log('4. 获取到历史数据', this.historyData[newId].bookingDetails.mblno)
const $data = this.historyData[newId] const $data = this.historyData[newId]
this.bookingDetails = $data.bookingDetails this.bookingDetails = $data.bookingDetails
this.excuteRules = $data.excuteRules this.excuteRules = $data.excuteRules
@ -400,7 +391,6 @@ export default {
ediAttnMail: '' ediAttnMail: ''
} }
} }
this.noSave = false
this.$set(this, 'bookingDetails', res.data) this.$set(this, 'bookingDetails', res.data)
this.$forceUpdate() this.$forceUpdate()
}) })
@ -415,20 +405,17 @@ export default {
}, },
bookingOrderUpdate() { bookingOrderUpdate() {
console.log('保存', this.bookingDetails)
if (!this.bookingDetails.mblno) { if (!this.bookingDetails.mblno) {
this.$message.error('请输入提单号') this.$message.error('请输入提单号')
return false return false
} }
const _data = JSON.parse(JSON.stringify(this.bookingDetails)) const _data = JSON.parse(JSON.stringify(this.bookingDetails))
delete _data.hbList delete _data.hbList
console.log(JSON.stringify(_data))
BookingOrderAddOrUpdate(_data) BookingOrderAddOrUpdate(_data)
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.isCopy = false this.isCopy = false
this.isAdd = false this.isAdd = false
this.noSave = false
this.$message.success('保存成功') this.$message.success('保存成功')
this.init() this.init()
this.$forceUpdate() this.$forceUpdate()
@ -442,7 +429,6 @@ export default {
}, },
bookingOrderAdd() { bookingOrderAdd() {
console.log('新增', this.bookingDetails)
if (!this.bookingDetails.mblno) { if (!this.bookingDetails.mblno) {
this.$message.error('请输入提单号') this.$message.error('请输入提单号')
return false return false
@ -454,7 +440,6 @@ export default {
if (res.success) { if (res.success) {
this.isAdd = false this.isAdd = false
this.id = res.data this.id = res.data
this.noSave = false
this.$message.success('保存成功') this.$message.success('保存成功')
this.$router.replace({ this.$router.replace({
name: 'BookingDetail', name: 'BookingDetail',
@ -475,7 +460,6 @@ export default {
}, },
changeTab(e) { changeTab(e) {
console.log(e)
this.tabActiveKey = e this.tabActiveKey = e
}, },
@ -506,7 +490,11 @@ export default {
} }
const prevId = arr[index - 1] const prevId = arr[index - 1]
const prevType = this.bookingList[prevId].carrierid const prevType = this.bookingList[prevId].carrierid
this.$router.replace({ name: 'BookingDetail', query: { id: prevId, type: prevType } }) this.$router.replace({
name: 'BookingDetail',
query: { id: prevId, type: prevType, mblno: this.bookingList[prevId].mblno }
})
// this.$route.query.id = 1123
} else { } else {
if (index === arr.length - 1) { if (index === arr.length - 1) {
this.$message.error('当前已经是最后一票') this.$message.error('当前已经是最后一票')
@ -514,7 +502,10 @@ export default {
} }
const nextId = arr[index + 1] const nextId = arr[index + 1]
const nextType = this.bookingList[nextId].carrierid const nextType = this.bookingList[nextId].carrierid
this.$router.replace({ name: 'BookingDetail', query: { id: nextId, type: nextType } }) this.$router.replace({
name: 'BookingDetail',
query: { id: nextId, type: nextType, mblno: this.bookingList[nextId].mblno }
})
} }
}, },
handleReload() { handleReload() {
@ -537,9 +528,6 @@ export default {
this.bookingDetails.hbList = [data] this.bookingDetails.hbList = [data]
this.tabActiveKey = '2' this.tabActiveKey = '2'
} }
},
deactivated () {
console.log('页面销毁', this.noSave)
} }
} }
</script> </script>

@ -14,6 +14,7 @@
:data-source="customerDataArr" :data-source="customerDataArr"
@select="customerSelect" @select="customerSelect"
@change="customerChange" @change="customerChange"
@focus="customerChange"
/> />
<span <span
class="customer-btn iconfont icon-touxiang" class="customer-btn iconfont icon-touxiang"
@ -62,6 +63,7 @@
:data-source="forwarderDataArr" :data-source="forwarderDataArr"
@select="forwarderSelect" @select="forwarderSelect"
@change="forwarderChange" @change="forwarderChange"
@focus="forwarderChange"
/> />
<!-- <a-input :allowClear="true" v-model="details.forwarder" /> --> <!-- <a-input :allowClear="true" v-model="details.forwarder" /> -->
</a-form-item> </a-form-item>
@ -124,6 +126,7 @@
:data-source="vesselDataArr" :data-source="vesselDataArr"
@select="vesselSelect" @select="vesselSelect"
@change="vesselChange" @change="vesselChange"
@focus="vesselChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -154,6 +157,7 @@
:data-source="voynoinnerDataArr" :data-source="voynoinnerDataArr"
@select="voynoinnerSelect" @select="voynoinnerSelect"
@change="voynoinnerChange" @change="voynoinnerChange"
@focus="voynoinnerChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -213,6 +217,7 @@
:data-source="lanenameDataArr" :data-source="lanenameDataArr"
@select="lanenameSelect" @select="lanenameSelect"
@change="lanenameChange" @change="lanenameChange"
@focus="lanenameChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -225,6 +230,7 @@
:data-source="shipagencyDataArr" :data-source="shipagencyDataArr"
@select="shipagencySelect" @select="shipagencySelect"
@change="shipagencyChange" @change="shipagencyChange"
@focus="shipagencyChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -259,6 +265,7 @@
:data-source="saleUserListArr" :data-source="saleUserListArr"
@select="saleSelect" @select="saleSelect"
@change="saleChange" @change="saleChange"
@focus="saleChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -277,6 +284,7 @@
:data-source="opUserListArr" :data-source="opUserListArr"
@select="opSelect" @select="opSelect"
@change="opChange" @change="opChange"
@focus="opChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -295,6 +303,7 @@
:data-source="docUserListArr" :data-source="docUserListArr"
@select="docSelect" @select="docSelect"
@change="docChange" @change="docChange"
@focus="docChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -313,6 +322,7 @@
:data-source="custserviceUserListArr" :data-source="custserviceUserListArr"
@select="custserviceSelect" @select="custserviceSelect"
@change="custserviceChange" @change="custserviceChange"
@focus="custserviceChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -418,6 +428,7 @@ import { XCard } from '@/components'
import { AutoComplete } from 'ant-design-vue' import { AutoComplete } from 'ant-design-vue'
import { import {
DjyCustomerpage, DjyCustomerpage,
DjyCustomerSuggest,
GetCarrierlist, GetCarrierlist,
GetVessellist, GetVessellist,
GetSysUserPage, GetSysUserPage,
@ -825,10 +836,10 @@ export default {
}, },
// - start // - start
getDjyCustomerpage(name = '', type, key) { getDjyCustomerpage(name = '', type, key) {
DjyCustomerpage({ DjyCustomerSuggest({
// SearchValue: name, // SearchValue: name,
// PropString: key, // PropString: key,
ShortName: name keyword: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -848,6 +859,7 @@ export default {
this.details.customerid = this.customerData[index].id this.details.customerid = this.customerData[index].id
}, },
customerChange(value) { customerChange(value) {
console.log(value)
// this.getCustomer(value) // this.getCustomer(value)
this.getDjyCustomerpage(value, 'customer', 'consignor') this.getDjyCustomerpage(value, 'customer', 'consignor')
}, },
@ -865,8 +877,7 @@ export default {
// - start // - start
getCarrier(name = '') { getCarrier(name = '') {
GetCarrierlist({ GetCarrierlist({
CnName: name, KeyWord: name
keyword: ''
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -914,7 +925,7 @@ export default {
// - start // - start
getForwarderlist(name = '') { getForwarderlist(name = '') {
GetForwarderlist({ GetForwarderlist({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -938,7 +949,7 @@ export default {
// - start // - start
getVessel(name = '') { getVessel(name = '') {
GetVessellist({ GetVessellist({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {

@ -58,10 +58,12 @@
> >
<auto-complete <auto-complete
:allowClear="true" :allowClear="true"
:disabled="true"
v-model="details.issueplace" v-model="details.issueplace"
:data-source="issueplaceDataArr" :data-source="issueplaceDataArr"
@select="issueplaceSelect" @select="issueplaceSelect"
@change="issueplaceChange" @change="issueplaceChange"
@focus="issueplaceChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -134,6 +136,7 @@
:data-source="prepardatDataArr" :data-source="prepardatDataArr"
@select="prepardatSelect" @select="prepardatSelect"
@change="prepardatChange" @change="prepardatChange"
@focus="prepardatChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -151,6 +154,7 @@
:data-source="payableatDataArr" :data-source="payableatDataArr"
@select="payableatSelect" @select="payableatSelect"
@change="payableatChange" @change="payableatChange"
@focus="payableatChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -168,6 +172,7 @@
:data-source="blfrtDataArr" :data-source="blfrtDataArr"
@select="blfrtSelect" @select="blfrtSelect"
@change="blfrtChange" @change="blfrtChange"
@focus="blfrtChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -196,6 +201,7 @@
:data-source="serviceDataArr" :data-source="serviceDataArr"
@select="serviceSelect" @select="serviceSelect"
@change="serviceChange" @change="serviceChange"
@focus="serviceChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -366,7 +372,6 @@ export default {
watch: { watch: {
details: { details: {
handler(nval, oval) { handler(nval, oval) {
// console.log('', nval)
this.$emit('changeDetail', { this.$emit('changeDetail', {
detail: nval, detail: nval,
type: 'billInfo' type: 'billInfo'
@ -471,7 +476,7 @@ export default {
// - start // - start
getIssuetypeList(name = '') { getIssuetypeList(name = '') {
Codeissuetypelist({ Codeissuetypelist({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -500,7 +505,6 @@ export default {
}, },
handleIssuetypeChange(index) { handleIssuetypeChange(index) {
this.details.issuetype = this.issuetypeSelectData[index].enName this.details.issuetype = this.issuetypeSelectData[index].enName
console.log(this.details.issuetype)
}, },
filterOption(input, option) { filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@ -510,7 +514,7 @@ export default {
// - start // - start
getPortloadlist(name = '', type) { getPortloadlist(name = '', type) {
GetPortloadlist({ GetPortloadlist({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -547,7 +551,7 @@ export default {
// - start // - start
getPortlist(name = '', type) { getPortlist(name = '', type) {
GetPortlist({ GetPortlist({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -572,7 +576,7 @@ export default {
// - start // - start
getFrt(name = '') { getFrt(name = '') {
GetFrt({ GetFrt({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -595,7 +599,7 @@ export default {
// - start // - start
getService(name = '') { getService(name = '') {
GetService({ GetService({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {

@ -646,7 +646,6 @@ export default {
watch: { watch: {
details: { details: {
handler(nval, oval) { handler(nval, oval) {
// console.log('detail', nval)
this.$emit('changeDetail', { this.$emit('changeDetail', {
detail: nval, detail: nval,
type: 'goodsTable' type: 'goodsTable'
@ -657,7 +656,6 @@ export default {
tableData: { tableData: {
handler(nval, oval) { handler(nval, oval) {
this.details.ctnInputs = nval this.details.ctnInputs = nval
// console.log('table', nval)
}, },
deep: true deep: true
} }
@ -669,7 +667,6 @@ export default {
methods: { methods: {
init() { init() {
console.log('init', this.details.ctnInputs)
if (Object.keys(this.details).length > 0) { if (Object.keys(this.details).length > 0) {
const arr = [] const arr = []
const totalCtnall = {} const totalCtnall = {}
@ -702,7 +699,7 @@ export default {
}, },
getCtn() { getCtn() {
GetCtn({ GetCtn({
Name: '' KeyWord: ''
}) })
.then(res => { .then(res => {
this.ctnList = res.data this.ctnList = res.data
@ -713,7 +710,7 @@ export default {
}, },
getPackage() { getPackage() {
GetPackage({ GetPackage({
Name: '' KeyWord: ''
}) })
.then(res => { .then(res => {
this.packageList = res.data this.packageList = res.data
@ -780,7 +777,6 @@ export default {
this.$message.error('请选择数据') this.$message.error('请选择数据')
return false return false
} }
console.log(this.childModelSelect)
let $pkgs = 0 let $pkgs = 0
let $kgs = 0 let $kgs = 0
let $cbm = 0 let $cbm = 0
@ -1049,23 +1045,23 @@ export default {
.btn-more-name, .btn-more-name,
.btn-import-station, .btn-import-station,
.btn-weight { .btn-weight {
position:relative; position: relative;
border: 1px solid @primary-color; border: 1px solid @primary-color;
color: @primary-color; color: @primary-color;
background: none; background: none;
&::after{ &::after {
content:''; content: '';
position:absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 0; z-index: 0;
background-color: @primary-color !important; background-color: @primary-color !important;
opacity: .04; opacity: 0.04;
} }
&:hover{ &:hover {
opacity: .7; opacity: 0.7;
} }
} }
} }

@ -17,10 +17,11 @@
:data-source="shipperDataArr" :data-source="shipperDataArr"
@select="shipperSelect" @select="shipperSelect"
@change="shipperChange" @change="shipperChange"
@focus="shipperChange"
/> />
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('shipper')" <a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('shipper')">
>保存</a-button 保存
> </a-button>
<div class="right"> <div class="right">
<span class="btn-circle" @click="spliceMore('shipper')" :style="{ fontSize: '14px' }">*</span> <span class="btn-circle" @click="spliceMore('shipper')" :style="{ fontSize: '14px' }">*</span>
<span class="btn" @click="changeCode(35, 'shipper')">35</span> <span class="btn" @click="changeCode(35, 'shipper')">35</span>
@ -54,6 +55,7 @@
:data-source="consigneeDataArr" :data-source="consigneeDataArr"
@select="consigneeSelect" @select="consigneeSelect"
@change="consigneeChange" @change="consigneeChange"
@focus="consigneeChange"
/> />
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('consignee')" <a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('consignee')"
>保存</a-button >保存</a-button
@ -91,6 +93,7 @@
:data-source="notifyDataArr" :data-source="notifyDataArr"
@select="notifySelect" @select="notifySelect"
@change="notifyChange" @change="notifyChange"
@focus="notifyChange"
/> />
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('notifyparty')" <a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('notifyparty')"
>保存</a-button >保存</a-button
@ -177,6 +180,7 @@
:data-source="customserDataArr" :data-source="customserDataArr"
@select="customserSelect" @select="customserSelect"
@change="customserChange" @change="customserChange"
@focus="customserChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -195,6 +199,7 @@
:data-source="truckerDataArr" :data-source="truckerDataArr"
@select="truckerSelect" @select="truckerSelect"
@change="truckerChange" @change="truckerChange"
@focus="truckerChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -213,6 +218,7 @@
:data-source="agentidDataArr" :data-source="agentidDataArr"
@select="agentidSelect" @select="agentidSelect"
@change="agentidChange" @change="agentidChange"
@focus="agentidChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -298,6 +304,7 @@
:data-source="portloadDataArr" :data-source="portloadDataArr"
@select="portloadSelect" @select="portloadSelect"
@change="portloadChange" @change="portloadChange"
@focus="portloadChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -327,6 +334,7 @@
:data-source="transportDataArr" :data-source="transportDataArr"
@select="transportSelect" @select="transportSelect"
@change="transportChange" @change="transportChange"
@focus="transportChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -356,6 +364,7 @@
:data-source="portdischargeDataArr" :data-source="portdischargeDataArr"
@select="portdischargeSelect" @select="portdischargeSelect"
@change="portdischargeChange" @change="portdischargeChange"
@focus="portdischargeChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -385,6 +394,7 @@
:data-source="destinationDataArr" :data-source="destinationDataArr"
@select="destinationSelect" @select="destinationSelect"
@change="destinationChange" @change="destinationChange"
@focus="destinationChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -414,6 +424,7 @@
:data-source="placedeliveryDataArr" :data-source="placedeliveryDataArr"
@select="placedeliverySelect" @select="placedeliverySelect"
@change="placedeliveryChange" @change="placedeliveryChange"
@focus="placedeliveryChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -443,6 +454,7 @@
:data-source="placereceiptDataArr" :data-source="placereceiptDataArr"
@select="placereceiptSelect" @select="placereceiptSelect"
@change="placereceiptChange" @change="placereceiptChange"
@focus="placereceiptChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -483,6 +495,7 @@
:data-source="kindpkgsDataArr" :data-source="kindpkgsDataArr"
@select="kindpkgsSelect" @select="kindpkgsSelect"
@change="kindpkgsChange" @change="kindpkgsChange"
@focus="kindpkgsChange"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -666,7 +679,6 @@ export default {
watch: { watch: {
details: { details: {
handler(nval, oval) { handler(nval, oval) {
// console.log('', nval)
this.$emit('changeDetail', { this.$emit('changeDetail', {
detail: nval, detail: nval,
type: 'mailingInfo' type: 'mailingInfo'
@ -864,9 +876,11 @@ export default {
}, },
mounted() { mounted() {
const shipperScroll = document.getElementById('shipper-scroll') const shipperScroll = document.getElementById('shipper-scroll')
shipperScroll.addEventListener('scroll', () => { if (shipperScroll) {
document.getElementById('shipper-scroll-right').scrollTop = shipperScroll.scrollTop shipperScroll.addEventListener('scroll', () => {
}) document.getElementById('shipper-scroll-right').scrollTop = shipperScroll.scrollTop
})
}
const consigneeScroll = document.getElementById('consignee-scroll') const consigneeScroll = document.getElementById('consignee-scroll')
consigneeScroll.addEventListener('scroll', () => { consigneeScroll.addEventListener('scroll', () => {
document.getElementById('consignee-scroll-right').scrollTop = consigneeScroll.scrollTop document.getElementById('consignee-scroll-right').scrollTop = consigneeScroll.scrollTop
@ -956,8 +970,7 @@ export default {
// - start // - start
getYardlist(name = '') { getYardlist(name = '') {
GetYardlist({ GetYardlist({
Name: name, keyword: name
keyword: ''
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -990,7 +1003,6 @@ export default {
handleYardChange(index) { handleYardChange(index) {
this.details.yard = this.yardSelectData[index].name this.details.yard = this.yardSelectData[index].name
this.details.yardid = this.yardSelectData[index].code this.details.yardid = this.yardSelectData[index].code
console.log(this.details.yard, this.details.yardid)
}, },
filterOption(input, option) { filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@ -1000,7 +1012,7 @@ export default {
// ( / ) - start // ( / ) - start
getPortloadlist(name = '', type) { getPortloadlist(name = '', type) {
GetPortloadlist({ GetPortloadlist({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -1014,6 +1026,10 @@ export default {
}, },
portloadSelect(value) { portloadSelect(value) {
this.details.portload = value this.details.portload = value
this.details.issueplace = value
if (!this.details.prepardat) {
this.details.prepardat = value
}
const index = this.portloadDataArr.indexOf(value) const index = this.portloadDataArr.indexOf(value)
this.details.portloadid = this.portloadData[index].ediCode this.details.portloadid = this.portloadData[index].ediCode
}, },
@ -1033,7 +1049,7 @@ export default {
// ( / / / ) - start // ( / / / ) - start
getPortlist(name = '', type) { getPortlist(name = '', type) {
GetPortlist({ GetPortlist({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -1048,6 +1064,9 @@ export default {
// //
portdischargeSelect(value) { portdischargeSelect(value) {
this.details.portdischarge = value this.details.portdischarge = value
if (!this.details.payableat) {
this.details.payableat = value
}
const index = this.portdischargeDataArr.indexOf(value) const index = this.portdischargeDataArr.indexOf(value)
this.details.portdischargeid = this.portdischargeData[index].ediCode this.details.portdischargeid = this.portdischargeData[index].ediCode
}, },
@ -1086,7 +1105,7 @@ export default {
// - start // - start
getPackage(name = '') { getPackage(name = '') {
GetPackage({ GetPackage({
Name: name KeyWord: name
}) })
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -1115,7 +1134,6 @@ export default {
.then(res => { .then(res => {
if (res.code === 200) { if (res.code === 200) {
this[`${type}Data`] = res.data.rows this[`${type}Data`] = res.data.rows
console.log(this[`${type}DataArr`])
this.$forceUpdate() this.$forceUpdate()
} }
}) })
@ -1194,7 +1212,6 @@ export default {
changeCodeRemove(num, type) { changeCodeRemove(num, type) {
const newStr = this.details[type].replace(/\n|\r/g, '') const newStr = this.details[type].replace(/\n|\r/g, '')
console.log(newStr)
const indexs = [] const indexs = []
let count = 0 let count = 0
for (let i = 0; i < newStr.length - 1; i++) { for (let i = 0; i < newStr.length - 1; i++) {
@ -1208,9 +1225,7 @@ export default {
let resStr = `` let resStr = ``
splitPosition.map((split, sindex) => { splitPosition.map((split, sindex) => {
const start = sindex === 0 ? 0 : splitPosition[sindex - 1] const start = sindex === 0 ? 0 : splitPosition[sindex - 1]
console.log(sindex, start, newStr.slice(start, split))
if (sindex === splitPosition.length - 1) { if (sindex === splitPosition.length - 1) {
console.log('last', newStr.slice(start, split), newStr.slice(split))
resStr += `${newStr.slice(start, split)} resStr += `${newStr.slice(start, split)}
${newStr.slice(split)}` ${newStr.slice(split)}`
} else { } else {

@ -414,28 +414,30 @@
<a-modal width="50vw" v-model="PrintModalVisible" title="打印"> <a-modal width="50vw" v-model="PrintModalVisible" title="打印">
<template slot="footer"> <span></span> </template> <template slot="footer"> <span></span> </template>
<div class="PrintMain"> <div class="PrintMain">
<div class="PrintRadio"> <div class="PrintTitle">
<a-radio-group default-value="1" button-style="solid" v-model="PrintType"> <p>默认打印格式为<span>pdf</span>,如需其他格式请选择</p>
<a-radio-button value="1"> <p>
pdf 打印格式
</a-radio-button> <a-radio-group v-model="PrintType" name="radioGroup">
<a-radio-button value="2"> <a-radio value="1">pdf</a-radio>
xlsx <a-radio value="2">xlsx</a-radio>
</a-radio-button> <a-radio value="3">docx</a-radio>
<a-radio-button value="3"> </a-radio-group>
docx </p>
</a-radio-button>
</a-radio-group>
</div> </div>
<span v-for="item in templateType" :key="item.id" @click="FnCilckTemplateType(item.code)" class="items"> <a-row class="PrintMainBox">
{{ item.name }} <a-col
</span> v-for="(item, index) in templateType"
:key="item.id"
@click="FnCilckTemplateType(item.typeCode)"
class="items"
:span="11"
:offset="index % 2 == 0 ? 0 : 1"
>
<span>·</span>{{ item.typeName }}
</a-col>
</a-row>
</div> </div>
<!-- <a-row>
<a-col class="Citems" :span="6" v-for="item in templateType" :key="item.id">
<span @click="FnCilckTemplateType(item.code)" class="items">{{ item.name }}</span>
</a-col>
</a-row> -->
</a-modal> </a-modal>
<!-- 打印弹窗 end --> <!-- 打印弹窗 end -->
@ -499,7 +501,8 @@ import {
BookingOrderDownloadPrint, BookingOrderDownloadPrint,
BookingOrderOcrUpFile, BookingOrderOcrUpFile,
BookingOrderOcrGetImg, BookingOrderOcrGetImg,
BookingOrderOcrGetText BookingOrderOcrGetText,
BookingOrderPrintTemplateList
} from '@/api/modular/main/BookingLedger' } from '@/api/modular/main/BookingLedger'
import axios from 'axios' import axios from 'axios'
@ -597,7 +600,10 @@ export default {
}, },
mounted() { mounted() {
this.BCvData = [...this.CvData] this.BCvData = [...this.CvData]
this.templateType = this.$options.filters['dictData']('booking_template_type') // this.templateType = this.$options.filters['dictData']('booking_template_type')
BookingOrderPrintTemplateList().then(res => {
this.templateType = res.data
})
// if (this.id) { // if (this.id) {
// this.getLetterYard() // this.getLetterYard()
// } // }
@ -616,9 +622,7 @@ export default {
FnClickCvBox(data) { FnClickCvBox(data) {
this.details[data.code] = this.details[data.code] + this.Rdata this.details[data.code] = this.details[data.code] + this.Rdata
this.CvBoxType = false this.CvBoxType = false
console.log(this.BCvData)
this.BCvData.forEach((item, index) => { this.BCvData.forEach((item, index) => {
console.log(item)
if (item.code == data.code) { if (item.code == data.code) {
this.BCvData.splice(index, 1) this.BCvData.splice(index, 1)
this.BCvData.push(item) this.BCvData.push(item)
@ -705,28 +709,36 @@ export default {
this.$message.success(`搜索文件中...`) this.$message.success(`搜索文件中...`)
BookingOrderPrint({ typeCode, bookingId: this.id, type: this.PrintType }) BookingOrderPrint({ typeCode, bookingId: this.id, type: this.PrintType })
.then(res => { .then(res => {
console.log(res)
if (!res.success) { if (!res.success) {
this.$message.error(res.message) this.$message.error(res.message)
} else { } else {
this.$message.success(`预览打印文件 ${res.data} 中...`) this.$message.success(`预览打印文件 ${res.data} 中...`)
console.log(res.data) let PrintType = 'pdf'
switch (this.PrintType) {
case '1':
PrintType = 'pdf'
break
case '2':
PrintType = 'xlsx'
break
default:
PrintType = 'docx'
break
}
BookingOrderDownloadPrint({ fileName: res.data }).then(res2 => { BookingOrderDownloadPrint({ fileName: res.data }).then(res2 => {
const blob = new Blob([res2], { type: 'application/pdf;chartset=UTF-8' }) const blob = new Blob([res2], { type: `application/${PrintType};chartset=UTF-8` })
if (this.PrintType == '1') {
// const exportName = res.data window.open(URL.createObjectURL(blob), '_blank')
// const link = document.createElement('a') } else {
// link.download = exportName const link = document.createElement('a')
// link.style.display = 'none' link.style.display = 'none'
// link.href = URL.createObjectURL(blob) link.href = URL.createObjectURL(blob)
// console.log(URL.createObjectURL(blob)) link.download = res.data
window.open(URL.createObjectURL(blob), '_blank') document.body.appendChild(link)
// link.setAttribute('download', exportName) link.click()
// document.body.appendChild(link) URL.revokeObjectURL(link.href) // URL
// console.log(link) document.body.removeChild(link)
// link.click() }
// URL.revokeObjectURL(link.href)
// document.body.removeChild(link)
}) })
} }
}) })
@ -806,7 +818,6 @@ export default {
this.EDIUloading = false this.EDIUloading = false
}) })
.catch(err => { .catch(err => {
console.log(err)
this.EDISloading = false this.EDISloading = false
this.EDIUloading = false this.EDIUloading = false
}) })
@ -838,7 +849,6 @@ export default {
title: '温馨提示', title: '温馨提示',
content: content, content: content,
onOk() { onOk() {
console.log('OK')
if (type === 'vgm') { if (type === 'vgm') {
_this.vgmSend() _this.vgmSend()
} else if (type === 'paper') { } else if (type === 'paper') {
@ -887,7 +897,6 @@ export default {
getLetterYard() { getLetterYard() {
LetterYard(this.id) LetterYard(this.id)
.then(res => { .then(res => {
console.log('== 放舱信息 ==', res.data)
if (res.success) { if (res.success) {
this.initCabinFrom = { ...this.initCabinFrom, ...res.data } this.initCabinFrom = { ...this.initCabinFrom, ...res.data }
} else { } else {
@ -903,7 +912,6 @@ export default {
getSampleBill() { getSampleBill() {
SampleBill(this.id) SampleBill(this.id)
.then(res => { .then(res => {
console.log('== 样单信息 ==', res.data)
if (res.success) { if (res.success) {
this.initCabinFrom = res.data this.initCabinFrom = res.data
} else { } else {
@ -919,7 +927,6 @@ export default {
getVgmLink() { getVgmLink() {
VgmLink(this.id) VgmLink(this.id)
.then(res => { .then(res => {
console.log('== VGM信息 ==', res.data)
if (res.success) { if (res.success) {
// this.initCabinFrom = res.data // this.initCabinFrom = res.data
} else { } else {
@ -968,7 +975,6 @@ export default {
}, },
bookingCheckChange(e) { bookingCheckChange(e) {
this.bookingModelFrom.useForwarderCode = e.target.checked this.bookingModelFrom.useForwarderCode = e.target.checked
console.log(e.target.checked)
}, },
// vgm // vgm
@ -1034,7 +1040,6 @@ export default {
this.SaveLoading = false this.SaveLoading = false
}) })
.catch(err => { .catch(err => {
console.log(err)
this.SaveLoading = false this.SaveLoading = false
}) })
}, },
@ -1051,7 +1056,6 @@ export default {
this.SaveLoading = false this.SaveLoading = false
}) })
.catch(err => { .catch(err => {
console.log(err)
this.SaveLoading = false this.SaveLoading = false
}) })
}, },
@ -1068,7 +1072,6 @@ export default {
this.SendLoading = false this.SendLoading = false
}) })
.catch(err => { .catch(err => {
console.log(err)
this.SendLoading = false this.SendLoading = false
}) })
}, },
@ -1077,7 +1080,6 @@ export default {
TxxpLink(this.id) TxxpLink(this.id)
.then(res => { .then(res => {
if (res.success) { if (res.success) {
console.log(res.data)
this.copyFun(res.data) this.copyFun(res.data)
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
@ -1106,7 +1108,6 @@ export default {
.catch(err => { .catch(err => {
this.$message.destroy() this.$message.destroy()
this.$message.success({ content: '校验失败' }) this.$message.success({ content: '校验失败' })
console.log(err)
}) })
}, },
@ -1301,18 +1302,42 @@ export default {
.PrintMain { .PrintMain {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
max-height: 50vh;
overflow-y: auto; .PrintTitle {
.items { width: 100%;
display: inline-block; display: flex;
height: 28px; padding: 20px;
line-height: 26px; box-sizing: border-box;
border: 1px dashed #ccc; background: #f7f8fe;
border-radius: 4px; border: 1px dashed #cdcdcd;
padding: 0 10px; p {
font-size: 13px; margin: 0;
cursor: pointer; &:nth-child(2) {
margin: 5px 10px; margin-left: 35px;
}
span {
color: #ff6646;
}
}
}
.PrintMainBox {
max-height: 50vh;
overflow-y: auto;
margin-top: 5px;
.items {
padding-left: 1rem;
height: 2.5rem;
line-height: 2.5rem;
border-bottom: 1px solid #ebebeb;
cursor: pointer;
&:hover {
color: #2f54eb;
}
span {
font-weight: bolder;
margin-right: 0.6rem;
}
}
} }
} }
/*订舱弹窗文件功能对齐 */ /*订舱弹窗文件功能对齐 */
@ -1330,19 +1355,19 @@ export default {
/deep/ .ant-modal-body .ant-input-affix-wrapper { /deep/ .ant-modal-body .ant-input-affix-wrapper {
position: relative; position: relative;
z-index: 1; z-index: 1;
&::after{ &::after {
content:''; content: '';
position:absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: -1; z-index: -1;
background-color: @primary-color !important; background-color: @primary-color !important;
opacity: .04; opacity: 0.04;
} }
} }
/deep/ .ant-modal-body .ant-input{ /deep/ .ant-modal-body .ant-input {
background: none; background: none;
} }
.PrintRadio { .PrintRadio {

@ -130,7 +130,7 @@
<a-collapse class="collapse-box" :bordered="false" expandIconPosition="right" v-model="showKey"> <a-collapse class="collapse-box" :bordered="false" expandIconPosition="right" v-model="showKey">
<a-collapse-panel key="1"> <a-collapse-panel key="1">
<template slot="header"> <template slot="header">
<div class="title" :style="{ marginTop: '-10px' }"><i class="iconfont icon-rizhi"></i><span>日志</span></div> <div class="title"><i class="iconfont icon-rizhi"></i><span>日志</span></div>
</template> </template>
<div class="cargo-info"> <div class="cargo-info">
<div class="info-header"> <div class="info-header">
@ -428,7 +428,6 @@ export default {
this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'application/pdf;charset=utf-8' })) this.pdfUrl = window.URL.createObjectURL(new Blob([res], { type: 'application/pdf;charset=utf-8' }))
const fname = data.fileName // const fname = data.fileName //
const link = document.createElement('a') const link = document.createElement('a')
console.log(this.pdfUrl)
link.href = this.pdfUrl link.href = this.pdfUrl
link.setAttribute('download', fname) link.setAttribute('download', fname)
document.body.appendChild(link) document.body.appendChild(link)

@ -256,7 +256,6 @@ export default {
this.$message.success('复制成功!') this.$message.success('复制成功!')
}, },
init(queryParam = {}) { init(queryParam = {}) {
console.log(queryParam, 'queryParam')
this.gridOptions.pagerConfig = { this.gridOptions.pagerConfig = {
total: 0, total: 0,
currentPage: 1, currentPage: 1,
@ -307,7 +306,6 @@ export default {
this.$set(this.formRes, item.label, this.formRes[item.label] || '') this.$set(this.formRes, item.label, this.formRes[item.label] || '')
}) })
this.getList(this.formRes) this.getList(this.formRes)
console.log('=== 当前数据 ===', this.formRes, this.formData, this.formMoreData)
const len = this.formData.length % 4 const len = this.formData.length % 4
if (len > 2) { if (len > 2) {
this.formBtnCol = 24 this.formBtnCol = 24
@ -351,7 +349,6 @@ export default {
console.log('表格自定义数据 - 更多: ', this.formMoreTableData) console.log('表格自定义数据 - 更多: ', this.formMoreTableData)
}, },
handlePageChange({ currentPage, pageSize }) { handlePageChange({ currentPage, pageSize }) {
console.log(currentPage, pageSize)
this.gridOptions.pagerConfig.currentPage = currentPage this.gridOptions.pagerConfig.currentPage = currentPage
this.gridOptions.pagerConfig.pageSize = pageSize this.gridOptions.pagerConfig.pageSize = pageSize
this.getList(this.formRes) this.getList(this.formRes)
@ -363,17 +360,14 @@ export default {
}, },
tableRefresh() { tableRefresh() {
let data = { ...this.formRes } let data = { ...this.formRes }
console.log(data, 1)
this.init(this.formRes) this.init(this.formRes)
console.log(data, 2)
this.formRes = data this.formRes = data
}, },
tableMoreRefresh() { tableMoreRefresh() {
const arr = this.formRes.MBLNO.split(/-||,|[.]/) const arr = this.formRes.MBLNO.split(/-||,|[.]/)
let val = `` let val = ``
arr.map((item, index) => { arr.map((item, index) => {
val += `${item} val += `${item}`
`
}) })
this.moreNumVal = val this.moreNumVal = val
this.moreNumVisible = !this.moreNumVisible this.moreNumVisible = !this.moreNumVisible
@ -435,7 +429,6 @@ export default {
} else if (form.type === 'select') { } else if (form.type === 'select') {
// //
} }
console.log(this.formRes)
this.$forceUpdate() this.$forceUpdate()
}, },
@ -476,14 +469,12 @@ export default {
this.showColumns = [] this.showColumns = []
this.showColumns = arr this.showColumns = arr
this.gridOptions.columns = arr this.gridOptions.columns = arr
console.log('=新的clomn=', this.columns)
this.$forceUpdate() this.$forceUpdate()
}, },
handledbclick({ row }) { handledbclick({ row }) {
this.editColumns(row) this.editColumns(row)
}, },
editColumns(row) { editColumns(row) {
console.log(row)
this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid, mblno: row.mblno } }) this.$router.push({ name: 'BookingDetail', query: { id: row.id, type: row.carrierid, mblno: row.mblno } })
}, },
getList(queryParam = {}) { getList(queryParam = {}) {
@ -511,10 +502,8 @@ export default {
this.gridOptions.data.map(($item, $index) => { this.gridOptions.data.map(($item, $index) => {
this.$set(bookingList, $item.id, $item) this.$set(bookingList, $item.id, $item)
}) })
console.log(bookingList)
this.setBookingList(bookingList) this.setBookingList(bookingList)
this.$forceUpdate() this.$forceUpdate()
console.log('======分页数据======', this.gridOptions.data)
} else { } else {
this.$set(this.gridOptions, 'data', [...[]]) this.$set(this.gridOptions, 'data', [...[]])
this.$set(this.gridOptions, 'loading', false) this.$set(this.gridOptions, 'loading', false)
@ -625,7 +614,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
/*订舱表格内字体颜色 */ /*订舱表格内字体颜色 */
.mblno { .mblno {
color: @primary-color; color: @primary-color;
span { span {
margin-right: 0.5rem; margin-right: 0.5rem;
cursor: pointer; cursor: pointer;

@ -37,7 +37,7 @@ export default {
watch: { watch: {
formRes: { formRes: {
handler(nval, oval) { handler(nval, oval) {
console.log('编辑结果发生变化', nval, oval) // console.log('', nval, oval)
// if (Object.keys(nval).length > 0 && nval && oval) { // if (Object.keys(nval).length > 0 && nval && oval) {
// this.value = nval[this.labelData.type] // this.value = nval[this.labelData.type]
// } // }

@ -0,0 +1,150 @@
<template>
<a-modal
title="新增账号"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="8">
<a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<!-- <a-input
placeholder="请选择类型"
v-decorator="['typeCode', { rules: [{ required: true, message: '请输入EDI类型' }] }]"
/> -->
<a-select
placeholder="请选择类型"
v-decorator="['typeCode', { rules: [{ required: true, message: '请选择类型!' }] }]"
>
<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="8">
<a-form-item label="账号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入账号"
v-decorator="['account', { rules: [{ required: true, message: '请输入账号!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入密码"
v-decorator="['password', { rules: [{ required: true, message: '请输入密码!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="19">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { DjyWebsiteAccountConfigAddTenant } from '@/api/modular/main/CompanySiteaccount'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 21 }
},
typeData: [],
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {
this.TypeData = this.$options.filters['dictData']('website_account_type')
},
methods: {
//
add(record) {
this.visible = true
this.typeData = [
{
code: 10,
name: '收货人'
},
{
code: 20,
name: '发货人'
},
{
code: 30,
name: '通知人'
},
{
code: 40,
name: '第二通知人'
}
]
},
/**
* 提交表单
*/
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])
}
}
DjyWebsiteAccountConfigAddTenant(values)
.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>

@ -0,0 +1,138 @@
<template>
<a-modal
title="编辑账号"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="8">
<a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择类型"
v-decorator="['typeCode', { rules: [{ required: true, message: '请选择类型!' }] }]"
>
<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="8">
<a-form-item label="账号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入账号"
v-decorator="['account', { rules: [{ required: true, message: '请输入账号!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入密码"
v-decorator="['password', { rules: [{ required: true, message: '请输入密码!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="19">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { DjyWebsiteAccountConfigEditTenant } from '@/api/modular/main/CompanySiteaccount'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 21 }
},
typeData: [],
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
data: {}
}
},
mounted() {
this.TypeData = this.$options.filters['dictData']('website_account_type')
},
methods: {
//
edit(record) {
this.data = record
this.visible = true
const typeOption = this.$options
this.typeData = typeOption.filters['dictData']('edi_type')
setTimeout(() => {
this.form.setFieldsValue({
typeCode: record.typeCode,
account: record.account,
password: record.password,
remark: record.remark
})
}, 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
DjyWebsiteAccountConfigEditTenant(values)
.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>

@ -0,0 +1,221 @@
<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" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`">
<a-form-item :label="item.title">
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
</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" empty-text="">
<vxe-column type="seq" width="40" fixed="left"></vxe-column>
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
>
<template #default="{ row }" v-if="item.title == '类型'">
<span>{{ FnTurnD(row.typeCode) }}</span>
</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="
e => {
confirm(e, row)
}
"
>
<vxe-button type="text">删除</vxe-button>
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:loading="loading"
:current-page="queryParam.currentPage"
:page-size="queryParam.pageSize"
:total="queryParam.totalResult"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange"
>
</vxe-pager>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import {
DjyWebsiteAccountConfigPageTenant,
DjyWebsiteAccountConfigDeleteTenant
} from '@/api/modular/main/CompanySiteaccount'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
import columnSetting from '@/components/tableColumnSetting'
export default {
components: {
addForm,
editForm,
columnSetting
},
data() {
return {
TypeData: [],
// /
advanced: false,
loading: false,
setVisible: false,
setVisible1: false,
queryParam: {
currentPage: 1,
pageSize: 10,
totalResult: 1
},
ColumnsQuery: [],
columns: [
{
title: '类型',
align: 'center',
width: '100',
dataIndex: 'typeCode'
},
{
title: '账号',
align: 'center',
width: '80',
dataIndex: 'account'
},
{
title: '密码',
align: 'center',
width: '80',
dataIndex: 'password'
},
{
title: '备注',
align: 'center',
width: '80',
dataIndex: 'remark'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: []
}
},
created() {},
mounted() {
this.init()
this.TypeData = this.$options.filters['dictData']('website_account_type')
},
methods: {
FnTurnD(data) {
let Rdata = ''
this.TypeData.forEach(item => {
if (item.code == data) {
Rdata = item.name
}
})
return Rdata
},
toggleAdvanced() {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()
},
handlePageChange({ currentPage, pageSize }) {
this.queryParam.pageNo = currentPage
this.queryParam.pageSize = pageSize
this.FnGetData()
},
FnGetData() {
this.loading = true
DjyWebsiteAccountConfigPageTenant(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
})
},
/**
* 查询参数组装
*/
switchingDate() {
const obj = JSON.parse(JSON.stringify(this.queryParam))
return obj
},
confirm(e, data) {
this.DjyWebsiteAccountConfigDeleteTenant(data)
},
DjyWebsiteAccountConfigDeleteTenant(record) {
DjyWebsiteAccountConfigDeleteTenant(record).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.FnGetData()
} else {
this.$message.error(`删除失败,${res.message}`)
}
})
},
handleOk() {
this.FnGetData()
}
}
}
</script>
<style lang="less">
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
.Open {
}
.Close {
height: 45px;
overflow: hidden;
}
</style>

@ -17,7 +17,7 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<p class="CsFormTitle"><span>基本信息</span></p> <p class="CsFormTitle"><span><i class="iconfont icon-shiyongwendang"></i>基本信息</span></p>
<a-col :span="6"> <a-col :span="6">
<a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input <a-input
@ -109,7 +109,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<p class="CsFormTitle"><span>联系人信息</span></p> <p class="CsFormTitle"><span><i class="iconfont icon-tuandui"></i>联系人信息</span></p>
<vxe-toolbar> <vxe-toolbar>
<template #buttons> <template #buttons>
<vxe-button icon="vxe-icon-square-plus" @click="insertEvent()"></vxe-button> <vxe-button icon="vxe-icon-square-plus" @click="insertEvent()"></vxe-button>
@ -162,7 +162,7 @@
</template> </template>
</vxe-column> </vxe-column>
</vxe-table> </vxe-table>
<p class="CsFormTitle" :style="{ marginTop: '10px' }"><span>财务信息</span></p> <p class="CsFormTitle" :style="{ marginTop: '10px' }"><span><i class="iconfont icon-icon_xinyong_xianxing_jijin-217"></i>财务信息</span></p>
<a-row> <a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="发票抬头" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback> <a-form-item label="发票抬头" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
@ -376,11 +376,21 @@ export default {
background: #fff; background: #fff;
padding: 25px; padding: 25px;
} }
.CsForm .ant-form-item{
margin-bottom: 10px;
}
.CsFormTitle { .CsFormTitle {
border-bottom: 1px solid #c9c9c9; border-bottom: 1px solid #d9d9d9;
padding-bottom: 5px;
font-weight: bold;
color: #333;
margin-bottom: 25px;
} }
.CsFormTitle > span { .CsFormTitle > span {
padding: 0.25rem 0.5rem 0 0.5rem; padding: 0.25rem 0.5rem 0 0.5rem;
/* border: 1px solid #c9c9c9; */ /* border: 1px solid #c9c9c9; */
}
.CsFormTitle span i{
margin-right: 7px;
} }
</style> </style>

@ -58,6 +58,7 @@
</template> </template>
</vxe-toolbar> </vxe-toolbar>
<vxe-table <vxe-table
:column-config="{ resizable: true }"
@cell-dblclick="cellDBLClickEvent" @cell-dblclick="cellDBLClickEvent"
:data="loadData" :data="loadData"
border border
@ -134,13 +135,13 @@ const columns = [
{ {
title: '简称', title: '简称',
align: 'center', align: 'center',
width: '60', width: '120',
dataIndex: 'shortName' dataIndex: 'shortName'
}, },
{ {
title: '全称', title: '全称',
align: 'center', align: 'center',
width: '60', width: '90',
dataIndex: 'fullName' dataIndex: 'fullName'
}, },
{ {
@ -152,7 +153,7 @@ const columns = [
{ {
title: '电话', title: '电话',
align: 'center', align: 'center',
width: '60', width: '110',
dataIndex: 'tel' dataIndex: 'tel'
}, },
{ {

Loading…
Cancel
Save