张同海 2 years ago
commit bb7845886c

@ -543,8 +543,11 @@
has-feedback
prop="pkgs"
>
<div class="line-box">
<inputView type="pkgs" :parentVal="details.pkgs" inputType="number" @getInputChange="inputChange"/>
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('pkgs')"></i>
<!-- <a-input :allowClear="true" v-model="details.pkgs" type="number" @change="changePkgs"/> -->
</div>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -581,6 +584,7 @@
<div class="line-box">
<inputView type="kgs" :parentVal="details.kgs" @getInputChange="inputChange"/>
<!-- <a-input :allowClear="true" v-model="details.kgs" /> -->
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('kgs')"></i>
<span class="unit">KGS</span>
</div>
</a-form-model-item>
@ -597,6 +601,7 @@
<div class="line-box">
<inputView type="cbm" :parentVal="details.cbm" @getInputChange="inputChange"/>
<!-- <a-input :allowClear="true" v-model="details.cbm" /> -->
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('cbm')"></i>
<span class="unit">CBM</span>
</div>
</a-form-model-item>
@ -677,6 +682,109 @@
</a-form>
</template>
</a-modal>
<!-- == 件重尺编辑模板 == -->
<a-modal width="500px" :maskClosable="false" v-model="textEntryModalVisible" :title="textEntryModalTitle">
<div class="text-entry-box">
<!-- 件数包装 -->
<a-form v-if="textEntryType === 'pkgs'">
<!-- <div class="tit">
<span>箱数或件数</span>
<span>No.of containers or pkgs</span>
</div> -->
<div class="text-input">
<a-textarea
v-model="details.pkgsTotal"
placeholder="请输入内容"
:auto-size="{ minRows: 6, maxRows: 9 }"
@change="pkgsTextChange"
/>
</div>
<!-- <div class="text-res">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item
label="总件数"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<inputView type="pkgs" :parentVal="details.pkgs" inputType="number" @getInputChange="inputChange"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="件数包装"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<auto-complete
:allowClear="true"
v-model="details.kindpkgs"
class="customer-input"
:data-source="kindpkgsDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px' }"
@select="kindpkgsSelect"
@change="kindpkgsChange"
@focus="kindpkgsChange"
/>
</a-form-item>
</a-col>
</a-row>
</div> -->
</a-form>
<!-- 毛重 -->
<a-form v-if="textEntryType === 'kgs'">
<!-- <div class="tit">
<span>毛重公斤</span>
<span>Gross Weight </span>
</div> -->
<div class="text-input">
<a-textarea
v-model="details.kgsTotal"
placeholder="请输入内容"
:auto-size="{ minRows: 6, maxRows: 9 }"
@change="kgsTextChange"
/>
</div>
<!-- <div class="text-res">
<div class="kgs-label">
<span class="left">总重量</span>
<inputView type="kgs" :parentVal="details.kgs" @getInputChange="inputChange"/>
<span class="unit">KGS</span>
</div>
</div> -->
</a-form>
<!-- 尺码 -->
<a-form v-if="textEntryType === 'cbm'">
<!-- <div class="tit">
<span>尺码(立方米)</span>
<span>Gross Weight </span>
</div> -->
<div class="text-input">
<a-textarea
v-model="details.cbmTotal"
placeholder="请输入内容"
:auto-size="{ minRows: 6, maxRows: 9 }"
@change="cbmTextChange"
/>
</div>
<!-- <div class="text-res">
<div class="kgs-label">
<span class="left">总重量</span>
<inputView type="cbm" :parentVal="details.cbm" @getInputChange="inputChange"/>
<span class="unit">CBM</span>
</div>
</div> -->
</a-form>
</div>
<template slot="footer">
<a-button type="primary" @click="textEntryClose"></a-button>
</template>
</a-modal>
<!-- == 件重尺编辑模板 == -->
</a-collapse-panel>
</a-collapse>
</template>
@ -767,7 +875,10 @@ export default {
customerModelconfirm: false,
showShipper: '',
showConsignee: '',
showNotifier: ''
showNotifier: '',
textEntryModalVisible: false,
textEntryType: '',
textEntryModalTitle: ''
}
},
watch: {
@ -1700,6 +1811,75 @@ export default {
this.changePkgs()
}
this.$forceUpdate()
},
editTextEntryModel (type) {
this.textEntryModalVisible = true
if (type === 'pkgs') {
this.textEntryModalTitle = '件数/包装'
} else if (type === 'kgs') {
this.textEntryModalTitle = '毛重'
} else if (type === 'cbm') {
this.textEntryModalTitle = '尺码'
}
this.textEntryType = type
},
textEntryClose () {
this.textEntryModalVisible = false
this.textEntryModalTitle = ''
this.textEntryType = false
},
//
pkgsTextChange () {
const pkgsTexyVal = this.details.pkgsTotal
const arr = pkgsTexyVal.split(/\n|\r/g)
let pkgs = 0
let kindpkgs = ''
console.log('arr', arr)
arr.map((item, index) => {
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
console.log('分割数组:', regexStr)
if (regexStr && Number(regexStr[0])) {
pkgs += Number(regexStr[0])
}
if (!kindpkgs && regexStr && /^[a-zA-Z]+$/.test(regexStr[1])) {
kindpkgs = regexStr[1]
}
})
console.log('包装:', kindpkgs, ' 、件数:', pkgs)
this.details.pkgs = pkgs
this.details.kindpkgs = kindpkgs
},
//
kgsTextChange () {
const kgsTexyVal = this.details.kgsTotal
const arr = kgsTexyVal.split(/\n|\r/g)
let kgs = 0
console.log('arr', arr)
arr.map((item, index) => {
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
console.log('分割数组:', regexStr)
if (regexStr && Number(regexStr[0])) {
kgs += Number(regexStr[0])
}
})
console.log('总重量:', kgs)
this.details.kgs = kgs
},
//
cbmTextChange () {
const cbmTexyVal = this.details.cbmTotal
const arr = cbmTexyVal.split(/\n|\r/g)
let cbm = 0
console.log('arr', arr)
arr.map((item, index) => {
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g);
console.log('分割数组:', regexStr)
if (regexStr && Number(regexStr[0])) {
cbm += Number(regexStr[0])
}
})
console.log('总重量:', cbm)
this.details.cbm = cbm
}
}
}
@ -1918,6 +2098,7 @@ export default {
.line-box {
display: flex;
margin-top: 6px;
overflow: hidden;
span.unit {
font-size: 12px;
color: #999;
@ -1926,6 +2107,12 @@ export default {
line-height: 28px;
padding-left: 5px;
}
.edit-icon{
font-size: 14px;
line-height: 28px;
margin-left: 4px;
cursor: pointer;
}
}
.required{
@ -2009,4 +2196,33 @@ export default {
right: 8px !important;
}
.text-entry-box {
.tit{
height:40px;
line-height:40px;
font-size:14px;
color: #333;
margin-bottom: 6px;
}
.text-res {
margin-top: 20px;
.kgs-label{
display: flex;
.left{
line-height: 28px;
display: block;
width: 68px;
text-align: left;
}
.unit{
display: block;
width: 60px;
margin-left:10px;
text-align: left;
line-height: 28px;
}
}
}
}
</style>

@ -113,7 +113,7 @@
<div class="child-log" v-for="(child, cindex) in bookingLog.detail" :key="cindex">
<span class="log-time">{{ child.opTime }}</span>
<i class="iconfont icon-yuanxuankuang2 icon"></i>
<span class="log-name">{{ child.status }}</span>
<span class="log-name">{{ child.status }} <span class="min-log" v-if="child.cntrno">:{{ child.cntrno }}</span> </span>
</div>
</div>
</div>
@ -775,6 +775,11 @@ export default {
}
.log-name {
flex: 1;
.min-log{
font-size: 12px;
color: #999;
margin-left: 4px;
}
}
}
.child-log {
@ -829,6 +834,15 @@ export default {
}
.log-name {
flex: 1;
display: flex;
.min-log{
font-size: 12px;
color: #999;
margin-left: 4px;
flex: 1;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.hideline {

@ -6,34 +6,26 @@
<div slot="content" class="table-page-search-wrapper">
<a-form layout="inline" :form="form">
<a-row :gutter="48">
<a-col :md="6" :sm="24" :style="{ paddingRight: 0 }">
<a-col :md="5" :sm="24" :style="{ paddingRight: 0 }">
<a-form-item
label="接口代码"
label="API接口"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
>
<a-input
placeholder="请输入接口代码"
v-decorator="['ApiCode', { rules: [{ required: false, message: '请输入接口代码' }] }]"
/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24" :style="{ paddingRight: 0 }">
<a-form-item
label="接口名称"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
<a-select
style="width: 100%"
show-search
:filter-option="filterOption"
:dropdownMatchSelectWidth="false"
v-decorator="['ApiName']"
>
<a-input
placeholder="请输入接口名称"
v-decorator="[
'ApiName',
{ rules: [{ required: false, message: '请输入接口名称' }] },
]"
/>
<a-select-option v-for="(api, aindex) in apiInterface" :key="api.name">
{{ api.name }} / {{ api.code }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24" :style="{ paddingRight: 0 }">
<a-col :md="4" :sm="24" :style="{ paddingRight: 0 }">
<a-form-item
label="租户名称"
:labelCol="labelCol"
@ -48,7 +40,7 @@
/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-col :md="4" :sm="24" :style="{ paddingRight: 0 }">
<a-form-item
label="用户姓名"
:labelCol="labelCol"
@ -63,7 +55,7 @@
/>
</a-form-item>
</a-col>
<a-col :md="12" :sm="24" :style="{ paddingRight: 0 }">
<a-col :md="7" :sm="24" :style="{ paddingRight: 0 }">
<a-form-item
label="是否禁用"
:labelCol="labelCol"
@ -82,7 +74,7 @@
</a-radio-group>
</a-form-item>
</a-col>
<a-col :md="12" :sm="24" :labelCol="{ span: 2, offset: 12 }">
<a-col :md="4" :sm="24" :labelCol="{ span: 2, offset: 12 }">
<span class="table-page-search-submitButtons" style="text-align: right">
<a-button type="primary" @click="tableRefresh"></a-button>
<a-button style="margin-left: 8px" @click="tableReset"></a-button>
@ -122,7 +114,7 @@
<vxe-button type="text" class="disable-btn active" @click="removeColumns(row)"></vxe-button>
<span v-if="row.isDisable" class="disable-btn" @click="setDisableFun(row)"></span>
<span v-else class="disable-btn active" @click="setDisableFun(row)"></span>
<a-popconfirm title="确认删除" ok-text="" cancel-text="" @confirm="secretResetFun(row)" @cancel="cancel">
<a-popconfirm title="确认重置秘钥" ok-text="" cancel-text="" @confirm="secretResetFun(row)" @cancel="cancel">
<vxe-button class="disable-btn active" type="text">重置秘钥</vxe-button>
</a-popconfirm>
</template>
@ -131,7 +123,7 @@
</x-card>
</a-col>
</a-row>
<add-form ref="addForm" :formData="addFormData" :type="addFormType" @ok="handleOk" />
<add-form ref="addForm" :formData="addFormData" :type="addFormType" :index="addFromIndex" @ok="handleOk" />
</div>
</template>
<script>
@ -191,11 +183,15 @@ export default {
data: [],
},
addFormData: {},
addFormType: 'add'
addFormType: 'add',
addFromIndex: null,
apiInterface: [],
}
},
created() {
this.getList()
this.apiInterface = this.$options.filters['dictData']('api_interface')
console.log('apiInterface', this.apiInterface)
},
mounted() {},
methods: {
@ -256,6 +252,7 @@ export default {
editColumns(data) {
this.addFormType = 'edit'
this.addFormId = data.id
this.addFromIndex = data.row_id
GetApiDetail({
id: this.addFormId,
}).then((res) => {
@ -367,6 +364,7 @@ export default {
tableHeaderEdit() {},
setDisableFun(data) {
console.log('是否禁用: ', data.id, data.isDisable, data)
debugger
DisableApi({
id: data.id,
disable: !data.isDisable
@ -401,7 +399,10 @@ export default {
console.log(err)
})
},
cancel() {}
cancel() {},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
</script>

@ -15,24 +15,24 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item
label="接口代码"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="apiCode"
>
<a-input placeholder="请输入接口代码" v-model="formData.apiCode" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item
label="接口名称"
label="API接口"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="apiName"
>
<a-input placeholder="请输入接口名称" v-model="formData.apiName" />
<a-select
style="width: 100%"
v-model="formData.apiName"
@change="apiHandleChange"
show-search
:filter-option="filterOption"
:dropdownMatchSelectWidth="false"
>
<a-select-option v-for="(api, aindex) in apiInterface" :key="aindex">
{{ api.name }} / {{ api.code }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -58,7 +58,7 @@
placeholder="请选择租户"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:filter-option="filterOption"
:not-found-content="null"
@select="tenantSelect"
>
@ -106,7 +106,8 @@
has-feedback
style="margin-bottom:0;"
>
{{ formData.apiSecret }}
<span>{{ formData.apiSecret }}</span>
<span class="copy-tip" @click="copyFun(formData.apiSecret)"><i class="iconfont icon-fuzhi2"></i></span>
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="formData.apiKey">
@ -117,7 +118,8 @@
has-feedback
style="margin-bottom:0;"
>
{{ formData.apiKey }}
<span>{{ formData.apiKey }}</span>
<span class="copy-tip" @click="copyFun(formData.apiKey)"><i class="iconfont icon-fuzhi2"></i></span>
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="formData.apiKey">
@ -156,6 +158,10 @@ import {
formData: {
type: Object,
default: null
},
index: {
type: Number,
default: null
}
},
data () {
@ -186,7 +192,8 @@ import {
rules: {
apiCode: [{ required: true, message: '请输入接口代码!', trigger: 'change' }],
apiName: [{ required: true, message: '请输入接口名称!', trigger: 'change' }]
}
},
apiInterface: []
}
},
computed: {
@ -205,6 +212,8 @@ import {
}
},
mounted () {
this.apiInterface = this.$options.filters['dictData']('api_interface')
console.log('apiInterface', this.apiInterface)
SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => {
this.TenantData = res.data.rows
})
@ -226,6 +235,7 @@ import {
},
handleCancel () {
this.$refs.addFrom.clearValidate()
this.$parent.$data.addFromIndex = null
this.visible = false
},
tenantIdSearch(value) {
@ -267,9 +277,28 @@ import {
this.formData.tenantName = this.TenantData[value].name || ''
},
setDisableFun () {
debugger
this.$parent.setDisableFun(this.formData)
// this.$parent.init()
this.$parent.setDisableFun({
...this.formData,
...{ row_id: this.index },
...{ isDisable: !this.formData.isDisable }
})
},
copyFun(data) {
const copyInput = document.createElement('input')
document.body.appendChild(copyInput)
copyInput.setAttribute('value', data)
copyInput.select()
document.execCommand('Copy', false, null)
this.$message.success('复制成功')
copyInput.remove()
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
apiHandleChange (value) {
console.log(value)
this.formData.apiCode = this.apiInterface[value].id
this.formData.apiName = this.apiInterface[value].name
}
}
}
@ -293,4 +322,8 @@ import {
margin-left: 10px;
font-size: 12px;
}
.copy-tip{
margin-left: 10px;
color: @primary-color;
}
</style>

Loading…
Cancel
Save