Compare commits
8 Commits
9b05c19b76
...
38eb6c221d
| Author | SHA1 | Date | |
|---|---|---|---|
| 38eb6c221d | |||
| 16ef440b87 | |||
| 970bc7b95c | |||
| b182536fed | |||
| 8f3e5738ad | |||
| fe91d1913d | |||
| a7c3eae535 | |||
| 9719cdf579 |
472
api/BusinessApproval.js
Normal file
472
api/BusinessApproval.js
Normal file
@ -0,0 +1,472 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获取当前商业用户票扣列表
|
||||||
|
// 相当于补差/bussiness/salemain/piAoKouLiSt
|
||||||
|
export function salemainpiAoKouList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/piAoKouLiSt',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 点击新增的时候先调用检查质保协议
|
||||||
|
export function salemaincheckQa(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/checkQa',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单列表--商业用户
|
||||||
|
export function listsalemain(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/list',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询订单列表内部用户
|
||||||
|
export function listsalemainNB(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/sysOrderList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询详细
|
||||||
|
export function salemainDetail(salemainId) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/info?id=' + salemainId,
|
||||||
|
method: 'get',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function addsalemain(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function updatesalemain(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function delsalemain(id) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/remove?ids=' +id,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询商务审批列表
|
||||||
|
export function mangerList(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/mangerList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询商务审批列表-张梦洁
|
||||||
|
export function specialMangerList(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/specialMangerList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询商务审批-商务经理额度
|
||||||
|
export function getManagerCreditLine(query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/getManagerCreditLine',
|
||||||
|
method: 'post',
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询商务审批-商务经理额度
|
||||||
|
export function getAreaCreditLine(query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/getAreaCreditLine',
|
||||||
|
method: 'post',
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商务经理审批时获取详情,下面的商品列表
|
||||||
|
export function businessManagerReviewGoodsList(salemainId) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/businessgoods/businessManagerReviewGoodsList?saleId=' + salemainId,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审批时获取详情-分开获取数据。分上面订单数据和下面商品数据。此接口为上面的订单数据
|
||||||
|
export function salemainDetailSWJL(query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/detail?id=' + query.salemainId + '&isThisMonth=' + query.isThisMonth,
|
||||||
|
method: 'get',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商务审批-审核
|
||||||
|
export function managerConfirm(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/managerConfirm?saleIds=' + data.saleIds + '&actionType=' + data.actionType,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 商务审批-回退
|
||||||
|
export function managerRefuse(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/managerRefuse?saleIds=' + data.saleIds + '&actionType=' + data.actionType,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询财务审批列表
|
||||||
|
export function financeList(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/financeList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 财务审批-审核
|
||||||
|
export function financeConfirm(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/financeConfirm?saleIds=' + data.saleIds,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 财务审批-回退
|
||||||
|
export function financeConfirmRefuse(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/financeConfirmRefuse?saleIds=' + data.saleIds,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单审核-列表
|
||||||
|
export function orderList(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/orderList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单审核-推送至OA-----state表示是否强制推送至OA,1是强制,0是不强制。
|
||||||
|
export function orderReviewSendOa(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/orderReviewSendOa?saleIds=' + data.saleIds + '&companyId=' + data.companyId + '&state=0',
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 订单审核-强制推送至OA
|
||||||
|
export function orderReviewSendOaQZ(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/orderReviewSendOa?saleIds=' + data.saleIds + '&companyId=' + data.companyId + '&state=1'+ '&psw=' + data.psw,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false,
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单审核-强制推送至分配
|
||||||
|
export function orderReviewForceOaToFenPei(data) {
|
||||||
|
return request({
|
||||||
|
// url: '/bussiness/salemain/orderReviewForceOa',
|
||||||
|
// 上面这个接口是参数用body里面传递的
|
||||||
|
url: '/bussiness/salemain/orderReviewForceOa?id=' + data.saleIds + '&psw=' + data.psw,
|
||||||
|
method: 'post',
|
||||||
|
// data:data,
|
||||||
|
// isEncrypt: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单审核-审核
|
||||||
|
export function orderReview(saleIds) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/orderReview?ids=' + saleIds,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单审核-回退
|
||||||
|
export function orderReviewBack(saleIds) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/orderReviewBack?id=' + saleIds ,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 账期审核
|
||||||
|
export function periodAudit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/periodAudit?ids=' + data,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 额度审核
|
||||||
|
export function creditReview(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/creditReview?ids=' + data,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更换仓库列表
|
||||||
|
export function changeWarehouseList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/changeWarehouseList?id=' + data ,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更换仓库
|
||||||
|
export function changeWarehouse(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/changeWarehouse?ids=' + data.ids + '&wareHouseId=' + data.wareHouseId,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 销售订单操作日志
|
||||||
|
export function salemainlogList(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemainlog/list',
|
||||||
|
method: 'post',
|
||||||
|
data:data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单分配列表
|
||||||
|
export function disOrderListsalemain(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/disOrderList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单分配-推送牛力(待推送分配状态推送至牛力状态)
|
||||||
|
export function SendNiuLi(id) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/SendNiuLi?id=' + id,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订单分配-数量查询
|
||||||
|
export function disOrderGetDataNiuLi(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/disOrderGetDataNiuLi',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单分配详细--上面部分
|
||||||
|
export function disOrderDetail(salemainId) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/disOrderDetail?id=' + salemainId,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单分配列表--下面部分
|
||||||
|
export function disOrderDisDetailList(salemainId) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/disOrderDisDetailList?saleId=' + salemainId,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询订单分配库存列表--双击后的列表
|
||||||
|
export function disOrderStockList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/disOrderStockList?saleId=' + data.saleId + '&goodsId=' + data.goodsId + '&warehouseId=' + data.warehouseId,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//订单分配--添加
|
||||||
|
export function disOrderSave(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/disOrderSave',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//订单分配--提交
|
||||||
|
export function disOrderSubmit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/disOrderSubmit',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//订单分配--回退
|
||||||
|
export function disOrderReturn(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/disOrderReturn',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 发货管理-工厂列表
|
||||||
|
export function factoryList(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/factoryList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发货管理-三方列表
|
||||||
|
export function thirdList(data,query) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/thirdList',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
params: query,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发货管理-数量查询
|
||||||
|
export function factoryGroupList(saleIds) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/factoryGroupList?saleIds=' + saleIds,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发货管理-获取页面详情-上面部分
|
||||||
|
export function DeliverDetail(saleId) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/DeliverDetail?saleId=' + saleId,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 发货管理-获取页面列表-下面
|
||||||
|
export function DeliverDetailList(saleId) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/DeliverDetailList?saleId=' + saleId,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发货管理-回退
|
||||||
|
export function DeliverBack(saleId) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/DeliverBack?saleId=' + saleId,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 发货管理-确认发货
|
||||||
|
export function DeliverSubmit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/DeliverSubmit?saleId=' + data.saleid + '&ckexecdate=' + data.ckexecdate,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发货管理-实际发货清单
|
||||||
|
export function getSaleDisDetail(saleid) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/getSaleDisDetail?saleId=' + saleid,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 发货管理-发票单
|
||||||
|
export function getInvoiceList(saleid) {
|
||||||
|
return request({
|
||||||
|
url: '/bussiness/salemain/getInvoiceList?saleId=' + saleid,
|
||||||
|
method: 'post',
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
43
components/DictSelect/DictSelect.vue
Normal file
43
components/DictSelect/DictSelect.vue
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<uni-data-select
|
||||||
|
v-model="modelValue"
|
||||||
|
:localdata="options"
|
||||||
|
v-bind="omit($attrs,['change'])"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineModel, defineOptions, defineProps, getCurrentInstance, ref, watch} from 'vue'
|
||||||
|
import {omit} from "radash";
|
||||||
|
import {getDicts} from "../../api/system/dict/data";
|
||||||
|
import UniDataSelect from "../../uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'DictSelect',
|
||||||
|
inheritAttrs: false
|
||||||
|
})
|
||||||
|
|
||||||
|
const modelValue = defineModel()
|
||||||
|
const props = defineProps(['dict'])
|
||||||
|
const {proxy} = getCurrentInstance()
|
||||||
|
|
||||||
|
const options = ref([])
|
||||||
|
|
||||||
|
watch(() => props.dict, async () => {
|
||||||
|
if (!props.dict) return ''
|
||||||
|
const {data} = await getDicts(`${props.dict}`)
|
||||||
|
options.value = data.map(item => {
|
||||||
|
return {
|
||||||
|
value: item.dictValue,
|
||||||
|
text: item.dictLabel
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, {
|
||||||
|
immediate: true
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
23
components/MB/MBCard.vue
Normal file
23
components/MB/MBCard.vue
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<template>
|
||||||
|
<view class="mb-card">
|
||||||
|
<slot/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineOptions} from 'vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'MBCard'
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.mb-card {
|
||||||
|
background: #FFFFFF;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
33
components/MB/MBLoading.vue
Normal file
33
components/MB/MBLoading.vue
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<view class="loading">
|
||||||
|
<uni-load-more
|
||||||
|
:contentText="{
|
||||||
|
contentrefresh: 'loading...',
|
||||||
|
}"
|
||||||
|
:status="'loading'"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineOptions} from 'vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'MBLoading'
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.loading {
|
||||||
|
display: flex;
|
||||||
|
margin: 20px auto;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
51
components/MB/MBPagination.vue
Normal file
51
components/MB/MBPagination.vue
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<template>
|
||||||
|
<uni-pagination
|
||||||
|
v-model:current="currentPage"
|
||||||
|
v-model:pageSize="pageSize"
|
||||||
|
:total="total"
|
||||||
|
next-text="后一页"
|
||||||
|
prev-text="前一页"
|
||||||
|
@change="handleChange"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import UniPagination from "../../uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue";
|
||||||
|
import {computed, defineEmits, defineOptions, defineProps} from 'vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'MBPagination',
|
||||||
|
inheritAttrs: false
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits()
|
||||||
|
const props = defineProps(['total', 'pagination', 'page', 'limit'])
|
||||||
|
|
||||||
|
|
||||||
|
const currentPage = computed({
|
||||||
|
get() {
|
||||||
|
return props.page
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
emit('update:page', val)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const pageSize = computed({
|
||||||
|
get() {
|
||||||
|
return props.limit
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
emit('update:pageSize', val)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleChange = ({type, current}) => {
|
||||||
|
currentPage.value = current
|
||||||
|
console.log(type, current, pageSize.value)
|
||||||
|
emit('pagination', {
|
||||||
|
page: current,
|
||||||
|
limit: pageSize.value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
40
components/ProductionUnit/ProductionUnit.vue
Normal file
40
components/ProductionUnit/ProductionUnit.vue
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<uni-data-select
|
||||||
|
v-model="modelValue"
|
||||||
|
:localdata="options"
|
||||||
|
placeholder="请选择货主"
|
||||||
|
v-bind="omit($attrs,['change'])"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineModel, defineOptions, defineProps, getCurrentInstance, 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 {listproductList} from "../../api/orderManager";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "ProductionUnit",
|
||||||
|
inheritAttrs: false
|
||||||
|
})
|
||||||
|
|
||||||
|
const modelValue = defineModel()
|
||||||
|
const props = defineProps([])
|
||||||
|
const {proxy} = getCurrentInstance()
|
||||||
|
|
||||||
|
const options = ref([])
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const {data} = await listproductList()
|
||||||
|
options.value = data.map(item => {
|
||||||
|
return {
|
||||||
|
value: item.deptId,
|
||||||
|
text: item.deptName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pinia-plugin-persistedstate": "^4.5.0"
|
"pinia-plugin-persistedstate": "^4.5.0",
|
||||||
|
"radash": "^12.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
58
pages/work/BusinessApproval/ListItem.vue
Normal file
58
pages/work/BusinessApproval/ListItem.vue
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<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"
|
||||||
|
>
|
||||||
|
<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.contractmoney.toFixed(2) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
<text>区域:</text>
|
||||||
|
<text>{{ item.areaName }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</uni-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {defineOptions, defineProps} from 'vue'
|
||||||
|
import UniCard from "../../../uni_modules/uni-card/components/uni-card/uni-card.vue";
|
||||||
|
import {formatDate} from "../../../uni_modules/uni-dateformat/components/uni-dateformat/date-format";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'ListItem'
|
||||||
|
})
|
||||||
|
|
||||||
|
const props = defineProps(['items'])
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.context {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
display: flex;
|
||||||
|
gap: 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,86 +1,126 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="example">
|
<MBCard>
|
||||||
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
|
<uni-forms ref="baseForm" :modelValue="queryParams">
|
||||||
<uni-forms-item label="支付方式">
|
<uni-forms-item label="支付方式">
|
||||||
<uni-data-select
|
<DictSelect v-model="queryParams.isPayNow" dict="dazhong_paytype" @change="handleQuery"/>
|
||||||
v-model="paymentValue"
|
</uni-forms-item>
|
||||||
:localdata="paymentOptions"
|
<uni-forms-item label="生产单位">
|
||||||
@change="filterContracts"
|
<ProductionUnit v-model="queryParams.companyId" @change="handleQuery"/>
|
||||||
></uni-data-select>
|
</uni-forms-item>
|
||||||
</uni-forms-item>
|
</uni-forms>
|
||||||
<uni-forms-item label="生产单位">
|
</MBCard>
|
||||||
<uni-data-select
|
|
||||||
v-model="companyValue"
|
|
||||||
:localdata="companyOptions"
|
|
||||||
@change="filterContracts"
|
|
||||||
></uni-data-select>
|
|
||||||
</uni-forms-item>
|
|
||||||
</uni-forms>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view v-if="filteredContracts.length === 0" class="no-data">
|
<MBLoading v-if="loading"/>
|
||||||
<text>暂无匹配的合同数据</text>
|
<view v-else>
|
||||||
</view>
|
<ListItem :items="tableData"/>
|
||||||
|
<MBPagination
|
||||||
<view v-else>
|
v-if="total > 0"
|
||||||
<uni-card
|
v-model:limit="paging.pageSize"
|
||||||
v-for="(contract, index) in filteredContracts"
|
v-model:page="paging.pageNum"
|
||||||
:key="contract.saleid"
|
:total="total"
|
||||||
:title="contract.usernames"
|
@pagination="handleQuery"
|
||||||
@click="gotoDetail(contract)"
|
/>
|
||||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
</view>
|
||||||
>
|
<!-- <uni-card-->
|
||||||
<uni-row class="demo-uni-row">
|
<!-- v-for="(contract, index) in filteredContracts"-->
|
||||||
<uni-col :span="12">
|
<!-- :key="contract.saleid"-->
|
||||||
<view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>
|
<!-- :class="index % 2 === 0 ? 'card-even' : 'card-odd'"-->
|
||||||
</uni-col>
|
<!-- :title="contract.usernames"-->
|
||||||
<uni-col :span="12">
|
<!-- @click="gotoDetail(contract)"-->
|
||||||
<view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>
|
<!-- >-->
|
||||||
</uni-col>
|
<!-- <uni-row class="demo-uni-row">-->
|
||||||
</uni-row>
|
<!-- <uni-col :span="12">-->
|
||||||
<uni-row class="demo-uni-row">
|
<!-- <view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>-->
|
||||||
<uni-col :span="12">
|
<!-- </uni-col>-->
|
||||||
<view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>
|
<!-- <uni-col :span="12">-->
|
||||||
</uni-col>
|
<!-- <view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>-->
|
||||||
<uni-col :span="12">
|
<!-- </uni-col>-->
|
||||||
<view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>
|
<!-- </uni-row>-->
|
||||||
</uni-col>
|
<!-- <uni-row class="demo-uni-row">-->
|
||||||
</uni-row>
|
<!-- <uni-col :span="12">-->
|
||||||
<uni-row class="demo-uni-row">
|
<!-- <view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>-->
|
||||||
<uni-col :span="12">
|
<!-- </uni-col>-->
|
||||||
<view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>
|
<!-- <uni-col :span="12">-->
|
||||||
</uni-col>
|
<!-- <view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>-->
|
||||||
<uni-col :span="12">
|
<!-- </uni-col>-->
|
||||||
<view class="demo-uni-col light">区域: {{ contract.areaName }}</view>
|
<!-- </uni-row>-->
|
||||||
</uni-col>
|
<!-- <uni-row class="demo-uni-row">-->
|
||||||
</uni-row>
|
<!-- <uni-col :span="12">-->
|
||||||
</uni-card>
|
<!-- <view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>-->
|
||||||
</view>
|
<!-- </uni-col>-->
|
||||||
</view>
|
<!-- <uni-col :span="12">-->
|
||||||
|
<!-- <view class="demo-uni-col light">区域: {{ contract.areaName }}</view>-->
|
||||||
|
<!-- </uni-col>-->
|
||||||
|
<!-- </uni-row>-->
|
||||||
|
<!-- </uni-card>-->
|
||||||
|
<!-- </view>-->
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import { ref, reactive, onMounted, computed,getCurrentInstance } from "vue"
|
import {computed, getCurrentInstance, onMounted, ref} from "vue"
|
||||||
import { contractData } from "./data.js" // 根据实际路径调整
|
import {contractData} from "./data.js"
|
||||||
const { proxy } = getCurrentInstance()
|
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 DictSelect from "../../../components/DictSelect/DictSelect.vue";
|
||||||
|
import ProductionUnit from "../../../components/ProductionUnit/ProductionUnit.vue";
|
||||||
|
import MBCard from "../../../components/MB/MBCard.vue";
|
||||||
|
import {mangerList} from "../../../api/BusinessApproval";
|
||||||
|
import MBPagination from "../../../components/MB/MBPagination.vue";
|
||||||
|
import MBLoading from "../../../components/MB/MBLoading.vue";
|
||||||
|
import ListItem from "./ListItem.vue";
|
||||||
|
|
||||||
|
const {proxy} = getCurrentInstance()
|
||||||
|
|
||||||
|
|
||||||
|
const queryParams = ref({
|
||||||
|
state: '1',
|
||||||
|
isPayNow: '',
|
||||||
|
companyId: ''
|
||||||
|
})
|
||||||
|
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 mangerList(queryParams.value, paging.value)
|
||||||
|
total.value = data.total
|
||||||
|
tableData.value = data.rows
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await handleQuery()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// ===========================================================================================
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const baseFormData = ref({})
|
const baseFormData = ref({})
|
||||||
const paymentValue = ref(0)
|
const paymentValue = ref('')
|
||||||
const companyValue = ref(0)
|
const companyValue = ref(0)
|
||||||
|
|
||||||
// 筛选选项
|
// 筛选选项
|
||||||
const paymentOptions = ref([
|
const paymentOptions = ref([
|
||||||
{ value: 0, text: "全部支付方式" },
|
{value: 0, text: "全部支付方式"},
|
||||||
{ value: 1, text: "账期支付" },
|
{value: 1, text: "账期支付"},
|
||||||
{ value: 2, text: "预付款" }
|
{value: 2, text: "预付款"}
|
||||||
])
|
])
|
||||||
|
|
||||||
const companyOptions = ref([
|
const companyOptions = ref([
|
||||||
{ value: 0, text: "全部生产单位" },
|
{value: 0, text: "全部生产单位"},
|
||||||
{ value: 1, text: "浙江大冢制药有限公司" },
|
{value: 1, text: "浙江大冢制药有限公司"},
|
||||||
{ value: 2, text: "广东大冢制药有限公司" }
|
{value: 2, text: "广东大冢制药有限公司"}
|
||||||
])
|
])
|
||||||
|
|
||||||
// 合同数据
|
// 合同数据
|
||||||
@ -88,106 +128,106 @@ const contracts = ref([])
|
|||||||
|
|
||||||
// 过滤后的合同数据
|
// 过滤后的合同数据
|
||||||
const filteredContracts = computed(() => {
|
const filteredContracts = computed(() => {
|
||||||
let result = contracts.value
|
let result = contracts.value
|
||||||
|
|
||||||
// 根据生产单位筛选
|
// 根据生产单位筛选
|
||||||
if (companyValue.value === 1) {
|
if (companyValue.value === 1) {
|
||||||
result = result.filter(contract => contract.companyName.includes('浙江'))
|
result = result.filter(contract => contract.companyName.includes('浙江'))
|
||||||
} else if (companyValue.value === 2) {
|
} else if (companyValue.value === 2) {
|
||||||
result = result.filter(contract => contract.companyName.includes('广东'))
|
result = result.filter(contract => contract.companyName.includes('广东'))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 可以根据支付方式添加更多筛选逻辑
|
// 可以根据支付方式添加更多筛选逻辑
|
||||||
|
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
contracts.value = contractData.rows
|
contracts.value = contractData.rows
|
||||||
})
|
})
|
||||||
|
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
function formatDate(dateString) {
|
function formatDate(dateString) {
|
||||||
if (!dateString) return '未知日期'
|
if (!dateString) return '未知日期'
|
||||||
return dateString.split(' ')[0]
|
return dateString.split(' ')[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 筛选合同
|
// 筛选合同
|
||||||
function filterContracts(e) {
|
function filterContracts(e) {
|
||||||
console.log("筛选条件变化:", e)
|
console.log("筛选条件变化:", e)
|
||||||
// 计算属性会自动更新,无需额外操作
|
// 计算属性会自动更新,无需额外操作
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转到详情页
|
// 跳转到详情页
|
||||||
function gotoDetail(contract) {
|
function gotoDetail(contract) {
|
||||||
console.log("查看合同详情:", contract)
|
console.log("查看合同详情:", contract)
|
||||||
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
|
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
|
||||||
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
|
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
|
||||||
proxy.$tab.navigateTo('/pages/work/BusinessApproval/OrderDetail')
|
proxy.$tab.navigateTo('/pages/work/BusinessApproval/OrderDetail')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example {
|
.example {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-section .uni-section-header) {
|
:deep(.uni-section .uni-section-header) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-card) {
|
:deep(.uni-card) {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 10px 0 !important;
|
margin: 10px 0 !important;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-card__content) {
|
:deep(.uni-card__content) {
|
||||||
padding: 12px !important;
|
padding: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-uni-row {
|
.demo-uni-row {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-uni-col {
|
.demo-uni-col {
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
|
|
||||||
&.dark {
|
&.dark {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.light {
|
&.light {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-even {
|
.card-even {
|
||||||
border-left: 4px solid #2979ff;
|
border-left: 4px solid #2979ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-odd {
|
.card-odd {
|
||||||
border-left: 4px solid #19be6b;
|
border-left: 4px solid #19be6b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-data {
|
.no-data {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px 0;
|
padding: 40px 0;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -1,63 +1,63 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="example">
|
<view class="example">
|
||||||
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
|
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
|
||||||
<uni-forms-item label="生产单位">
|
<uni-forms-item label="生产单位">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="companyValue"
|
v-model="companyValue"
|
||||||
:localdata="companyOptions"
|
:localdata="companyOptions"
|
||||||
@change="filterContracts"
|
@change="filterContracts"
|
||||||
></uni-data-select>
|
></uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="filteredContracts.length === 0" class="no-data">
|
<view v-if="filteredContracts.length === 0" class="no-data">
|
||||||
<text>暂无匹配的合同数据</text>
|
<text>暂无匹配的合同数据</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<uni-card
|
<uni-card
|
||||||
v-for="(contract, index) in filteredContracts"
|
v-for="(contract, index) in filteredContracts"
|
||||||
:key="contract.saleid"
|
:key="contract.saleid"
|
||||||
:title="contract.usernames"
|
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||||
@click="gotoDetail(contract)"
|
:title="contract.usernames"
|
||||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
@click="gotoDetail(contract)"
|
||||||
>
|
>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>
|
<view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>
|
<view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>
|
<view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>
|
<view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>
|
<view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col light">区域: {{ contract.areaName }}</view>
|
<view class="demo-uni-col light">区域: {{ contract.areaName }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import { ref, reactive, onMounted, computed,getCurrentInstance } from "vue"
|
import {computed, getCurrentInstance, onMounted, ref} from "vue"
|
||||||
import { contractData } from "./data.js" // 根据实际路径调整
|
import {contractData} from "./data.js" // 根据实际路径调整
|
||||||
const { proxy } = getCurrentInstance()
|
const {proxy} = getCurrentInstance()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const baseFormData = ref({})
|
const baseFormData = ref({})
|
||||||
const paymentValue = ref(0)
|
const paymentValue = ref(0)
|
||||||
@ -65,15 +65,15 @@ const companyValue = ref(0)
|
|||||||
|
|
||||||
// 筛选选项
|
// 筛选选项
|
||||||
const paymentOptions = ref([
|
const paymentOptions = ref([
|
||||||
{ value: 0, text: "全部支付方式" },
|
{value: 0, text: "全部支付方式"},
|
||||||
{ value: 1, text: "账期支付" },
|
{value: 1, text: "账期支付"},
|
||||||
{ value: 2, text: "预付款" }
|
{value: 2, text: "预付款"}
|
||||||
])
|
])
|
||||||
|
|
||||||
const companyOptions = ref([
|
const companyOptions = ref([
|
||||||
{ value: 0, text: "全部生产单位" },
|
{value: 0, text: "全部生产单位"},
|
||||||
{ value: 1, text: "浙江大冢制药有限公司" },
|
{value: 1, text: "浙江大冢制药有限公司"},
|
||||||
{ value: 2, text: "广东大冢制药有限公司" }
|
{value: 2, text: "广东大冢制药有限公司"}
|
||||||
])
|
])
|
||||||
|
|
||||||
// 合同数据
|
// 合同数据
|
||||||
@ -81,106 +81,106 @@ const contracts = ref([])
|
|||||||
|
|
||||||
// 过滤后的合同数据
|
// 过滤后的合同数据
|
||||||
const filteredContracts = computed(() => {
|
const filteredContracts = computed(() => {
|
||||||
let result = contracts.value
|
let result = contracts.value
|
||||||
|
|
||||||
// 根据生产单位筛选
|
// 根据生产单位筛选
|
||||||
if (companyValue.value === 1) {
|
if (companyValue.value === 1) {
|
||||||
result = result.filter(contract => contract.companyName.includes('浙江'))
|
result = result.filter(contract => contract.companyName.includes('浙江'))
|
||||||
} else if (companyValue.value === 2) {
|
} else if (companyValue.value === 2) {
|
||||||
result = result.filter(contract => contract.companyName.includes('广东'))
|
result = result.filter(contract => contract.companyName.includes('广东'))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 可以根据支付方式添加更多筛选逻辑
|
// 可以根据支付方式添加更多筛选逻辑
|
||||||
|
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
contracts.value = contractData.rows
|
contracts.value = contractData.rows
|
||||||
})
|
})
|
||||||
|
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
function formatDate(dateString) {
|
function formatDate(dateString) {
|
||||||
if (!dateString) return '未知日期'
|
if (!dateString) return '未知日期'
|
||||||
return dateString.split(' ')[0]
|
return dateString.split(' ')[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 筛选合同
|
// 筛选合同
|
||||||
function filterContracts(e) {
|
function filterContracts(e) {
|
||||||
console.log("筛选条件变化:", e)
|
console.log("筛选条件变化:", e)
|
||||||
// 计算属性会自动更新,无需额外操作
|
// 计算属性会自动更新,无需额外操作
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转到详情页
|
// 跳转到详情页
|
||||||
function gotoDetail(contract) {
|
function gotoDetail(contract) {
|
||||||
console.log("查看合同详情:", contract)
|
console.log("查看合同详情:", contract)
|
||||||
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
|
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
|
||||||
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
|
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
|
||||||
proxy.$tab.navigateTo('/pages/work/FinancialApproval/OrderDetail')
|
proxy.$tab.navigateTo('/pages/work/FinancialApproval/OrderDetail')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example {
|
.example {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-section .uni-section-header) {
|
:deep(.uni-section .uni-section-header) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-card) {
|
:deep(.uni-card) {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 10px 0 !important;
|
margin: 10px 0 !important;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-card__content) {
|
:deep(.uni-card__content) {
|
||||||
padding: 12px !important;
|
padding: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-uni-row {
|
.demo-uni-row {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-uni-col {
|
.demo-uni-col {
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
|
|
||||||
&.dark {
|
&.dark {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.light {
|
&.light {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-even {
|
.card-even {
|
||||||
border-left: 4px solid #2979ff;
|
border-left: 4px solid #2979ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-odd {
|
.card-odd {
|
||||||
border-left: 4px solid #19be6b;
|
border-left: 4px solid #19be6b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-data {
|
.no-data {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px 0;
|
padding: 40px 0;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -1,78 +1,78 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="example">
|
<view class="example">
|
||||||
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
|
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
|
||||||
|
|
||||||
<uni-forms-item label="生产单位">
|
<uni-forms-item label="生产单位">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="companyValue"
|
v-model="companyValue"
|
||||||
:localdata="companyOptions"
|
:localdata="companyOptions"
|
||||||
@change="filterContracts"
|
@change="filterContracts"
|
||||||
></uni-data-select>
|
></uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="仓库">
|
<uni-forms-item label="仓库">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="paymentValue"
|
v-model="paymentValue"
|
||||||
:localdata="warehouseList"
|
:localdata="warehouseList"
|
||||||
@change="filterContracts"
|
@change="filterContracts"
|
||||||
></uni-data-select>
|
></uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="大区">
|
<uni-forms-item label="大区">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="paymentValue"
|
v-model="paymentValue"
|
||||||
:localdata="areaList"
|
:localdata="areaList"
|
||||||
@change="filterContracts"
|
@change="filterContracts"
|
||||||
></uni-data-select>
|
></uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="filteredContracts.length === 0" class="no-data">
|
<view v-if="filteredContracts.length === 0" class="no-data">
|
||||||
<text>暂无匹配的合同数据</text>
|
<text>暂无匹配的合同数据</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<uni-card
|
<uni-card
|
||||||
v-for="(contract, index) in filteredContracts"
|
v-for="(contract, index) in filteredContracts"
|
||||||
:key="contract.saleid"
|
:key="contract.saleid"
|
||||||
:title="contract.usernames"
|
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||||
@click="gotoDetail(contract)"
|
:title="contract.usernames"
|
||||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
@click="gotoDetail(contract)"
|
||||||
>
|
>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>
|
<view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>
|
<view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>
|
<view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>
|
<view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>
|
<view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col light">区域: {{ contract.areaName }}</view>
|
<view class="demo-uni-col light">区域: {{ contract.areaName }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import { ref, reactive, onMounted, computed,getCurrentInstance } from "vue"
|
import {computed, getCurrentInstance, onMounted, ref} from "vue"
|
||||||
import { contractData } from "./data.js" // 根据实际路径调整
|
import {contractData} from "./data.js" // 根据实际路径调整
|
||||||
const { proxy } = getCurrentInstance()
|
const {proxy} = getCurrentInstance()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const baseFormData = ref({})
|
const baseFormData = ref({})
|
||||||
const paymentValue = ref(0)
|
const paymentValue = ref(0)
|
||||||
@ -80,20 +80,20 @@ const companyValue = ref(0)
|
|||||||
|
|
||||||
// 筛选选项
|
// 筛选选项
|
||||||
const warehouseList = ref([
|
const warehouseList = ref([
|
||||||
{ value: 0, text: "广东直发" },
|
{value: 0, text: "广东直发"},
|
||||||
{ value: 1, text: "四川直发" },
|
{value: 1, text: "四川直发"},
|
||||||
{ value: 2, text: "浙江直发" }
|
{value: 2, text: "浙江直发"}
|
||||||
])
|
])
|
||||||
const areaList = ref([
|
const areaList = ref([
|
||||||
{ value: 0, text: "南区" },
|
{value: 0, text: "南区"},
|
||||||
{ value: 1, text: "北区" },
|
{value: 1, text: "北区"},
|
||||||
{ value: 2, text: "东区" },
|
{value: 2, text: "东区"},
|
||||||
{ value: 3, text: "西区" }
|
{value: 3, text: "西区"}
|
||||||
])
|
])
|
||||||
const companyOptions = ref([
|
const companyOptions = ref([
|
||||||
{ value: 0, text: "全部生产单位" },
|
{value: 0, text: "全部生产单位"},
|
||||||
{ value: 1, text: "浙江大冢制药有限公司" },
|
{value: 1, text: "浙江大冢制药有限公司"},
|
||||||
{ value: 2, text: "广东大冢制药有限公司" }
|
{value: 2, text: "广东大冢制药有限公司"}
|
||||||
])
|
])
|
||||||
|
|
||||||
// 合同数据
|
// 合同数据
|
||||||
@ -101,106 +101,106 @@ const contracts = ref([])
|
|||||||
|
|
||||||
// 过滤后的合同数据
|
// 过滤后的合同数据
|
||||||
const filteredContracts = computed(() => {
|
const filteredContracts = computed(() => {
|
||||||
let result = contracts.value
|
let result = contracts.value
|
||||||
|
|
||||||
// 根据生产单位筛选
|
// 根据生产单位筛选
|
||||||
if (companyValue.value === 1) {
|
if (companyValue.value === 1) {
|
||||||
result = result.filter(contract => contract.companyName.includes('浙江'))
|
result = result.filter(contract => contract.companyName.includes('浙江'))
|
||||||
} else if (companyValue.value === 2) {
|
} else if (companyValue.value === 2) {
|
||||||
result = result.filter(contract => contract.companyName.includes('广东'))
|
result = result.filter(contract => contract.companyName.includes('广东'))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 可以根据支付方式添加更多筛选逻辑
|
// 可以根据支付方式添加更多筛选逻辑
|
||||||
|
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
contracts.value = contractData.rows
|
contracts.value = contractData.rows
|
||||||
})
|
})
|
||||||
|
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
function formatDate(dateString) {
|
function formatDate(dateString) {
|
||||||
if (!dateString) return '未知日期'
|
if (!dateString) return '未知日期'
|
||||||
return dateString.split(' ')[0]
|
return dateString.split(' ')[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 筛选合同
|
// 筛选合同
|
||||||
function filterContracts(e) {
|
function filterContracts(e) {
|
||||||
console.log("筛选条件变化:", e)
|
console.log("筛选条件变化:", e)
|
||||||
// 计算属性会自动更新,无需额外操作
|
// 计算属性会自动更新,无需额外操作
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转到详情页
|
// 跳转到详情页
|
||||||
function gotoDetail(contract) {
|
function gotoDetail(contract) {
|
||||||
console.log("查看合同详情:", contract)
|
console.log("查看合同详情:", contract)
|
||||||
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
|
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
|
||||||
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
|
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
|
||||||
proxy.$tab.navigateTo('/pages/work/OrderApproval/OrderDetail')
|
proxy.$tab.navigateTo('/pages/work/OrderApproval/OrderDetail')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example {
|
.example {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-section .uni-section-header) {
|
:deep(.uni-section .uni-section-header) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-card) {
|
:deep(.uni-card) {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 10px 0 !important;
|
margin: 10px 0 !important;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-card__content) {
|
:deep(.uni-card__content) {
|
||||||
padding: 12px !important;
|
padding: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-uni-row {
|
.demo-uni-row {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-uni-col {
|
.demo-uni-col {
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
|
|
||||||
&.dark {
|
&.dark {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.light {
|
&.light {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-even {
|
.card-even {
|
||||||
border-left: 4px solid #2979ff;
|
border-left: 4px solid #2979ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-odd {
|
.card-odd {
|
||||||
border-left: 4px solid #19be6b;
|
border-left: 4px solid #19be6b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-data {
|
.no-data {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px 0;
|
padding: 40px 0;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -1,113 +1,109 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="example">
|
<view class="example">
|
||||||
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
|
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="20vw">
|
||||||
|
|
||||||
<uni-forms-item label="生产单位">
|
<uni-forms-item label="生产单位">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="queryParams.CompanyId"
|
v-model="queryParams.CompanyId"
|
||||||
:localdata="companyOptions"
|
:clear="true"
|
||||||
text-field="deptName"
|
:localdata="companyOptions"
|
||||||
value-field="deptId"
|
text-field="deptName"
|
||||||
@change="getTableData"
|
value-field="deptId"
|
||||||
:clear="true"
|
@change="getTableData"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="状态">
|
<uni-forms-item label="状态">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="queryParams.state"
|
v-model="queryParams.state"
|
||||||
:localdata="stateList"
|
:clear="true"
|
||||||
@change="getTableData"
|
:localdata="stateList"
|
||||||
:clear="true"
|
@change="getTableData"
|
||||||
></uni-data-select>
|
></uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="合同编号" >
|
<uni-forms-item label="合同编号">
|
||||||
<input
|
<input
|
||||||
class="uni-input custom-input"
|
v-model="queryParams.contractcode"
|
||||||
v-model="queryParams.contractcode"
|
class="uni-input custom-input"
|
||||||
placeholder="请输入合同编号"
|
placeholder="请输入合同编号"
|
||||||
@confirm="getTableData"/>
|
@confirm="getTableData"/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<!-- <uni-forms-item label="合同编号" >
|
<!-- <uni-forms-item label="合同编号" >
|
||||||
<view class="uni-form-item uni-column">
|
<view class="uni-form-item uni-column">
|
||||||
<input class="uni-input" focus placeholder="自动获得焦点" />
|
<input class="uni-input" focus placeholder="自动获得焦点" />
|
||||||
</view>
|
</view>
|
||||||
</uni-forms-item> -->
|
</uni-forms-item> -->
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
<button type="primary" @click="gotoNewAdd">新增</button>
|
<button type="primary" @click="gotoNewAdd">新增</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="filteredContracts.length === 0" class="no-data">
|
<view v-if="filteredContracts.length === 0" class="no-data">
|
||||||
<text>暂无匹配的合同数据</text>
|
<text>暂无匹配的合同数据</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<uni-card
|
<uni-card
|
||||||
v-for="(contract, index) in filteredContracts"
|
v-for="(contract, index) in filteredContracts"
|
||||||
:key="contract.saleid"
|
:key="contract.saleid"
|
||||||
:title="contract.usernames"
|
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||||
@click="gotoDetail(contract)"
|
:title="contract.usernames"
|
||||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
@click="gotoDetail(contract)"
|
||||||
>
|
>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>
|
<view class="demo-uni-col dark">生产单位: {{ contract.companyName }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>
|
<view class="demo-uni-col light">合同编号: {{ contract.contractcode }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>
|
<view class="demo-uni-col dark">制单日期: {{ formatDate(contract.adddate) }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>
|
<view class="demo-uni-col light">订单金额: {{ contract.contractmoney.toFixed(2) }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
<view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>
|
<view class="demo-uni-col dark">状态: {{ contract.stateText }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="12" style="display: flex;">
|
<uni-col :span="12" style="display: flex;">
|
||||||
<view class="demo-uni-col light">订单类型: </view>
|
<view class="demo-uni-col light">订单类型:</view>
|
||||||
<dict-tag :options="orderTypeList" :value="contract.type" style="color: red;"/>
|
<dict-tag :options="orderTypeList" :value="contract.type" style="color: red;"/>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { listsalemain } from "../../../api/orderManager/index.js"
|
import {listproductList, listsalemain} from "../../../api/orderManager/index.js"
|
||||||
import { listproductList } from "../../../api/orderManager/index.js"
|
import {computed, getCurrentInstance, onMounted, ref} from "vue"
|
||||||
import { ref, reactive, onMounted, computed,getCurrentInstance } from "vue"
|
import {getDicts} from "../../../api/system/dict/data.js"
|
||||||
import { contractData } from "../OrderManager/data.js" // 根据实际路径调整
|
|
||||||
import { getDicts } from "../../../api/system/dict/data.js"
|
|
||||||
// import DictTag from '@/components/dict-tag/dict-tag.vue';
|
// import DictTag from '@/components/dict-tag/dict-tag.vue';
|
||||||
import { useOrderManagerStore } from "../../../store/modules/orderManager.js"
|
import {useOrderManagerStore} from "../../../store/modules/orderManager.js"
|
||||||
// import { log } from "console"
|
// import { log } from "console"
|
||||||
const { proxy } = getCurrentInstance()
|
const {proxy} = getCurrentInstance()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const baseFormData = ref({
|
const baseFormData = ref({})
|
||||||
|
|
||||||
})
|
|
||||||
//订单类型
|
//订单类型
|
||||||
const orderTypeList =ref([])
|
const orderTypeList = ref([])
|
||||||
const paymentValue = ref(0)
|
const paymentValue = ref(0)
|
||||||
const companyValue = ref(0)
|
const companyValue = ref(0)
|
||||||
const paging = ref({
|
const paging = ref({
|
||||||
// 页码
|
// 页码
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
// 分页数量
|
// 分页数量
|
||||||
pageSize:999,
|
pageSize: 999,
|
||||||
isAsc: 'descending',
|
isAsc: 'descending',
|
||||||
orderByColumn: 'adddate'
|
orderByColumn: 'adddate'
|
||||||
})
|
})
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
params:{
|
params: {
|
||||||
state: "0,1,-1,2,-2,3,-3,9,10,11,12,-12,13,-13,14,15,16",
|
state: "0,1,-1,2,-2,3,-3,9,10,11,12,-12,13,-13,14,15,16",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -132,175 +128,181 @@ const contracts = ref([])
|
|||||||
|
|
||||||
// 过滤后的合同数据
|
// 过滤后的合同数据
|
||||||
const filteredContracts = computed(() => {
|
const filteredContracts = computed(() => {
|
||||||
let result = contracts.value
|
let result = contracts.value
|
||||||
|
|
||||||
// 根据生产单位筛选
|
// 根据生产单位筛选
|
||||||
if (companyValue.value === 1) {
|
if (companyValue.value === 1) {
|
||||||
result = result.filter(contract => contract.companyName.includes('浙江'))
|
result = result.filter(contract => contract.companyName.includes('浙江'))
|
||||||
} else if (companyValue.value === 2) {
|
} else if (companyValue.value === 2) {
|
||||||
result = result.filter(contract => contract.companyName.includes('广东'))
|
result = result.filter(contract => contract.companyName.includes('广东'))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 可以根据支付方式添加更多筛选逻辑
|
// 可以根据支付方式添加更多筛选逻辑
|
||||||
|
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDictData()
|
getDictData()
|
||||||
getTableData()
|
getTableData()
|
||||||
getDeptLists()
|
getDeptLists()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
function formatDate(dateString) {
|
function formatDate(dateString) {
|
||||||
if (!dateString) return '未知日期'
|
if (!dateString) return '未知日期'
|
||||||
return dateString.split(' ')[0]
|
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,
|
const getDictData = () => {
|
||||||
text:item.dictLabel
|
getDicts("order_state").then(res => {
|
||||||
}
|
console.log('order_state', res.data)
|
||||||
})
|
stateList.value = res.data.map(item => {
|
||||||
})
|
|
||||||
getDicts("dazhong_dingdan_type").then(res =>{
|
return {
|
||||||
console.log('dazhong_dingdan_type',res.data)
|
value: item.dictValue,
|
||||||
orderTypeList.value = res.data
|
text: item.dictLabel
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
getDicts("dazhong_dingdan_type").then(res => {
|
||||||
|
console.log('dazhong_dingdan_type', res.data)
|
||||||
|
orderTypeList.value = res.data
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
//获取列表数据
|
//获取列表数据
|
||||||
const getTableData = () =>{
|
const getTableData = () => {
|
||||||
|
|
||||||
console.log(queryParams.value)
|
console.log(queryParams.value)
|
||||||
listsalemain(queryParams.value,paging.value).then(res => {
|
listsalemain(queryParams.value, paging.value).then(res => {
|
||||||
|
|
||||||
contracts.value = res.rows
|
contracts.value = res.rows
|
||||||
// total.value = res.total;
|
// total.value = res.total;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
const getDeptLists = () =>{
|
const getDeptLists = () => {
|
||||||
listproductList().then(res => {
|
listproductList().then(res => {
|
||||||
companyOptions.value = res.data.map(item => {
|
companyOptions.value = res.data.map(item => {
|
||||||
return {
|
return {
|
||||||
value:item.deptId,
|
value: item.deptId,
|
||||||
text:item.deptName
|
text: item.deptName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('companyOptions.value', companyOptions.value)
|
console.log('companyOptions.value', companyOptions.value)
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 筛选合同
|
// 筛选合同
|
||||||
function filterContracts(e) {
|
function filterContracts(e) {
|
||||||
console.log("筛选条件变化:",e)
|
console.log("筛选条件变化:", e)
|
||||||
// 计算属性会自动更新,无需额外操作
|
// 计算属性会自动更新,无需额外操作
|
||||||
}
|
}
|
||||||
|
|
||||||
//编号输入框事件
|
//编号输入框事件
|
||||||
const handleInput = (e) =>{
|
const handleInput = (e) => {
|
||||||
console.log('handleInput',e.detail.value)
|
console.log('handleInput', e.detail.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转到详情页
|
// 跳转到详情页
|
||||||
function gotoDetail(contract) {
|
function gotoDetail(contract) {
|
||||||
console.log("查看合同详情:", contract)
|
console.log("查看合同详情:", contract)
|
||||||
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
|
// proxy.$tab.navigateTo('/pages/work/yonghu/detail')
|
||||||
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
|
// proxy.$tab.navigateTo(`/pages/work/yonghu/detail?saleid=${contract.saleid}`)
|
||||||
// proxy.$tab.navigateTo('pages/work/OrderManager/OrderDetail')
|
// proxy.$tab.navigateTo('pages/work/OrderManager/OrderDetail')
|
||||||
//存储要传的值到pinia
|
//存储要传的值到pinia
|
||||||
useOrderManagerStore().addOrder(contract)
|
useOrderManagerStore().addOrder(contract)
|
||||||
console.log('数据',useOrderManagerStore().orders)
|
console.log('数据', useOrderManagerStore().orders)
|
||||||
if(contract.state == '0'){
|
if (contract.state == '0') {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/work/OrderManager/components/EditData?"
|
url: "/pages/work/OrderManager/components/EditData?"
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/work/OrderManager/components/LookData"
|
url: "/pages/work/OrderManager/components/LookData"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
const gotoNewAdd = () =>{
|
|
||||||
uni.navigateTo({
|
const gotoNewAdd = () => {
|
||||||
url: "/pages/work/OrderManager/components/NewAdd"
|
uni.navigateTo({
|
||||||
});
|
url: "/pages/work/OrderManager/components/NewAdd"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.custom-input {
|
.custom-input {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example {
|
.example {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-section .uni-section-header) {
|
:deep(.uni-section .uni-section-header) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-card) {
|
:deep(.uni-card) {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 10px 0 !important;
|
margin: 10px 0 !important;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-card__content) {
|
:deep(.uni-card__content) {
|
||||||
padding: 12px !important;
|
padding: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-uni-row {
|
.demo-uni-row {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.demo-uni-col {
|
.demo-uni-col {
|
||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
|
|
||||||
&.dark {
|
&.dark {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.light {
|
&.light {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-even {
|
.card-even {
|
||||||
border-left: 4px solid #2979ff;
|
border-left: 4px solid #2979ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-odd {
|
.card-odd {
|
||||||
border-left: 4px solid #19be6b;
|
border-left: 4px solid #19be6b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-data {
|
.no-data {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px 0;
|
padding: 40px 0;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -5140,3 +5140,12 @@ scroll-view.cu-steps .cu-item {
|
|||||||
.cuIcon-btn:before {
|
.cuIcon-btn:before {
|
||||||
content: "\e601";
|
content: "\e601";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.card-even {
|
||||||
|
border-left: 4px solid #2979ff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-odd {
|
||||||
|
border-left: 4px solid #19be6b !important;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user