mui.init({
	beforeback: function() { //获得父页面的webview
		var list = plus.webview.currentWebview().opener(); //触发父页面的自定义事件(refresh),从而进行刷新
		mui.fire(list, 'reload');
		//返回true,继续页面关闭逻辑
		return true;
	},
})
mui.plusReady(function() {
	var orderId = '';
	var self = plus.webview.currentWebview()
	orderId = self.orderId
	// 上传图片
	$(".oneImg").on("tap", '#img', function() {
		// UP.init("accountBookImg", "test", "accountBookImgTag")

		UP.init("imgUrl", "test", "img")
		openCamera()
	})

	var click = false;
	$("body").on("tap", '.bc_btn', function() {
		if (click == true) return;

		click = true;
		var params = JZL.getParams(".inp");
		params.orderId = orderId
		if ('' == $.trim($('#content').val())) {
			mui.alert("请输入凭证说明")
			return;
		}
		if ('' == $('#imgUrl').val()) {
			mui.alert("请上传凭证图片")
			return;
		}

		JZL.ajax(qlgUrl('app/orders/uploadCertificate'), params, function(data) {
			if (1 == data.status) {
				mui.alert(data.msg);
				mui.back()
			} else {
				mui.alert(data.msg)
			}
		})


	})
})
