Commit 1b9e89a0 authored by clone's avatar clone

Merge branch 'test-v1.9' into test

parents b0dda765 3768a721
...@@ -199,8 +199,9 @@ ...@@ -199,8 +199,9 @@
</tbody> </tbody>
</table> </table>
<div> <div class="detail-modal-maid-bottom-btn-area text-right">
<a id="maid_ok_btn" class="btn btn-primary" data-toggle="modal">确认分佣</a> <a id="maid_ok_btn" class="btn btn-primary" data-toggle="modal">确认分佣</a>
<a id="maid_save_btn" class="btn btn-primary" data-toggle="modal">保存</a>
</div> </div>
<!--分佣提成--> <!--分佣提成-->
</div> </div>
...@@ -292,8 +293,8 @@ ...@@ -292,8 +293,8 @@
<div class="modal-body" id="addmaid_input_area"> <div class="modal-body" id="addmaid_input_area">
<div> <div>
<span>分佣方:</span> <span>分佣方:</span>
<select class="form-control form-control-one" id="is_carefully_chosen"> <select class="form-control" id="addmaid_input_servant">
<option value="0">请选择</option> <option value="">请选择</option>
<option value="1">盘方</option> <option value="1">盘方</option>
<option value="2">客方</option> <option value="2">客方</option>
<option value="3">反签</option> <option value="3">反签</option>
...@@ -302,25 +303,40 @@ ...@@ -302,25 +303,40 @@
</select> </select>
</div> </div>
<div> <div>
<span>业务员:</span><input class="form-control form-control-one" type="text" /> <span>业务员:</span><input class="form-control" type="text" id="addmaid_input_ywy" />
</div> </div>
<div> <div>
<span>所属门店:</span><input class="form-control form-control-one" type="text" /> <span>所属门店:</span><input class="form-control" type="text" id="addmaid_input_shop" />
</div> </div>
<div> <div>
<span>分佣比例:</span><input class="form-control form-control-one" type="text" />% <span>分佣比例:</span><input class="form-control" type="number" id="addmaid_input_ratio" /><span>%</span>
</div> </div>
<div> <div>
<span>应分佣金:</span><input class="form-control form-control-one" type="text" /> <span>应分佣金:</span><input class="form-control" type="number" id="addmaid_input_cash" /><span></span>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消 <div href="#modal_new_maid_select" data-toggle="modal">打开盘方业务员选择框</div>
</button> <button type="button" class="btn btn-primary" data-dismiss="modal" id="addmaid_ok_btn">确定</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" id="new-commission"> </div>
确定 </div>
</button> <!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- 弹出框 分佣提成新增,选择盘方,多个的时候选择一业务员 -->
<div class="modal fade" id="modal_new_maid_select" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop='static'>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">选择一业务员</h4>
</div>
<div class="modal-body">
<ul id="addmaid_select_ul">
</ul>
</div> </div>
</div> </div>
<!-- /.modal-content --> <!-- /.modal-content -->
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>同联商业</title><script type=text/javascript>!function(n,e){var t=n.documentElement,i="orientationchange" in window?"orientationchange":"resize",d=function(){var n=t.clientWidth;n&&(t.style.fontSize=n/750*100+"px")};n.addEventListener&&(e.addEventListener(i,d,!1),n.addEventListener("DOMContentLoaded",d,!1))}(document,window);</script><link href=./static/css/app.6f6848b431f83947e15872468e00fb5a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.8ffd82b342bc2a4ca245.js></script><script type=text/javascript src=./static/js/app.e8d152ec10dff8827c92.js></script><script type=text/javascript src=./static/js/vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>同联商业</title><script type=text/javascript>!function(n,e){var t=n.documentElement,i="orientationchange" in window?"orientationchange":"resize",d=function(){var n=t.clientWidth;n&&(t.style.fontSize=n/750*100+"px")};n.addEventListener&&(e.addEventListener(i,d,!1),n.addEventListener("DOMContentLoaded",d,!1))}(document,window);</script><link href=./static/css/app.c7934a66ee9399db8d2f4ce090a941a4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.8ffd82b342bc2a4ca245.js></script><script type=text/javascript src=./static/js/app.af7540b5ab8d6bfb234b.js></script><script type=text/javascript src=./static/js/vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script></body></html>
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["webpack:///webpack/bootstrap 688c5dabc3380c253405"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 688c5dabc3380c253405"],"sourceRoot":""} {"version":3,"sources":["webpack:///webpack/bootstrap 2b28591e49dc391cfec1"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2b28591e49dc391cfec1"],"sourceRoot":""}
\ No newline at end of file \ No newline at end of file
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<div class="bottom-border">商铺号<span class="left">{{house_number}}</span></div> <div class="bottom-border">商铺号<span class="left">{{house_number}}</span></div>
</li> </li>
<li class="main-sec-li"> <li class="main-sec-li">
<div class="bottom-border">是否开业<span class="left">{{is_open===1?'是':'否'}}</span></div> <div class="bottom-border">是否开业<span class="left">{{is_open=='1'?'是':'否'}}</span></div>
</li> </li>
<li class="main-sec-li"> <li class="main-sec-li">
<div class="bottom-border">成交类型<span class="left">{{trade_type}}</span></div> <div class="bottom-border">成交类型<span class="left">{{trade_type}}</span></div>
...@@ -254,19 +254,19 @@ ...@@ -254,19 +254,19 @@
_this.is_open = response.data.data.bargainInfo.is_open; _this.is_open = response.data.data.bargainInfo.is_open;
//判断开业类型 //判断开业类型
_this.trade_type = response.data.data.bargainInfo.trade_type; _this.trade_type = response.data.data.bargainInfo.trade_type;
if(_this.trade_type === 10) { if(_this.trade_type == '10') {
_this.trade_type = '出租' _this.trade_type = '出租'
}; };
if(_this.trade_type === 20) { if(_this.trade_type =='20') {
_this.trade_type = '增佣' _this.trade_type = '增佣'
}; };
if(_this.trade_type === 30) { if(_this.trade_type =='30') {
_this.trade_type = '代理' _this.trade_type = '代理'
}; };
if(_this.trade_type === 40) { if(_this.trade_type =='40') {
_this.trade_type = '好处费' _this.trade_type = '好处费'
}; };
......
...@@ -112,6 +112,9 @@ addtax_ ...@@ -112,6 +112,9 @@ addtax_
/*详情弹出框,分佣提成*/ /*详情弹出框,分佣提成*/
.detail-modal-maid-top-btn-area{ .detail-modal-maid-top-btn-area{
padding: 0 10px 10px; padding: 0 10px 10px;
}
.detail-modal-maid-bottom-btn-area>a{
} }
[href="#modal_new_maid"]{ [href="#modal_new_maid"]{
float: left; float: left;
...@@ -192,14 +195,38 @@ addtax_ ...@@ -192,14 +195,38 @@ addtax_
/********************/ /********************/
/*新增分佣提成弹框部分样式*/ /*新增分佣提成弹框部分样式*/
#addmaid_input_area>div{
overflow: hidden;
padding: 5px 0;
}
#addmaid_input_area>div>span{
float: left;
height: 34px;
line-height: 34px;
}
#addmaid_input_area>div>select,
#addmaid_input_area>div>input{
float: left;
width: 40%;
}
#addmaid_input_area>div>span:nth-of-type(1){ #addmaid_input_area>div>span:nth-of-type(1){
display: inline-block; display: inline-block;
width: 50px; width: 80px;
}
#addmaid_input_area>div>span:nth-of-type(2){
padding-left: 10px;
}
[href="#modal_new_maid_select"]{
display: none;
} }
.form-control-one { #addmaid_select_ul{
display: inline-block; list-style: none;
width: 40%; }
#addmaid_select_ul>li{
height: 50px;
line-height: 50px;
cursor: pointer;
} }
......
...@@ -7,6 +7,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -7,6 +7,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
mainTabIndex: 0, mainTabIndex: 0,
detailTabIndex: 0, detailTabIndex: 0,
bargain_id: '', bargain_id: '',
panfangData: null,
maidTotalCommission: 0,//应收总佣金
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template + template_tax + template_maid); $(document.body).append(template + template_tax + template_maid);
...@@ -32,7 +34,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -32,7 +34,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
_doc.on('click', '#maintable_search', function(e) { _doc.on('click', '#maintable_search', function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
$("#maintable_reset").click();//先重置输入框
bargain.getList(1); //一级审核搜索 bargain.getList(1); //一级审核搜索
}); });
...@@ -137,12 +138,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -137,12 +138,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
bargain.bargaininfoSave(); bargain.bargaininfoSave();
}); });
//详情弹出框,点击新增分佣提成
_doc.delegate("#new-commission", "click", function() {
bargain.newCommission();
bargain.Caozuo();
});
//详情弹出框,点击开票税费下的新增税费,弹出框出来 //详情弹出框,点击开票税费下的新增税费,弹出框出来
_doc.on('click', '[href=\"#modal_new_tax\"]', function(e){ _doc.on('click', '[href=\"#modal_new_tax\"]', function(e){
e.preventDefault(); e.preventDefault();
...@@ -172,6 +167,85 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -172,6 +167,85 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
bargain.newAddTaxOk(); bargain.newAddTaxOk();
}); });
//详情弹出框,分佣提成里,点击新增
_doc.on('click', '[href="#modal_new_maid"]', function(e){
e.preventDefault();
e.stopPropagation();
bargain.newAddMaid();
});
//详情弹出框,分佣提成里,点击新增,分佣方选择时触发的事件
_doc.on('input', '#addmaid_input_servant', function(e){
var _this = $(this);
$('#addmaid_input_ywy').val('');//先置空
$('#addmaid_input_shop').val('');//先置空
if(_this.val() === ''){
}else if(_this.val() === '5'){
}else{
var _rateTemp = bargain.getDefaultRadio(_this.val());
$('#addmaid_input_ratio').val(_rateTemp);
$('#addmaid_input_cash').val(_rateTemp*bargain.maidTotalCommission);
var _arrTemp = bargain.panfangData.filter(function(item, index, array){
return (item.role == _this.val());
});
if(_arrTemp.length===0){
return false;
}else if(_arrTemp.length===1){
$('#addmaid_input_ywy').val(_arrTemp[0].name+'-'+_arrTemp[0].phone).attr('data-id',_arrTemp[0].id);
bargain.getDepart(_arrTemp[0].id, function(obj){
$('#addmaid_input_shop').val(obj.district_name+'-'+obj.store_name);
});
}else{
$('[href="#modal_new_maid_select"]').click();
var _tempHtml = '';
$.each(_arrTemp, function(i, v) {
_tempHtml += '<li data-data="{data}">{0}-{1}</li>'.stringFormatObj({
'data': encodeURIComponent(JSON.stringify(v)),
'0': v.name,
'1': v.phone
});
});
$('#addmaid_select_ul').html(_tempHtml);
}
}
});
//详情弹出框,分佣提成里,点击新增,分佣方选择,弹出选择列表触发的事件
_doc.on('click', '#addmaid_select_ul>li', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
var _dataTemp = JSON.parse(decodeURIComponent(_this.attr('data-data')));
$('#addmaid_input_ywy').val(_dataTemp.name+'-'+_dataTemp.phone).attr('data-id',_dataTemp.id);
bargain.getDepart(_dataTemp.id, function(obj){
$('#addmaid_input_shop').val(obj.district_name+'-'+obj.store_name);
});
_this.closest('.modal-content').find('button.close').click();
});
//详情弹出框,分佣提成里,点击新增,点击保存触发的事件
_doc.on('click', '#addmaid_ok_btn', function(e){
e.preventDefault();
e.stopPropagation();
bargain.newAddMaidOk();
});
//详情弹出框,分佣提成里,点击确认分佣触发的事件
_doc.on('click', '#maid_ok_btn', function(e){
e.preventDefault();
e.stopPropagation();
bargain.MaidOk();
});
//详情弹出框,分佣提成里,点击保存触发的事件
_doc.on('click', '#maid_save_btn', function(e){
e.preventDefault();
e.stopPropagation();
bargain.MaidSave();
});
//详情弹出框,分佣提成里,点击增加实收按钮 //详情弹出框,分佣提成里,点击增加实收按钮
_doc.on('click', '#maid_new_btn', function(e){ _doc.on('click', '#maid_new_btn', function(e){
e.preventDefault(); e.preventDefault();
...@@ -180,11 +254,58 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -180,11 +254,58 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
content: '确认增加吗?', content: '确认增加吗?',
btn: ['确定', '取消'], btn: ['确定', '取消'],
yes: function(_index){ yes: function(_index){
$('.detail-modal-maid-mix-td').append('<div class="oh"><span contenteditable=""></span><span contenteditable=""></span><span contenteditable=""></span><span contenteditable=""></span><span contenteditable=""></span><span></span></div>'); $('.detail-modal-maid-mix-td').append('<div class="oh"><span contenteditable></span><span contenteditable></span><span contenteditable></span><span contenteditable></span><span contenteditable></span><span class="detail-modal-maid-span-time"></span></div>');
layer.close(_index); layer.close(_index);
} }
}); });
}); });
},
getDefaultRadio: function(v){
switch (Number(v)){
case 1:
return 25;
case 2:
return 30;
case 3:
return 35;
case 4:
return 10;
default:
return 25;
}
},
getDepart: function(s, fn){
$.ajax({
type: 'GET',
url: '/index/getAgentDistrictStore',
data: {
'id': s
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
fn && fn(_data.data);
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
}, },
Timeline: function() { //获取时间轴 Timeline: function() { //获取时间轴
$.ajax({ $.ajax({
...@@ -227,6 +348,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -227,6 +348,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
$("#bargaininfo_total_commission").val(data.data.commission); $("#bargaininfo_total_commission").val(data.data.commission);
$("#bargaininfo_create_time").html(data.data.create_time); $("#bargaininfo_create_time").html(data.data.create_time);
bargain.maidTotalCommission = Number(data.data.commission);
var _inputAreaTempObj = $('.detail-modal-bargaininfo-commission-addarea'); var _inputAreaTempObj = $('.detail-modal-bargaininfo-commission-addarea');
if(data.data.practical_fee && data.data.practical_fee.length > 0){ if(data.data.practical_fee && data.data.practical_fee.length > 0){
_inputAreaTempObj.html(''); _inputAreaTempObj.html('');
...@@ -384,6 +507,75 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -384,6 +507,75 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
} }
}); });
}, },
newAddMaid: function(){
$.ajax({
type: 'GET',
url: '/index/searchBargainAgents',
data: {
'bargain_id': bargain.bargain_id
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
bargain.panfangData = _data.data;
console.log(bargain.panfangData);
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
},
newAddMaidOk: function(){
console.log(7789);
$.ajax({
type: 'POST',
url: '/index/addBargain',
data: {
'id': bargain.bargain_id,
'scale_fee': $('#addmaid_input_cash').val(),
'role': $('#addmaid_input_servant').val(),
'scale': $('#addmaid_input_ratio').val()
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
},
newAddTax: function(obj) { newAddTax: function(obj) {
var _tempTableObj = $('.addtax-modal-tax-table'); var _tempTableObj = $('.addtax-modal-tax-table');
_tempTableObj.attr('data-type',obj['type']); _tempTableObj.attr('data-type',obj['type']);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<span contenteditable>2</span> <span contenteditable>2</span>
<span contenteditable>2</span> <span contenteditable>2</span>
<span contenteditable>2</span> <span contenteditable>2</span>
<span>4</span> <span class="detail-modal-maid-span-time">4</span>
</div> </div>
[% }else{ %] [% }else{ %]
<div class="oh"> <div class="oh">
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<span contenteditable></span> <span contenteditable></span>
<span contenteditable></span> <span contenteditable></span>
<span contenteditable></span> <span contenteditable></span>
<span></span> <span class="detail-modal-maid-span-time"></span>
</div> </div>
[% } %] [% } %]
</td> </td>
......
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