feedbackadd.js 1.6 KB
Newer Older
doc_wei's avatar
doc_wei 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13

// 工单反馈
layui.config({
	base: basePath,
	version: skyeyeVersion
}).extend({
	window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function(exports) {
	winui.renderColor();
	layui.use(['form'], function(form) {
		var index = parent.layer.getFrameIndex(window.name);
		var $ = layui.$;
		var customerId = "",//客户id
W
weizhiqiang 已提交
14
			productId = "";//商品id
doc_wei's avatar
doc_wei 已提交
15
		
doc_wei's avatar
doc_wei 已提交
16
		AjaxPostUtil.request({url: flowableBasePath + "feedback002", params: {serviceId: parent.serviceId}, type: 'json', callback: function(json) {
17 18 19 20 21
			$("#orderNum").html(json.bean.orderNum);
			$("#customerName").html(json.bean.customerName);
			$("#productName").html(json.bean.productName);
			productId = json.bean.productId;
			customerId = json.bean.customerId;
22 23 24 25

			// 售后服务反馈类型
			sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["amsServiceFeedbBackType"]["key"], 'select', "typeId", '', form);

26
			matchingLanguage();
doc_wei's avatar
doc_wei 已提交
27 28 29 30 31 32 33 34 35 36 37 38 39
		}});

		skyeyeEnclosure.init('enclosureUpload');
		form.on('submit(formAddBean)', function(data) {
			if(winui.verifyForm(data.elem)) {
				var params = {
					typeId: $("#typeId").val(),
					content: $("#content").val(),
					customId: customerId,
					proId: productId,
					serviceId: parent.serviceId,
					enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
				};
doc_wei's avatar
doc_wei 已提交
40
				AjaxPostUtil.request({url: flowableBasePath + "feedback003", params: params, type: 'json', callback: function(json) {
41 42
					parent.layer.close(index);
					parent.refreshCode = '0';
doc_wei's avatar
doc_wei 已提交
43 44 45 46 47 48 49 50 51 52
				}});
			}
			return false;
		});

		$("body").on("click", "#cancle", function() {
			parent.layer.close(index);
		});
	});
});