style(work): 格式化代码样式
This commit is contained in:
parent
9b05c19b76
commit
9719cdf579
@ -27,9 +27,9 @@
|
|||||||
<uni-card
|
<uni-card
|
||||||
v-for="(contract, index) in filteredContracts"
|
v-for="(contract, index) in filteredContracts"
|
||||||
:key="contract.saleid"
|
:key="contract.saleid"
|
||||||
|
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||||
:title="contract.usernames"
|
:title="contract.usernames"
|
||||||
@click="gotoDetail(contract)"
|
@click="gotoDetail(contract)"
|
||||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
|
||||||
>
|
>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
@ -62,9 +62,9 @@
|
|||||||
|
|
||||||
<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)
|
||||||
@ -72,15 +72,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: "广东大冢制药有限公司"}
|
||||||
])
|
])
|
||||||
|
|
||||||
// 合同数据
|
// 合同数据
|
||||||
|
|||||||
@ -20,9 +20,9 @@
|
|||||||
<uni-card
|
<uni-card
|
||||||
v-for="(contract, index) in filteredContracts"
|
v-for="(contract, index) in filteredContracts"
|
||||||
:key="contract.saleid"
|
:key="contract.saleid"
|
||||||
|
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||||
:title="contract.usernames"
|
:title="contract.usernames"
|
||||||
@click="gotoDetail(contract)"
|
@click="gotoDetail(contract)"
|
||||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
|
||||||
>
|
>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
@ -55,9 +55,9 @@
|
|||||||
|
|
||||||
<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: "广东大冢制药有限公司"}
|
||||||
])
|
])
|
||||||
|
|
||||||
// 合同数据
|
// 合同数据
|
||||||
|
|||||||
@ -35,9 +35,9 @@
|
|||||||
<uni-card
|
<uni-card
|
||||||
v-for="(contract, index) in filteredContracts"
|
v-for="(contract, index) in filteredContracts"
|
||||||
:key="contract.saleid"
|
:key="contract.saleid"
|
||||||
|
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||||
:title="contract.usernames"
|
:title="contract.usernames"
|
||||||
@click="gotoDetail(contract)"
|
@click="gotoDetail(contract)"
|
||||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
|
||||||
>
|
>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
@ -70,9 +70,9 @@
|
|||||||
|
|
||||||
<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: "广东大冢制药有限公司"}
|
||||||
])
|
])
|
||||||
|
|
||||||
// 合同数据
|
// 合同数据
|
||||||
|
|||||||
@ -6,26 +6,26 @@
|
|||||||
<uni-forms-item label="生产单位">
|
<uni-forms-item label="生产单位">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="queryParams.CompanyId"
|
v-model="queryParams.CompanyId"
|
||||||
|
:clear="true"
|
||||||
:localdata="companyOptions"
|
:localdata="companyOptions"
|
||||||
text-field="deptName"
|
text-field="deptName"
|
||||||
value-field="deptId"
|
value-field="deptId"
|
||||||
@change="getTableData"
|
@change="getTableData"
|
||||||
:clear="true"
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</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"
|
||||||
|
:clear="true"
|
||||||
:localdata="stateList"
|
:localdata="stateList"
|
||||||
@change="getTableData"
|
@change="getTableData"
|
||||||
:clear="true"
|
|
||||||
></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>
|
||||||
@ -46,9 +46,9 @@
|
|||||||
<uni-card
|
<uni-card
|
||||||
v-for="(contract, index) in filteredContracts"
|
v-for="(contract, index) in filteredContracts"
|
||||||
:key="contract.saleid"
|
:key="contract.saleid"
|
||||||
|
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
||||||
:title="contract.usernames"
|
:title="contract.usernames"
|
||||||
@click="gotoDetail(contract)"
|
@click="gotoDetail(contract)"
|
||||||
:class="index % 2 === 0 ? 'card-even' : 'card-odd'"
|
|
||||||
>
|
>
|
||||||
<uni-row class="demo-uni-row">
|
<uni-row class="demo-uni-row">
|
||||||
<uni-col :span="12">
|
<uni-col :span="12">
|
||||||
@ -71,7 +71,7 @@
|
|||||||
<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>
|
||||||
@ -81,33 +81,29 @@
|
|||||||
</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",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -158,56 +154,60 @@ 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 => {
|
||||||
|
|
||||||
|
return {
|
||||||
|
value: item.dictValue,
|
||||||
|
text: item.dictLabel
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
getDicts("dazhong_dingdan_type").then(res =>{
|
getDicts("dazhong_dingdan_type").then(res => {
|
||||||
console.log('dazhong_dingdan_type',res.data)
|
console.log('dazhong_dingdan_type', res.data)
|
||||||
orderTypeList.value = 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)
|
||||||
@ -216,19 +216,20 @@ function gotoDetail(contract) {
|
|||||||
// 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 = () =>{
|
|
||||||
|
const gotoNewAdd = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/work/OrderManager/components/NewAdd"
|
url: "/pages/work/OrderManager/components/NewAdd"
|
||||||
});
|
});
|
||||||
@ -236,12 +237,13 @@ const gotoNewAdd = () =>{
|
|||||||
</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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user