Compare commits

..

No commits in common. "a69124663cb242444bcca10496850030ca1b2615" and "ec6d4bb404ee55e985713e7bfded693223e17b6f" have entirely different histories.

12 changed files with 223 additions and 222 deletions

View File

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

View File

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

View File

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

View File

@ -57,25 +57,34 @@
}, },
"vueVersion": "3", "vueVersion": "3",
"h5": { "h5": {
"template": "static/index.html" "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"
// }
// }
// }
}, },
"title": "RuoYi-App", "title": "RuoYi-App",
"router": { "router": {
"mode": "hash", "mode": "hash",
"base": "./" "base": "/h5/" //
} }
// "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,6 +1,5 @@
{ {
"dependencies": { "dependencies": {
"pdfjs-dist": "^2.16.105",
"pinia-plugin-persistedstate": "^4.7.1", "pinia-plugin-persistedstate": "^4.7.1",
"radash": "^12.1.1" "radash": "^12.1.1"
} }

View File

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

View File

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

View File

@ -7,7 +7,7 @@
<view>修改密码</view> <view>修改密码</view>
</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="menu-item-box">
<view class="iconfont icon-refresh menu-icon"></view> <view class="iconfont icon-refresh menu-icon"></view>
<view>检查更新</view> <view>检查更新</view>
@ -18,7 +18,7 @@
<view class="iconfont icon-clean menu-icon"></view> <view class="iconfont icon-clean menu-icon"></view>
<view>清理缓存</view> <view>清理缓存</view>
</view> </view>
</view> --> </view>
</view> </view>
<view class="cu-list menu"> <view class="cu-list menu">
<view class="cu-item item-box"> <view class="cu-item item-box">

View File

@ -1,116 +1,109 @@
<template> <template>
<view> <uni-card
<template v-if="items && items.length > 0"> v-for="(item,index) in items"
<uni-card :key="item.saleid"
v-for="(item,index) in items" :class="index % 2 === 0 ? 'card-even' : 'card-odd'"
:key="item.saleid" :extra="item.contractcode"
:class="index % 2 === 0 ? 'card-even' : 'card-odd'" :title="item.usernames"
:extra="item.contractcode" style="margin: 0;margin-bottom: 20px"
:title="`${index + 1}. ${item.usernames}`" @click="handleDetail(item)"
style="margin: 0;margin-bottom: 20px" >
@click="handleDetail(item)" <view class="context" v-if="userType === '01' || userType === '02'" >
> <view class="label">
<view class="context" v-if="userType === '01' || userType === '02'" > <text>货主:</text>
<view class="label"> <text>{{ item.companyName }}</text>
<text>货主:</text> </view>
<text>{{ item.companyName }}</text> <view class="label">
</view> <text>金额:</text>
<view class="label"> <text>{{ formatPrice(item.contractmoney) }}</text>
<text>金额:</text> </view>
<text>{{ formatPrice(item.contractmoney) }}</text> <view class="label">
</view> <text>订单类型:</text>
<view class="label"> <view>
<text>订单类型:</text> <dict-tag :options="orderTypeList" :value="item.type"/>
<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>
<view class="context" v-else > </view>
<view class="label"> <view class="label">
<text>货主:</text> <text>制单日期:</text>
<text>{{ item.companyName }}</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 class="label"> </view>
<text>发货仓库:</text> </view>
<text>{{ item.warehouseName }}</text> <view class="context" v-else >
</view> <view class="label">
<view class="label"> <text>货主:</text>
<text>制单日期:</text> <text>{{ item.companyName }}</text>
<text>{{ formatDate(item.adddate, 'yyyy-MM-dd') }}</text> </view>
</view> <view class="label">
<view class="label"> <text>发货仓库:</text>
<text>订单金额:</text> <text>{{ item.warehouseName }}</text>
<text>{{ formatPrice(item.contractmoney) }}</text> </view>
</view> <view class="label">
<view class="label"> <text>制单日期:</text>
<text>补差金额:</text> <text>{{ formatDate(item.adddate, 'yyyy-MM-dd') }}</text>
<text>{{ formatPrice(item.disCount) }}</text> </view>
</view> <view class="label">
<view class="label"> <text>订单金额:</text>
<text>本月/下月:</text> <text>{{ formatPrice(item.contractmoney) }}</text>
<text>{{ item.actioninfo }}</text> </view>
</view> <view class="label">
<view class="label"> <text>补差金额:</text>
<text>支付方式:</text> <text>{{ formatPrice(item.disCount) }}</text>
<view> </view>
<text>{{ item.creditperiods > 0 ? '非现款' : '现款' }}</text> <view class="label">
</view> <text>本月/下月:</text>
</view> <text>{{ item.actioninfo }}</text>
<view class="label"> </view>
<text>状态:</text> <view class="label">
<text> <text>支付方式:</text>
<text>{{ item.stateText }}</text> <view>
</text> <text>{{ item.creditperiods > 0 ? '非现款' : '现款' }}</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> </view>
</uni-card> </view>
</template> <view class="label">
<view v-else class="no-data"> <text>状态:</text>
<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> </view>
</view> </uni-card>
</template> </template>
<script setup> <script setup>
@ -132,43 +125,43 @@ defineOptions({
name: 'ListItem' name: 'ListItem'
}) })
// props - const userType = ref()
const props = defineProps({
items: { const props = defineProps(['items'])
type: Array,
default: () => [] const stateList = ref([])
}, const orderTypeList = ref([])
orderTypeList: {
type: Array,
default: () => []
},
userType: {
type: String,
default: ''
}
})
const emit = defineEmits(['refresh'])
// //
onMounted(async () => { onMounted(async () => {
try { try {
await getDictData()
await getUser()
} finally { } finally {
} }
}) })
function getUser() {
getUserProfile().then(response => {
userType.value = response.data.userType
})
}
const Edit = async (row) => { const Edit = async (row) => {
try { try {
console.log(row,'当前行数据') console.log(row,'当前行数据')
const params = { //
companyId: row.companyId, const params = {
saleid: row.saleid, companyId: row.companyId,
userid: row.userid, saleid: row.saleid,
} userid: row.userid,
const paramsStr = encodeURIComponent(JSON.stringify(params)) }
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/EditData?data=${paramsStr}`) // JSON
const paramsStr = encodeURIComponent(JSON.stringify(params))
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/EditData?data=${paramsStr}`)
} catch (error) { } catch (error) {
console.error('失败:', error) console.error('失败:', error)
} }
} }
const emit = defineEmits(['refresh'])
// //
const deleteData = async (row) => { const deleteData = async (row) => {
uni.showModal({ uni.showModal({
@ -194,7 +187,7 @@ const deleteData = async (row) => {
}) })
// //
emit('refresh') proxy.$emit('refresh')
} catch (error) { } catch (error) {
uni.hideLoading() uni.hideLoading()
@ -209,14 +202,40 @@ const deleteData = async (row) => {
}) })
} }
const handleDetail = (row) => { //
console.log(props.userType,'userType') const getDictData = async () => {
if(props.userType == '01' || props.userType == '02'){ try {
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/LookDataSY?id=${row.saleid}`) const [stateRes, typeRes] = await Promise.all([
}else{ getDicts("order_state"),
proxy.$tab.navigateTo(`/pages/work/OrderManager/components/LookDataNB?id=${row.saleid}`) 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}`)
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -234,13 +253,4 @@ const handleDetail = (row) => {
display: flex; display: flex;
justify-content: center; 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> </style>

View File

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

View File

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

View File

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