Compare commits
6 Commits
ab55d14f26
...
c780e6dbba
| Author | SHA1 | Date | |
|---|---|---|---|
| c780e6dbba | |||
| bfc5bb8f59 | |||
| b43a03b206 | |||
| e400aadb14 | |||
| a2d85cd307 | |||
| eee43c6b78 |
21
api/Salemain.js
Normal file
21
api/Salemain.js
Normal file
@ -0,0 +1,21 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询财务审批列表
|
||||
export const financeList = (data, query) => {
|
||||
return request({
|
||||
url: '/bussiness/salemain/financeList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取订单审核列表
|
||||
export const getOrderApprovalList = (data, query) => {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/bussiness/salemain/orderList',
|
||||
data: data,
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
8
api/dept.js
Normal file
8
api/dept.js
Normal file
@ -0,0 +1,8 @@
|
||||
import request from "../utils/request";
|
||||
|
||||
export const getDeptList = () => {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/system/dept/list',
|
||||
})
|
||||
}
|
||||
11
api/warehouse.js
Normal file
11
api/warehouse.js
Normal file
@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询列表仓库
|
||||
export const listwarehouse = (data, query) => {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/baseInfo/warehouse/list',
|
||||
data: data,
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
33
components/LargeArea/LargeArea.vue
Normal file
33
components/LargeArea/LargeArea.vue
Normal file
@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<uni-data-select
|
||||
v-model="modelValue"
|
||||
:localdata="options"
|
||||
v-bind="omit($attrs,['change'])"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineModel, defineOptions, onMounted, ref} from 'vue'
|
||||
import {omit} from "radash";
|
||||
import UniDataSelect from "../../uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue";
|
||||
import {getDeptList} from "../../api/dept";
|
||||
|
||||
defineOptions({
|
||||
name: "LargeArea"
|
||||
})
|
||||
|
||||
const modelValue = defineModel()
|
||||
const options = ref([])
|
||||
|
||||
onMounted(async () => {
|
||||
const {data} = await getDeptList()
|
||||
options.value = data.filter(i => i.isUnit === 1).map(i => ({
|
||||
value: i.deptId,
|
||||
text: i.deptName
|
||||
}))
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
48
components/Warehouse/WareHouse.vue
Normal file
48
components/Warehouse/WareHouse.vue
Normal file
@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<uni-data-select
|
||||
v-model="modelValue"
|
||||
:localdata="options"
|
||||
v-bind="omit($attrs,['change'])"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineModel, defineOptions, defineProps, onMounted, ref, watch} from 'vue'
|
||||
import {omit} from "radash";
|
||||
import UniDataSelect from "../../uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue";
|
||||
import {listwarehouse} from "../../api/warehouse";
|
||||
|
||||
defineOptions({
|
||||
name: "WareHouse"
|
||||
})
|
||||
|
||||
const modelValue = defineModel()
|
||||
|
||||
const props = defineProps(['companyId'])
|
||||
const options = ref([])
|
||||
|
||||
const handleQuery = async () => {
|
||||
const {rows} = await listwarehouse({
|
||||
state: 1,
|
||||
companyid: props.companyId
|
||||
}, {
|
||||
pageNum: 1,
|
||||
pageSize: 1000
|
||||
})
|
||||
options.value = rows.filter(i => !i.warehousename.includes('其他')).map(i => ({
|
||||
value: i.warehouseid,
|
||||
text: i.warehousename
|
||||
}))
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await handleQuery()
|
||||
})
|
||||
|
||||
watch(() => props.companyId, async (newValue) => {
|
||||
if (newValue || newValue === '') {
|
||||
modelValue.value = ''
|
||||
await handleQuery()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@ -1,49 +0,0 @@
|
||||
// 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": "查询成功"
|
||||
};
|
||||
@ -1,34 +0,0 @@
|
||||
<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>
|
||||
@ -1,69 +0,0 @@
|
||||
// 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"
|
||||
},
|
||||
{
|
||||
"taxrate": 1.00,
|
||||
"mon3": 0.0000,
|
||||
"packingnum": 200,
|
||||
"invoiceprice": 46.8900,
|
||||
"goodsname": "诺氟沙星(美普清)10",
|
||||
"piaokou": 0.0000,
|
||||
"goodsnum": 123,
|
||||
"allmoney": 5767.4700,
|
||||
"shortname": "MPT10"
|
||||
},
|
||||
{
|
||||
"taxrate": 1.00,
|
||||
"mon3": 0.0000,
|
||||
"packingnum": 200,
|
||||
"invoiceprice": 46.8900,
|
||||
"goodsname": "盐酸宁干片(美普清)10",
|
||||
"piaokou": 0.0000,
|
||||
"goodsnum": 123,
|
||||
"allmoney": 5767.4700,
|
||||
"shortname": "MPT10"
|
||||
}
|
||||
]
|
||||
}
|
||||
67
pages/work/FinancialApproval/ListItem.vue
Normal file
67
pages/work/FinancialApproval/ListItem.vue
Normal file
@ -0,0 +1,67 @@
|
||||
<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">
|
||||
<view class="label">
|
||||
<text>状态:</text>
|
||||
<text>{{ item.stateText }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>下单日期:</text>
|
||||
<text>{{ formatDate(item.adddate) }}</text>
|
||||
</view>
|
||||
|
||||
<view class="label">
|
||||
<text>支付方式:</text>
|
||||
<text>{{ item.creditperiods > 0 ? '非现款' : '现款' }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>区域:</text>
|
||||
<text>{{ item.areaName }}</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>{{ formatPrice(item.balance) }}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</uni-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineOptions, defineProps, getCurrentInstance} from 'vue'
|
||||
import {formatDate} from "../../../uni_modules/uni-dateformat/components/uni-dateformat/date-format";
|
||||
import UniCard from "../../../uni_modules/uni-card/components/uni-card/uni-card.vue";
|
||||
import {formatPrice} from "../../../utils/utils";
|
||||
|
||||
defineOptions({
|
||||
name: "ListItem"
|
||||
})
|
||||
|
||||
const {proxy} = getCurrentInstance()
|
||||
const props = defineProps(['items'])
|
||||
const handleDetail = (raw) => {
|
||||
proxy.$tab.navigateTo(`/pages/work/FinancialApproval/OrderDetail?id=${raw}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@ -1,186 +1,63 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="example">
|
||||
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
|
||||
<MBCard>
|
||||
<uni-forms ref="baseForm" :modelValue="queryParams">
|
||||
<uni-forms-item label="生产单位">
|
||||
<uni-data-select
|
||||
v-model="companyValue"
|
||||
:localdata="companyOptions"
|
||||
@change="filterContracts"
|
||||
></uni-data-select>
|
||||
<ProductionUnit v-model="queryParams.companyId" @change="handleQuery"/>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
||||
<view v-if="filteredContracts.length === 0" class="no-data">
|
||||
<text>暂无匹配的合同数据</text>
|
||||
</view>
|
||||
</MBCard>
|
||||
|
||||
<MBLoading v-if="loading"/>
|
||||
<view v-else>
|
||||
<uni-card
|
||||
v-for="(contract, index) in filteredContracts"
|
||||
:key="contract.saleid"
|
||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||
:title="contract.usernames"
|
||||
@click="gotoDetail(contract)"
|
||||
>
|
||||
<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">
|
||||
<view class="demo-uni-col light">区域: {{ contract.areaName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-card>
|
||||
<ListItem :items="tableData"/>
|
||||
<MBPagination
|
||||
v-if="total > 0"
|
||||
v-model:limit="paging.pageSize"
|
||||
v-model:page="paging.pageNum"
|
||||
:total="total"
|
||||
@pagination="handleQuery"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getCurrentInstance, onMounted, ref} from "vue"
|
||||
import UniForms from "../../../uni_modules/uni-forms/components/uni-forms/uni-forms.vue";
|
||||
import UniFormsItem from "../../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue";
|
||||
import MBCard from "../../../components/MB/MBCard.vue";
|
||||
import ProductionUnit from "../../../components/ProductionUnit/ProductionUnit.vue";
|
||||
import MBLoading from "../../../components/MB/MBLoading.vue";
|
||||
import MBPagination from "../../../components/MB/MBPagination.vue";
|
||||
import ListItem from "./ListItem.vue"
|
||||
import {financeList} from "../../../api/Salemain";
|
||||
|
||||
import {computed, getCurrentInstance, onMounted, ref} from "vue"
|
||||
import {contractData} from "./data.js" // 根据实际路径调整
|
||||
const {proxy} = getCurrentInstance()
|
||||
// 表单数据
|
||||
const baseFormData = ref({})
|
||||
const paymentValue = ref(0)
|
||||
const companyValue = ref(0)
|
||||
|
||||
// 筛选选项
|
||||
const paymentOptions = ref([
|
||||
{value: 0, text: "全部支付方式"},
|
||||
{value: 1, text: "账期支付"},
|
||||
{value: 2, text: "预付款"}
|
||||
])
|
||||
const queryParams = ref({
|
||||
state: '2'
|
||||
})
|
||||
const loading = ref(true)
|
||||
const total = ref(0)
|
||||
const paging = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
isAsc: 'descending',
|
||||
orderByColumn: 'adddate'
|
||||
})
|
||||
const tableData = ref([])
|
||||
|
||||
const companyOptions = ref([
|
||||
{value: 0, text: "全部生产单位"},
|
||||
{value: 1, text: "浙江大冢制药有限公司"},
|
||||
{value: 2, text: "广东大冢制药有限公司"}
|
||||
])
|
||||
const handleQuery = async () => {
|
||||
loading.value = true
|
||||
const data = await financeList(queryParams.value, paging.value)
|
||||
total.value = data.total
|
||||
tableData.value = data.rows
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
// 合同数据
|
||||
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(async () => {
|
||||
await handleQuery()
|
||||
})
|
||||
|
||||
// 初始化数据
|
||||
onMounted(() => {
|
||||
contracts.value = contractData.rows
|
||||
})
|
||||
|
||||
// 格式化日期
|
||||
function formatDate(dateString) {
|
||||
if (!dateString) return '未知日期'
|
||||
return dateString.split(' ')[0]
|
||||
}
|
||||
|
||||
// 筛选合同
|
||||
function filterContracts(e) {
|
||||
console.log("筛选条件变化:", e)
|
||||
// 计算属性会自动更新,无需额外操作
|
||||
}
|
||||
|
||||
// 跳转到详情页
|
||||
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/FinancialApproval/OrderDetail')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.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>
|
||||
96
pages/work/OrderApproval/ListItem.vue
Normal file
96
pages/work/OrderApproval/ListItem.vue
Normal file
@ -0,0 +1,96 @@
|
||||
<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">
|
||||
<view class="label">
|
||||
<text>状态:</text>
|
||||
<text>{{ item.stateText }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>制单日期:</text>
|
||||
<text>{{ formatDate(item.adddate, 'yyyy-MM-dd') }}</text>
|
||||
</view>
|
||||
|
||||
<view class="label">
|
||||
<text>支付方式:</text>
|
||||
<text>{{ item.creditperiods > 0 ? '非现款' : '现款' }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>区域:</text>
|
||||
<text>{{ item.areaName }}</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>
|
||||
<dict-tag :options="bus_acperiod_state" :value="item.acPeriodState"/>
|
||||
</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>额度状态:</text>
|
||||
<text>
|
||||
<dict-tag :options="bus_isrush_state" :value="item.isRush"/>
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="label">
|
||||
<text>OA推送状态:</text>
|
||||
<text>{{ item.oaStateText }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>OA流程编号:</text>
|
||||
<text>{{ item.oaCode }}</text>
|
||||
</view>
|
||||
|
||||
<view class="label">
|
||||
<text>本月/下月:</text>
|
||||
<text>{{ item.actioninfo }}</text>
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>商务经理:</text>
|
||||
<text>{{ item.businessManagerName }}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</uni-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {defineOptions, defineProps, getCurrentInstance} from 'vue'
|
||||
import {formatDate} from "../../../uni_modules/uni-dateformat/components/uni-dateformat/date-format";
|
||||
import UniCard from "../../../uni_modules/uni-card/components/uni-card/uni-card.vue";
|
||||
import {formatPrice} from "../../../utils/utils";
|
||||
import DictTag from "../../../components/dict-tag/dict-tag.vue";
|
||||
|
||||
defineOptions({
|
||||
name: "ListItem"
|
||||
})
|
||||
|
||||
const {proxy} = getCurrentInstance()
|
||||
const {bus_isrush_state, bus_acperiod_state} = proxy.useDict(['bus_isrush_state', 'bus_acperiod_state'])
|
||||
const props = defineProps(['items'])
|
||||
const handleDetail = (raw) => {
|
||||
proxy.$tab.navigateTo(`/pages/work/OrderApproval/OrderDetail?id=${raw}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@ -1,78 +1,158 @@
|
||||
<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="companyValue"
|
||||
:localdata="companyOptions"
|
||||
@change="filterContracts"
|
||||
></uni-data-select>
|
||||
<MBCard>
|
||||
<uni-forms ref="baseForm" :modelValue="queryParams">
|
||||
<uni-forms-item label="货主">
|
||||
<ProductionUnit v-model="queryParams.companyId" @change="handleQuery"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="仓库">
|
||||
<uni-data-select
|
||||
v-model="paymentValue"
|
||||
:localdata="warehouseList"
|
||||
@change="filterContracts"
|
||||
></uni-data-select>
|
||||
<WareHouse
|
||||
v-model="queryParams.warehouseid"
|
||||
:companyId="queryParams.companyId"
|
||||
@change="handleQuery"
|
||||
/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="大区">
|
||||
<uni-data-select
|
||||
v-model="paymentValue"
|
||||
:localdata="areaList"
|
||||
@change="filterContracts"
|
||||
></uni-data-select>
|
||||
<LargeArea v-model="queryParams.bigAreaId" @change="handleQuery"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="状态">
|
||||
<DictSelect
|
||||
v-model="queryParams.state"
|
||||
dict="dazhong_dingdanshenhe_list_state"
|
||||
@change="handleQuery"
|
||||
/>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
||||
<view v-if="filteredContracts.length === 0" class="no-data">
|
||||
<text>暂无匹配的合同数据</text>
|
||||
</view>
|
||||
</MBCard>
|
||||
|
||||
<MBLoading v-if="loading"/>
|
||||
<view v-else>
|
||||
<uni-card
|
||||
v-for="(contract, index) in filteredContracts"
|
||||
:key="contract.saleid"
|
||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||
:title="contract.usernames"
|
||||
@click="gotoDetail(contract)"
|
||||
>
|
||||
<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">
|
||||
<view class="demo-uni-col light">区域: {{ contract.areaName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-card>
|
||||
<ListItem :items="tableData"/>
|
||||
<MBPagination
|
||||
v-if="total > 0"
|
||||
v-model:limit="paging.pageSize"
|
||||
v-model:page="paging.pageNum"
|
||||
:total="total"
|
||||
@pagination="handleQuery"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- <view class="example">-->
|
||||
<!-- <uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">-->
|
||||
|
||||
<!-- <uni-forms-item label="生产单位">-->
|
||||
<!-- <uni-data-select-->
|
||||
<!-- v-model="companyValue"-->
|
||||
<!-- :localdata="companyOptions"-->
|
||||
<!-- @change="filterContracts"-->
|
||||
<!-- ></uni-data-select>-->
|
||||
<!-- </uni-forms-item>-->
|
||||
<!-- <uni-forms-item label="仓库">-->
|
||||
<!-- <uni-data-select-->
|
||||
<!-- v-model="paymentValue"-->
|
||||
<!-- :localdata="warehouseList"-->
|
||||
<!-- @change="filterContracts"-->
|
||||
<!-- ></uni-data-select>-->
|
||||
<!-- </uni-forms-item>-->
|
||||
<!-- <uni-forms-item label="大区">-->
|
||||
<!-- <uni-data-select-->
|
||||
<!-- v-model="paymentValue"-->
|
||||
<!-- :localdata="areaList"-->
|
||||
<!-- @change="filterContracts"-->
|
||||
<!-- ></uni-data-select>-->
|
||||
<!-- </uni-forms-item>-->
|
||||
<!-- </uni-forms>-->
|
||||
<!-- </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"-->
|
||||
<!-- :class="index % 2 === 0 ? 'card-even' : 'card-odd'"-->
|
||||
<!-- :title="contract.usernames"-->
|
||||
<!-- @click="gotoDetail(contract)"-->
|
||||
<!-- >-->
|
||||
<!-- <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">-->
|
||||
<!-- <view class="demo-uni-col light">区域: {{ contract.areaName }}</view>-->
|
||||
<!-- </uni-col>-->
|
||||
<!-- </uni-row>-->
|
||||
<!-- </uni-card>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import {computed, getCurrentInstance, onMounted, ref} from "vue"
|
||||
import {contractData} from "./data.js" // 根据实际路径调整
|
||||
import {contractData} from "./data.js"
|
||||
import UniForms from "../../../uni_modules/uni-forms/components/uni-forms/uni-forms.vue";
|
||||
import UniFormsItem from "../../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue";
|
||||
import MBCard from "../../../components/MB/MBCard.vue";
|
||||
import ProductionUnit from "../../../components/ProductionUnit/ProductionUnit.vue";
|
||||
import DictSelect from "../../../components/DictSelect/DictSelect.vue";
|
||||
import WareHouse from "../../../components/Warehouse/WareHouse.vue";
|
||||
import LargeArea from "../../../components/LargeArea/LargeArea.vue";
|
||||
import MBLoading from "../../../components/MB/MBLoading.vue";
|
||||
import {getOrderApprovalList} from "../../../api/Salemain";
|
||||
import ListItem from "./ListItem.vue";
|
||||
import MBPagination from "../../../components/MB/MBPagination.vue";
|
||||
|
||||
const {proxy} = getCurrentInstance()
|
||||
|
||||
|
||||
const queryParams = ref({})
|
||||
|
||||
const loading = ref(true)
|
||||
const total = ref(0)
|
||||
const paging = ref({
|
||||
pageNum: 1,
|
||||
// 分页数量
|
||||
pageSize: 10,
|
||||
isAsc: 'descending',
|
||||
orderByColumn: 'adddate'
|
||||
})
|
||||
const tableData = ref([])
|
||||
|
||||
const handleQuery = async () => {
|
||||
loading.value = true
|
||||
const data = await getOrderApprovalList(queryParams.value, paging.value)
|
||||
total.value = data.total
|
||||
tableData.value = data.rows
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await handleQuery()
|
||||
})
|
||||
|
||||
|
||||
// ================================================================================
|
||||
|
||||
|
||||
// 表单数据
|
||||
const baseFormData = ref({})
|
||||
const paymentValue = ref(0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user