You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
4.1 KiB

3 years ago
<template>
<view class="container">
<uni-section title="基本信息" type="line">
<view class="form">
<uni-forms ref="baseForm" :modelValue="form" label-width="100">
<uni-forms-item label="商务经理">
<uni-easyinput v-model="form.provience" disabled />
</uni-forms-item>
<uni-forms-item label="客户名称" name="contact" required>
<uni-easyinput v-model="form.contact" placeholder="请选择" />
</uni-forms-item>
<uni-forms-item label="省份">
<uni-easyinput v-model="form.provience" disabled />
</uni-forms-item>
<uni-forms-item label="城市">
<uni-easyinput v-model="form.city" disabled />
</uni-forms-item>
<uni-forms-item label="联系人">
<uni-easyinput v-model="form.provience" disabled />
</uni-forms-item>
<uni-forms-item label="电话">
<uni-easyinput v-model="form.city" disabled />
</uni-forms-item>
<uni-forms-item label="邮箱">
<uni-easyinput v-model="form.provience" disabled />
</uni-forms-item>
<uni-forms-item label="订单类型">
<uni-data-checkbox v-model="form.orderType" :localdata="orderTypes"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="订单编号">
<uni-easyinput v-model="form.provience" disabled />
</uni-forms-item>
<uni-forms-item label="订单时间">
<uni-easyinput v-model="form.city" disabled />
</uni-forms-item>
<uni-forms-item label="订单金额(元)">
<uni-easyinput v-model="form.provience" disabled />
</uni-forms-item>
</uni-forms>
</view>
</uni-section>
<uni-section title="订单产品" type="line">
<view class="card">
<button type="primary">添加产品</button>
</view>
</uni-section>
<view class="product">
<view class="total">
<text>已选个产品</text>
<text>总成交价合计20000</text>
</view>
<view class="list">
<view class="line">总采购成本</view>
<view class="line">总产品利润</view>
</view>
</view>
<uni-card :is-shadow="false" :border="false" is-full>
<button type="primary" @click="submit('valiForm')">提交</button>
</uni-card>
</view>
</template>
<script>
export default {
data() {
return {
orderTypes: [{
text: '正式',
value: 0
}, {
text: '试用',
value: 1
}],
candidates: ['北京', '南京', '东京', '武汉', '天津', '上海', '海口'],
dataTree: [{
text: "一年级",
value: "1-0",
children: [{
text: "1.1班",
value: "1-1"
},
{
text: "1.2班",
value: "1-2"
}
]
},
{
text: "二年级",
value: "2-0",
children: [{
text: "2.1班",
value: "2-1"
},
{
text: "2.2班",
value: "2-2"
}
]
},
{
text: "三年级",
value: "3-0",
disable: true
}
],
form: {
orderType: 0,
provience: '',
city: '',
industryId: '',
age: '',
introduction: '',
sex: 2,
hobby: [5],
datetimesingle: 1627529992399
},
sexs: [{
text: '男',
value: 0
}, {
text: '女',
value: 1
}, {
text: '保密',
value: 2
}],
}
},
onLoad() {
console.log(getApp())
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.index = e.detail.value
},
onchange(e) {
console.log('---------onchange:', e);
},
submit(ref) {
this.$refs[ref].validate().then(res => {
console.log('success', res);
uni.showToast({
title: `校验通过`
})
}).catch(err => {
console.log('err', err);
})
},
}
}
</script>
<style scoped lang="scss">
.form {
padding: 15px;
background-color: #fff;
}
.card {
padding: 15px;
}
.product {
margin: 10px 0;
background-color: #fff;
.total {
display: flex;
justify-content: space-between;
padding: 10px 15px;
font-size: 13px;
border-bottom: 1px solid #ddd;
}
.list {
padding: 10px 15px;
.line {
line-height: 30px;
font-size: 12px;
}
}
}
</style>