Commit c6c39e06 authored by duxinyuan's avatar duxinyuan

commite

parent cfabbc65
...@@ -157,6 +157,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -157,6 +157,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
var id = e.target.dataset.id; var id = e.target.dataset.id;
that.getMoneyDetail(id); that.getMoneyDetail(id);
that.house_fatherid = id; that.house_fatherid = id;
that.getaddPicList(id);
console.log(id) console.log(id)
}); });
//操作---调整 //操作---调整
...@@ -327,8 +328,36 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -327,8 +328,36 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
}); });
}, },
getaddPicList: function(id) {
//获取收款图片
$('#container_body_img_area').html('');//每回先清空所有图片
var id_pic = id;//follow.house_fatherid > 0?follow.house_fatherid:follow.house_id;
$('.result2,.result').remove(); //删除之前存在的图片 显示从接口获取的数据 用来区分新添加的 和 已经保存的
$.ajax({
'type': 'GET',
'url': '/index/receiptImgList',
data: {
"id": id_pic,
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
//渲染已经有的列表
// <img src='[%= it[item]["agent_img"] %]' class="diagram-image J_preview"
// data-bimg='[%= it[item]["agent_img"] %]'>
for(i = 0; i < data.data.length; i++) {
$('#container_body_img_area').append('<div class="result2"><img data-imgid="{0}" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}"/> <span class="span-del2">删除</span></div>'.stringFormatObj({
'0': data.data[i].id,
'1': data.data[i].img_name?urlDeal(data.data[i].img_name):data.data[i].img_name
}));
};
//将li里的值 赋给input(分佣方姓名) } else {}
}
});
},
//将li里的值 赋给input(分佣方姓名)
intoIdBuild: function(obj) {//新增客户 input赋值 intoIdBuild: function(obj) {//新增客户 input赋值
var that = receiv ; var that = receiv ;
that.intoId_a = $(obj).attr("data-id"); that.intoId_a = $(obj).attr("data-id");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment