refactor(work): 移除业务审批页面多余代码并优化列表项样式

This commit is contained in:
lonewolfyx 2026-02-07 15:12:39 +08:00
parent 0de6841538
commit 9cb7af2141
3 changed files with 3082 additions and 3202 deletions

View File

@ -5,6 +5,7 @@
:class="index % 2 === 0 ? 'card-even' : 'card-odd'" :class="index % 2 === 0 ? 'card-even' : 'card-odd'"
:extra="item.contractcode" :extra="item.contractcode"
:title="item.usernames" :title="item.usernames"
style="margin: 0;margin-bottom: 20px"
@click="handleDetail(item)" @click="handleDetail(item)"
> >
<view class="context"> <view class="context">

View File

@ -27,8 +27,7 @@
<script setup> <script setup>
import {computed, getCurrentInstance, onMounted, ref} from "vue" import {getCurrentInstance, onMounted, ref} from "vue"
import {contractData} from "./data.js"
import UniForms from "../../../uni_modules/uni-forms/components/uni-forms/uni-forms.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 UniFormsItem from "../../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue";
import DictSelect from "../../../components/DictSelect/DictSelect.vue"; import DictSelect from "../../../components/DictSelect/DictSelect.vue";
@ -69,132 +68,5 @@ onMounted(async () => {
await handleQuery() await handleQuery()
}) })
// ===========================================================================================
//
const baseFormData = ref({})
const paymentValue = ref('')
const companyValue = ref(0)
//
const paymentOptions = ref([
{value: 0, text: "全部支付方式"},
{value: 1, text: "账期支付"},
{value: 2, text: "预付款"}
])
const companyOptions = ref([
{value: 0, text: "全部生产单位"},
{value: 1, text: "浙江大冢制药有限公司"},
{value: 2, text: "广东大冢制药有限公司"}
])
//
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(() => {
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/BusinessApproval/OrderDetail')
}
</script> </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>

File diff suppressed because one or more lines are too long