79 lines
1.3 KiB
Vue
79 lines
1.3 KiB
Vue
<script setup>
|
|
//
|
|
import {
|
|
ref,
|
|
reactive,
|
|
getCurrentInstance,
|
|
defineExpose,
|
|
} from 'vue'
|
|
// 工具库
|
|
import util from '@/common/js/util';
|
|
// api
|
|
import api from '@/api/index.js';
|
|
const {
|
|
proxy
|
|
} = getCurrentInstance()
|
|
// 表单
|
|
const form = reactive({
|
|
// 物流公司名称
|
|
expressName: '',
|
|
// 运单号
|
|
trackingNumber: '',
|
|
})
|
|
|
|
// 获取物流公司列表
|
|
function getExpressList() {
|
|
api.getDict({
|
|
path: ['express_company'],
|
|
}).then(rs => {
|
|
if (rs.code == 200) {
|
|
return
|
|
}
|
|
util.alert({
|
|
content: rs.msg,
|
|
showCancel: false,
|
|
})
|
|
})
|
|
}
|
|
|
|
// 开启弹窗
|
|
function open() {
|
|
proxy.$refs.express.open()
|
|
}
|
|
|
|
// 关闭弹窗
|
|
function close() {
|
|
proxy.$refs.express.close()
|
|
}
|
|
|
|
defineExpose({
|
|
open,
|
|
close
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<uni-popup ref="express" type="center">
|
|
<view class="expressAlt">
|
|
<view class="header rows">
|
|
<view>填写快递单号</view>
|
|
<uni-icons type="closeempty" />
|
|
</view>
|
|
|
|
<view class="form">
|
|
<view class="line df aic">
|
|
<view class="">快递公司</view>
|
|
<input type="text" placeholder="输入快递公司" />
|
|
</view>
|
|
|
|
<view class="line df aic">
|
|
<view class="">快递单号</view>
|
|
<input type="text" placeholder="输入快递公司" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</template>
|
|
|
|
<style>
|
|
</style> |