<template>
	<view>
		<u-navbar autoBack placeholder bgColor="#FFFFFF">
			<view class="navSlot" slot="center">
				<!-- <u-icon name="arrow-left" size="19"></u-icon> -->
				<view class="title">去处理</view>
			</view>
		</u-navbar>
		<view class="bg">
			<view>选择处理结果</view>

			<u-radio-group v-model="value" @change="radioGroupChange">
				<u-radio class="radio-left" @change="radioChange(item.status)" v-for="(item, index) in list" :key="index" :name="item.name"
					:disabled="item.disabled" shape>
					{{item.name}}
				</u-radio>
			</u-radio-group>
					<u--textarea border="none"  placeholder="请输入申请原因"  v-model="storeRemark" ></u--textarea>
					<view class="butSubmmit" @click="submit">提交</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:"",
				storeProcessStatus:0,
				storeRemark:"",
				list: [{
						name: '同意',
						disabled: false,
						status:2
					},
					{
						name: '拒绝',
						disabled: false,
						status:3
					},
					{
						name: '其他',
						disabled: false,
						status:4
					}
				],
	
				value: '',
			}
		},
		onLoad(options) {
			this.id=options.id
		
		},
		methods: {
			gethandleAfterSales() {
				this.$http.post("/api/store/personalCenter/handleAfterSales", {
					id: this.id,
					storeProcessStatus:this.storeProcessStatus,
					storeRemark:this.storeRemark,
			
				}).then(res => {
					if (res.code == 200)
					this.data = res.data
					wx.showToast({
						title: '提交成功！',
						icon: 'none'
					})
					uni.navigateTo({
						url: '/pages/afterSalesOrder/afterSalesOrder'
					})
				})
			},
			submit(){
				this.gethandleAfterSales()
			},
			// 选中某个单选框时，由radio时触发
			radioChange(e) {
				console.log(e);
				this.storeProcessStatus = e;
			},
			// 选中任一radio时，由radio-group触发
			radioGroupChange(e) {
				console.log(e);
			}

		}
	}
</script>

<style lang="scss">
	.bg{
		padding: 24rpx;
		.butSubmmit{
			background: linear-gradient( 90deg, #FF4502 0%, #FF8903 100%);
			border-radius: 44rpx 44rpx 44rpx 44rpx;
			text-align: center;
			color: white;
			font-weight: 800;
			padding-top: 26rpx;
			position: fixed;
			width: 702rpx;
			bottom: 2%;
			padding-bottom: 25rpx;
		}
	}
	.radio-left{
		display: flex;
	}
</style>