<template>
	<view class="content">
		<view class="container">
			<headers :titles="titles"><uni-icons type="arrow-left" color="#fff" size="22px"></uni-icons></headers>
			<view class="input-box">
				<view class="">姓名</view>
				<view style="text-align: right;">
					<input type="text" v-model="formData.staffName" placeholder="请输入员工姓名" />
				</view>
			</view>
			<view class="input-box">
				<view class="">电话</view>
				<view style="text-align: right;">
					<input type="number" v-model="formData.staffPhone" placeholder="请输入员工电话" />
				</view>

			</view>
			<view class="anniu" @click="submit()">
				确定
			</view>
		</view>

	</view>
</template>

<script>
	import headers from '../../components/header/headers.vue'
	import request from '../../utils/request.js'
	export default {
		data() {
			return {
				titles: "添加员工",
				msg: "1",
				dataList: [],
				show: false,
				status: 'loading',
				formData: {
					staffName: "",
					staffPhone: ""
				}
			}
		},
		components: {
			headers
		},
		methods: {
			submit() {
				request({
					url: 'app/uaMer/addStaff',
					method: 'post',
					data: this.formData

				}).then(res => {
					uni.navigateBack()
				})
			},
			goback() {
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
	.content {
		background: #f4f5f6;
		height: 100vh;
	}

	.container {
		width: 100%;
		background: #f4f5f6;
		box-sizing: border-box;
		padding-top: 88px;
	}

	.input-box {
		width: 100%;
		box-sizing: border-box;
		padding: 15px;
		border-bottom: 1px solid #ededee;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.anniu {
		width: 150px;
		height: 40px;
		background: #E4612E;
		border-radius: 50px;
		margin: 40px auto;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
	}
</style>
