Compare commits

...

8 Commits

12 changed files with 223 additions and 224 deletions

View File

@ -43,12 +43,13 @@ export function uploadSecurityFileByType(query,data) {
}
// 通用上传文件下载-通用文件下载
// api/FileUpload/FileUpload.js
export function securityFileDownload(query) {
return request({
url: '/common/securityFileDownload',
method: 'get',
params: query,
responseType: 'blob', // 设置响应类型为 blob
responseType: 'arraybuffer', // 改为 arraybuffer
isEncrypt: false
})
}

View File

@ -2,8 +2,10 @@
export default {
// baseUrl: 'https://vue.ruoyi.vip/prod-api', //
// baseUrl: '/prod-api', //前后端分离版的接口地址,转发代理 设置在了manifest.json文件中
// baseUrl: 'http://192.168.99.25:18090', //前后端分离版的接口地址
baseUrl: '/prod-api', //前后端分离版的接口地址
// baseUrl: 'http://192.168.99.25:18090', //--慎用--慎用--慎用前后端分离版的接口地址--大冢服务器--慎用
baseUrl: 'http://106.15.139.36:18090', //前后端分离版的接口地址
// baseUrl: '/prod-api', //前后端分离版的接口地址
//测试提交
// 应用信息
appInfo: {

View File

@ -8,6 +8,8 @@ import {useDict} from '@/utils/dict'
import * as Pinia from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
export function createApp() {
const app = createSSRApp(App)
// const pinia = createPinia()

View File

@ -57,34 +57,25 @@
},
"vueVersion": "3",
"h5": {
"template": "static/index.html",
"publicPath": "/h5/", // /h5/ ./
"router": {
"mode": "history", // "hash"
"base": "/h5/" // /h5/
}
// "devServer" : {
// "port" : 30088,
// "https" : false,
// "proxy": {
// "/prod-api":{
// "target" : "http://106.15.139.36:18090",
// "changeOrigin" : true,
// "secure" : false,
// "pathRewrite" : {
// "^/prod-api" : "/"
// },
// "headers" : {
// "Origin" : "http://106.15.139.36:18090",
// "Referer" : "http://106.15.139.36:18090"
// }
// }
// }
"template": "static/index.html"
},
"title": "RuoYi-App",
"router": {
"mode": "hash",
"base": "/h5/" //
"base": "./"
}
// "h5": {
// "template": "static/index.html",
// "publicPath": "/h5/", // /h5/ ./
// "router": {
// "mode": "history", // "hash"
// "base": "/h5/" // /h5/
// }
// },
// "title": "RuoYi-App",
// "router": {
// "mode": "hash",
// "base": "/h5/" //
// }
}
}

View File

