--增加判断对象为空方法
--增加表单检索方法 --增加公司资料编辑页面 --增加码单管理页面 --增加码单添加页面 --编辑个人资料、地址管理、码单管理引入图标
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
export default {
|
||||
navigationBarTitleText: '公司资料'
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
.company{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.save-button{
|
||||
width: 668px;
|
||||
height: 82px;
|
||||
background: #007aff;
|
||||
border-radius: 40px;
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
display: flex;align-items: center;justify-content: center;
|
||||
margin: 320px auto 0;
|
||||
}
|
||||
|
||||
.form-radio{
|
||||
display: flex;
|
||||
flex-wrap: wrap;align-items: center;
|
||||
}
|
||||
.form-radio view{
|
||||
height: 54px;
|
||||
background: #f0f0f0;
|
||||
border-radius: 28px;
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #707070;
|
||||
padding: 10px 28px;
|
||||
box-sizing: border-box;
|
||||
display: flex;align-items: center;justify-content: center;
|
||||
margin: 10px;
|
||||
border: 2px solid #f0f0f0;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.form-radio .form-radio-active{
|
||||
background: #ecf5ff;
|
||||
border: 2px solid #cde5ff;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
|
||||
import Address from "@/components/address"
|
||||
import FromList from "@/components/FromList"
|
||||
import { Button, Input, Text, Textarea, View } from "@tarojs/components"
|
||||
import Taro, { getCurrentPages, useRouter } from "@tarojs/taro"
|
||||
import { useEffect, useState } from "react"
|
||||
import "./index.scss"
|
||||
|
||||
export default ()=>{
|
||||
const [showSiteModal, setShowSiteModal] = useState(false);
|
||||
|
||||
const handleSelectSite = ()=>{
|
||||
setShowSiteModal(true);
|
||||
}
|
||||
|
||||
|
||||
// 保存
|
||||
const [formData, setFormData] = useState({
|
||||
aa: "",
|
||||
bb:"",
|
||||
cc:"",
|
||||
dd:""
|
||||
})
|
||||
const handleSave = ()=>{
|
||||
const pages = getCurrentPages();
|
||||
const prevPage = pages[pages.length-2];
|
||||
Taro.eventCenter.trigger('message:detail', { text: 'test' })
|
||||
|
||||
Taro.navigateBack();
|
||||
}
|
||||
// 单选
|
||||
const radioData = ['布行','二批','制衣厂'];
|
||||
const [radioActive, setRadioActive] = useState(0);
|
||||
const handleActiveRadio = (index:number)=>{
|
||||
setRadioActive(index);
|
||||
}
|
||||
|
||||
return (
|
||||
<View className="company">
|
||||
<FromList value={formData["aa"]} label="公司名称" placeholder="请输入收货人姓名"/>
|
||||
<FromList value={formData["bb"]} label="公司全称" placeholder="请输入收货人姓名"/>
|
||||
<FromList value={formData["bb"]} label="公司类型" placeholder="请输入收货人姓名">
|
||||
<View className="form-radio">
|
||||
{
|
||||
radioData.map((item,index)=>{
|
||||
return <View onClick={()=>handleActiveRadio(index)} className={radioActive==index?'form-radio-active':''} key={index}>{item}</View>
|
||||
})
|
||||
}
|
||||
</View>
|
||||
</FromList>
|
||||
<FromList value={formData["bb"]} label="联系人" placeholder="请输入收货人姓名"/>
|
||||
<FromList value={formData["bb"]} label="联系方式" placeholder="请输入收货人姓名"/>
|
||||
<FromList value={formData["cc"]} onClick={handleSelectSite} label="收地址" type="select" placeholder="请选择/省/市/区"/>
|
||||
<FromList value={formData["dd"]} label="详细地址" type="textarea" placeholder="请输入详细地址(街道、门牌号等)"/>
|
||||
|
||||
|
||||
<Button hoverClass="none" className="save-button" onClick={handleSave}>保存</Button>
|
||||
<Address addressOnClose={()=>setShowSiteModal(false)} show={showSiteModal}/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user