fix:新增订单功能

This commit is contained in:
Fsd0511 2025-08-28 17:29:25 +08:00
parent 8c7eec9950
commit 9a85f1bd13
15 changed files with 2101 additions and 71 deletions

29
api/orderManager/index.js Normal file
View File

@ -0,0 +1,29 @@
import request from '@/utils/request'
export function listsalemain(data,query) {
return request({
url: '/bussiness/salemain/list',
method: 'post',
data: data,
params: query,
})
}
// 查询s生产单位列表
export function listproductList(data,query) {
return request({
url: '/system/dept/productList',
method: 'get',
data:data,
params: query
})
}
// 新建销售订单时候的商品列表
export function listsaleBusGoodsList(data,query) {
return request({
url: '/bussiness/businessgoods/saleBusGoodsList',
method: 'post',
data: data,
params: query,
})
}

View File

@ -0,0 +1,185 @@
<!-- components/uni-app-tag/uni-app-tag.vue -->
<template>
<view class="uni-app-tag-container">
<!-- 匹配的标签 -->
<template
v-for="(item, index) in matchedItems"
:key="getValue(item)"
>
<!-- 普通 spandefault 类型 + class -->
<span
v-if="isDefaultTag(item)"
class="uni-app-tag-span"
:class="item.elTagClass"
>
{{ getText(item) }}&nbsp;
</span>
<!-- 自定义样式 view 模拟 tag -->
<view
v-else
class="uni-app-tag"
:class="[
`uni-app-tag--${getUniType(item.elTagType)}`,
item.elTagClass
]"
>
{{ getText(item) }}
</view>
</template>
<!-- 未匹配的值 -->
<text v-if="unmatch && showValue" class="uni-app-tag-unmatch">
{{ unmatchText }}
</text>
</view>
</template>
<script setup>
import { computed } from 'vue'
const props = defineProps({
/* 选项数组 */
options: {
type: Array,
default: () => []
},
/* 当前值String | Number | Array */
value: [String, Number, Array],
/* 是否显示未匹配值 */
showValue: {
type: Boolean,
default: true
},
/* 字符串分隔符(仅 value 为字符串时生效) */
separator: {
type: String,
default: ','
},
/* 字段映射:值字段名 */
valueField: {
type: String,
default: 'dictValue'
},
/* 字段映射:文本字段名 */
textField: {
type: String,
default: 'dictLabel'
}
})
/* 工具函数:统一取出值 / 文本 */
const getValue = (opt) => String(opt[props.valueField])
const getText = (opt) => opt[props.textField] ?? ''
/* 1. 统一转成字符串数组 */
const values = computed(() => {
if (props.value == null || props.value === '') return []
return Array.isArray(props.value)
? props.value.map(String)
: String(props.value).split(props.separator).map(v => v.trim())
})
/* 2. 匹配到的选项 */
const matchedItems = computed(() =>
values.value
.map(val => props.options.find(opt => getValue(opt) === val))
.filter(Boolean)
)
/* 3. 未匹配的值 */
const unmatchArray = computed(() => {
if (!values.value.length || !props.options.length) return []
return values.value.filter(
val => !props.options.some(opt => getValue(opt) === val)
)
})
const unmatch = computed(() => unmatchArray.value.length > 0)
const unmatchText = computed(() => unmatchArray.value.join(' '))
/* 4. 判断是否为默认 tagdefault 且无自定义 class */
const isDefaultTag = (item) => {
const type = item.elTagType || 'default'
const cls = item.elTagClass || ''
return (type === 'default' || !type) && !cls
}
/* 5. el-tag type -> uni 类名映射 */
const getUniType = (type) => {
const map = {
primary: 'primary',
success: 'success',
warning: 'warning',
danger: 'error',
info: 'info',
default: 'default'
}
return map[type] || 'default'
}
</script>
<style scoped>
.uni-app-tag-container {
display: flex;
flex-wrap: wrap;
align-items: center;
font-size: 14px;
}
.uni-app-tag-span {
margin-right: 8px;
white-space: nowrap;
}
.uni-app-tag {
display: inline-flex;
align-items: center;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
margin-right: 8px;
white-space: nowrap;
}
.uni-app-tag--primary {
background-color: #d0e3ff;
color: #0066ff;
border: 1px solid #99ccff;
}
.uni-app-tag--success {
background-color: #dcf5e7;
color: #00aa55;
border: 1px solid #88ccaa;
}
.uni-app-tag--warning {
background-color: #fff0d9;
color: #cc8800;
border: 1px solid #ffcc88;
}
.uni-app-tag--error {
background-color: #ffd9dc;
color: #ff3344;
border: 1px solid #ff99aa;
}
.uni-app-tag--info {
background-color: #e6e6e6;
color: #666666;
border: 1px solid #cccccc;
}
.uni-app-tag--default {
background-color: #f4f4f4;
color: #333;
border: 1px solid #ddd;
}
.uni-app-tag-unmatch {
margin-left: 4px;
color: #999;
font-size: 12px;
}
</style>

View File

