完善页面4

This commit is contained in:
2026-02-13 00:38:13 +08:00
parent 01d1c345d0
commit 194dd19174
2 changed files with 377 additions and 87 deletions

View File

@@ -6,74 +6,235 @@
<text class="bc-sep">/</text>
<text class="bc-item">接口配置</text>
<text class="bc-sep">/</text>
<text class="bc-item active">电子面单</text>
<text class="bc-item active">电子面单配置</text>
</view>
</view>
<view class="content-card">
<view class="tabs-header">
<view class="tab-item active"><text class="tab-text">面单配置</text></view>
<view :class="['tab-item', activeTab == 0 ? 'active' : '']" @click="activeTab = 0">
<text class="tab-text">基础配置</text>
</view>
<view :class="['tab-item', activeTab == 1 ? 'active' : '']" @click="activeTab = 1">
<text class="tab-text">一号通配置</text>
</view>
</view>
<view class="form-section">
<!-- 基础配置 -->
<view class="form-section" v-if="activeTab == 0">
<view class="form-content">
<view class="form-row">
<view class="form-label"><text class="star">*</text>打印方式:</view>
<view class="form-label">开启电子面单:</view>
<view class="form-input-box">
<radio-group class="form-radio-group" @change="onPrintChange">
<label class="radio-label"><radio value="cloud" checked color="#2d8cf0" /><text class="radio-text">云打印</text></label>
<label class="radio-label"><radio value="local" color="#2d8cf0" /><text class="radio-text">本地打印</text></label>
<radio-group class="form-radio-group" @change="onBaseChange('enabled', $event)">
<label class="radio-label"><radio value="1" :checked="form.base.enabled == '1'" color="#2d8cf0" /><text class="radio-text">开启</text></label>
<label class="radio-label"><radio value="0" :checked="form.base.enabled == '0'" color="#2d8cf0" /><text class="radio-text">关闭</text></label>
</radio-group>
<text class="form-tips">电子面单是否开启</text>
</view>
</view>
<view class="form-row">
<view class="form-label"><text class="star">*</text>电子面单账号:</view>
<view class="form-label">电子面单类型:</view>
<view class="form-input-box">
<input class="form-input" v-model="form.account" placeholder="请输入账号" />
<text class="form-tips">快递100或一号通申请的电子面单账号</text>
<radio-group class="form-radio-group" @change="onBaseChange('type', $event)">
<label class="radio-label"><radio value="onepass" :checked="form.base.type == 'onepass'" color="#2d8cf0" /><text class="radio-text">一号通</text></label>
</radio-group>
<text class="form-tips">电子面单类型</text>
</view>
</view>
<view class="form-actions" style="margin-top: 20px;">
<button class="submit-btn" type="primary" @click="handleSave">提交</button>
</view>
</view>
</view>
<!-- 一号通配置 -->
<view class="form-section" v-if="activeTab == 1">
<view class="form-content">
<view class="form-row">
<view class="form-label">发货人姓名:</view>
<view class="form-input-box">
<input class="form-input max-width-input" v-model="form.onepass.senderName" placeholder="王二麻子" />
<text class="form-tips">快递面单发货人姓名</text>
</view>
</view>
<view class="form-row">
<view class="form-label"><text class="star">*</text>电子面单密钥:</view>
<view class="form-label">发货人电话:</view>
<view class="form-input-box">
<input class="form-input" v-model="form.secret" type="password" placeholder="请输入密钥" />
<input class="form-input max-width-input" v-model="form.onepass.senderPhone" placeholder="13020202020" />
<text class="form-tips">快递面单发货人电话</text>
</view>
</view>
<view class="form-actions">
<button class="submit-btn" type="primary" @click="handleSubmit">保存配置</button>
<view class="form-row">
<view class="form-label">发货人详细地址:</view>
<view class="form-input-box">
<input class="form-input max-width-input" v-model="form.onepass.senderAddress" placeholder="山西省长治市钢铁去送货单" />
<text class="form-tips">快递面单发货人详细地址</text>
</view>
</view>
<view class="form-row">
<view class="form-label">打印机编号:</view>
<view class="form-input-box">
<input class="form-input max-width-input" v-model="form.onepass.printerId" placeholder="请输入打印机编号" />
<text class="form-tips">请购买快速100二代云打印机(KX100L3)</text>
</view>
</view>
<view class="form-actions" style="margin-top: 20px;">
<button class="submit-btn" type="primary" @click="handleSave">提交</button>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
const form = reactive({ account: 'ES123456', secret: 'PRIVATE_KEY', printMode: 'cloud' })
const onPrintChange = (e : any) => { form.printMode = e.detail.value }
const handleSubmit = () => { uni.showToast({ title: '电子面单配置保存成功' }) }
const activeTab = ref(0)
const form = reactive({
base: {
enabled: '1',
type: 'onepass'
},
onepass: {
senderName: '王二麻子',
senderPhone: '13020202020',
senderAddress: '山西省长治市钢铁去送货单',
printerId: ''
}
})
const onBaseChange = (key : string, e : any) => {
form.base[key] = e.detail.value
}
const handleSave = () => {
uni.showToast({
title: '提交成功',
icon: 'success'
})
}
</script>
<style scoped>
.admin-page-container { min-height: 100vh; background-color: #f5f7f9; padding: 20px; }
.breadcrumb { display: flex; flex-direction: row; margin-bottom: 20px; }
.bc-item { font-size: 14px; color: #999; }
.bc-item.active { color: #333; }
.bc-sep { margin: 0 8px; color: #ccc; }
.content-card { background-color: #fff; border-radius: 4px; }
.tabs-header { display: flex; flex-direction: row; border-bottom: 1px solid #f0f0f0; padding: 0 20px; }
.tab-item { padding: 15px 20px; border-bottom: 2px solid transparent; }
.tab-text { font-size: 14px; color: #666; }
.tab-item.active { border-bottom-color: #2d8cf0; }
.tab-item.active .tab-text { color: #2d8cf0; font-weight: bold; }
.form-section { padding: 40px 20px; }
.form-content { max-width: 800px; }
.form-row { display: flex; flex-direction: row; margin-bottom: 24px; }
.form-label { width: 140px; font-size: 14px; color: #606266; text-align: right; margin-right: 20px; padding-top: 8px; }
.star { color: #ff4d4f; margin-right: 4px; }
.form-input-box { flex: 1; }
.form-input { width: 100%; max-width: 400px; border: 1px solid #dcdfe6; border-radius: 4px; height: 36px; padding: 0 12px; font-size: 14px; }
.form-tips { display: block; font-size: 12px; color: #999; margin-top: 8px; }
.form-radio-group { display: flex; flex-direction: row; align-items: center; height: 36px; }
.radio-label { display: flex; flex-direction: row; align-items: center; margin-right: 20px; }
.radio-text { font-size: 14px; margin-left: 8px; }
.form-actions { margin-top: 40px; padding-left: 160px; }
.submit-btn { width: 100px; height: 36px; background-color: #2d8cf0; color: #fff; border-radius: 4px; font-size: 14px; line-height: 36px; text-align: center; }
.admin-page-container {
min-height: 100vh;
background-color: #f5f7f9;
padding: 20px;
}
.breadcrumb {
display: flex;
flex-direction: row;
margin-bottom: 20px;
}
.bc-item {
font-size: 14px;
color: #999;
}
.bc-item.active {
color: #333;
}
.bc-sep {
margin: 0 8px;
color: #ccc;
}
.content-card {
background-color: #fff;
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0,21,41,.08);
}
.tabs-header {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
padding: 0 30px;
}
.tab-item {
padding: 16px 20px;
margin-right: 32px;
cursor: pointer;
border-bottom: 2px solid transparent;
}
.tab-text {
font-size: 14px;
color: #666;
}
.tab-item.active {
border-bottom-color: #2d8cf0;
}
.tab-item.active .tab-text {
color: #2d8cf0;
font-weight: bold;
}
.form-section {
padding: 30px;
}
.form-content {
max-width: 900px;
}
.form-row {
display: flex;
flex-direction: row;
margin-bottom: 24px;
}
.form-label {
width: 140px;
font-size: 14px;
color: #333;
text-align: right;
margin-right: 24px;
padding-top: 8px;
}
.form-input-box {
flex: 1;
}
.form-input {
width: 100%;
border: 1px solid #dcdfe6;
border-radius: 4px;
height: 34px;
padding: 0 12px;
font-size: 14px;
}
.max-width-input {
max-width: 450px;
}
.form-tips {
display: block;
font-size: 12px;
color: #999;
margin-top: 10px;
line-height: 1.6;
}
.form-radio-group {
display: flex;
flex-direction: row;
align-items: center;
height: 34px;
}
.radio-label {
display: flex;
flex-direction: row;
align-items: center;
margin-right: 24px;
}
.radio-text {
font-size: 14px;
margin-left: 6px;
color: #606266;
}
.form-actions {
padding-left: 164px;
}
.submit-btn {
width: 65px;
height: 32px;
background-color: #2d8cf0;
color: #fff;
border-radius: 4px;
font-size: 14px;
line-height: 32px;
text-align: center;
border: none;
}
</style>

View File

@@ -6,75 +6,204 @@
<text class="bc-sep">/</text>
<text class="bc-item">接口配置</text>
<text class="bc-sep">/</text>
<text class="bc-item active">物流查询</text>
<text class="bc-item active">物流查询配置</text>
</view>
</view>
<view class="content-card">
<view class="tabs-header">
<view class="tab-item active"><text class="tab-text">物流配置</text></view>
<view :class="['tab-item', activeTab == 0 ? 'active' : '']" @click="activeTab = 0">
<text class="tab-text">基础配置</text>
</view>
<view :class="['tab-item', activeTab == 1 ? 'active' : '']" @click="activeTab = 1">
<text class="tab-text">阿里云配置</text>
</view>
</view>
<view class="form-section">
<!-- 基础配置 -->
<view class="form-section" v-if="activeTab == 0">
<view class="form-content">
<view class="form-row">
<view class="form-label"><text class="star">*</text>物流查询服务:</view>
<view class="form-label">接口选择:</view>
<view class="form-input-box">
<radio-group class="form-radio-group" @change="onServiceChange">
<label class="radio-label"><radio value="kuaidi100" checked color="#2d8cf0" /><text class="radio-text">快递100</text></label>
<label class="radio-label"><radio value="onepass" color="#2d8cf0" /><text class="radio-text">一号通</text></label>
<radio-group class="form-radio-group" @change="onBaseChange('type', $event)">
<label class="radio-label"><radio value="onepass" :checked="form.base.type == 'onepass'" color="#2d8cf0" /><text class="radio-text">一号通</text></label>
<label class="radio-label"><radio value="aliyun" :checked="form.base.type == 'aliyun'" color="#2d8cf0" /><text class="radio-text">阿里云物流查询</text></label>
</radio-group>
<text class="form-tips highlight">建议使用一号通更方便不用配置密钥阿里云云市场购买链接https://0x9.me/w9vnq</text>
</view>
</view>
<view class="form-actions" style="margin-top: 20px;">
<button class="submit-btn" type="primary" @click="handleSave">提交</button>
</view>
</view>
</view>
<!-- 阿里云配置 -->
<view class="form-section" v-if="activeTab == 1">
<view class="form-content">
<view class="form-row">
<view class="form-label"><text class="star">*</text>Customer:</view>
<view class="form-label">快递查询密钥:</view>
<view class="form-input-box">
<input class="form-input" v-model="form.customer" placeholder="请输入Customer" />
<text class="form-tips">快递100分配给贵司的Customer</text>
<input class="form-input max-width-input" v-model="form.ali.appCode" placeholder="请输入快递查询密钥" />
<text class="form-tips highlight">阿里云云市场快递查询接口密钥购买地址https://market.aliyun.com/products/57126001/cmapi021863.html?spm=5176.2020520132.101.4.42a672183nvgfH#sku=yuncode1586300000</text>
</view>
</view>
<view class="form-row">
<view class="form-label"><text class="star">*</text>Key:</view>
<view class="form-input-box">
<input class="form-input" v-model="form.key" type="password" placeholder="请输入Key" />
<text class="form-tips">快递100分配给贵司的Key</text>
</view>
</view>
<view class="form-actions">
<button class="submit-btn" type="primary" @click="handleSubmit">保存</button>
<view class="form-actions" style="margin-top: 20px;">
<button class="submit-btn" type="primary" @click="handleSave">提交</button>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
const form = reactive({ customer: 'C123456789', key: 'K123456789', service: 'kuaidi100' })
const onServiceChange = (e : any) => { form.service = e.detail.value }
const handleSubmit = () => { uni.showToast({ title: '保存成功' }) }
const activeTab = ref(0)
const form = reactive({
base: {
type: 'onepass'
},
ali: {
appCode: ''
}
})
const onBaseChange = (key : string, e : any) => {
form.base[key] = e.detail.value
}
const handleSave = () => {
uni.showToast({
title: '提交成功',
icon: 'success'
})
}
</script>
<style scoped>
.admin-page-container { min-height: 100vh; background-color: #f5f7f9; padding: 20px; }
.breadcrumb { display: flex; flex-direction: row; align-items: center; margin-bottom: 20px; }
.bc-item { font-size: 14px; color: #999; }
.bc-item.active { color: #333; }
.bc-sep { margin: 0 8px; color: #ccc; }
.content-card { background-color: #fff; border-radius: 4px; overflow: hidden; }
.tabs-header { display: flex; flex-direction: row; border-bottom: 1px solid #f0f0f0; padding: 0 20px; }
.tab-item { padding: 15px 20px; border-bottom: 2px solid transparent; }
.tab-text { font-size: 14px; color: #666; }
.tab-item.active { border-bottom-color: #2d8cf0; }
.tab-item.active .tab-text { color: #2d8cf0; font-weight: bold; }
.form-section { padding: 40px 20px; }
.form-content { max-width: 800px; }
.form-row { display: flex; flex-direction: row; margin-bottom: 24px; }
.form-label { width: 140px; font-size: 14px; color: #606266; text-align: right; margin-right: 20px; padding-top: 8px; }
.star { color: #ff4d4f; margin-right: 4px; }
.form-input-box { flex: 1; }
.form-input { width: 100%; max-width: 400px; border: 1px solid #dcdfe6; border-radius: 4px; height: 36px; padding: 0 12px; font-size: 14px; }
.form-tips { display: block; font-size: 12px; color: #999; margin-top: 8px; }
.form-radio-group { display: flex; flex-direction: row; align-items: center; height: 36px; }
.radio-label { display: flex; flex-direction: row; align-items: center; margin-right: 20px; }
.radio-text { font-size: 14px; margin-left: 8px; }
.form-actions { margin-top: 40px; padding-left: 160px; }
.submit-btn { width: 80px; height: 36px; background-color: #2d8cf0; color: #fff; border-radius: 4px; font-size: 14px; line-height: 36px; text-align: center; border: none; }
.admin-page-container {
min-height: 100vh;
background-color: #f5f7f9;
padding: 20px;
}
.breadcrumb {
display: flex;
flex-direction: row;
margin-bottom: 20px;
}
.bc-item {
font-size: 14px;
color: #999;
}
.bc-item.active {
color: #333;
}
.bc-sep {
margin: 0 8px;
color: #ccc;
}
.content-card {
background-color: #fff;
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0,21,41,.08);
}
.tabs-header {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
padding: 0 30px;
}
.tab-item {
padding: 16px 20px;
margin-right: 32px;
cursor: pointer;
border-bottom: 2px solid transparent;
}
.tab-text {
font-size: 14px;
color: #666;
}
.tab-item.active {
border-bottom-color: #2d8cf0;
}
.tab-item.active .tab-text {
color: #2d8cf0;
font-weight: bold;
}
.form-section {
padding: 30px;
}
.form-content {
max-width: 900px;
}
.form-row {
display: flex;
flex-direction: row;
margin-bottom: 24px;
}
.form-label {
width: 140px;
font-size: 14px;
color: #333;
text-align: right;
margin-right: 24px;
padding-top: 8px;
}
.form-input-box {
flex: 1;
}
.form-input {
width: 100%;
border: 1px solid #dcdfe6;
border-radius: 4px;
height: 34px;
padding: 0 12px;
font-size: 14px;
}
.max-width-input {
max-width: 450px;
}
.form-tips {
display: block;
font-size: 12px;
color: #999;
margin-top: 10px;
line-height: 1.6;
}
.highlight {
color: #c0c4cc;
}
.form-radio-group {
display: flex;
flex-direction: row;
align-items: center;
height: 34px;
}
.radio-label {
display: flex;
flex-direction: row;
align-items: center;
margin-right: 24px;
}
.radio-text {
font-size: 14px;
margin-left: 6px;
color: #606266;
}
.form-actions {
padding-left: 164px;
}
.submit-btn {
width: 65px;
height: 32px;
background-color: #2d8cf0;
color: #fff;
border-radius: 4px;
font-size: 14px;
line-height: 32px;
text-align: center;
border: none;
}
</style>