Compare commits
8 Commits
ec6d4bb404
...
a69124663c
| Author | SHA1 | Date | |
|---|---|---|---|
| a69124663c | |||
| db6b178c30 | |||
| 9c257f0363 | |||
| 0f7e77fc8d | |||
| b2b75a670d | |||
| 15ddc0094b | |||
| 5848878fb5 | |||
| 3ee53d21c4 |
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
@ -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: {
|
||||
|
||||
2
main.js
2
main.js
@ -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()
|
||||
|
||||
@ -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/" // 这里也要改
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"pdfjs-dist": "^2.16.105",
|
||||
"pinia-plugin-persistedstate": "^4.7.1",
|
||||
"radash": "^12.1.1"
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
{
|
||||
"path": "pages/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "若依移动端框架",
|
||||
"navigationBarTitleText": "大冢APS Ultra管理平台",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -1,109 +1,116 @@
|
||||
<template>
|
||||
<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"
|
||||
style="margin: 0;margin-bottom: 20px"
|
||||
@click="handleDetail(item)"
|
||||
>
|
||||
<view class="context" v-if="userType === '01' || userType === '02'" >
|
||||
<view class="label">
|
||||
<text>货主:</text>
|
||||
<text>{{ item.companyName }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>金额:</text>
|
||||
<text>{{ formatPrice(item.contractmoney) }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>订单类型:</text>
|
||||
<view>
|
||||
<dict-tag :options="orderTypeList" :value="item.type"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>制单日期:</text>
|
||||
<text>{{ formatDate(item.adddate, 'yyyy-MM-dd') }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>状态:</text>
|
||||
<text>
|
||||
<text>{{ item.stateText }}</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>操作:</text>
|
||||
<view class="action-buttons">
|
||||
<button type='primary'
|
||||
:plain="true"
|
||||
@click.stop="Edit(item)"
|
||||
class="btn"
|
||||
v-if="item.state == 0 "
|
||||
>
|
||||
编辑
|
||||
</button>
|
||||
<button type='warn'
|
||||
:plain="true"
|
||||
@click.stop="deleteData(item)"
|
||||
class="btn"
|
||||
v-if="item.state == 0 || item.state == 1 || item.state == -1 || item.state == -2"
|
||||
>删除</button>
|
||||
<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="`${index + 1}. ${item.usernames}`"
|
||||
style="margin: 0;margin-bottom: 20px"
|
||||
@click="handleDetail(item)"
|
||||
>
|
||||
<view class="context" v-if="userType === '01' || userType === '02'" >
|
||||
<view class="label">
|
||||
<text>货主:</text>
|
||||
<text>{{ item.companyName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="context" v-else >
|
||||
<view class="label">
|
||||
<text>货主:</text>
|
||||
<text>{{ item.companyName }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>发货仓库:</text>
|
||||
<text>{{ item.warehouseName }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>制单日期:</text>
|
||||
<text>{{ formatDate(item.adddate, 'yyyy-MM-dd') }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>订单金额:</text>
|
||||
<text>{{ formatPrice(item.contractmoney) }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>补差金额:</text>
|
||||
<text>{{ formatPrice(item.disCount) }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>本月/下月:</text>
|
||||
<text>{{ item.actioninfo }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>支付方式:</text>
|
||||
<view>
|
||||
<text>{{ item.creditperiods > 0 ? '非现款' : '现款' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>状态:</text>
|
||||
<text>
|
||||
<text>{{ item.stateText }}</text>
|
||||
</text>
|
||||
</view>
|
||||
<!-- <view class="label">
|
||||
<text>操作:</text>
|
||||
<view class="action-buttons">
|
||||
<button type='primary'
|
||||
:plain="true"
|
||||
@click.stop="Edit(item)"
|
||||
class="btn"
|
||||
>
|
||||
编辑
|
||||
</button>
|
||||
<view class="label">
|
||||
<text>金额:</text>
|
||||
<text>{{ formatPrice(item.contractmoney) }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="label">
|
||||
<text>订单类型:</text>
|
||||
<view>
|
||||
<dict-tag :options="props.orderTypeList" :value="item.type"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>制单日期:</text>
|
||||
<text>{{ formatDate(item.adddate, 'yyyy-MM-dd') }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>状态:</text>
|
||||
<text>
|
||||
<text>{{ item.stateText }}</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>操作:</text>
|
||||
<view class="action-buttons">
|
||||
<button type='primary'
|
||||
:plain="true"
|
||||
@click.stop="Edit(item)"
|
||||
class="btn"
|
||||
v-if="item.state == 0 "
|
||||
>
|
||||
编辑
|
||||
</button>
|
||||
<button type='warn'
|
||||
:plain="true"
|
||||
@click.stop="deleteData(item)"
|
||||
class="btn"
|
||||
v-if="item.state == 0 || item.state == 1 || item.state == -1 || item.state == -2"
|
||||
>删除</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="context" v-else >
|
||||
<view class="label">
|
||||
<text>货主:</text>
|
||||
<text>{{ item.companyName }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>发货仓库:</text>
|
||||
<text>{{ item.warehouseName }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>制单日期:</text>
|
||||
<text>{{ formatDate(item.adddate, 'yyyy-MM-dd') }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>订单金额:</text>
|
||||
<text>{{ formatPrice(item.contractmoney) }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>补差金额:</text>
|
||||
<text>{{ formatPrice(item.disCount) }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>本月/下月:</text>
|
||||
<text>{{ item.actioninfo }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>支付方式:</text>
|
||||
<view>
|
||||
<text>{{ item.creditperiods > 0 ? '非现款' : '现款' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>状态:</text>
|
||||
<text>
|
||||
<text>{{ item.stateText }}</text>
|
||||
</text>
|
||||
</view>
|
||||
<!-- <view class="label">
|
||||
<text>操作:</text>
|
||||
<view class="action-buttons">
|
||||
<button type='primary'
|
||||
:plain="true"
|
||||
@click.stop="Edit(item)"
|
||||
class="btn"
|
||||
>
|
||||
编辑
|
||||
</button>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</uni-card>
|
||||
</template>
|
||||
<view v-else class="no-data">
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
</uni-card>
|
||||
</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}`)
|
||||
|
||||
console.log(row,'当前行数据')
|
||||
const params = {
|
||||
companyId: row.companyId,
|
||||
saleid: row.saleid,
|
||||
userid: row.userid,
|
||||
}
|
||||
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,39 +209,13 @@ 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'){
|
||||
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}`)
|
||||
}
|
||||
console.log(props.userType,'userType')
|
||||
if(props.userType == '01' || props.userType == '02'){
|
||||
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/LookDataSY?id=${row.saleid}`)
|
||||
}else{
|
||||
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/LookDataNB?id=${row.saleid}`)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -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>
|
||||
@ -59,7 +59,6 @@
|
||||
>
|
||||
{{ form.loadfile.split('\\').pop() }}
|
||||
</text>
|
||||
<!-- <text>{{ form.loadfile }}</text> -->
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>审核表(OA):</text>
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -20,18 +20,31 @@ 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',
|
||||
timeout: config.timeout || timeout,
|
||||
timeout: config.timeout || timeout,
|
||||
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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user