@ -1,5 +1,6 @@
{
"dependencies": {
"pdfjs-dist": "^2.16.105",
"pinia-plugin-persistedstate": "^4.7.1",
"radash": "^12.1.1"
}

View File

@ -15,7 +15,7 @@
{
"path": "pages/index",
"style": {
"navigationBarTitleText": "若依移动端框架",
"navigationBarTitleText": "大冢APS Ultra管理平台",
"navigationStyle": "custom"
}
},

View File

@ -41,30 +41,30 @@
value: "1"
}]
const rules = ref({
nickName: {
rules: [{
required: true,
errorMessage: '用户昵称不能为空'
}]
},
phonenumber: {
rules: [{
required: true,
errorMessage: '手机号码不能为空'
}, {
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
errorMessage: '请输入正确的手机号码'
}]
},
email: {
rules: [{
required: true,
errorMessage: '邮箱地址不能为空'
}, {
format: 'email',
errorMessage: '请输入正确的邮箱地址'
}]
}
// nickName: {
// rules: [{
// required: true,
// errorMessage: ''
// }]
// },
// phonenumber: {
// rules: [{
// required: true,
// errorMessage: ''
// }, {
// pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
// errorMessage: ''
// }]
// },
// email: {
// rules: [{
// required: true,
// errorMessage: ''
// }, {
// format: 'email',
// errorMessage: ''
// }]
// }
})
function getUser() {

View File

@ -7,7 +7,7 @@
<view>修改密码</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleToUpgrade">
<!-- <view class="list-cell list-cell-arrow" @click="handleToUpgrade">
<view class="menu-item-box">
<view class="iconfont icon-refresh menu-icon"></view>
<view>检查更新</view>
@ -18,7 +18,7 @@
<view class="iconfont icon-clean menu-icon"></view>
<view>清理缓存</view>
</view>
</view>
</view> -->
</view>
<view class="cu-list menu">
<view class="cu-item item-box">

View File

@ -1,10 +1,12 @@
<template>
<view>
<template v-if="items && items.length > 0">
<uni-card
v-for="(item,index) in items"
:key="item.saleid"
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
:extra="item.contractcode"
:title="item.usernames"
:title="`${index + 1}. ${item.usernames}`"
style="margin: 0;margin-bottom: 20px"
@click="handleDetail(item)"
>
@ -20,7 +22,7 @@
<view class="label">
<text>订单类型:</text>
<view>
<dict-tag :options="orderTypeList" :value="item.type"/>
<dict-tag :options="props.orderTypeList" :value="item.type"/>
</view>
</view>
<view class="label">
@ -104,6 +106,11 @@
</view> -->
</view>
</uni-card>
</template>
<view v-else class="no-data">
<text>暂无数据</text>
</view>
</view>
</template>
<script setup>
@ -125,43 +132,43 @@ defineOptions({
name: 'ListItem'
})
const userType = ref()
const props = defineProps(['items'])
const stateList = ref([])
const orderTypeList = ref([])
// props -
const props = defineProps({
items: {
type: Array,
default: () => []
},
orderTypeList: {
type: Array,
default: () => []
},
userType: {
type: String,
default: ''
}
})
const emit = defineEmits(['refresh'])
//
onMounted(async () => {
try {
await getDictData()
await getUser()
} finally {
}
})
function getUser() {
getUserProfile().then(response => {
userType.value = response.data.userType
})
}
const Edit = async (row) => {
try {
console.log(row,'当前行数据')
//
const params = {
companyId: row.companyId,
saleid: row.saleid,
userid: row.userid,
}
// JSON
const paramsStr = encodeURIComponent(JSON.stringify(params))
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/EditData?data=${paramsStr}`)
} catch (error) {
console.error('失败:', error)
}
}
const emit = defineEmits(['refresh'])
//
const deleteData = async (row) => {
uni.showModal({
@ -187,7 +194,7 @@ const deleteData = async (row) => {
})
//
proxy.$emit('refresh')
emit('refresh')
} catch (error) {
uni.hideLoading()
@ -202,37 +209,11 @@ const deleteData = async (row) => {
})
}
//
const getDictData = async () => {
try {
const [stateRes, typeRes] = await Promise.all([
getDicts("order_state"),
getDicts("dazhong_dingdan_type")
])
stateList.value = stateRes.data.map(item => {
return {
value: item.dictValue,
text: item.dictLabel
}
})
orderTypeList.value = typeRes.data
} catch (error) {
console.error('获取字典数据失败:', error)
}
}
const handleDetail = (row) => {
console.log(userType.value,'userType')
if(userType.value == '01' || userType.value == '02'){
console.log(props.userType,'userType')
if(props.userType == '01' || props.userType == '02'){
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/LookDataSY?id=${row.saleid}`)
}else{
// uni.showToast({
// title: '!',
// icon: 'none',
// duration: 2000
// })
// return false;
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/LookDataNB?id=${row.saleid}`)
}
}
@ -253,4 +234,13 @@ const handleDetail = (row) => {
display: flex;
justify-content: center;
}
.no-data {
text-align: center;
padding: 40px 0;
color: #999;
font-size: 14px;
background-color: #fff;
border-radius: 8px;
margin: 20px 0;
}
</style>

View File

@ -59,7 +59,6 @@
>
{{ form.loadfile.split('\\').pop() }}
</text>
<!-- <text>{{ form.loadfile }}</text> -->
</view>
<view class="label">
<text>审核表(OA):</text>

View File

@ -14,7 +14,7 @@
<!-- 宫格组件 -->
<uni-section title="订单管理" type="line"></uni-section>
<view class="grid-body">
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
<uni-grid :column="2" :showBorder="false" @change="changeGrid">
<uni-grid-item @click="gotoOrderManager">
<view class="grid-item-box">
<uni-icons size="30" type="person-filled"></uni-icons>
@ -23,19 +23,19 @@
</uni-grid-item>
<uni-grid-item @click="gotoOrder">
<view class="grid-item-box">
<uni-icons size="30" type="person-filled"></uni-icons>
<uni-icons size="30" type="compose"></uni-icons>
<text class="text">订单审核</text>
</view>
</uni-grid-item>
<uni-grid-item @click="gotoFinalcial">
<view class="grid-item-box">
<uni-icons size="30" type="person-filled"></uni-icons>
<uni-icons size="30" type="list"></uni-icons>
<text class="text">财务审批</text>
</view>
</uni-grid-item>
<uni-grid-item @click="gotoBusiness">
<view class="grid-item-box">
<uni-icons size="30" type="person-filled"></uni-icons>
<uni-icons size="30" type="staff"></uni-icons>
<text class="text">商务审批</text>
</view>
</uni-grid-item>
@ -65,7 +65,7 @@
</uni-grid>
</view>
<uni-section title="系统设置" type="line"></uni-section>
<!-- <uni-section title="系统设置" type="line"></uni-section>
<view class="grid-body">
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
<uni-grid-item>
@ -117,7 +117,7 @@
</view>
</uni-grid-item>
</uni-grid>
</view>
</view> -->
</view>
</template>

View File

@ -20,6 +20,10 @@ const request = config => {
url = url.slice(0, -1)
config.url = url
}
// 关键:获取 responseType默认为 'json'
const responseType = config.responseType || 'json'
return new Promise((resolve, reject) => {
uni.request({
method: config.method || 'get',
@ -27,11 +31,20 @@ const request = config => {
url: config.baseUrl || baseUrl + config.url,
data: config.data,
header: config.header,
dataType: 'json'
dataType: 'json',
responseType: responseType // 添加 responseType 支持
}).then(response => {
// 如果是 arraybuffer 或 blob 类型,直接返回原始数据
if (responseType === 'arraybuffer' || responseType === 'blob') {
resolve(response.data)
return
}
// 原有的 JSON 响应处理逻辑
const res = response
const code = res.data.code || 200
const msg = errorCode[code] || res.data.msg || errorCode['default']
if (code === 401) {
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
if (res.confirm) {