<template>
	<view class="warehouseEntry">
		<view>
			<view>
				<view>
					供应商
				</view>
				<view>
					<input type="text" placeholder="请输入供应商名称" v-model="datas.form.name" name="" id="">
				</view>
			</view>
			<view>
				<view>
					联系电话
				</view>
				<view>
					<input type="text" placeholder="请输入联系电话" v-model="datas.form.telephone" name="" id="">
				</view>
			</view>
			<view>
				<view>
					地址
				</view>
				<view>
					<input type="text" placeholder="请输入地址" v-model="datas.form.address" name="" id="">
				</view>
			</view>
			<view>
				<view>
					排序
				</view>
				<view>
					<input type="text" placeholder="请输入排序" v-model="datas.form.sort" name="" id="">
				</view>
			</view>
			<view>
				<view>
					备注
				</view>
				<view>
					<input type="text" placeholder="请输入备注" v-model="datas.form.remark" name="" id="">
				</view>
			</view>
		</view>
	</view>
	<view class="bottombutton">
		<up-button type="primary" style="background-color:  #318AFE;color: #fff;" @tap="sumbit" :plain="true"
			text="保存"></up-button>
	</view>
</template>


<script setup>
	import { ref, reactive, } from 'vue';
	import { onLoad, } from '@dcloudio/uni-app';
	import { editVendor } from '@/http/api/vendor.js';
	let datas = reactive({
		form: {},
	})
	const props = defineProps({
		item: {
			type: String
		}
	})
	onLoad((d)=>{
		datas.form = JSON.parse(d.item)
	})

	function sumbit() {
		editVendor({
			...datas.form
		}).then(res => {
			uni.navigateBack()
		})
	}
</script>
<style>
	page {
		background-color: #f9f9f9;
	}
</style>
<style scoped lang="less">


	.df() {
		display: flex;
		align-items: center;
	}

	 

	.status {
		margin: 0 32rpx;
		position: absolute;
		// top: 100%;
		left: 0;
		right: 0;
		z-index: 10;
		background-color: #fff;
	}

	.warehouseEntry {
		height: 540rpx;
		background: #FFFFFF;
		border-radius: 18rpx 18rpx 18rpx 18rpx;
		margin: 28rpx;
		padding: 1rpx 24rpx;
		box-sizing: border-box;

		>view {
			>view {
				height: 84rpx;
				background: #fcfcfc;
				border: 2rpx solid #F9F9F9;
				margin-top: 32rpx;
				.df;

				>view:first-child {
					width: 190rpx;
					height: 84rpx;
					line-height: 84rpx;
					// text-align: left;
					padding-left: 24rpx;
					background: #F9F9F9;
					border-radius: 8rpx 0rpx 0rpx 8rpx;
					border: 2rpx solid #F9F9F9;
					font-family: Source Han Sans CN, Source Han Sans CN;
					font-weight: 400;
					font-size: 32rpx;
					color: #333333;
				}
			}
		}
	}

	.bottombutton {
		margin-top: 84rpx;
		padding: 0 24rpx;
		>button {
			width: 530rpx;
			height: 80rpx;
			border-radius: 56rpx 56rpx 56rpx 56rpx;
		}
	}
</style>