@ -1,8 +1,8 @@
// 应用全局配置
export default {
baseUrl: 'https://vue.ruoyi.vip/prod-api', //
// baseUrl: 'https://vue.ruoyi.vip/prod-api', //
// baseUrl: '/prod-api', //前后端分离版的接口地址,转发代理 设置在了manifest.json文件中
// baseUrl: 'http://192.168.3.27:18090', //前后端分离版的接口地址
baseUrl: 'http://106.15.139.36:18090', //前后端分离版的接口地址
//测试提交
// 应用信息
appInfo: {

View File

@ -4,10 +4,12 @@ import store from './store' // store
import { install } from './plugins' // plugins
import './permission' // permission
import { useDict } from '@/utils/dict'
// 全局注册 dict-tag 组件
// import DictTag from '@/components/dict-tag/dict-tag.vue';
export function createApp() {
const app = createSSRApp(App)
app.use(store)
// app.component('dict-tag', DictTag);
app.config.globalProperties.useDict = useDict
install(app)
return {

View File

@ -57,24 +57,24 @@
},
"vueVersion" : "3",
"h5" : {
"template" : "static/index.html",
"devServer" : {
"port" : 30088,
"https" : false
// "proxy" : {
// "/prod-api" : {
// "target" : "http://192.168.0.3:18090/",
// "changeOrigin" : true,
// "secure" : false,
// "pathRewrite" : {
// "^/prod-api" : "/"
// },
// "headers" : {
// "Origin" : "http://192.168.0.3:18090/",
// "Referer" : "http://192.168.0.3:18090/"
// }
// }
// }
"template" : "static/index.html"
// "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",
"router" : {

View File

@ -20,6 +20,11 @@
"style": {
"navigationBarTitleText": "工作台"
}
}, {
"path": "pages/work/OrderManager/index",
"style": {
"navigationBarTitleText": "订单管理"
}
}, {
"path": "pages/work/BusinessApproval/index",
"style": {
@ -100,6 +105,16 @@
"style": {
"navigationBarTitleText": "订单审批详情"
}
},{
"path": "pages/work/OrderManager/components/OrderDetail",
"style": {
"navigationBarTitleText": "订单管理详情"
}
},{
"path": "pages/work/OrderManager/components/NewAdd",
"style": {
"navigationBarTitleText": "新增订单"
}
}],
"tabBar": {

View File

@ -34,41 +34,10 @@
<uni-col :span="12">
<view class="label">联系方式:{{ contract.ispaynow }}</view>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label required">*执行月份:</view>
<view class="select-container">
<uni-data-select
v-model="executionMonth"
:localdata="monthOptions"
popup-class="month-popup"
></uni-data-select>
</view>
</uni-col>
<uni-col :span="12">
<view class="label">折后订单金额:{{ contract.piaokous }}</view>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label">本月商务额度:{{ contract.contractmoney }}</view>
</uni-col>
<uni-col :span="12">
<view class="label">本月商务可用:{{ contract.contractmoney }}</view>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label">本月大区额度:{{ contract.contractmoney }}</view>
</uni-col>
<uni-col :span="12">
<view class="label">本月大区可用:{{ contract.contractmoney }}</view>
</uni-col>
</uni-row>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label">收货地址:{{ contract.place }}</view>
<view class="label">发货仓库:{{ contract.place }}</view>
</uni-col>
</uni-row>
@ -97,19 +66,19 @@
</view>
<view class="goods-content">
<!-- 件装数和供应参考价在一行 -->
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">件装数:{{ goods.packingnum }}</view>
<!-- <view class="value">{{ goods.packCount }}</view> -->
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">供应参考:{{ goods.invoiceprice }}</view>
<view class="label">:{{ goods.invoiceprice }}</view>
<!-- <view class="value">{{ goods.referencePrice }}</view> -->
</uni-col>
</uni-row>
<!-- 前三月平均数和采购数量在一行 -->
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">前三月平均数:{{ goods.mon3 }}</view>
@ -121,26 +90,17 @@
</uni-col>
</uni-row>
<!-- 小计和使用票扣在一行 -->
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">小计:{{ goods.allmoney }}</view>
<view class="label">可分配数:{{ goods.allmoney }}</view>
<!-- <view class="value total">{{ goods.subtotal }}</view> -->
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">使用票扣:{{ goods.piaokou }}</view>
<view class="label">要求补差:{{ goods.piaokou }}</view>
<!-- <view class="value">{{ goods.ticketDeduction }}</view> -->
</uni-col>
</uni-row>
<!-- 税率单独一行 -->
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">税率:{{ goods.taxrate }}</view>
<!-- <view class="value">{{ goods.taxRate }}</view> -->
</uni-col>
<uni-col :span="12" class="info-pair empty"></uni-col>
</uni-row>
</view>
</view>
</view>
@ -148,8 +108,9 @@
<!-- 操作按钮 -->
<view class="action-buttons">
<button @click="goBack" class="btn btn-secondary">回退</button>
<button @click="review" class="btn btn-primary">审核</button>
<button @click="goBack" class="btn btn-secondary">审核回退</button>
<button @click="review" class="btn btn-primary">审核通过</button>
<button @click="review" class="btn btn-primary">强制推送OA</button>
</view>
</view>
</template>

View File

@ -0,0 +1,814 @@
<template>
<view class="order-detail-container">
<!-- 基础信息区域 -->
<view class="info-section">
<uni-row class="info-grid">
<uni-col class="flex-row">
<view class="label">生产单位: </view>
<uni-data-select
v-model="form.companyId"
:localdata="companyOptions"
text-field="deptName"
value-field="deptId"
@change="getEdu"
:clear="true"
/>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label">剩余金额:{{ remainingMoney}}</view>
</uni-col>
<uni-col :span="12">
<view class="label">订单金额:{{ orderAmount }}</view>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="24" style="display: flex;">
<view class="label">已选补差:</view>
<view class="">
<view style="color: red;" v-if="buchaGoodsList.length&&selectedBuCha.length==0">
提示:当前有补差数据可选择
</view>
<view v-else class="" v-for="(item,index) in selectedBuCha" :key="index">
商品{{item.goodsname}},金额{{item.piaokou}}
</view>
</view>
</uni-col>
</uni-row>
<button type="primary" @click="toShowBucha" v-show="buChaButState">选择补差</button>
</view>
<!-- 补差列表 -->
<view class="" v-if="ShowBucha">
<!-- 商品信息区域 -->
<view class="goods-section">
<view class="section-title">
<view class="">
补差商品信息
</view>
<view class="select-all">
<checkbox
:checked="allSelected"
@click="toggleSelectAll"
></checkbox>
</view>
</view>
<view v-if="buchaGoodsList.length === 0" class="no-data">
暂无商品数据
</view>
<view v-else class="goods-double-column">
<checkbox-group @change="checkboxChange">
<view
v-for="(goods, index) in buchaGoodsList"
:key="goods.piaokouid"
class="goods-item"
>
<view class="goods-header">
<text class="serial-number">{{ index + 1 }}</text>
<text class="goods-name">{{ goods.goodsname }}</text>
<checkbox :checked="selectedList.includes(goods.piaokouid)" :value="goods.piaokouid">
</checkbox>
</view>
<view class="goods-content">
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">申请日期:{{ goods.applydate }}</view>
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">补差类型:{{ goods.piaokoutype }}</view>
</uni-col>
</uni-row>
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">商品简称:{{ goods.shortname }}</view>
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">可补差金额:{{ goods.piaokou }}</view>
</uni-col>
</uni-row>
</view>
</view>
</checkbox-group>
</view>
</view>
<!-- 操作按钮 -->
<view class="action-buttons">
<button @click="goAdd" class="btn btn-secondary">添加</button>
<button @click="goCancel" class="btn btn-primary">取消</button>
</view>
</view>
<view v-else>
<!-- 商品信息区域 -->
<view class="goods-section">
<view class="section-title">
<view class="">
商品信息
</view>
</view>
<view v-if="goodsList.length === 0" class="no-data">
暂无商品数据
</view>
<view v-else class="goods-double-column">
<view
v-for="(goods, index) in goodsList"
:key="goods.goodsid"
class="goods-item"
>
<view class="goods-header">
<text class="serial-number">{{ index + 1 }}</text>
<text class="goods-name">{{ goods.goodsname }}</text>
</view>
<view class="goods-content">
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">件装数:{{ goods.packingnum }}</view>
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">供应参考价:{{ goods.invoiceprice }}</view>
</uni-col>
</uni-row>
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">前三月平均数:{{ goods.threeMonths }}</view>
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">使用票扣:{{ goods.piaokou }}</view>
</uni-col>
</uni-row>
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">小计:{{ goods.allmoney }}</view>
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">税率:{{ goods.taxrate }}</view>
</uni-col>
</uni-row>
<uni-row class="info-row">
<uni-col :span="12" class="info-pair flex-row" >
<view class="label">采购数量:</view>
<input
class="uni-input custom-input"
v-model="goods.goodsnum"
placeholder="请输入采购数量"
@confirm="e =>handleInput(e,index)"/>
</uni-col>
</uni-row>
</view>
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="action-buttons">
<button @click="goSave" class="btn btn-secondary">保存</button>
<button @click="goSubmit" class="btn btn-primary">确认提交</button>
</view>
</view>
</view>
</template>
<script setup>
import { onMounted, ref ,computed} from 'vue'
import { contractData, goodsData } from '../detailData.js'
import { listsaleBusGoodsList } from '../../../../api/orderManager/index.js'
import { listproductList } from '../../../../api/orderManager/index.js'
// import { getInfo } from '../../../../store/modules/user.js'
import { useUserStore } from '../../../../store/modules/user.js'
import data1 from './data1.js'
//
const selectedBuCha = ref([])
//
const buchaGoodsList =ref([])
const goodsList = ref([])
const form = ref({
companyId:'1',
})
const RemainingMoney = ref('0.00') //
//
const buChaButState = ref(true)
//
const allSelected = ref(false)
//
const selectedList = ref([])
//
const ShowBucha = ref(false)
//
const remainingMoney = ref(0)
//
const orderAmount = ref(0.00)
//
const queryNum = ref({})
//
const contract = ref({})
//
const companyOptions = ref([])
const monthOptions = ref([
{ value: 0, text: '本月执行' },
{ value: 1, text: '下月执行' }
])
// //
// const formatMoney = (value) => {
// const num = Number(value)
// return isNaN(num)
// ? '0.00'
// : num.toLocaleString('en-US', {
// minimumFractionDigits: 2,
// maximumFractionDigits: 2
// })
// }
// //
// const formattedRemainingMoney = computed(() => formatMoney(RemainingMoney.value))
// const formattedContractMoney = computed(() => formatMoney(form.value.contractmoney))
onMounted(() => {
// contract.value = contractData.data[0]
// console.log(contract.value)
buchaGoodsList.value = data1.data
getDeptLists()
GetlistsaleBusGoodsList()
})
function GetlistsaleBusGoodsList() {
// //
const KeSaleGoodsParams ={
companyId:form.value.companyId,
// userid: useUserStore.id,41
userid: 41,
deleteflag:0, // 0: 1: 2,
// state:1, //0,1
}
const KeSaleGoodsQuery = {
pageNum: 1,
pageSize: 999,
}
listsaleBusGoodsList(KeSaleGoodsParams,KeSaleGoodsQuery).then(res => {
goodsList.value = res.data
});
}
const getDeptLists = () =>{
listproductList().then(res => {
companyOptions.value = res.data.map(item => {
return {
value:item.deptId,
text:item.deptName
}
})
console.log('companyOptions.value', companyOptions.value)
});
}
/**
* 判断两个数组是否**严格相等**顺序类型都一致
*/
function arraysEqual(a, b) {
return (
Array.isArray(a) &&
Array.isArray(b) &&
a.length === b.length &&
a.every((val, idx) => val === b[idx])
);
}
//
const checkboxChange = (value) =>{
// console.log("value",value)
let idList = value.detail.value
let compareList = []
selectedList.value = idList//
selectedBuCha.value = []
let temp =true
idList.forEach(item =>{
buchaGoodsList.value.forEach(item1 =>{
if( temp ){
compareList.push(item1.piaokouid)
}
if(item1.piaokouid == item){
selectedBuCha.value.push(
{ goodsname: item1.goodsname,
piaokou: item1.piaokou,
goodsid:item1.goodsid}
)
}
})
temp =false
}
)
//
console.log("111",arraysEqual(idList,compareList))
console.log("111",idList,compareList)
if(compareList.length!==0&&idList.length!==0&&arraysEqual(idList,compareList)){
allSelected.value = true
}else{
allSelected.value = false
}
}
/** 更改生产单位时,查询额度 */
function getEdu() {
console.log(form.value.companyId,'form.value.companyId生产单位ID')
BuChaDataShow.value = [] //
const AmountqueryParams = {
companyId:form.value.companyId,
saleId: 0,
}
//
getsalemaincheckAmount(AmountqueryParams).then(res => {
RemainingMoney.value = res.data.amounts
});
GetlistsaleBusGoodsList()
getsalemainpiAoKouList()
}
//
const toggleSelectAll = () =>{
if(!allSelected.value){
selectedList.value = buchaGoodsList.value.map(item => item.piaokouid)
allSelected.value = true
selectedBuCha.value = []
buchaGoodsList.value.forEach(item1 =>{
selectedBuCha.value.push(
{ goodsname: item1.goodsname,
piaokou: item1.piaokou,
goodsid:item1.goodsid}
)
})
}else{
selectedBuCha.value = []//
selectedList.value = []//
allSelected.value = false
}
console.log("value",selectedList.value)
console.log("value",allSelected.value)
}
//
const goAdd = () =>{
console.log('添加!')
//piaokou
console.log('selectedBuCha.value',selectedBuCha.value)
if(selectedBuCha.value.length!==0){
const piaoKouSum = selectedBuCha.value.reduce((acc , cur) =>{
acc[cur.goodsid] = (acc[cur.goodsid]||0) + cur.piaokou
return acc
},{})
console.log('piaoKouSum',piaoKouSum)
goodsList.value.forEach( item =>{
if(piaoKouSum[item.goodsid] !== undefined){
item.piaokou = piaoKouSum[item.goodsid]
}
})
}else{
uni.showToast({
title: '没有选择数据!',
icon: 'none',
duration: 2000
});
return
}
uni.showToast({
title: '添加成功!',
icon: 'success',
duration: 2000
});
window.scrollTo({ top: 0, behavior: 'smooth' });
ShowBucha.value = false
buChaButState.value =true
}
//
const goCancel = () =>{
ShowBucha.value = false
buChaButState.value =true
window.scrollTo({ top: 0, behavior: 'smooth' });
console.log('取消!')
}
//
const handleInput = (e, index) => {
console.log('index',index)
const value = e.detail.value
//
const num = Number(value)
if (isNaN(num)) return //
//
goodsList.value[index].goodsnum = num
// = ×
goodsList.value[index].allmoney = num * goodsList.value[index].invoiceprice
//
orderAmount.value = 0
goodsList.value.forEach(item =>{
orderAmount.value += Number(item.invoiceprice)*Number(item.goodsnum)
} )
orderAmount.value = Math.ceil(orderAmount.value * 100) / 100;
console.log('orderAmount',orderAmount.value)
}
const toggleSelection = (index) => {
goodsList.value[index].selected = !goodsList.value[index].selected;
}
const handleByCompany = (value) => {
console.log("value", value)
//
}
const validatePiaokou = () => {
// piaokouxiaoji
const invalidItems = form.value.saledetailList.filter(
item => item.piaokou > item.xiaoji
);
if (invalidItems.length > 0) {
//
const errorMessage = `以下商品的票扣金额大于小计金额:\n` +
invalidItems.map(item =>
`- ${item.goodsname} (票扣: ${item.piaokou}, 小计: ${item.xiaoji})`
).join('\n');
uni.showToast({
title: errorMessage,
icon: 'none',
duration: 3000
});
return false;
}
return true;
};
const goSave = () => {
console.log("回退操作")
// ( ElMessage.success)
const tableData =goodsList.value;
const filteredData = tableData.filter(item =>
item.goodsnum !== null &&
item.goodsnum !== '' &&
item.goodsnum !== 0 &&
!isNaN(item.goodsnum)
);
form.value.saledetailList = filteredData
form.value.saledetailList = form.value.saledetailList.map(item => ({
...item,
price:item.invoiceprice,
xiaoji:item.allmoney
}));
//
if (!validatePiaokou()) {
return; //
}
form.value.state = 0 // 01
//
console.log(" form.value.state", form.value)
uni.showToast({
title: '保存成功!',
icon: 'success',
duration: 2000
});
}
const goSubmit = () => {
console.log("审核操作")
uni.showToast({
title: '审核成功!',
icon: 'success',
duration: 2000
});
}
const toShowBucha = () => {
ShowBucha.value = true
buChaButState.value =false
console.log("选择补差")
}
</script>
<style lang="scss" scoped>
// ::v-deep .uni-checkbox-input {
// background-color: #fff !important;
// border-color: #67c23a !important;
// }
// ::v-deep .uni-checkbox-input-checked {
// background-color: #fff !important;
// color: #67c23a !important; /* */
// }
// ::v-deep .uni-checkbox-input svg{
// viewBox: 0 0 36 36;
// width: 22rpx;
// height: 22rpx;
// }
.select-all {
//
margin-left: auto;
// margin-left: 10rpx;
// background-color: #67c23a;
}
.custom-input {
border: 1px solid #ccc;
border-radius: 4px;
padding: 5px;
height: 25px;
}
.order-detail-container {
padding: 16px;
background-color: #f5f5f5;
min-height: 100vh;
}
.flex-row {
display: flex;
align-items: center; /* 垂直居中对齐 */
gap: 10px; /* 标签和下拉框之间的间距 */
}
.page-title {
text-align: center;
margin-bottom: 24px;
color: #333;
font-size: 18px;
font-weight: 600;
padding: 12px 0;
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* 基础信息网格布局 */
.info-section {
background: #fff;
border-radius: 12px;
padding: 16px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.info-grid {
:deep(.uni-row) {
display: flex;
flex-wrap: wrap;
}
.info-value {
font-size: 15px;
color: #333;
font-weight: 500;
display: flex;
justify-content: flex-end;
}
margin-bottom: 20rpx;
margin-top: 20rpx;
}
.info-item {
margin-bottom: 12px;
}
.label {
font-size: 14px;
color: #666;
margin-bottom: 4px;
font-weight: 500;
}
.required::after {
content: '*';
color: #f56c6c;
margin-left: 2px;
}
.amount {
color: #f56c6c;
font-weight: 600;
}
.select-container {
width: 100%;
}
:deep(.uni-data-select__text) {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 8px;
background-color: #fff;
}
:deep(.month-popup) {
min-width: 120px;
}
/* 商品信息区域 */
.goods-section {
background: #fff;
border-radius: 12px;
padding: 16px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.section-title {
font-size: 16px;
color: #333;
margin: 0 0 16px 0;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
font-weight: 600;
display: flex;
align-items: center;
}
.no-data {
text-align: center;
color: #999;
padding: 40px 0;
font-size: 14px;
}
/* 商品双栏布局 */
.goods-double-column {
display: flex;
flex-direction: column;
gap: 12px;
}
.goods-item {
border: 1px solid #eee;
border-radius: 12px;
overflow: hidden;
background: #fafafa;
}
.goods-header {
background: #409eff;
color: white;
padding: 10px 16px;
display: flex;
align-items: center;
gap: 12px;
}
.serial-number {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
font-size: 12px;
font-weight: 600;
}
.goods-name {
font-size: 15px;
font-weight: 600;
flex: 1;
}
/* 商品内容区域 */
.goods-content {
padding: 12px 16px;
}
.info-row {
display: flex;
margin-bottom: 8px;
}
.info-pair {
flex: 1;
padding: 0 8px;
}
.info-pair .label {
font-size: 14px;
color: #666;
margin-bottom: 2px;
}
.info-pair .value {
font-size: 14px;
color: #333;
font-weight: 500;
text-align: right;
}
.quantity {
color: #409eff;
font-weight: 600;
}
.total {
color: #f56c6c;
font-weight: 600;
}
.empty {
visibility: hidden;
}
/* 操作按钮 */
.action-buttons {
display: flex;
justify-content: center;
gap: 12px;
padding: 16px 0;
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn {
padding: 12px 24px;
border: none;
border-radius: 8px;
font-size: 15px;
font-weight: 500;
cursor: pointer;
min-width: 80px;
text-align: center;
flex: 1;
}
.btn-primary {
background: #409eff;
color: white;
}
.btn-secondary {
background: #67c23a;
color: white;
}
.btn-outline {
background: #fff;
color: #333;
border: 1px solid #ddd;
}
/* 响应式设计 */
@media (max-width: 768px) {
.order-detail-container {
padding: 12px;
}
.info-item {
margin-bottom: 10px;
}
.info-pair {
padding: 0 4px;
}
.action-buttons {
flex-direction: column;
}
.btn {
width: 100%;
margin-bottom: 8px;
}
.btn:last-child {
margin-bottom: 0;
}
}
/* 添加多选框样式 */
.uni-checkbox {
display: inline-flex;
align-items: center;
margin-right: 8px;
}
</style>

View File

@ -0,0 +1,449 @@
<template>
<view class="order-detail-container">
<!-- <view class="page-title">查看详细信息</view> -->
<!-- 基础信息区域 -->
<view class="info-section">
<uni-row class="info-grid">
<uni-col >
<view class="label">商业公司: {{contract.user_name}} </view>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label">制单日期:{{ contract.adddate}}</view>
</uni-col>
<uni-col :span="12">
<view class="label">合同编号:{{ contract.contractcode }}</view>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label">订单金额:{{ contract.contractmoney }}</view>
</uni-col>
<uni-col :span="12">
<view class="label">补差金额:{{ contract.user_name }}</view>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label">支付方式:{{ contract.ispaynow }}</view>
</uni-col>
<uni-col :span="12">
<view class="label">联系方式:{{ contract.ispaynow }}</view>
</uni-col>
</uni-row>
<uni-row class="info-grid">
<uni-col :span="12">
<view class="label">发货仓库:{{ contract.place }}</view>
</uni-col>
</uni-row>
</view>
<!-- 商品信息区域 -->
<view class="goods-section">
<view class="section-title">商品信息</view>
<view v-if="goodsList.length === 0" class="no-data">
暂无商品数据
</view>
<view v-else class="goods-double-column">
<view
v-for="(goods, index) in goodsList"
:key="index"
class="goods-item"
>
<view class="goods-header">
<text class="serial-number">{{ index + 1 }}</text>
<text class="goods-name">{{ goods.goodsname }}</text>
</view>
<view class="goods-content">
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">件装数:{{ goods.packingnum }}</view>
<!-- <view class="value">{{ goods.packCount }}</view> -->
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">单价:{{ goods.invoiceprice }}</view>
<!-- <view class="value">{{ goods.referencePrice }}</view> -->
</uni-col>
</uni-row>
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">前三月平均数:{{ goods.mon3 }}</view>
<!-- <view class="value">{{ goods.average }}</view> -->
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">采购数量:{{ goods.goodsnum }}</view>
<!-- <view class="value quantity">{{ goods.quantity }}</view> -->
</uni-col>
</uni-row>
<uni-row class="info-row">
<uni-col :span="12" class="info-pair">
<view class="label">可分配数:{{ goods.allmoney }}</view>
<!-- <view class="value total">{{ goods.subtotal }}</view> -->
</uni-col>
<uni-col :span="12" class="info-pair">
<view class="label">要求补差:{{ goods.piaokou }}</view>
<!-- <view class="value">{{ goods.ticketDeduction }}</view> -->
</uni-col>
</uni-row>
</view>
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="action-buttons">
<button @click="goBack" class="btn btn-secondary">审核回退</button>
<button @click="review" class="btn btn-primary">审核通过</button>
<button @click="review" class="btn btn-primary">强制推送OA</button>
</view>
</view>
</template>
<script setup>
import { onMounted, ref } from 'vue'
import { contractData,goodsData } from '../detailData.js'
//
const contract = ref({})
const monthOptions = ref([
{ value: 0, text: '本月执行' },
{ value: 1, text: '下月执行' }
])
onMounted(()=>{
contract.value = contractData.data[0]
console.log(contract.value)
goodsList.value = goodsData.data
})
//
const goodsList = ref([
{
name: '商品A',
packCount: '12',
referencePrice: '88.00',
average: '150',
quantity: '1000',
subtotal: '88,000.00',
ticketDeduction: '是',
taxRate: '13%'
},
{
name: '商品B',
packCount: '24',
referencePrice: '18.00',
average: '800',
quantity: '1200',
subtotal: '21,600.00',
ticketDeduction: '否',
taxRate: '13%'
}
])
//
const goBack = () => {
console.log("回退操作")
// ( ElMessage.success)
uni.showToast({
title: '回退成功!',
icon: 'success',
duration: 2000
});
}
const review = () => {
console.log("审核操作")
// ( ElMessage.success)
uni.showToast({
title: '审核成功!',
icon: 'success',
duration: 2000
});
}
</script>
<style lang="scss" scoped>
.order-detail-container {
padding: 16px;
background-color: #f5f5f5;
min-height: 100vh;
}
.page-title {
text-align: center;
margin-bottom: 24px;
color: #333;
font-size: 18px;
font-weight: 600;
padding: 12px 0;
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* 基础信息网格布局 */
.info-section {
background: #fff;
border-radius: 12px;
padding: 16px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.info-grid {
:deep(.uni-row) {
display: flex;
flex-wrap: wrap;
}
.info-value {
font-size: 15px;
color: #333;
font-weight: 500;
display: flex;
justify-content: flex-end;
}
margin-bottom: 20rpx;
margin-top: 20rpx;
}
.info-item {
margin-bottom: 12px;
}
.label {
font-size: 14px;
color: #666;
margin-bottom: 4px;
font-weight: 500;
}
.required::after {
content: '*';
color: #f56c6c;
margin-left: 2px;
}
// .info-value {
// font-size: 15px;
// color: #333;
// font-weight: 500;
// display: flex;
// justify-content: flex-end;
// }
.amount {
color: #f56c6c;
font-weight: 600;
}
.select-container {
width: 100%;
}
:deep(.uni-data-select__text) {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 8px;
background-color: #fff;
}
:deep(.month-popup) {
min-width: 120px;
}
/* 商品信息区域 */
.goods-section {
background: #fff;
border-radius: 12px;
padding: 16px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.section-title {
font-size: 16px;
color: #333;
margin: 0 0 16px 0;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
font-weight: 600;
}
.no-data {
text-align: center;
color: #999;
padding: 40px 0;
font-size: 14px;
}
/* 商品双栏布局 */
.goods-double-column {
display: flex;
flex-direction: column;
gap: 12px;
}
.goods-item {
border: 1px solid #eee;
border-radius: 12px;
overflow: hidden;
background: #fafafa;
}
.goods-header {
background: #409eff;
color: white;
padding: 10px 16px;
display: flex;
align-items: center;
gap: 12px;
}
.serial-number {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
background: rgba(255,255,255,0.2);
border-radius: 50%;
font-size: 12px;
font-weight: 600;
}
.goods-name {
font-size: 15px;
font-weight: 600;
flex: 1;
}
/* 商品内容区域 */
.goods-content {
padding: 12px 16px;
}
.info-row {
display: flex;
margin-bottom: 8px;
}
.info-pair {
flex: 1;
padding: 0 8px;
}
.info-pair .label {
font-size: 14px;
color: #666;
margin-bottom: 2px;
}
.info-pair .value {
font-size: 14px;
color: #333;
font-weight: 500;
text-align: right;
}
.quantity {
color: #409eff;
font-weight: 600;
}
.total {
color: #f56c6c;
font-weight: 600;
}
.empty {
visibility: hidden;
}
/* 操作按钮 */
.action-buttons {
display: flex;
justify-content: center;
gap: 12px;
padding: 16px 0;
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn {
padding: 12px 24px;
border: none;
border-radius: 8px;
font-size: 15px;
font-weight: 500;
cursor: pointer;
min-width: 80px;
text-align: center;
flex: 1;
}
.btn-primary {
background: #409eff;
color: white;
}
.btn-secondary {
background: #67c23a;
color: white;
}
.btn-outline {
background: #fff;
color: #333;
border: 1px solid #ddd;
}
/* 响应式设计 */
@media (max-width: 768px) {
.order-detail-container {
padding: 12px;
}
.info-item {
margin-bottom: 10px;
}
.info-pair {
padding: 0 4px;
}
.action-buttons {
flex-direction: column;
}
.btn {
width: 100%;
margin-bottom: 8px;
}
.btn:last-child {
margin-bottom: 0;
}
}
</style>

View File

@ -0,0 +1,113 @@
// buchadata.js
export default {
data: [
{
piaokouid: 1,
goodsid: 1, // 对应盐酸丙卡特罗片(美普清)10
applydate: "2024-01-15",
piaokoutype: "价格补差",
shortname: "MPT10",
goodsname: "盐酸丙卡特罗片(美普清)10",
piaokou: 100
},
{
piaokouid: 101,
goodsid: 1, // 对应盐酸丙卡特罗片(美普清)10
applydate: "2025-11-15",
piaokoutype: "价格补差",
shortname: "MPT10",
goodsname: "盐酸丙卡特罗片(美普清)10",
piaokou: 200
},
{
piaokouid: 2,
goodsid: 3, // 对应盐酸丙卡特罗片(美普清)20
applydate: "2024-01-16",
piaokoutype: "运费补差",
shortname: "MPT20",
goodsname: "盐酸丙卡特罗片(美普清)20",
piaokou: 8.00
},
{
piaokouid: 3,
goodsid: 5, // 对应瑞巴派特片(膜固思达)24
applydate: "2024-01-17",
piaokoutype: "促销补差",
shortname: "MCT24",
goodsname: "瑞巴派特片(膜固思达)24",
piaokou: 12.80
},
{
piaokouid: 4,
goodsid: 35, // 对应瑞巴派特片(膜固思达)48
applydate: "2024-01-18",
piaokoutype: "价格补差",
shortname: "MCT48",
goodsname: "瑞巴派特片(膜固思达)48",
piaokou: 25.00
},
{
piaokouid: 5,
goodsid: 6, // 对应阿立哌唑片(安律凡)5mg
applydate: "2024-01-19",
piaokoutype: "运费补差",
shortname: "ABF5",
goodsname: "阿立哌唑片(安律凡)5mg",
piaokou: 18.50
},
{
piaokouid: 6,
goodsid: 8, // 对应托伐普坦片(苏麦卡)
applydate: "2024-01-20",
piaokoutype: "促销补差",
shortname: "SMC",
goodsname: "托伐普坦片(苏麦卡)",
piaokou: 45.75
},
{
piaokouid: 7,
goodsid: 10, // 对应白消安注射液(白舒非)
applydate: "2024-01-21",
piaokoutype: "价格补差",
shortname: "BSF",
goodsname: "白消安注射液(白舒非)",
piaokou: 120.25
},
{
piaokouid: 8,
goodsid: 33, // 对应德拉马尼片(德尔巴)
applydate: "2024-01-22",
piaokoutype: "运费补差",
shortname: "DLM",
goodsname: "德拉马尼片(德尔巴)",
piaokou: 280.00
},
{
piaokouid: 9,
goodsid: 39, // 对应注射用阿立哌唑0.4g
applydate: "2024-01-23",
piaokoutype: "促销补差",
shortname: "AOM400",
goodsname: "注射用阿立哌唑0.4g",
piaokou: 95.90
},
{
piaokouid: 10,
goodsid: 41, // 对应布瑞哌唑片(锐思定)1mg
applydate: "2024-01-24",
piaokoutype: "价格补差",
shortname: "RXT1",
goodsname: "布瑞哌唑片(锐思定)1mg",
piaokou: 22.40
},
{
piaokouid: 11,
goodsid: 42, // 对应泊那替尼片英可欣15mg
applydate: "2024-01-25",
piaokoutype: "运费补差",
shortname: "ISG",
goodsname: "泊那替尼片英可欣15mg",
piaokou: 350.60
}
]
};

View File

@ -0,0 +1,49 @@
// staticData.js
export const contractData = {
"total": 2,
"rows": [
{
"saleid": 999822,
"adddate": "2025-08-20 09:05:26",
"contractcode": "Z-CQ-000120",
"contractmoney": 5767.4700,
"usernames": "重庆医药集团医贸药品有限公司",
"businessManagerName": "商务经理名字-西区",
"transport": "汽运",
"areaName": "重庆",
"warehouseName": "临安GSP库",
"companyName": "浙江大冢制药有限公司",
"stateText": "待商务审批",
"bigAreaName": "西区"
},
{
"saleid": 999833,
"adddate": "2025-08-20 09:05:26",
"contractcode": "Z-CQ-000120",
"contractmoney": 5767.4700,
"usernames": "重庆医药集团医贸药品有限公司",
"businessManagerName": "商务经理名字-西区",
"transport": "汽运",
"areaName": "重庆",
"warehouseName": "临安GSP库",
"companyName": "浙江大冢制药有限公司",
"stateText": "待商务审批",
"bigAreaName": "西区"
},
{
"saleid": 166314,
"adddate": "2025-07-08 15:09:20",
"contractcode": "G-SC-40861",
"contractmoney": 109296.0000,
"usernames": "国药集团西南医药有限公司",
"transport": "汽运",
"areaName": "四川",
"warehouseName": "广东三方(上药)",
"companyName": "广东大冢制药有限公司",
"stateText": "待商务审批",
"bigAreaName": "西区"
}
],
"code": 200,
"msg": "查询成功"
};

View File

@ -0,0 +1,34 @@
<template>
<view class="container">
详情{{saleid}}
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
const saleid = ref('')
onLoad((options) => {
if (options.saleid) {
saleid.value = options.saleid
// saleid
console.log('加载合同详情ID:', saleid.value)
// loadContractDetail(saleid.value)
}
})
function loadContractDetail(id) {
// saleid
console.log('加载合同详情ID:', id)
}
</script>
<style scoped>
.container {
padding: 10px;
background-color: #f5f7fa;
min-height: 100vh;
}
</style>

View File

@ -0,0 +1,72 @@
// staticData.js
export const contractData = {
"total": 2,
"data": [
{
"saleid": 999822,
"user_name": "重庆医药集团医贸药品有限公司",
"phonenumber": "",
"budgetmoney_area": 0.0000,
"ispaynow": "非现款",
"contractcode": "Z-CQ-000120",
"piaokous": 5767.4700,
"budgetmoney1": 0.0000,
"CAN": 0.0000,
"ContractMoney1": 0.00,
"contractmoney": 5767.4700,
"ContractMoney_area": 0.00,
"CAN_area": 0.0000,
"place": "重庆市沙坪坝区土主镇明珠山一支路4号",
"piaokou": 0.0000,
"dept_id": 1,
"shortName": "重庆医贸",
"adddate": "2025-08-20"
},
],
"code": 200,
"msg": "查询成功"
};
export const goodsData =
{
"msg": "操作成功",
"code": 200,
"data": [
{
"taxrate": 1.00,
"mon3": 0.0000,
"packingnum": 200,
"invoiceprice": 46.8900,
"goodsname": "盐酸丙卡特罗片(美普清)10",
"piaokou": 0.0000,
"goodsnum": 123,
"allmoney": 5767.4700,
"shortname": "MPT10",
"num":0
},
{
"taxrate": 2.00,
"mon3": 0.0000,
"packingnum": 200,
"invoiceprice": 46.8900,
"goodsname": "诺氟沙星(美普清)10",
"piaokou": 0.0000,
"goodsnum": 123,
"allmoney": 5767.4700,
"shortname": "MPT10",
"num":0
},
{
"taxrate": 3.00,
"mon3": 0.0000,
"packingnum": 200,
"invoiceprice": 46.8900,
"goodsname": "盐酸宁干片(美普清)10",
"piaokou": 0.0000,
"goodsnum": 123,
"allmoney": 5767.4700,
"shortname": "MPT10",
"num":0
}
]
}

View File

@ -0,0 +1,296 @@
<template>
<view class="container">
<view class="example">
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
<uni-forms-item label="生产单位">
<uni-data-select
v-model="queryParams.CompanyId"
:localdata="companyOptions"
text-field="deptName"
value-field="deptId"
@change="getTableData"
:clear="true"
/>
</uni-forms-item>
<uni-forms-item label="状态">
<uni-data-select
v-model="queryParams.state"
:localdata="stateList"
@change="getTableData"
:clear="true"
></uni-data-select>
</uni-forms-item>
<uni-forms-item label="合同编号" >
<input
class="uni-input custom-input"
v-model="queryParams.contractcode"
placeholder="请输入合同编号"
@confirm="getTableData"/>
</uni-forms-item>
<!-- <uni-forms-item label="合同编号" >
<view class="uni-form-item uni-column">
<input class="uni-input" focus placeholder="自动获得焦点" />
</view>
</uni-forms-item> -->
</uni-forms>
<button type="primary" @click="gotoNewAdd">新增</button>
</view>
<view v-if="filteredContracts.length === 0" class="no-data">
<text>暂无匹配的合同数据</text>
</view>
<view v-else>
<uni-card
v-for="(contract, index) in filteredContracts"
:key="contract.saleid"
:title="contract.usernames"
@click="gotoDetail(contract)"
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
>
<uni-row class="demo-uni-row">
<uni-col :span="12">
<view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>
</uni-col>
<uni-col :span="12">
<view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>
</uni-col>
</uni-row>
<uni-row class="demo-uni-row">
<uni-col :span="12">
<view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>
</uni-col>
<uni-col :span="12">
<view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>
</uni-col>
</uni-row>
<uni-row class="demo-uni-row">
<uni-col :span="12">
<view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>
</uni-col>
<uni-col :span="12" style="display: flex;">
<view class="demo-uni-col light">订单类型: </view>
<dict-tag :options="orderTypeList" :value="contract.type" style="color: red;"/>
</uni-col>
</uni-row>
</uni-card>
</view>
</view>
</template>
<script setup>
import { listsalemain } from "../../../api/orderManager/index.js"
import { listproductList } from "../../../api/orderManager/index.js"
import { ref, reactive, onMounted, computed,getCurrentInstance } from "vue"
import { contractData } from "../OrderManager/data.js" //
import { getDicts } from "../../../api/system/dict/data.js"
// import DictTag from '@/components/dict-tag/dict-tag.vue';
// import { log } from "console"
const { proxy } = getCurrentInstance()
//
const baseFormData = ref({
})
//
const orderTypeList =ref([])
const paymentValue = ref(0)
const companyValue = ref(0)
const paging = ref({
//
pageNum: 1,
//
pageSize:999,
isAsc: 'descending',
orderByColumn: 'adddate'
})
const queryParams = ref({
params:{
state: "0,1,-1,2,-2,3,-3,9,10,11,12,-12,13,-13,14,15,16",
}
})
//
// const stateList = ref([
// { value: '0', text: "" },
// { value: '1', text: "" },
// { value: '-1', text: "退" },
// { value: '2', text: "" },
// { value: '-2', text: "退" },
// { value:'3', text: "" },
// { value: '-3', text: "退" },
// { value: '9', text: "" },
// { value: '10', text: "" },
// { value: '11', text: "" },
// ])
const stateList = ref([])
const companyOptions = ref([])
//
const contracts = ref([])
//
const filteredContracts = computed(() => {
let result = contracts.value
//
if (companyValue.value === 1) {
result = result.filter(contract => contract.companyName.includes('浙江'))
} else if (companyValue.value === 2) {
result = result.filter(contract => contract.companyName.includes('广东'))
}
//
return result
})
//
onMounted(() => {
getDictData()
getTableData()
getDeptLists()
})
//
function formatDate(dateString) {
if (!dateString) return '未知日期'
return dateString.split(' ')[0]
}
//
const getDictData = () =>{
getDicts("order_state").then(res =>{
console.log('order_state',res.data)
stateList.value = res.data.map(item =>{
return{
value:item.dictValue,
text:item.dictLabel
}
})
})
getDicts("dazhong_dingdan_type").then(res =>{
console.log('dazhong_dingdan_type',res.data)
orderTypeList.value = res.data
})
}
//
const getTableData = () =>{
console.log(queryParams.value)
listsalemain(queryParams.value,paging.value).then(res => {
contracts.value = res.rows
// total.value = res.total;
});
}
const getDeptLists = () =>{
listproductList().then(res => {
companyOptions.value = res.data.map(item => {
return {
value:item.deptId,
text:item.deptName
}
})
console.log('companyOptions.value', companyOptions.value)
});
}
//
function filterContracts(e) {
console.log("筛选条件变化:",e)
//
}
//
const handleInput = (e) =>{
console.log('handleInput',e.detail.value)
}
//
function gotoDetail(contract) {
console.log("查看合同详情:", contract)
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
// proxy.$tab.navigateTo('pages/work/OrderManager/OrderDetail')
uni.navigateTo({
url: "/pages/work/OrderManager/components/OrderDetail"
});
}
const gotoNewAdd = () =>{
uni.navigateTo({
url: "/pages/work/OrderManager/components/NewAdd"
});
}
</script>
<style lang="scss" scoped>
.custom-input {
border: 1px solid #ccc;
border-radius: 4px;
padding: 5px;
height: 35px;
}
.container {
padding: 10px;
background-color: #f5f7fa;
min-height: 100vh;
}
.example {
padding: 10px;
background: #fff;
border-radius: 8px;
margin-bottom: 15px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
:deep(.uni-section .uni-section-header) {
padding: 0;
}
:deep(.uni-card) {
padding: 0 !important;
margin: 10px 0 !important;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
:deep(.uni-card__content) {
padding: 12px !important;
}
.demo-uni-row {
padding: 5px 0;
font-size: 14px;
}
.demo-uni-col {
padding: 2px 0;
&.dark {
color: #333;
font-weight: 500;
}
&.light {
color: #666;
}
}
.card-even {
border-left: 4px solid #2979ff;
}
.card-odd {
border-left: 4px solid #19be6b;
}
.no-data {
text-align: center;
padding: 40px 0;
color: #999;
font-size: 16px;
}
</style>

View File

@ -15,6 +15,12 @@
<uni-section title="系统管理" type="line"></uni-section>
<view class="grid-body">
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
<uni-grid-item @click="gotoOrderManager">
<view class="grid-item-box" >
<uni-icons type="person-filled" size="30"></uni-icons>
<text class="text">订单管理</text>
</view>
</uni-grid-item>
<uni-grid-item @click="gotoBusiness">
<view class="grid-item-box" >
<uni-icons type="person-filled" size="30"></uni-icons>
@ -124,6 +130,11 @@
url:'/pages/work/OrderApproval/index'
})
}
const gotoOrderManager = () =>{
uni.navigateTo({
url:'/pages/work/OrderManager/index'
})
}
</script>