Authored by mali

Merge branch 'master' into test6.9.16

Showing 66 changed files with 30 additions and 1055 deletions
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.fda52726821106658b27.css" rel="stylesheet"><link href="css/coupon.fda52726821106658b27.css" rel="stylesheet"></head>
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/coupon.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -22,6 +22,6 @@
<script type="text/javascript" src="js/vendors.fda52726821106658b27.js"></script><script type="text/javascript" src="js/coupon.fda52726821106658b27.js"></script></body>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/coupon.f3f566c7ebfba974ad02.js"></script></body>
</html>
... ...
button {
margin: 5px;
}
.ivu-form-item-label {
width: 90px !important;
}
.form-group[data-v-35ed785d]{width:100%;height:30px;background-color:#f5f7f9}.ivu-form-item-label[data-v-35ed785d]{width:90px!important}
\ No newline at end of file
button {
margin: 5px;
}
.ivu-form-item-label {
width: 90px !important;
}
.form-group[data-v-35ed785d]{width:100%;height:30px;background-color:#f5f7f9}.ivu-form-item-label[data-v-35ed785d]{width:90px!important}
\ No newline at end of file
[data-v-34e1a97a] .icon-edit{font-size:16px;cursor:pointer;vertical-align:bottom;color:#515a6e}[data-v-34e1a97a] .row-unnormarl{color:#ed4014}
\ No newline at end of file
[data-v-34e1a97a] .icon-edit{font-size:16px;cursor:pointer;vertical-align:bottom;color:#515a6e}[data-v-34e1a97a] .row-unnormarl{color:#ed4014}
\ No newline at end of file
.main {
display: -ms-flexbox;
display: flex;
width: 100%;
height: 100%;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
}
.ivu-card-head p {
text-align: center;
}
.editor-container {
width: 500px;
height: 100%;
-ms-flex-negative: 0;
flex-shrink: 0;
border-right: 1px solid #e4e4e4;
overflow-x: hidden;
overflow-y: scroll;
}
.button-container {
width: 50%;
-ms-flex-positive: 1;
flex-grow: 1;
}
.button-container button {
margin: 10px;
}
.floor-item {
position: relative;
width: 100%;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
overflow: hidden;
background-color: #fff;
}
.floor-image {
width: 100%;
margin: 5px 5px 5px 5px;
}
.floor-image img {
width: 100%;
float: left;
}
.floor-item:hover .floor-mask {
display: block;
}
.floor-mask {
display: none;
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
left: 0;
top: 0;
z-index: 19;
}
.floor-mask .floor-edit-buttons {
position: absolute;
width: 100px;
right: 0;
top: 0;
z-index: 20;
}
.floor-mask .floor-edit-buttons a {
display: inline-block;
width: 40px;
box-sizing: border-box;
background-color: gray;
color: #fff;
margin: 0 5px;
float: left;
text-align: center;
}
.floor-image-three-root {
/* display: flex;
flex-direction: row; */
width: 100%;
margin: 5px 5px 5px 5px;
}
.floor-image-three {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
width: 100%;
height: 200px;
}
.floor-image-three-left {
width: 40%;
height: 100%;
}
.floor-image-three-right-root {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 55%;
height: 100%;
}
.floor-image-three-right-item {
width: 100%;
height: 50%;
}
.floor-image-hot {
width: 100%;
margin: 5px 5px 5px 5px;
}
.hot-image-list {
background-color: white;
width: 100%;
margin: 5px 5px 5px 5px;
}
.hot-image-list-title {
font-size: 25px;
text-align: left;
padding-top: 10px;
}
.hot-image-list-body {
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-ms-flex-line-pack: start;
align-content: flex-start;
background-color: white;
text-align: left;
width: 100%;
}
.hot-image-list-item {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex: 0 0 25%;
flex: 0 0 25%;
-ms-flex-line-pack: center;
align-content: center;
-ms-flex-pack: justify;
justify-content: space-between;
-ms-flex-negative: 0;
flex-shrink: 0;
height: 150px;
}
.item-image {
margin-top: 10px;
-o-object-fit: contain;
object-fit: contain;
width: 100%;
height: 100px;
/* align-content: center;
justify-content: center; */
}
.item-title {
width: 112px;
margin-top: 10px;
padding-left: 10px;
padding-right: 10px;
text-align: center;
/* -webkit-line-clamp: 1; */
/* max-lines: 1; */
/* line-clamp: 1; */
white-space: nowrap;
display: inline-block;
/* display: -webkit-box; */
/* display: inline-flex; */
overflow: hidden;
text-overflow: ellipsis;
}
.sort-tab-body {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
}
.sort-tab {
padding-right: 10px;
padding-left: 10px;
}
.main {
display: -ms-flexbox;
display: flex;
width: 100%;
height: 100%;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
}
.ivu-card-head p {
text-align: center;
}
.editor-container {
width: 500px;
height: 100%;
-ms-flex-negative: 0;
flex-shrink: 0;
border-right: 1px solid #e4e4e4;
overflow-x: hidden;
overflow-y: scroll;
}
.button-container {
width: 50%;
-ms-flex-positive: 1;
flex-grow: 1;
}
.button-container button {
margin: 10px;
}
.floor-item {
position: relative;
width: 100%;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
overflow: hidden;
background-color: #fff;
}
.floor-image {
width: 100%;
margin: 5px 5px 5px 5px;
}
.floor-image img {
width: 100%;
float: left;
}
.floor-item:hover .floor-mask {
display: block;
}
.floor-mask {
display: none;
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
left: 0;
top: 0;
z-index: 19;
}
.floor-mask .floor-edit-buttons {
position: absolute;
width: 100px;
right: 0;
top: 0;
z-index: 20;
}
.floor-mask .floor-edit-buttons a {
display: inline-block;
width: 40px;
box-sizing: border-box;
background-color: gray;
color: #fff;
margin: 0 5px;
float: left;
text-align: center;
}
.floor-image-three-root {
/* display: flex;
flex-direction: row; */
width: 100%;
margin: 5px 5px 5px 5px;
}
.floor-image-three {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
width: 100%;
height: 200px;
}
.floor-image-three-left {
width: 40%;
height: 100%;
}
.floor-image-three-right-root {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 55%;
height: 100%;
}
.floor-image-three-right-item {
width: 100%;
height: 50%;
}
.floor-image-hot {
width: 100%;
margin: 5px 5px 5px 5px;
}
.hot-image-list {
background-color: white;
width: 100%;
margin: 5px 5px 5px 5px;
}
.hot-image-list-title {
font-size: 25px;
text-align: left;
padding-top: 10px;
}
.hot-image-list-body {
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-ms-flex-line-pack: start;
align-content: flex-start;
background-color: white;
text-align: left;
width: 100%;
}
.hot-image-list-item {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex: 0 0 25%;
flex: 0 0 25%;
-ms-flex-line-pack: center;
align-content: center;
-ms-flex-pack: justify;
justify-content: space-between;
-ms-flex-negative: 0;
flex-shrink: 0;
height: 150px;
}
.hot-image-list-item-5 {
-ms-flex: 0 0 20%;
flex: 0 0 20%;
height: 120px;
}
.item-image {
margin-top: 10px;
-o-object-fit: contain;
object-fit: contain;
width: 100%;
height: 100px;
/* align-content: center;
justify-content: center; */
}
.item-image-5 {
height: 80px;
}
.item-title {
width: 110px;
margin-top: 10px;
padding-left: 10px;
padding-right: 10px;
text-align: center;
/* -webkit-line-clamp: 1; */
/* max-lines: 1; */
/* line-clamp: 1; */
white-space: nowrap;
display: inline-block;
/* display: -webkit-box; */
/* display: inline-flex; */
overflow: hidden;
text-overflow: ellipsis;
}
.item-title-5 {
width: 88px;
}
.sort-tab-body {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
}
.sort-tab {
padding-right: 10px;
padding-left: 10px;
}
.miniapp {
display: inline-block;
margin-top: 30px;
margin-bottom: 30px;
}
.index[data-v-724c5842] {
text-align: center;
overflow: auto;
}
.app-frame {
width: 400px;
min-height: 1000px;
display: inline-block;
background-color: #F2F2F2;
border: 1px solid #CCCCCC;
border-radius: 10px;
padding-left: 10px;
padding-right: 10px;
}
.app-title {
/* background-image: url('~assets/apptitle.png'); */
/* background-size: cover; */
margin-bottom: 10px;
}
.title {
font-size: 25px;
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
}
.miniapp {
display: inline-block;
margin-top: 30px;
margin-bottom: 30px;
}
.index[data-v-724c5842] {
text-align: center;
overflow: auto;
}
.app-frame {
width: 400px;
min-height: 1000px;
display: inline-block;
background-color: #F2F2F2;
border: 1px solid #CCCCCC;
border-radius: 10px;
padding-left: 10px;
padding-right: 10px;
}
.app-title {
/* background-image: url('~assets/apptitle.png'); */
/* background-size: cover; */
margin-bottom: 10px;
}
.title {
font-size: 25px;
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
}
.resource-add-container {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
}
.resource-add-card {
position: absolute;
width: 600px;
margin-top: 30px;
left: 50%;
margin-left: -300px;
}
.platform-select, .name-input {
width: 200px;
margin: 0 auto;
}
.ivu-row {
border-bottom: 1px solid #e3e3e3;
}
.ivu-row:hover {
background-color: #aefdff;
}
.ivu-col {
text-align: center;
height: 50px;
line-height: 50px;
}
.ivu-col:nth-child(odd) {
border-right: 1px solid #e4e4e4;
}
.ivu-card-body {
margin: 0;
padding: 0;
}
.resource-add-container {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
}
.resource-add-card {
position: absolute;
width: 600px;
margin-top: 30px;
left: 50%;
margin-left: -300px;
}
.platform-select, .name-input {
width: 200px;
margin: 0 auto;
}
.ivu-row {
border-bottom: 1px solid #e3e3e3;
}
.ivu-row:hover {
background-color: #aefdff;
}
.ivu-col {
text-align: center;
height: 50px;
line-height: 50px;
}
.ivu-col:nth-child(odd) {
border-right: 1px solid #e4e4e4;
}
.ivu-card-body {
margin: 0;
padding: 0;
}
.manual-send-wrapper {
height: 205px;
}
.import-send-wrapper {
height: 100%;
}
.ivu-card-body {
padding: 0;
margin: 0;
}
.ivu-card-bordered {
/*border: none;*/
border-bottom: none;
}
.ivu-card-head {
background-color: #f7f7f7;
}
.manual-send-container {
margin-top: 20px;
height: 130px;
}
.import-send-container {
margin-top: 40px;
/*margin-bottom: 200px;*/
}
.manual-send-container .title {
text-align: right;
margin-right: 20px;
}
#txt_uids {
width: 98%;
height: 100%;
}
#upload {
width: 100%;
height: 100%;
opacity: 0;
position: absolute;
left: 0;
top: 0;
}
.button-upload {
position: relative;
display: inline-block;
background-color: #17b566;
border-radius: 5px;
color: #fff;
width: 80px;
height: 32px;
line-height: 32px;
text-align: center;
overflow: hidden;
}
.file-name {
height: 32px;
line-height: 32px;
margin-left: 20px;
color: #2b85e4;
display: inline-table;
vertical-align: middle;
}
.red {
color: #ff0000;
}
.bottom {
position: absolute;
bottom: 0;
width: 100%;
height: 80px;
background-color: #f7f7f7;
line-height: 80px;
text-align: center;
}
a {
text-decoration: none;
}
.manual-send-wrapper {
height: 205px;
}
.import-send-wrapper {
height: 100%;
}
.ivu-card-body {
padding: 0;
margin: 0;
}
.ivu-card-bordered {
/*border: none;*/
border-bottom: none;
}
.ivu-card-head {
background-color: #f7f7f7;
}
.manual-send-container {
margin-top: 20px;
height: 130px;
}
.import-send-container {
margin-top: 40px;
/*margin-bottom: 200px;*/
}
.manual-send-container .title {
text-align: right;
margin-right: 20px;
}
#txt_uids {
width: 98%;
height: 100%;
}
#upload {
width: 100%;
height: 100%;
opacity: 0;
position: absolute;
left: 0;
top: 0;
}
.button-upload {
position: relative;
display: inline-block;
background-color: #17b566;
border-radius: 5px;
color: #fff;
width: 80px;
height: 32px;
line-height: 32px;
text-align: center;
overflow: hidden;
}
.file-name {
height: 32px;
line-height: 32px;
margin-left: 20px;
color: #2b85e4;
display: inline-table;
vertical-align: middle;
}
.red {
color: #ff0000;
}
.bottom {
position: absolute;
bottom: 0;
width: 100%;
height: 80px;
background-color: #f7f7f7;
line-height: 80px;
text-align: center;
}
a {
text-decoration: none;
}
button {
margin: 5px;
}
.form-group[data-v-c6807168]{width:100%;height:30px;background-color:#f5f7f9}.ivu-form-item-label[data-v-c6807168]{width:90px!important}
\ No newline at end of file
.ivu-btn {
margin: 0 2px;
}
.ivu-table-cell {
padding: 10px;
}
.show {
display: block !important;
}
.btn-close {
width: 30px;
height: 30px;
border: none;
border-radius: 50%;
text-align: center;
padding: 0;
color: red;
}
.popup-detail-wrapper,
.popup-invist-wrapper {
display: none;
width: 100%;
height: 100%;
left: 0;
top: 0;
position: absolute;
background-color: rgba(0, 0, 0, 0.7);
z-index: 99;
}
.popup-detail-container {
width: 900px;
min-height: 500px;
margin: 100px auto;
}
.popup-invist-container {
width: 500px;
height: 200px;
margin: 100px auto;
}
.ivu-row:hover {
background-color: lightblue;
}
.ivu-row, .ivu-col {
overflow: hidden;
}
.detail-title, .invist-title {
color: #2db7f5;
}
.cert-image {
width: 200px;
min-height: 126px;
margin: 4px 10px;
}
.popup-detail-container .ivu-row {
border-left: 1px solid lightgray;
border-bottom: 1px solid lightgray;
}
.popup-detail-container .ivu-col {
border: 1px solid lightgray;
padding: 8px 0;
text-align: center;
border-bottom: none;
border-left: none;
}
.no-border-right {
border-right: none !important;
}
.border-left {
border-left: 1px solid lightgray !important;
}
.popup-invist-container .ivu-row {
padding: 10px 0;
text-align: center;
}
input {
width: 80%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.ivu-btn {
margin: 0 2px;
}
.ivu-table-cell {
padding: 10px;
}
.show {
display: block !important;
}
.btn-close {
width: 30px;
height: 30px;
border: none;
border-radius: 50%;
text-align: center;
padding: 0;
color: red;
}
.popup-detail-wrapper,
.popup-invist-wrapper {
display: none;
width: 100%;
height: 100%;
left: 0;
top: 0;
position: absolute;
background-color: rgba(0, 0, 0, 0.7);
z-index: 99;
}
.popup-detail-container {
width: 900px;
min-height: 500px;
margin: 100px auto;
}
.popup-invist-container {
width: 500px;
height: 200px;
margin: 100px auto;
}
.ivu-row:hover {
background-color: lightblue;
}
.ivu-row, .ivu-col {
overflow: hidden;
}
.detail-title, .invist-title {
color: #2db7f5;
}
.cert-image {
width: 200px;
min-height: 126px;
margin: 4px 10px;
}
.popup-detail-container .ivu-row {
border-left: 1px solid lightgray;
border-bottom: 1px solid lightgray;
}
.popup-detail-container .ivu-col {
border: 1px solid lightgray;
padding: 8px 0;
text-align: center;
border-bottom: none;
border-left: none;
}
.no-border-right {
border-right: none !important;
}
.border-left {
border-left: 1px solid lightgray !important;
}
.popup-invist-container .ivu-row {
padding: 10px 0;
text-align: center;
}
input {
width: 80%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
webpackJsonp([1],{10:function(e,t){e.exports=Vue},139:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(140),r=a(18);Object(r.a)(o.a)},140:function(e,t,a){"use strict";function o(e){n||a(141)}var r=a(62),i=a(214),n=!1,s=a(0),l=o,u=s(r.a,i.a,!1,l,null,null);u.options.__file="src/views/coupon/index.vue",t.a=u.exports},141:function(e,t){},210:function(e,t,a){"use strict";function o(e){n||a(211)}var r=a(90),i=a(213),n=!1,s=a(0),l=o,u=s(r.a,i.a,!1,l,"data-v-35ed785d",null);u.options.__file="src/views/coupon/components/modal-create-coupon.vue",t.a=u.exports},211:function(e,t){},212:function(e,t){e.exports=XLSX},213:function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Modal",{attrs:{loading:e.posting,title:e.allreadonly?"查看优惠券":"创建/编辑优惠券",width:"600"},on:{"on-ok":e.onOk},model:{value:e.visiable,callback:function(t){e.visiable=t},expression:"visiable"}},[e.loading?a("Spin"):a("Form",{ref:"formCoupon",attrs:{rules:e.ruleValidate,model:e.formData,"label-width":80}},[a("FormItem",{staticClass:"form-group",attrs:{label:"优惠券类型"}}),e._v(" "),a("FormItem",{attrs:{label:"优惠券类型",prop:"couponType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.couponType,callback:function(t){e.$set(e.formData,"couponType",t)},expression:"formData.couponType"}},[a("Option",{attrs:{value:0}},[e._v("请选择")]),e._v(" "),a("Option",{attrs:{value:100}},[e._v("活动券")]),e._v(" "),a("Option",{attrs:{value:110}},[e._v("运费券")])],1)],1),e._v(" "),a("FormItem",{staticClass:"form-group",attrs:{label:"基本信息"}}),e._v(" "),e.couponToken?a("FormItem",{attrs:{label:"Token"}},[e._v("\n "+e._s(e.couponToken)+"\n ")]):e._e(),e._v(" "),a("FormItem",{attrs:{label:"名称",prop:"couponName"}},[a("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"名称建议30字以内",disabled:e.allreadonly},model:{value:e.formData.couponName,callback:function(t){e.$set(e.formData,"couponName",t)},expression:"formData.couponName"}})],1),e._v(" "),a("FormItem",{attrs:{label:"数量",prop:"couponNum"}},[a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"数量",disabled:e.allreadonly},model:{value:e.formData.couponNum,callback:function(t){e.$set(e.formData,"couponNum",t)},expression:"formData.couponNum"}})],1),e._v(" "),a("FormItem",{attrs:{label:"使用次数",prop:"useNum"}},[a("Input",{staticStyle:{width:"100px"},attrs:{placeholder:"使用次数",disabled:""},model:{value:e.formData.useNum,callback:function(t){e.$set(e.formData,"useNum",t)},expression:"formData.useNum"}})],1),e._v(" "),a("FormItem",{attrs:{label:"使用期限",prop:"time"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",disabled:e.allreadonly,placeholder:"使用期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.time,callback:function(t){e.$set(e.formData,"time",t)},expression:"formData.time"}})],1),e._v(" "),a("FormItem",{attrs:{label:"领券期限",prop:"receiveTime"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",disabled:e.readonly,placeholder:"领券期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.receiveTime,callback:function(t){e.$set(e.formData,"receiveTime",t)},expression:"formData.receiveTime"}})],1),e._v(" "),a("FormItem",{attrs:{label:"优惠券说明",prop:"remark"}},[a("Input",{attrs:{type:"textarea",placeholder:"优惠券使用条件简介",disabled:e.allreadonly},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1),e._v(" "),a("FormItem",{staticClass:"form-group",attrs:{label:"使用条件"}}),e._v(" "),a("FormItem",{staticStyle:{display:"inline-block",width:"100%"},attrs:{label:"优惠条件",prop:"useLimitType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.useLimitType,callback:function(t){e.$set(e.formData,"useLimitType",t)},expression:"formData.useLimitType"}},[a("Option",{attrs:{value:0}},[e._v("无限制")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("金额")])],1),e._v(" "),2===e.formData.useLimitType?a("div",{staticStyle:{display:"inline-block"}},[e._v("\n  \n 金额满:\n "),a("InputNumber",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly,placeholder:"限制金额"},model:{value:e.formData.useLimitValue,callback:function(t){e.$set(e.formData,"useLimitValue",t)},expression:"formData.useLimitValue"}})],1):e._e()],1),e._v(" "),a("FormItem",{attrs:{label:"优惠金额",prop:"couponAmount"}},[a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"优惠金额",disabled:e.readonly},model:{value:e.formData.couponAmount,callback:function(t){e.$set(e.formData,"couponAmount",t)},expression:"formData.couponAmount"}})],1),e._v(" "),a("FormItem",{attrs:{label:"适用范围",prop:"productLimitType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.productLimitType,callback:function(t){e.$set(e.formData,"productLimitType",t)},expression:"formData.productLimitType"}},[a("Option",{attrs:{value:1}},[e._v("指定商品")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("全部商品")]),e._v(" "),a("Option",{attrs:{value:3}},[e._v("排除商品")])],1)],1),e._v(" "),1===e.formData.productLimitType||3===e.formData.productLimitType?a("FormItem",{attrs:{prop:"productLimitValue"}},[a("Input",{attrs:{type:"textarea",disabled:e.readonly,placeholder:"填写商品编码,多个商品编码用英文逗号分隔"},model:{value:e.formData.productLimitValue,callback:function(t){e.$set(e.formData,"productLimitValue",t)},expression:"formData.productLimitValue"}}),e._v(" "),a("Poptip",{attrs:{trigger:"hover"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("p",[e._v("1.上传文件必须是xlsx文件")]),e._v(" "),a("p",[e._v("2.第一行标题栏:商品编码")]),e._v(" "),a("p",[e._v("3."),a("a",{attrs:{href:"javascript:;"},on:{click:e.onExample}},[e._v("下载样例")])])]),e._v(" "),a("Upload",{attrs:{action:"",format:["xlsx"],"max-size":1024,"before-upload":e.onBeforeUpload}},[a("Button",{attrs:{type:"success",size:"small",disabled:e.readonly}},[e._v("导入")]),e._v(" "),a("p",[e._v(e._s(e.uploadTxt))])],1)],1)],1):e._e(),e._v(" "),a("FormItem",{attrs:{label:"可用商品类型"}},[a("checkbox-group",{on:{"on-change":e.getCheckBox},model:{value:e.formData.skupAllowTypeLabel,callback:function(t){e.$set(e.formData,"skupAllowTypeLabel",t)},expression:"formData.skupAllowTypeLabel"}},[a("checkbox",{attrs:{label:"极速发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"极速寄存",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"预售",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"瑕疵",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"二手",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"海外直邮",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"现货发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"现货寄存",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闪购发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闪购寄存",disabled:e.readonly}})],1)],1),e._v(" "),a("FormItem",{attrs:{label:"购买渠道",prop:"useLimitType"}},[a("checkbox-group",{on:{"on-change":e.getChannelCheckBox},model:{value:e.formData.businessClientLabel,callback:function(t){e.$set(e.formData,"businessClientLabel",t)},expression:"formData.businessClientLabel"}},[a("checkbox",{attrs:{label:"UFO",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闲鱼",disabled:e.readonly}})],1)],1)],1)],1)},r=[];o._withStripped=!0;var i={render:o,staticRenderFns:r};t.a=i},214:function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("LayoutContent",{attrs:{breads:[{title:"优惠券列表"}]}},[a("LayoutFilter",{on:{"on-filter":e.onFilter,"on-clear":e.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:e.filter}},[a("FormItem",{attrs:{prop:"id"}},[a("Input",{attrs:{placeholder:"输入ID"},model:{value:e.filter.id,callback:function(t){e.$set(e.filter,"id",t)},expression:"filter.id"}})],1),e._v(" "),a("FormItem",{attrs:{prop:"name"}},[a("Input",{attrs:{placeholder:"输入券名称"},model:{value:e.filter.name,callback:function(t){e.$set(e.filter,"name",t)},expression:"filter.name"}})],1),e._v(" "),a("FormItem",{attrs:{prop:"status"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:e.filter.status,callback:function(t){e.$set(e.filter,"status",t)},expression:"filter.status"}},[a("Option",{attrs:{value:0}},[e._v("未生效")]),e._v(" "),a("Option",{attrs:{value:1}},[e._v("生效中")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("已过期")]),e._v(" "),a("Option",{attrs:{value:3}},[e._v("已作废")])],1)],1),e._v(" "),a("FormItem",{attrs:{prop:"time"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",placeholder:"开始-结束时间",format:"yyyy-MM-dd HH:mm"},model:{value:e.filter.time,callback:function(t){e.$set(e.filter,"time",t)},expression:"filter.time"}})],1)],1)],1),e._v(" "),a("LayoutTools",[a("Button",{attrs:{type:"success",icon:"md-add"},on:{click:e.onCreateCoupon}},[e._v("新增优惠券")])],1),e._v(" "),a("LayoutTable",{attrs:{page:e.page,total:e.total,columns:e.columns,data:e.data},on:{"on-page-change":e.onPageChange}},[a("template",{staticClass:"btns",slot:"footer"},[a("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:e.onExport}},[e._v("导出")])],1)],2),e._v(" "),a("ModalCreateCoupon",{ref:"modalCreateCoupon",on:{"on-created":e.onCreated}})],1)},r=[];o._withStripped=!0;var i={render:o,staticRenderFns:r};t.a=i},5:function(e,t){e.exports=iview},62:function(e,t,a){"use strict";var o=a(13),r=a.n(o),i=a(21),n=a.n(i),s=a(22),l=a.n(s),u=a(5),c=(a.n(u),a(16)),m=a(17),p=a.n(m),d=a(44),f=a(27),v=a.n(f),y=a(210),b=new c.a;t.a={name:"CouponPage",data:function(){var e=this;this.$createElement;return{filter:{id:"",name:"",status:"",time:["",""]},page:1,total:0,data:[],columns:[{title:"ID",key:"id",width:80},{title:"券名称",key:"name",width:180},{title:"token",key:"token",width:180},{title:"数量",key:"couponNum",width:90},{title:"已发放",key:"sendNum",width:90},{title:"已使用",key:"useNum",width:90},{title:"使用期限",key:"useTime",width:165},{title:"优惠券说明",key:"remark",align:"center",width:150},{title:"状态",align:"center",key:"status"},{title:"操作",align:"center",width:200,render:function(t,a){var o=a.row;return t("div",[t(u.Button,{attrs:{type:"success",size:"small"},on:{click:function(){return e.onEditCoupon(o,!0,!0)}}},["查看详情"]),"未生效"===o.status||"生效中"===o.status?t(u.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return e.onEditCoupon(o)}}},["修改"]):void 0,t(u.Button,{attrs:{type:"warning",size:"small"},on:{click:function(){return e.onToRecord(o)}}},["发放记录"]),"未生效"===o.status||"生效中"===o.status?t(u.Button,{attrs:{type:"success",size:"small"},on:{click:function(){return e.onSendCoupon(o)}}},["发券"]):void 0])}}]}},created:function(){var e=this;this.$nextTick(function(){var t=v.a.parse(location.search?location.search.slice(1):""),a=t.page,o=t.id,r=t.name,i=t.status,n=t.startTime,s=t.endTime;e.filter.id=o||e.filter.id,e.filter.name=r?decodeURIComponent(r):e.filter.name,e.filter.status=i?parseInt(i):e.filter.status,e.filter.time=n&&s?[p()(n),p()(s)]:e.filter.time,e.page=a?parseInt(a):1,e.fetchData(e.filter,e.page)})},methods:{onToRecord:function(e){var t=e.id;location.href="send-record.html?"+v.a.stringify({id:t,param:{id:this.filter.id||void 0,name:this.filter.name||void 0,status:this.filter.status||void 0,startTime:this.filter.time[0]||void 0,endTime:this.filter.time[1]||void 0,page:this.page||void 0}})},onSendCoupon:function(e){var t=e.id,a=e.token;t&&a&&(location.href="send-coupon.html?"+v.a.stringify({id:t,token:a}))},onCreated:function(){this.fetchData(this.filter)},onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(e){this.fetchData(this.filter,e)},onCreateCoupon:function(){this.$refs.modalCreateCoupon.show()},onEditCoupon:function(e,t,a){var o=e.id;e.sendNum>0&&(t=!0),this.$refs.modalCreateCoupon.show(o,t,a)},onExport:function(){var e=this;return l()(n.a.mark(function t(){var a;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.$Loading.start(),t.next=3,b._get("/ufoPlatform/coupon/export",{param:{method:"coupon",param:b._2params(e.getParams(e.filter))}},{responseType:"blob"});case 3:a=t.sent,a instanceof Blob?(d.a.downloadBlob(a,"优惠券导出_"+p()().format("YYYY-MM-DD")+".xlsx"),e.$Loading.finish()):a&&(a.message&&e.$Message.warning(a.message),e.$Loading.error());case 5:case"end":return t.stop()}},t,e)}))()},fetchData:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return l()(n.a.mark(function o(){var i;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return t.page=a,t.$Loading.start(),o.next=4,b._get("/ufoPlatform/coupon/queryCoupons",r()({page:a},t.getParams(e)));case 4:i=o.sent,200===i.code?(t.total=i.data.total,t.data=i.data.coupons,t.$Loading.finish()):(i.message&&t.$Message.warning(i.message),t.$Loading.error());case 6:case"end":return o.stop()}},o,t)}))()},getParams:function(e){var t=e.time[0]?p()(e.time[0]).unix():void 0,a=e.time[1]?p()(e.time[1]).unix():void 0,o=parseInt(e.status)>=0?e.status:void 0,r=p()().unix();return{id:e.id,name:e.name,status:o,startTime:t,endTime:a,curTime:r}}},components:{ModalCreateCoupon:y.a}}},90:function(e,t,a){"use strict";var o=a(21),r=a.n(o),i=a(22),n=a.n(i),s=a(16),l=a(17),u=a.n(l),c=a(212),m=a.n(c),p=new s.a,d={"极速发货":"9-N","极速寄存":"9-Y","预售":"4","瑕疵":"5","二手":"6","海外直邮":"17","现货发货":"1-N","现货寄存":"1-Y","闪购发货":"3-N","闪购寄存":"3-Y"},f={"9-N":"极速发货","9-Y":"极速寄存",4:"预售",5:"瑕疵",6:"二手",17:"海外直邮","1-N":"现货发货","1-Y":"现货寄存","3-N":"闪购发货","3-Y":"闪购寄存"},v={UFO:"ufo","闲鱼":"h5/xianyu"},y={ufo:"UFO","h5/xianyu":"闲鱼"};t.a={components:{},name:"ModalCreateCoupon",data:function(){var e=this;return{readonly:!1,allreadonly:!1,visiable:!1,loading:!1,posting:!0,uploadTxt:"",couponToken:"",formData:{id:0,couponName:"",couponType:0,couponNum:0,useNum:1,couponAmount:0,useLimitType:0,remark:"",productLimitType:2,productLimitValue:"",useLimitValue:0,time:["",""],receiveTime:["",""],skupAllowTypeLabel:[],skupAllowType:"",businessClient:""},ruleValidate:{couponType:{required:!0,validator:function(e,t,a){0===t||"0"===t?a(new Error("请选择优惠券类型")):a()}},couponName:{required:!0,max:30,message:"请输入名称"},couponNum:{type:"number",required:!0,min:1,message:"请输入数量"},couponAmount:{type:"number",required:!0,min:1,message:"请输入优惠金额"},time:{required:!0,validator:function(e,t,a){t.some(function(e){return!e})?a(new Error("请选择使用期限")):a()}},receiveTime:{required:!0,validator:function(t,a,o){if(a.some(function(e){return!e}))o(new Error("请选择领券期限"));else{var r=e.formData.time[1]?u()(e.formData.time[1]).unix():void 0,i=a[1]?u()(a[1]).unix():void 0;console.log("====/"+r+"///===/"+i),r<i?o(new Error("请选择领券结束时间小于使用结束时间")):o()}}},remark:{required:!0,message:"请输入优惠券说明"},useLimitType:{required:!0,validator:function(t,a,o){a>=0?2===a?parseInt(e.formData.useLimitValue)>0?o():o(new Error("请输入限制金额")):o():o(new Error("请选择优惠条件"))}},productLimitValue:{required:!1,validator:function(e,t,a){var o=(t||"").split(",");t&&o.length?o.some(function(e){return!!e&&!parseInt(e)})?a(new Error("适用范围格式错误")):a():a(new Error("请输入适用范围"))}},productLimitType:{required:!0,validator:function(e,t,a){1===t||2===t||3===t?a():a(new Error("请选择类型"))}}}}},methods:{show:function(e,t,a){var o=this;return n()(r.a.mark(function i(){var n,s,l,c,m,d,v,b,h,k;return r.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(console.log(e),o.readonly=t,o.allreadonly=a,o.posting=o.visiable=!0,o.$refs.formCoupon.resetFields(),o.couponToken="",n={id:0,couponName:"",couponNum:0,couponType:0,useNum:1,couponAmount:0,useLimitType:0,remark:"",productLimitValue:"",productLimitType:2,useLimitValue:0,time:["",""],skupAllowTypeLabel:[],skupAllowType:"",businessClientLabel:[],businessClient:""},!e){r.next=14;break}return o.loading=!0,r.next=11,p._get("/ufoPlatform/coupon/getCouponInfo",{id:e});case 11:if(s=r.sent,o.loading=!1,200===s.code){if(l=s.data.coupon,c=s.data.productLimits,o.couponToken=l.couponToken,m=[],l.skupAllowType)for(d=l.skupAllowType.split(","),v=0;v<d.length;v++)m.push(f[d[v]]);if(b=[],l.businessClient)for(h=l.businessClient.split(","),k=0;k<h.length;k++)b.push(y[h[k]]);n={id:e,couponName:l.couponName,couponNum:l.couponNum,couponType:l.couponType||0,useNum:l.useNum,couponAmount:l.couponAmount,useLimitType:l.useLimitType,remark:l.remark,productLimitType:l.productLimitType,productLimitValue:(c||[]).map(function(e){return e.productId}).join(","),useLimitValue:l.useLimitValue,time:[u.a.unix(l.startTime).format("YYYY-MM-DD HH:mm:ss"),u.a.unix(l.endTime).format("YYYY-MM-DD HH:mm:ss")],receiveTime:[u.a.unix(l.receiveStartTime).format("YYYY-MM-DD HH:mm:ss"),u.a.unix(l.receiveEndTime).format("YYYY-MM-DD HH:mm:ss")],skupAllowTypeLabel:m,skupAllowType:l.skupAllowType,businessClientLabel:b,businessClient:l.businessClient}}else s.message&&o.$Message.warning(s.message);case 14:o.formData=n;case 15:case"end":return r.stop()}},i,o)}))()},onOk:function(){var e=this;this.$refs.formCoupon.validate(function(t){t?e.saveData(e.formData):(e.posting=!1,e.$nextTick(function(){e.posting=!0}))})},getCheckBox:function(){for(var e=[],t=0;t<this.formData.skupAllowTypeLabel.length;t++){var a=this.formData.skupAllowTypeLabel[t];console.log(a),e.push(d[a])}console.log(e),this.formData.skupAllowType=e.join(",")},getChannelCheckBox:function(){for(var e=[],t=0;t<this.formData.businessClientLabel.length;t++){var a=this.formData.businessClientLabel[t];console.log(a),e.push(v[a])}console.log(e),this.formData.businessClient=e.join(",")},saveData:function(e){var t=this;return n()(r.a.mark(function a(){var o;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!t.allreadonly){a.next=3;break}return t.visiable=!1,a.abrupt("return");case 3:return a.next=5,p._post("/ufoPlatform/coupon/saveOrUpdateCoupon",{id:e.id||void 0,couponName:e.couponName,couponAmount:e.couponAmount,couponNum:e.couponNum,couponType:e.couponType,useNum:e.useNum,useLimitValue:e.useLimitValue,productLimitType:e.productLimitType,productLimitValue:e.productLimitValue,remark:e.remark,useLimitType:parseInt(e.useLimitType)>=0?e.useLimitType:void 0,startTime:e.time[0]?u()(e.time[0]).unix():void 0,endTime:e.time[1]?u()(e.time[1]).unix():void 0,skupAllowType:e.skupAllowType,businessClient:e.businessClient,receiveStartTime:e.receiveTime[0]?u()(e.receiveTime[0]).unix():void 0,receiveEndTime:e.receiveTime[1]?u()(e.receiveTime[1]).unix():void 0});case 5:o=a.sent,console.log("result=",o),200===o.code?(t.$Message.success("保存成功"),t.visiable=!1,t.$emit("on-created")):(o.message&&t.$Message.warning(o.message),t.posting=!1,t.$nextTick(function(){t.posting=!0}));case 8:case"end":return a.stop()}},a,t)}))()},onBeforeUpload:function(e){var t=this,a=e.name.split(".").pop().toLocaleLowerCase();if(console.log(a),"xlsx"!==a)return this.$Message.warning("文件格式错误"),!1;if(e.size>1048576)return this.$Message.warning("文件大小超过1M"),!1;var o=new FileReader;return o.readAsArrayBuffer(e),o.onloadstart=function(){t.uploadTxt="开始读取"},o.onprogress=function(e){t.uploadTxt="进度:"+Math.round(e.loaded/e.total*100)+"..."},o.onerror=function(){t.uploadTxt="文件读取出错"},o.onload=function(e){t.uploadTxt="";try{var a=e.target.result,o=m.a.read(a,{type:"array"}),r=o.SheetNames[0],i=o.Sheets[r],n=m.a.utils.sheet_to_json(i);t.formData.productLimitValue=n.map(function(e){return e["商品编码"]}).filter(function(e){return e}).join(",")}catch(e){t.uploadTxt="文件解析失败,请按照格式上传"}},!1},onExample:function(){var e=m.a.utils.book_new(),t=m.a.utils.json_to_sheet([{"商品编码":"123456"}]);m.a.utils.book_append_sheet(e,t,"优惠券适用范围示例"),m.a.writeFile(e,"优惠券适用范围示例.xlsx")}}}}},[139]);
\ No newline at end of file
webpackJsonp([1],{10:function(t,e){t.exports=Vue},137:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a(138),r=a(15);Object(r.a)(o.a)},138:function(t,e,a){"use strict";function o(t){i||a(139)}var r=a(62),n=a(212),i=!1,s=a(0),l=o,u=s(r.a,n.a,!1,l,null,null);u.options.__file="src/views/coupon/index.vue",e.a=u.exports},139:function(t,e){},208:function(t,e,a){"use strict";function o(t){i||a(209)}var r=a(90),n=a(211),i=!1,s=a(0),l=o,u=s(r.a,n.a,!1,l,"data-v-35ed785d",null);u.options.__file="src/views/coupon/components/modal-create-coupon.vue",e.a=u.exports},209:function(t,e){},210:function(t,e){t.exports=XLSX},211:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("Modal",{attrs:{loading:t.posting,title:t.allreadonly?"查看优惠券":"创建/编辑优惠券",width:"600"},on:{"on-ok":t.onOk},model:{value:t.visiable,callback:function(e){t.visiable=e},expression:"visiable"}},[t.loading?a("Spin"):a("Form",{ref:"formCoupon",attrs:{rules:t.ruleValidate,model:t.formData,"label-width":80}},[a("FormItem",{staticClass:"form-group",attrs:{label:"优惠券类型"}}),t._v(" "),a("FormItem",{attrs:{label:"优惠券类型",prop:"couponType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:t.readonly},model:{value:t.formData.couponType,callback:function(e){t.$set(t.formData,"couponType",e)},expression:"formData.couponType"}},[a("Option",{attrs:{value:0}},[t._v("请选择")]),t._v(" "),a("Option",{attrs:{value:100}},[t._v("活动券")]),t._v(" "),a("Option",{attrs:{value:110}},[t._v("运费券")])],1)],1),t._v(" "),a("FormItem",{staticClass:"form-group",attrs:{label:"基本信息"}}),t._v(" "),t.couponToken?a("FormItem",{attrs:{label:"Token"}},[t._v("\n "+t._s(t.couponToken)+"\n ")]):t._e(),t._v(" "),a("FormItem",{attrs:{label:"名称",prop:"couponName"}},[a("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"名称建议30字以内",disabled:t.allreadonly},model:{value:t.formData.couponName,callback:function(e){t.$set(t.formData,"couponName",e)},expression:"formData.couponName"}})],1),t._v(" "),a("FormItem",{attrs:{label:"数量",prop:"couponNum"}},[a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"数量",disabled:t.allreadonly},model:{value:t.formData.couponNum,callback:function(e){t.$set(t.formData,"couponNum",e)},expression:"formData.couponNum"}})],1),t._v(" "),a("FormItem",{attrs:{label:"使用次数",prop:"useNum"}},[a("Input",{staticStyle:{width:"100px"},attrs:{placeholder:"使用次数",disabled:""},model:{value:t.formData.useNum,callback:function(e){t.$set(t.formData,"useNum",e)},expression:"formData.useNum"}})],1),t._v(" "),a("FormItem",{attrs:{label:"使用期限",prop:"time"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",disabled:t.readonly,placeholder:"使用期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:t.formData.time,callback:function(e){t.$set(t.formData,"time",e)},expression:"formData.time"}})],1),t._v(" "),a("FormItem",{attrs:{label:"优惠券说明",prop:"remark"}},[a("Input",{attrs:{type:"textarea",placeholder:"优惠券使用条件简介",disabled:t.allreadonly},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1),t._v(" "),a("FormItem",{staticClass:"form-group",attrs:{label:"使用条件"}}),t._v(" "),a("FormItem",{staticStyle:{display:"inline-block",width:"100%"},attrs:{label:"优惠条件",prop:"useLimitType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:t.readonly},model:{value:t.formData.useLimitType,callback:function(e){t.$set(t.formData,"useLimitType",e)},expression:"formData.useLimitType"}},[a("Option",{attrs:{value:0}},[t._v("无限制")]),t._v(" "),a("Option",{attrs:{value:2}},[t._v("金额")])],1),t._v(" "),2===t.formData.useLimitType?a("div",{staticStyle:{display:"inline-block"}},[t._v("\n  \n 金额满:\n "),a("InputNumber",{staticStyle:{width:"100px"},attrs:{disabled:t.readonly,placeholder:"限制金额"},model:{value:t.formData.useLimitValue,callback:function(e){t.$set(t.formData,"useLimitValue",e)},expression:"formData.useLimitValue"}})],1):t._e()],1),t._v(" "),a("FormItem",{attrs:{label:"优惠金额",prop:"couponAmount"}},[a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"优惠金额",disabled:t.readonly},model:{value:t.formData.couponAmount,callback:function(e){t.$set(t.formData,"couponAmount",e)},expression:"formData.couponAmount"}})],1),t._v(" "),a("FormItem",{attrs:{label:"适用范围",prop:"productLimitType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:t.readonly},model:{value:t.formData.productLimitType,callback:function(e){t.$set(t.formData,"productLimitType",e)},expression:"formData.productLimitType"}},[a("Option",{attrs:{value:1}},[t._v("指定商品")]),t._v(" "),a("Option",{attrs:{value:2}},[t._v("全部商品")]),t._v(" "),a("Option",{attrs:{value:3}},[t._v("排除商品")])],1)],1),t._v(" "),1===t.formData.productLimitType||3===t.formData.productLimitType?a("FormItem",{attrs:{prop:"productLimitValue"}},[a("Input",{attrs:{type:"textarea",disabled:t.readonly,placeholder:"填写商品编码,多个商品编码用英文逗号分隔"},model:{value:t.formData.productLimitValue,callback:function(e){t.$set(t.formData,"productLimitValue",e)},expression:"formData.productLimitValue"}}),t._v(" "),a("Poptip",{attrs:{trigger:"hover"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("p",[t._v("1.上传文件必须是xlsx文件")]),t._v(" "),a("p",[t._v("2.第一行标题栏:商品编码")]),t._v(" "),a("p",[t._v("3."),a("a",{attrs:{href:"javascript:;"},on:{click:t.onExample}},[t._v("下载样例")])])]),t._v(" "),a("Upload",{attrs:{action:"",format:["xlsx"],"max-size":1024,"before-upload":t.onBeforeUpload}},[a("Button",{attrs:{type:"success",size:"small",disabled:t.readonly}},[t._v("导入")]),t._v(" "),a("p",[t._v(t._s(t.uploadTxt))])],1)],1)],1):t._e(),t._v(" "),a("FormItem",{attrs:{label:"可用商品类型"}},[a("checkbox-group",{on:{"on-change":t.getCheckBox},model:{value:t.formData.skupAllowTypeLabel,callback:function(e){t.$set(t.formData,"skupAllowTypeLabel",e)},expression:"formData.skupAllowTypeLabel"}},[a("checkbox",{attrs:{label:"极速发货",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"极速寄存",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"预售",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"瑕疵",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"二手",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"海外直邮",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"现货发货",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"现货寄存",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"闪购发货",disabled:t.readonly}}),t._v(" "),a("checkbox",{attrs:{label:"闪购寄存",disabled:t.readonly}})],1)],1)],1)],1)},r=[];o._withStripped=!0;var n={render:o,staticRenderFns:r};e.a=n},212:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("LayoutContent",{attrs:{breads:[{title:"优惠券列表"}]}},[a("LayoutFilter",{on:{"on-filter":t.onFilter,"on-clear":t.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:t.filter}},[a("FormItem",{attrs:{prop:"id"}},[a("Input",{attrs:{placeholder:"输入ID"},model:{value:t.filter.id,callback:function(e){t.$set(t.filter,"id",e)},expression:"filter.id"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"name"}},[a("Input",{attrs:{placeholder:"输入券名称"},model:{value:t.filter.name,callback:function(e){t.$set(t.filter,"name",e)},expression:"filter.name"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"status"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:t.filter.status,callback:function(e){t.$set(t.filter,"status",e)},expression:"filter.status"}},[a("Option",{attrs:{value:0}},[t._v("未生效")]),t._v(" "),a("Option",{attrs:{value:1}},[t._v("生效中")]),t._v(" "),a("Option",{attrs:{value:2}},[t._v("已过期")]),t._v(" "),a("Option",{attrs:{value:3}},[t._v("已作废")])],1)],1),t._v(" "),a("FormItem",{attrs:{prop:"time"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",placeholder:"开始-结束时间",format:"yyyy-MM-dd HH:mm"},model:{value:t.filter.time,callback:function(e){t.$set(t.filter,"time",e)},expression:"filter.time"}})],1)],1)],1),t._v(" "),a("LayoutTools",[a("Button",{attrs:{type:"success",icon:"md-add"},on:{click:t.onCreateCoupon}},[t._v("新增优惠券")])],1),t._v(" "),a("LayoutTable",{attrs:{page:t.page,total:t.total,columns:t.columns,data:t.data},on:{"on-page-change":t.onPageChange}},[a("template",{staticClass:"btns",slot:"footer"},[a("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:t.onExport}},[t._v("导出")])],1)],2),t._v(" "),a("ModalCreateCoupon",{ref:"modalCreateCoupon",on:{"on-created":t.onCreated}})],1)},r=[];o._withStripped=!0;var n={render:o,staticRenderFns:r};e.a=n},5:function(t,e){t.exports=iview},62:function(t,e,a){"use strict";var o=a(12),r=a.n(o),n=a(24),i=a.n(n),s=a(25),l=a.n(s),u=a(5),p=(a.n(u),a(19)),c=a(20),m=a.n(c),d=a(44),f=a(27),v=a.n(f),y=a(208),h=new p.a;e.a={name:"CouponPage",data:function(){var t=this;this.$createElement;return{filter:{id:"",name:"",status:"",time:["",""]},page:1,total:0,data:[],columns:[{title:"ID",key:"id",width:80},{title:"券名称",key:"name",width:180},{title:"token",key:"token",width:180},{title:"数量",key:"couponNum",width:90},{title:"已发放",key:"sendNum",width:90},{title:"已使用",key:"useNum",width:90},{title:"使用期限",key:"useTime",width:165},{title:"优惠券说明",key:"remark",align:"center",width:150},{title:"状态",align:"center",key:"status"},{title:"操作",align:"center",width:200,render:function(e,a){var o=a.row;return e("div",[e(u.Button,{attrs:{type:"success",size:"small"},on:{click:function(){return t.onEditCoupon(o,!0,!0)}}},["查看详情"]),"未生效"===o.status||"生效中"===o.status?e(u.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return t.onEditCoupon(o)}}},["修改"]):void 0,e(u.Button,{attrs:{type:"warning",size:"small"},on:{click:function(){return t.onToRecord(o)}}},["发放记录"]),"未生效"===o.status||"生效中"===o.status?e(u.Button,{attrs:{type:"success",size:"small"},on:{click:function(){return t.onSendCoupon(o)}}},["发券"]):void 0])}}]}},created:function(){var t=this;this.$nextTick(function(){var e=v.a.parse(location.search?location.search.slice(1):""),a=e.page,o=e.id,r=e.name,n=e.status,i=e.startTime,s=e.endTime;t.filter.id=o||t.filter.id,t.filter.name=r?decodeURIComponent(r):t.filter.name,t.filter.status=n?parseInt(n):t.filter.status,t.filter.time=i&&s?[m()(i),m()(s)]:t.filter.time,t.page=a?parseInt(a):1,t.fetchData(t.filter,t.page)})},methods:{onToRecord:function(t){var e=t.id;location.href="send-record.html?"+v.a.stringify({id:e,param:{id:this.filter.id||void 0,name:this.filter.name||void 0,status:this.filter.status||void 0,startTime:this.filter.time[0]||void 0,endTime:this.filter.time[1]||void 0,page:this.page||void 0}})},onSendCoupon:function(t){var e=t.id,a=t.token;e&&a&&(location.href="send-coupon.html?"+v.a.stringify({id:e,token:a}))},onCreated:function(){this.fetchData(this.filter)},onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(t){this.fetchData(this.filter,t)},onCreateCoupon:function(){this.$refs.modalCreateCoupon.show()},onEditCoupon:function(t,e,a){var o=t.id;t.sendNum>0&&(e=!0),this.$refs.modalCreateCoupon.show(o,e,a)},onExport:function(){var t=this;return l()(i.a.mark(function e(){var a;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,h._get("/ufoPlatform/coupon/export",{param:{method:"coupon",param:h._2params(t.getParams(t.filter))}},{responseType:"blob"});case 3:a=e.sent,a instanceof Blob?(d.a.downloadBlob(a,"优惠券导出_"+m()().format("YYYY-MM-DD")+".xlsx"),t.$Loading.finish()):a&&(a.message&&t.$Message.warning(a.message),t.$Loading.error());case 5:case"end":return e.stop()}},e,t)}))()},fetchData:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return l()(i.a.mark(function o(){var n;return i.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return e.page=a,e.$Loading.start(),o.next=4,h._get("/ufoPlatform/coupon/queryCoupons",r()({page:a},e.getParams(t)));case 4:n=o.sent,200===n.code?(e.total=n.data.total,e.data=n.data.coupons,e.$Loading.finish()):(n.message&&e.$Message.warning(n.message),e.$Loading.error());case 6:case"end":return o.stop()}},o,e)}))()},getParams:function(t){var e=t.time[0]?m()(t.time[0]).unix():void 0,a=t.time[1]?m()(t.time[1]).unix():void 0,o=parseInt(t.status)>=0?t.status:void 0,r=m()().unix();return{id:t.id,name:t.name,status:o,startTime:e,endTime:a,curTime:r}}},components:{ModalCreateCoupon:y.a}}},90:function(t,e,a){"use strict";var o=a(24),r=a.n(o),n=a(25),i=a.n(n),s=a(19),l=a(20),u=a.n(l),p=a(210),c=a.n(p),m=new s.a,d={"极速发货":"9-N","极速寄存":"9-Y","预售":"4","瑕疵":"5","二手":"6","海外直邮":"17","现货发货":"1-N","现货寄存":"1-Y","闪购发货":"3-N","闪购寄存":"3-Y"},f={"9-N":"极速发货","9-Y":"极速寄存",4:"预售",5:"瑕疵",6:"二手",17:"海外直邮","1-N":"现货发货","1-Y":"现货寄存","3-N":"闪购发货","3-Y":"闪购寄存"};e.a={components:{},name:"ModalCreateCoupon",data:function(){var t=this;return{readonly:!1,allreadonly:!1,visiable:!1,loading:!1,posting:!0,uploadTxt:"",couponToken:"",formData:{id:0,couponName:"",couponType:0,couponNum:0,useNum:1,couponAmount:0,useLimitType:0,remark:"",productLimitType:2,productLimitValue:"",useLimitValue:0,time:["",""],skupAllowTypeLabel:[],skupAllowType:""},ruleValidate:{couponType:{required:!0,validator:function(t,e,a){0===e||"0"===e?a(new Error("请选择优惠券类型")):a()}},couponName:{required:!0,max:30,message:"请输入名称"},couponNum:{type:"number",required:!0,min:1,message:"请输入数量"},couponAmount:{type:"number",required:!0,min:1,message:"请输入优惠金额"},time:{required:!0,validator:function(t,e,a){e.some(function(t){return!t})?a(new Error("请选择使用期限")):a()}},remark:{required:!0,message:"请输入优惠券说明"},useLimitType:{required:!0,validator:function(e,a,o){a>=0?2===a?parseInt(t.formData.useLimitValue)>0?o():o(new Error("请输入限制金额")):o():o(new Error("请选择优惠条件"))}},productLimitValue:{required:!1,validator:function(t,e,a){var o=(e||"").split(",");e&&o.length?o.some(function(t){return!!t&&!parseInt(t)})?a(new Error("适用范围格式错误")):a():a(new Error("请输入适用范围"))}},productLimitType:{required:!0,validator:function(t,e,a){1===e||2===e||3===e?a():a(new Error("请选择类型"))}}}}},methods:{show:function(t,e,a){var o=this;return i()(r.a.mark(function n(){var i,s,l,p,c,d,v;return r.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(o.readonly=e,o.allreadonly=a,o.posting=o.visiable=!0,o.$refs.formCoupon.resetFields(),o.couponToken="",i={id:0,couponName:"",couponNum:0,couponType:0,useNum:1,couponAmount:0,useLimitType:0,remark:"",productLimitValue:"",productLimitType:2,useLimitValue:0,time:["",""],skupAllowTypeLabel:[],skupAllowType:""},!t){r.next=13;break}return o.loading=!0,r.next=10,m._get("/ufoPlatform/coupon/getCouponInfo",{id:t});case 10:if(s=r.sent,o.loading=!1,200===s.code){if(l=s.data.coupon,p=s.data.productLimits,o.couponToken=l.couponToken,c=[],l.skupAllowType)for(d=l.skupAllowType.split(","),v=0;v<d.length;v++)c.push(f[d[v]]);i={id:t,couponName:l.couponName,couponNum:l.couponNum,couponType:l.couponType||0,useNum:l.useNum,couponAmount:l.couponAmount,useLimitType:l.useLimitType,remark:l.remark,productLimitType:l.productLimitType,productLimitValue:(p||[]).map(function(t){return t.productId}).join(","),useLimitValue:l.useLimitValue,time:[u.a.unix(l.startTime).format("YYYY-MM-DD HH:mm:ss"),u.a.unix(l.endTime).format("YYYY-MM-DD HH:mm:ss")],skupAllowTypeLabel:c,skupAllowType:l.skupAllowType}}else s.message&&o.$Message.warning(s.message);case 13:o.formData=i;case 14:case"end":return r.stop()}},n,o)}))()},onOk:function(){var t=this;this.$refs.formCoupon.validate(function(e){e?t.saveData(t.formData):(t.posting=!1,t.$nextTick(function(){t.posting=!0}))})},getCheckBox:function(){for(var t=[],e=0;e<this.formData.skupAllowTypeLabel.length;e++){var a=this.formData.skupAllowTypeLabel[e];t.push(d[a])}console.log(t),this.formData.skupAllowType=t.join(",")},saveData:function(t){var e=this;return i()(r.a.mark(function a(){var o;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!e.allreadonly){a.next=3;break}return e.visiable=!1,a.abrupt("return");case 3:return a.next=5,m._post("/ufoPlatform/coupon/saveOrUpdateCoupon",{id:t.id||void 0,couponName:t.couponName,couponAmount:t.couponAmount,couponNum:t.couponNum,couponType:t.couponType,useNum:t.useNum,useLimitValue:t.useLimitValue,productLimitType:t.productLimitType,productLimitValue:t.productLimitValue,remark:t.remark,useLimitType:parseInt(t.useLimitType)>=0?t.useLimitType:void 0,startTime:t.time[0]?u()(t.time[0]).unix():void 0,endTime:t.time[1]?u()(t.time[1]).unix():void 0,skupAllowType:t.skupAllowType});case 5:o=a.sent,console.log("result=",o),200===o.code?(e.$Message.success("保存成功"),e.visiable=!1,e.$emit("on-created")):(o.message&&e.$Message.warning(o.message),e.posting=!1,e.$nextTick(function(){e.posting=!0}));case 8:case"end":return a.stop()}},a,e)}))()},onBeforeUpload:function(t){var e=this;if("XLSX"!==t.name.split(".").pop().toLocaleLowerCase())return this.$Message.warning("文件格式错误"),!1;if(t.size>1048576)return this.$Message.warning("文件大小超过1M"),!1;var a=new FileReader;return a.readAsArrayBuffer(t),a.onloadstart=function(){e.uploadTxt="开始读取"},a.onprogress=function(t){e.uploadTxt="进度:"+Math.round(t.loaded/t.total*100)+"..."},a.onerror=function(){e.uploadTxt="文件读取出错"},a.onload=function(t){e.uploadTxt="";try{var a=t.target.result,o=c.a.read(a,{type:"array"}),r=o.SheetNames[0],n=o.Sheets[r],i=c.a.utils.sheet_to_json(n);e.formData.productLimitValue=i.map(function(t){return t["商品编码"]}).filter(function(t){return t}).join(",")}catch(t){e.uploadTxt="文件解析失败,请按照格式上传"}},!1},onExample:function(){var t=c.a.utils.book_new(),e=c.a.utils.json_to_sheet([{"商品编码":"123456"}]);c.a.utils.book_append_sheet(t,e,"优惠券适用范围示例"),c.a.writeFile(t,"优惠券适用范围示例.xlsx")}}}}},[137]);
\ No newline at end of file
webpackJsonp([1],{10:function(e,t){e.exports=Vue},139:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(140),r=a(18);Object(r.a)(o.a)},140:function(e,t,a){"use strict";function o(e){n||a(141)}var r=a(63),i=a(214),n=!1,s=a(0),l=o,u=s(r.a,i.a,!1,l,null,null);u.options.__file="src/views/coupon/index.vue",t.a=u.exports},141:function(e,t){},210:function(e,t,a){"use strict";function o(e){n||a(211)}var r=a(91),i=a(213),n=!1,s=a(0),l=o,u=s(r.a,i.a,!1,l,"data-v-35ed785d",null);u.options.__file="src/views/coupon/components/modal-create-coupon.vue",t.a=u.exports},211:function(e,t){},212:function(e,t){e.exports=XLSX},213:function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Modal",{attrs:{loading:e.posting,title:e.allreadonly?"查看优惠券":"创建/编辑优惠券",width:"600"},on:{"on-ok":e.onOk},model:{value:e.visiable,callback:function(t){e.visiable=t},expression:"visiable"}},[e.loading?a("Spin"):a("Form",{ref:"formCoupon",attrs:{rules:e.ruleValidate,model:e.formData,"label-width":80}},[a("FormItem",{staticClass:"form-group",attrs:{label:"优惠券类型"}}),e._v(" "),a("FormItem",{attrs:{label:"优惠券类型",prop:"couponType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.couponType,callback:function(t){e.$set(e.formData,"couponType",t)},expression:"formData.couponType"}},[a("Option",{attrs:{value:0}},[e._v("请选择")]),e._v(" "),a("Option",{attrs:{value:100}},[e._v("活动券")]),e._v(" "),a("Option",{attrs:{value:110}},[e._v("运费券")])],1)],1),e._v(" "),a("FormItem",{staticClass:"form-group",attrs:{label:"基本信息"}}),e._v(" "),e.couponToken?a("FormItem",{attrs:{label:"Token"}},[e._v("\n "+e._s(e.couponToken)+"\n ")]):e._e(),e._v(" "),a("FormItem",{attrs:{label:"名称",prop:"couponName"}},[a("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"名称建议30字以内",disabled:e.allreadonly},model:{value:e.formData.couponName,callback:function(t){e.$set(e.formData,"couponName",t)},expression:"formData.couponName"}})],1),e._v(" "),a("FormItem",{attrs:{label:"数量",prop:"couponNum"}},[a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"数量",disabled:e.allreadonly},model:{value:e.formData.couponNum,callback:function(t){e.$set(e.formData,"couponNum",t)},expression:"formData.couponNum"}})],1),e._v(" "),a("FormItem",{attrs:{label:"使用次数",prop:"useNum"}},[a("Input",{staticStyle:{width:"100px"},attrs:{placeholder:"使用次数",disabled:""},model:{value:e.formData.useNum,callback:function(t){e.$set(e.formData,"useNum",t)},expression:"formData.useNum"}})],1),e._v(" "),a("FormItem",{attrs:{label:"使用期限",prop:"time"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",disabled:e.allreadonly,placeholder:"使用期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.time,callback:function(t){e.$set(e.formData,"time",t)},expression:"formData.time"}})],1),e._v(" "),a("FormItem",{attrs:{label:"领券期限",prop:"receiveTime"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",disabled:e.readonly,placeholder:"领券期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.receiveTime,callback:function(t){e.$set(e.formData,"receiveTime",t)},expression:"formData.receiveTime"}})],1),e._v(" "),a("FormItem",{attrs:{label:"优惠券说明",prop:"remark"}},[a("Input",{attrs:{type:"textarea",placeholder:"优惠券使用条件简介",disabled:e.allreadonly},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1),e._v(" "),a("FormItem",{staticClass:"form-group",attrs:{label:"使用条件"}}),e._v(" "),a("FormItem",{staticStyle:{display:"inline-block",width:"100%"},attrs:{label:"优惠条件",prop:"useLimitType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.useLimitType,callback:function(t){e.$set(e.formData,"useLimitType",t)},expression:"formData.useLimitType"}},[a("Option",{attrs:{value:0}},[e._v("无限制")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("金额")])],1),e._v(" "),2===e.formData.useLimitType?a("div",{staticStyle:{display:"inline-block"}},[e._v("\n  \n 金额满:\n "),a("InputNumber",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly,placeholder:"限制金额"},model:{value:e.formData.useLimitValue,callback:function(t){e.$set(e.formData,"useLimitValue",t)},expression:"formData.useLimitValue"}})],1):e._e()],1),e._v(" "),a("FormItem",{attrs:{label:"优惠金额",prop:"couponAmount"}},[a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"优惠金额",disabled:e.readonly},model:{value:e.formData.couponAmount,callback:function(t){e.$set(e.formData,"couponAmount",t)},expression:"formData.couponAmount"}})],1),e._v(" "),a("FormItem",{attrs:{label:"适用范围",prop:"productLimitType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.productLimitType,callback:function(t){e.$set(e.formData,"productLimitType",t)},expression:"formData.productLimitType"}},[a("Option",{attrs:{value:1}},[e._v("指定商品")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("全部商品")]),e._v(" "),a("Option",{attrs:{value:3}},[e._v("排除商品")])],1)],1),e._v(" "),1===e.formData.productLimitType||3===e.formData.productLimitType?a("FormItem",{attrs:{prop:"productLimitValue"}},[a("Input",{attrs:{type:"textarea",disabled:e.readonly,placeholder:"填写商品编码,多个商品编码用英文逗号分隔"},model:{value:e.formData.productLimitValue,callback:function(t){e.$set(e.formData,"productLimitValue",t)},expression:"formData.productLimitValue"}}),e._v(" "),a("Poptip",{attrs:{trigger:"hover"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("p",[e._v("1.上传文件必须是xlsx文件")]),e._v(" "),a("p",[e._v("2.第一行标题栏:商品编码")]),e._v(" "),a("p",[e._v("3."),a("a",{attrs:{href:"javascript:;"},on:{click:e.onExample}},[e._v("下载样例")])])]),e._v(" "),a("Upload",{attrs:{action:"",format:["xlsx"],"max-size":1024,"before-upload":e.onBeforeUpload}},[a("Button",{attrs:{type:"success",size:"small",disabled:e.readonly}},[e._v("导入")]),e._v(" "),a("p",[e._v(e._s(e.uploadTxt))])],1)],1)],1):e._e(),e._v(" "),a("FormItem",{attrs:{label:"可用商品类型"}},[a("checkbox-group",{on:{"on-change":e.getCheckBox},model:{value:e.formData.skupAllowTypeLabel,callback:function(t){e.$set(e.formData,"skupAllowTypeLabel",t)},expression:"formData.skupAllowTypeLabel"}},[a("checkbox",{attrs:{label:"极速发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"极速寄存",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"预售",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"瑕疵",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"二手",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"海外直邮",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"现货发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"现货寄存",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闪购发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闪购寄存",disabled:e.readonly}})],1)],1),e._v(" "),a("FormItem",{attrs:{label:"购买渠道",prop:"useLimitType"}},[a("checkbox-group",{on:{"on-change":e.getChannelCheckBox},model:{value:e.formData.businessClientLabel,callback:function(t){e.$set(e.formData,"businessClientLabel",t)},expression:"formData.businessClientLabel"}},[a("checkbox",{attrs:{label:"UFO",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闲鱼",disabled:e.readonly}})],1)],1)],1)],1)},r=[];o._withStripped=!0;var i={render:o,staticRenderFns:r};t.a=i},214:function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("LayoutContent",{attrs:{breads:[{title:"优惠券列表"}]}},[a("LayoutFilter",{on:{"on-filter":e.onFilter,"on-clear":e.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:e.filter}},[a("FormItem",{attrs:{prop:"id"}},[a("Input",{attrs:{placeholder:"输入ID"},model:{value:e.filter.id,callback:function(t){e.$set(e.filter,"id",t)},expression:"filter.id"}})],1),e._v(" "),a("FormItem",{attrs:{prop:"name"}},[a("Input",{attrs:{placeholder:"输入券名称"},model:{value:e.filter.name,callback:function(t){e.$set(e.filter,"name",t)},expression:"filter.name"}})],1),e._v(" "),a("FormItem",{attrs:{prop:"status"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:e.filter.status,callback:function(t){e.$set(e.filter,"status",t)},expression:"filter.status"}},[a("Option",{attrs:{value:0}},[e._v("未生效")]),e._v(" "),a("Option",{attrs:{value:1}},[e._v("生效中")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("已过期")]),e._v(" "),a("Option",{attrs:{value:3}},[e._v("已作废")])],1)],1),e._v(" "),a("FormItem",{attrs:{prop:"time"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",placeholder:"开始-结束时间",format:"yyyy-MM-dd HH:mm"},model:{value:e.filter.time,callback:function(t){e.$set(e.filter,"time",t)},expression:"filter.time"}})],1)],1)],1),e._v(" "),a("LayoutTools",[a("Button",{attrs:{type:"success",icon:"md-add"},on:{click:e.onCreateCoupon}},[e._v("新增优惠券")])],1),e._v(" "),a("LayoutTable",{attrs:{page:e.page,total:e.total,columns:e.columns,data:e.data},on:{"on-page-change":e.onPageChange}},[a("template",{staticClass:"btns",slot:"footer"},[a("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:e.onExport}},[e._v("导出")])],1)],2),e._v(" "),a("ModalCreateCoupon",{ref:"modalCreateCoupon",on:{"on-created":e.onCreated}})],1)},r=[];o._withStripped=!0;var i={render:o,staticRenderFns:r};t.a=i},5:function(e,t){e.exports=iview},63:function(e,t,a){"use strict";var o=a(13),r=a.n(o),i=a(21),n=a.n(i),s=a(22),l=a.n(s),u=a(5),c=(a.n(u),a(16)),m=a(17),p=a.n(m),d=a(44),f=a(27),v=a.n(f),y=a(210),b=new c.a;t.a={name:"CouponPage",data:function(){var e=this;this.$createElement;return{filter:{id:"",name:"",status:"",time:["",""]},page:1,total:0,data:[],columns:[{title:"ID",key:"id",width:80},{title:"券名称",key:"name",width:180},{title:"token",key:"token",width:180},{title:"数量",key:"couponNum",width:90},{title:"已发放",key:"sendNum",width:90},{title:"已使用",key:"useNum",width:90},{title:"使用期限",key:"useTime",width:165},{title:"优惠券说明",key:"remark",align:"center",width:150},{title:"状态",align:"center",key:"status"},{title:"操作",align:"center",width:200,render:function(t,a){var o=a.row;return t("div",[t(u.Button,{attrs:{type:"success",size:"small"},on:{click:function(){return e.onEditCoupon(o,!0,!0)}}},["查看详情"]),"未生效"===o.status||"生效中"===o.status?t(u.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return e.onEditCoupon(o)}}},["修改"]):void 0,t(u.Button,{attrs:{type:"warning",size:"small"},on:{click:function(){return e.onToRecord(o)}}},["发放记录"]),"未生效"===o.status||"生效中"===o.status?t(u.Button,{attrs:{type:"success",size:"small"},on:{click:function(){return e.onSendCoupon(o)}}},["发券"]):void 0])}}]}},created:function(){var e=this;this.$nextTick(function(){var t=v.a.parse(location.search?location.search.slice(1):""),a=t.page,o=t.id,r=t.name,i=t.status,n=t.startTime,s=t.endTime;e.filter.id=o||e.filter.id,e.filter.name=r?decodeURIComponent(r):e.filter.name,e.filter.status=i?parseInt(i):e.filter.status,e.filter.time=n&&s?[p()(n),p()(s)]:e.filter.time,e.page=a?parseInt(a):1,e.fetchData(e.filter,e.page)})},methods:{onToRecord:function(e){var t=e.id;location.href="send-record.html?"+v.a.stringify({id:t,param:{id:this.filter.id||void 0,name:this.filter.name||void 0,status:this.filter.status||void 0,startTime:this.filter.time[0]||void 0,endTime:this.filter.time[1]||void 0,page:this.page||void 0}})},onSendCoupon:function(e){var t=e.id,a=e.token;t&&a&&(location.href="send-coupon.html?"+v.a.stringify({id:t,token:a}))},onCreated:function(){this.fetchData(this.filter)},onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(e){this.fetchData(this.filter,e)},onCreateCoupon:function(){this.$refs.modalCreateCoupon.show()},onEditCoupon:function(e,t,a){var o=e.id;e.sendNum>0&&(t=!0),this.$refs.modalCreateCoupon.show(o,t,a)},onExport:function(){var e=this;return l()(n.a.mark(function t(){var a;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.$Loading.start(),t.next=3,b._get("/ufoPlatform/coupon/export",{param:{method:"coupon",param:b._2params(e.getParams(e.filter))}},{responseType:"blob"});case 3:a=t.sent,a instanceof Blob?(d.a.downloadBlob(a,"优惠券导出_"+p()().format("YYYY-MM-DD")+".xlsx"),e.$Loading.finish()):a&&(a.message&&e.$Message.warning(a.message),e.$Loading.error());case 5:case"end":return t.stop()}},t,e)}))()},fetchData:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return l()(n.a.mark(function o(){var i;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return t.page=a,t.$Loading.start(),o.next=4,b._get("/ufoPlatform/coupon/queryCoupons",r()({page:a},t.getParams(e)));case 4:i=o.sent,200===i.code?(t.total=i.data.total,t.data=i.data.coupons,t.$Loading.finish()):(i.message&&t.$Message.warning(i.message),t.$Loading.error());case 6:case"end":return o.stop()}},o,t)}))()},getParams:function(e){var t=e.time[0]?p()(e.time[0]).unix():void 0,a=e.time[1]?p()(e.time[1]).unix():void 0,o=parseInt(e.status)>=0?e.status:void 0,r=p()().unix();return{id:e.id,name:e.name,status:o,startTime:t,endTime:a,curTime:r}}},components:{ModalCreateCoupon:y.a}}},91:function(e,t,a){"use strict";var o=a(21),r=a.n(o),i=a(22),n=a.n(i),s=a(16),l=a(17),u=a.n(l),c=a(212),m=a.n(c),p=new s.a,d={"极速发货":"9-N","极速寄存":"9-Y","预售":"4","瑕疵":"5","二手":"6","海外直邮":"17","现货发货":"1-N","现货寄存":"1-Y","闪购发货":"3-N","闪购寄存":"3-Y"},f={"9-N":"极速发货","9-Y":"极速寄存",4:"预售",5:"瑕疵",6:"二手",17:"海外直邮","1-N":"现货发货","1-Y":"现货寄存","3-N":"闪购发货","3-Y":"闪购寄存"},v={UFO:"ufo","闲鱼":"h5/xianyu"},y={ufo:"UFO","h5/xianyu":"闲鱼"};t.a={components:{},name:"ModalCreateCoupon",data:function(){var e=this;return{readonly:!1,allreadonly:!1,visiable:!1,loading:!1,posting:!0,uploadTxt:"",couponToken:"",formData:{id:0,couponName:"",couponType:0,couponNum:0,useNum:1,couponAmount:0,useLimitType:0,remark:"",productLimitType:2,productLimitValue:"",useLimitValue:0,time:["",""],receiveTime:["",""],skupAllowTypeLabel:[],skupAllowType:"",businessClient:""},ruleValidate:{couponType:{required:!0,validator:function(e,t,a){0===t||"0"===t?a(new Error("请选择优惠券类型")):a()}},couponName:{required:!0,max:30,message:"请输入名称"},couponNum:{type:"number",required:!0,min:1,message:"请输入数量"},couponAmount:{type:"number",required:!0,min:1,message:"请输入优惠金额"},time:{required:!0,validator:function(e,t,a){t.some(function(e){return!e})?a(new Error("请选择使用期限")):a()}},receiveTime:{required:!0,validator:function(t,a,o){if(a.some(function(e){return!e}))o(new Error("请选择领券期限"));else{var r=e.formData.time[1]?u()(e.formData.time[1]).unix():void 0,i=a[1]?u()(a[1]).unix():void 0;console.log("====/"+r+"///===/"+i),r<i?o(new Error("请选择领券结束时间小于使用结束时间")):o()}}},remark:{required:!0,message:"请输入优惠券说明"},useLimitType:{required:!0,validator:function(t,a,o){a>=0?2===a?parseInt(e.formData.useLimitValue)>0?o():o(new Error("请输入限制金额")):o():o(new Error("请选择优惠条件"))}},productLimitValue:{required:!1,validator:function(e,t,a){var o=(t||"").split(",");t&&o.length?o.some(function(e){return!!e&&!parseInt(e)})?a(new Error("适用范围格式错误")):a():a(new Error("请输入适用范围"))}},productLimitType:{required:!0,validator:function(e,t,a){1===t||2===t||3===t?a():a(new Error("请选择类型"))}}}}},methods:{show:function(e,t,a){var o=this;return n()(r.a.mark(function i(){var n,s,l,c,m,d,v,b,h,k;return r.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(console.log(e),o.readonly=t,o.allreadonly=a,o.posting=o.visiable=!0,o.$refs.formCoupon.resetFields(),o.couponToken="",n={id:0,couponName:"",couponNum:0,couponType:0,useNum:1,couponAmount:0,useLimitType:0,remark:"",productLimitValue:"",productLimitType:2,useLimitValue:0,time:["",""],skupAllowTypeLabel:[],skupAllowType:"",businessClientLabel:[],businessClient:""},!e){r.next=14;break}return o.loading=!0,r.next=11,p._get("/ufoPlatform/coupon/getCouponInfo",{id:e});case 11:if(s=r.sent,o.loading=!1,200===s.code){if(l=s.data.coupon,c=s.data.productLimits,o.couponToken=l.couponToken,m=[],l.skupAllowType)for(d=l.skupAllowType.split(","),v=0;v<d.length;v++)m.push(f[d[v]]);if(b=[],l.businessClient)for(h=l.businessClient.split(","),k=0;k<h.length;k++)b.push(y[h[k]]);n={id:e,couponName:l.couponName,couponNum:l.couponNum,couponType:l.couponType||0,useNum:l.useNum,couponAmount:l.couponAmount,useLimitType:l.useLimitType,remark:l.remark,productLimitType:l.productLimitType,productLimitValue:(c||[]).map(function(e){return e.productId}).join(","),useLimitValue:l.useLimitValue,time:[u.a.unix(l.startTime).format("YYYY-MM-DD HH:mm:ss"),u.a.unix(l.endTime).format("YYYY-MM-DD HH:mm:ss")],receiveTime:[u.a.unix(l.receiveStartTime).format("YYYY-MM-DD HH:mm:ss"),u.a.unix(l.receiveEndTime).format("YYYY-MM-DD HH:mm:ss")],skupAllowTypeLabel:m,skupAllowType:l.skupAllowType,businessClientLabel:b,businessClient:l.businessClient}}else s.message&&o.$Message.warning(s.message);case 14:o.formData=n;case 15:case"end":return r.stop()}},i,o)}))()},onOk:function(){var e=this;this.$refs.formCoupon.validate(function(t){t?e.saveData(e.formData):(e.posting=!1,e.$nextTick(function(){e.posting=!0}))})},getCheckBox:function(){for(var e=[],t=0;t<this.formData.skupAllowTypeLabel.length;t++){var a=this.formData.skupAllowTypeLabel[t];console.log(a),e.push(d[a])}console.log(e),this.formData.skupAllowType=e.join(",")},getChannelCheckBox:function(){for(var e=[],t=0;t<this.formData.businessClientLabel.length;t++){var a=this.formData.businessClientLabel[t];console.log(a),e.push(v[a])}console.log(e),this.formData.businessClient=e.join(",")},saveData:function(e){var t=this;return n()(r.a.mark(function a(){var o;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!t.allreadonly){a.next=3;break}return t.visiable=!1,a.abrupt("return");case 3:return a.next=5,p._post("/ufoPlatform/coupon/saveOrUpdateCoupon",{id:e.id||void 0,couponName:e.couponName,couponAmount:e.couponAmount,couponNum:e.couponNum,couponType:e.couponType,useNum:e.useNum,useLimitValue:e.useLimitValue,productLimitType:e.productLimitType,productLimitValue:e.productLimitValue,remark:e.remark,useLimitType:parseInt(e.useLimitType)>=0?e.useLimitType:void 0,startTime:e.time[0]?u()(e.time[0]).unix():void 0,endTime:e.time[1]?u()(e.time[1]).unix():void 0,skupAllowType:e.skupAllowType,businessClient:e.businessClient,receiveStartTime:e.receiveTime[0]?u()(e.receiveTime[0]).unix():void 0,receiveEndTime:e.receiveTime[1]?u()(e.receiveTime[1]).unix():void 0});case 5:o=a.sent,console.log("result=",o),200===o.code?(t.$Message.success("保存成功"),t.visiable=!1,t.$emit("on-created")):(o.message&&t.$Message.warning(o.message),t.posting=!1,t.$nextTick(function(){t.posting=!0}));case 8:case"end":return a.stop()}},a,t)}))()},onBeforeUpload:function(e){var t=this,a=e.name.split(".").pop().toLocaleLowerCase();if(console.log(a),"xlsx"!==a)return this.$Message.warning("文件格式错误"),!1;if(e.size>1048576)return this.$Message.warning("文件大小超过1M"),!1;var o=new FileReader;return o.readAsArrayBuffer(e),o.onloadstart=function(){t.uploadTxt="开始读取"},o.onprogress=function(e){t.uploadTxt="进度:"+Math.round(e.loaded/e.total*100)+"..."},o.onerror=function(){t.uploadTxt="文件读取出错"},o.onload=function(e){t.uploadTxt="";try{var a=e.target.result,o=m.a.read(a,{type:"array"}),r=o.SheetNames[0],i=o.Sheets[r],n=m.a.utils.sheet_to_json(i);t.formData.productLimitValue=n.map(function(e){return e["商品编码"]}).filter(function(e){return e}).join(",")}catch(e){t.uploadTxt="文件解析失败,请按照格式上传"}},!1},onExample:function(){var e=m.a.utils.book_new(),t=m.a.utils.json_to_sheet([{"商品编码":"123456"}]);m.a.utils.book_append_sheet(e,t,"优惠券适用范围示例"),m.a.writeFile(e,"优惠券适用范围示例.xlsx")}}}}},[139]);
\ No newline at end of file
webpackJsonp([1],{10:function(e,t){e.exports=Vue},139:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a(140),r=a(18);Object(r.a)(o.a)},140:function(e,t,a){"use strict";function o(e){n||a(141)}var r=a(63),i=a(214),n=!1,s=a(0),l=o,u=s(r.a,i.a,!1,l,null,null);u.options.__file="src/views/coupon/index.vue",t.a=u.exports},141:function(e,t){},210:function(e,t,a){"use strict";function o(e){n||a(211)}var r=a(91),i=a(213),n=!1,s=a(0),l=o,u=s(r.a,i.a,!1,l,"data-v-35ed785d",null);u.options.__file="src/views/coupon/components/modal-create-coupon.vue",t.a=u.exports},211:function(e,t){},212:function(e,t){e.exports=XLSX},213:function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Modal",{attrs:{loading:e.posting,title:e.allreadonly?"查看优惠券":"创建/编辑优惠券",width:"600"},on:{"on-ok":e.onOk},model:{value:e.visiable,callback:function(t){e.visiable=t},expression:"visiable"}},[e.loading?a("Spin"):a("Form",{ref:"formCoupon",attrs:{rules:e.ruleValidate,model:e.formData,"label-width":80}},[a("FormItem",{staticClass:"form-group",attrs:{label:"优惠券类型"}}),e._v(" "),a("FormItem",{attrs:{label:"优惠券类型",prop:"couponType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.couponType,callback:function(t){e.$set(e.formData,"couponType",t)},expression:"formData.couponType"}},[a("Option",{attrs:{value:0}},[e._v("请选择")]),e._v(" "),a("Option",{attrs:{value:100}},[e._v("活动券")]),e._v(" "),a("Option",{attrs:{value:110}},[e._v("运费券")])],1)],1),e._v(" "),a("FormItem",{staticClass:"form-group",attrs:{label:"基本信息"}}),e._v(" "),e.couponToken?a("FormItem",{attrs:{label:"Token"}},[e._v("\n "+e._s(e.couponToken)+"\n ")]):e._e(),e._v(" "),a("FormItem",{attrs:{label:"名称",prop:"couponName"}},[a("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"名称建议30字以内",disabled:e.allreadonly},model:{value:e.formData.couponName,callback:function(t){e.$set(e.formData,"couponName",t)},expression:"formData.couponName"}})],1),e._v(" "),a("FormItem",{attrs:{label:"数量",prop:"couponNum"}},[a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"数量",disabled:e.allreadonly},model:{value:e.formData.couponNum,callback:function(t){e.$set(e.formData,"couponNum",t)},expression:"formData.couponNum"}})],1),e._v(" "),a("FormItem",{attrs:{label:"使用次数",prop:"useNum"}},[a("Input",{staticStyle:{width:"100px"},attrs:{placeholder:"使用次数",disabled:""},model:{value:e.formData.useNum,callback:function(t){e.$set(e.formData,"useNum",t)},expression:"formData.useNum"}})],1),e._v(" "),a("FormItem",{attrs:{label:"使用期限",prop:"time"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",disabled:e.allreadonly,placeholder:"使用期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.time,callback:function(t){e.$set(e.formData,"time",t)},expression:"formData.time"}})],1),e._v(" "),a("FormItem",{attrs:{label:"领券期限",prop:"receiveTime"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",disabled:e.readonly,placeholder:"领券期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.receiveTime,callback:function(t){e.$set(e.formData,"receiveTime",t)},expression:"formData.receiveTime"}})],1),e._v(" "),a("FormItem",{attrs:{label:"优惠券说明",prop:"remark"}},[a("Input",{attrs:{type:"textarea",placeholder:"优惠券使用条件简介",disabled:e.allreadonly},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1),e._v(" "),a("FormItem",{staticClass:"form-group",attrs:{label:"使用条件"}}),e._v(" "),a("FormItem",{staticStyle:{display:"inline-block",width:"100%"},attrs:{label:"优惠条件",prop:"useLimitType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.useLimitType,callback:function(t){e.$set(e.formData,"useLimitType",t)},expression:"formData.useLimitType"}},[a("Option",{attrs:{value:0}},[e._v("无限制")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("金额")])],1),e._v(" "),2===e.formData.useLimitType?a("div",{staticStyle:{display:"inline-block"}},[e._v("\n  \n 金额满:\n "),a("InputNumber",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly,placeholder:"限制金额"},model:{value:e.formData.useLimitValue,callback:function(t){e.$set(e.formData,"useLimitValue",t)},expression:"formData.useLimitValue"}})],1):e._e()],1),e._v(" "),a("FormItem",{attrs:{label:"优惠金额",prop:"couponAmount"}},[a("InputNumber",{staticStyle:{width:"100px"},attrs:{placeholder:"优惠金额",disabled:e.readonly},model:{value:e.formData.couponAmount,callback:function(t){e.$set(e.formData,"couponAmount",t)},expression:"formData.couponAmount"}})],1),e._v(" "),a("FormItem",{attrs:{label:"适用范围",prop:"productLimitType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{disabled:e.readonly},model:{value:e.formData.productLimitType,callback:function(t){e.$set(e.formData,"productLimitType",t)},expression:"formData.productLimitType"}},[a("Option",{attrs:{value:1}},[e._v("指定商品")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("全部商品")]),e._v(" "),a("Option",{attrs:{value:3}},[e._v("排除商品")])],1)],1),e._v(" "),1===e.formData.productLimitType||3===e.formData.productLimitType?a("FormItem",{attrs:{prop:"productLimitValue"}},[a("Input",{attrs:{type:"textarea",disabled:e.readonly,placeholder:"填写商品编码,多个商品编码用英文逗号分隔"},model:{value:e.formData.productLimitValue,callback:function(t){e.$set(e.formData,"productLimitValue",t)},expression:"formData.productLimitValue"}}),e._v(" "),a("Poptip",{attrs:{trigger:"hover"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("p",[e._v("1.上传文件必须是xlsx文件")]),e._v(" "),a("p",[e._v("2.第一行标题栏:商品编码")]),e._v(" "),a("p",[e._v("3."),a("a",{attrs:{href:"javascript:;"},on:{click:e.onExample}},[e._v("下载样例")])])]),e._v(" "),a("Upload",{attrs:{action:"",format:["xlsx"],"max-size":1024,"before-upload":e.onBeforeUpload}},[a("Button",{attrs:{type:"success",size:"small",disabled:e.readonly}},[e._v("导入")]),e._v(" "),a("p",[e._v(e._s(e.uploadTxt))])],1)],1)],1):e._e(),e._v(" "),a("FormItem",{attrs:{label:"可用商品类型"}},[a("checkbox-group",{on:{"on-change":e.getCheckBox},model:{value:e.formData.skupAllowTypeLabel,callback:function(t){e.$set(e.formData,"skupAllowTypeLabel",t)},expression:"formData.skupAllowTypeLabel"}},[a("checkbox",{attrs:{label:"极速发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"极速寄存",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"预售",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"瑕疵",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"二手",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"海外直邮",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"现货发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"现货寄存",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闪购发货",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闪购寄存",disabled:e.readonly}})],1)],1),e._v(" "),a("FormItem",{attrs:{label:"购买渠道",prop:"useLimitType"}},[a("checkbox-group",{on:{"on-change":e.getChannelCheckBox},model:{value:e.formData.businessClientLabel,callback:function(t){e.$set(e.formData,"businessClientLabel",t)},expression:"formData.businessClientLabel"}},[a("checkbox",{attrs:{label:"UFO",disabled:e.readonly}}),e._v(" "),a("checkbox",{attrs:{label:"闲鱼",disabled:e.readonly}})],1)],1)],1)],1)},r=[];o._withStripped=!0;var i={render:o,staticRenderFns:r};t.a=i},214:function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("LayoutContent",{attrs:{breads:[{title:"优惠券列表"}]}},[a("LayoutFilter",{on:{"on-filter":e.onFilter,"on-clear":e.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:e.filter}},[a("FormItem",{attrs:{prop:"id"}},[a("Input",{attrs:{placeholder:"输入ID"},model:{value:e.filter.id,callback:function(t){e.$set(e.filter,"id",t)},expression:"filter.id"}})],1),e._v(" "),a("FormItem",{attrs:{prop:"name"}},[a("Input",{attrs:{placeholder:"输入券名称"},model:{value:e.filter.name,callback:function(t){e.$set(e.filter,"name",t)},expression:"filter.name"}})],1),e._v(" "),a("FormItem",{attrs:{prop:"status"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:e.filter.status,callback:function(t){e.$set(e.filter,"status",t)},expression:"filter.status"}},[a("Option",{attrs:{value:0}},[e._v("未生效")]),e._v(" "),a("Option",{attrs:{value:1}},[e._v("生效中")]),e._v(" "),a("Option",{attrs:{value:2}},[e._v("已过期")]),e._v(" "),a("Option",{attrs:{value:3}},[e._v("已作废")])],1)],1),e._v(" "),a("FormItem",{attrs:{prop:"time"}},[a("DatePicker",{staticStyle:{width:"250px"},attrs:{type:"datetimerange",placeholder:"开始-结束时间",format:"yyyy-MM-dd HH:mm"},model:{value:e.filter.time,callback:function(t){e.$set(e.filter,"time",t)},expression:"filter.time"}})],1)],1)],1),e._v(" "),a("LayoutTools",[a("Button",{attrs:{type:"success",icon:"md-add"},on:{click:e.onCreateCoupon}},[e._v("新增优惠券")])],1),e._v(" "),a("LayoutTable",{attrs:{page:e.page,total:e.total,columns:e.columns,data:e.data},on:{"on-page-change":e.onPageChange}},[a("template",{staticClass:"btns",slot:"footer"},[a("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:e.onExport}},[e._v("导出")])],1)],2),e._v(" "),a("ModalCreateCoupon",{ref:"modalCreateCoupon",on:{"on-created":e.onCreated}})],1)},r=[];o._withStripped=!0;var i={render:o,staticRenderFns:r};t.a=i},5:function(e,t){e.exports=iview},63:function(e,t,a){"use strict";var o=a(13),r=a.n(o),i=a(21),n=a.n(i),s=a(22),l=a.n(s),u=a(5),c=(a.n(u),a(16)),m=a(17),p=a.n(m),d=a(44),f=a(27),v=a.n(f),y=a(210),b=new c.a;t.a={name:"CouponPage",data:function(){var e=this;this.$createElement;return{filter:{id:"",name:"",status:"",time:["",""]},page:1,total:0,data:[],columns:[{title:"ID",key:"id",width:80},{title:"券名称",key:"name",width:180},{title:"token",key:"token",width:180},{title:"数量",key:"couponNum",width:90},{title:"已发放",key:"sendNum",width:90},{title:"已使用",key:"useNum",width:90},{title:"使用期限",key:"useTime",width:165},{title:"优惠券说明",key:"remark",align:"center",width:150},{title:"状态",align:"center",key:"status"},{title:"操作",align:"center",width:200,render:function(t,a){var o=a.row;return t("div",[t(u.Button,{attrs:{type:"success",size:"small"},on:{click:function(){return e.onEditCoupon(o,!0,!0)}}},["查看详情"]),"未生效"===o.status||"生效中"===o.status?t(u.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return e.onEditCoupon(o)}}},["修改"]):void 0,t(u.Button,{attrs:{type:"warning",size:"small"},on:{click:function(){return e.onToRecord(o)}}},["发放记录"]),"未生效"===o.status||"生效中"===o.status?t(u.Button,{attrs:{type:"success",size:"small"},on:{click:function(){return e.onSendCoupon(o)}}},["发券"]):void 0])}}]}},created:function(){var e=this;this.$nextTick(function(){var t=v.a.parse(location.search?location.search.slice(1):""),a=t.page,o=t.id,r=t.name,i=t.status,n=t.startTime,s=t.endTime;e.filter.id=o||e.filter.id,e.filter.name=r?decodeURIComponent(r):e.filter.name,e.filter.status=i?parseInt(i):e.filter.status,e.filter.time=n&&s?[p()(n),p()(s)]:e.filter.time,e.page=a?parseInt(a):1,e.fetchData(e.filter,e.page)})},methods:{onToRecord:function(e){var t=e.id;location.href="send-record.html?"+v.a.stringify({id:t,param:{id:this.filter.id||void 0,name:this.filter.name||void 0,status:this.filter.status||void 0,startTime:this.filter.time[0]||void 0,endTime:this.filter.time[1]||void 0,page:this.page||void 0}})},onSendCoupon:function(e){var t=e.id,a=e.token;t&&a&&(location.href="send-coupon.html?"+v.a.stringify({id:t,token:a}))},onCreated:function(){this.fetchData(this.filter)},onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(e){this.fetchData(this.filter,e)},onCreateCoupon:function(){this.$refs.modalCreateCoupon.show()},onEditCoupon:function(e,t,a){var o=e.id;e.sendNum>0&&(t=!0),this.$refs.modalCreateCoupon.show(o,t,a)},onExport:function(){var e=this;return l()(n.a.mark(function t(){var a;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.$Loading.start(),t.next=3,b._get("/ufoPlatform/coupon/export",{param:{method:"coupon",param:b._2params(e.getParams(e.filter))}},{responseType:"blob"});case 3:a=t.sent,a instanceof Blob?(d.a.downloadBlob(a,"优惠券导出_"+p()().format("YYYY-MM-DD")+".xlsx"),e.$Loading.finish()):a&&(a.message&&e.$Message.warning(a.message),e.$Loading.error());case 5:case"end":return t.stop()}},t,e)}))()},fetchData:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return l()(n.a.mark(function o(){var i;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return t.page=a,t.$Loading.start(),o.next=4,b._get("/ufoPlatform/coupon/queryCoupons",r()({page:a},t.getParams(e)));case 4:i=o.sent,200===i.code?(t.total=i.data.total,t.data=i.data.coupons,t.$Loading.finish()):(i.message&&t.$Message.warning(i.message),t.$Loading.error());case 6:case"end":return o.stop()}},o,t)}))()},getParams:function(e){var t=e.time[0]?p()(e.time[0]).unix():void 0,a=e.time[1]?p()(e.time[1]).unix():void 0,o=parseInt(e.status)>=0?e.status:void 0,r=p()().unix();return{id:e.id,name:e.name,status:o,startTime:t,endTime:a,curTime:r}}},components:{ModalCreateCoupon:y.a}}},91:function(e,t,a){"use strict";var o=a(21),r=a.n(o),i=a(22),n=a.n(i),s=a(16),l=a(17),u=a.n(l),c=a(212),m=a.n(c),p=new s.a,d={"极速发货":"9-N","极速寄存":"9-Y","预售":"4","瑕疵":"5","二手":"6","海外直邮":"17","现货发货":"1-N","现货寄存":"1-Y","闪购发货":"3-N","闪购寄存":"3-Y"},f={"9-N":"极速发货","9-Y":"极速寄存",4:"预售",5:"瑕疵",6:"二手",17:"海外直邮","1-N":"现货发货","1-Y":"现货寄存","3-N":"闪购发货","3-Y":"闪购寄存"},v={UFO:"ufo","闲鱼":"h5/xianyu"},y={ufo:"UFO","h5/xianyu":"闲鱼"};t.a={components:{},name:"ModalCreateCoupon",data:function(){var e=this;return{readonly:!1,allreadonly:!1,visiable:!1,loading:!1,posting:!0,uploadTxt:"",couponToken:"",formData:{id:0,couponName:"",couponType:0,couponNum:0,useNum:1,couponAmount:0,useLimitType:0,remark:"",productLimitType:2,productLimitValue:"",useLimitValue:0,time:["",""],receiveTime:["",""],skupAllowTypeLabel:[],skupAllowType:"",businessClient:""},ruleValidate:{couponType:{required:!0,validator:function(e,t,a){0===t||"0"===t?a(new Error("请选择优惠券类型")):a()}},couponName:{required:!0,max:30,message:"请输入名称"},couponNum:{type:"number",required:!0,min:1,message:"请输入数量"},couponAmount:{type:"number",required:!0,min:1,message:"请输入优惠金额"},time:{required:!0,validator:function(e,t,a){t.some(function(e){return!e})?a(new Error("请选择使用期限")):a()}},receiveTime:{required:!0,validator:function(t,a,o){if(a.some(function(e){return!e}))o(new Error("请选择领券期限"));else{(e.formData.time[1]?u()(e.formData.time[1]).unix():void 0)<(a[1]?u()(a[1]).unix():void 0)?o(new Error("请选择领券结束时间小于使用结束时间")):o()}}},remark:{required:!0,message:"请输入优惠券说明"},useLimitType:{required:!0,validator:function(t,a,o){a>=0?2===a?parseInt(e.formData.useLimitValue)>0?o():o(new Error("请输入限制金额")):o():o(new Error("请选择优惠条件"))}},productLimitValue:{required:!1,validator:function(e,t,a){var o=(t||"").split(",");t&&o.length?o.some(function(e){return!!e&&!parseInt(e)})?a(new Error("适用范围格式错误")):a():a(new Error("请输入适用范围"))}},productLimitType:{required:!0,validator:function(e,t,a){1===t||2===t||3===t?a():a(new Error("请选择类型"))}}}}},methods:{show:function(e,t,a){var o=this;return n()(r.a.mark(function i(){var n,s,l,c,m,d,v,b,h,k;return r.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(o.readonly=t,o.allreadonly=a,o.posting=o.visiable=!0,o.$refs.formCoupon.resetFields(),o.couponToken="",n={id:0,couponName:"",couponNum:0,couponType:0,useNum:1,couponAmount:0,useLimitType:0,remark:"",productLimitValue:"",productLimitType:2,useLimitValue:0,time:["",""],skupAllowTypeLabel:[],skupAllowType:"",businessClientLabel:[],businessClient:""},!e){r.next=13;break}return o.loading=!0,r.next=10,p._get("/ufoPlatform/coupon/getCouponInfo",{id:e});case 10:if(s=r.sent,o.loading=!1,200===s.code){if(l=s.data.coupon,c=s.data.productLimits,o.couponToken=l.couponToken,m=[],l.skupAllowType)for(d=l.skupAllowType.split(","),v=0;v<d.length;v++)m.push(f[d[v]]);if(b=[],l.businessClient)for(h=l.businessClient.split(","),k=0;k<h.length;k++)b.push(y[h[k]]);n={id:e,couponName:l.couponName,couponNum:l.couponNum,couponType:l.couponType||0,useNum:l.useNum,couponAmount:l.couponAmount,useLimitType:l.useLimitType,remark:l.remark,productLimitType:l.productLimitType,productLimitValue:(c||[]).map(function(e){return e.productId}).join(","),useLimitValue:l.useLimitValue,time:[u.a.unix(l.startTime).format("YYYY-MM-DD HH:mm:ss"),u.a.unix(l.endTime).format("YYYY-MM-DD HH:mm:ss")],receiveTime:[u.a.unix(l.receiveStartTime).format("YYYY-MM-DD HH:mm:ss"),u.a.unix(l.receiveEndTime).format("YYYY-MM-DD HH:mm:ss")],skupAllowTypeLabel:m,skupAllowType:l.skupAllowType,businessClientLabel:b,businessClient:l.businessClient}}else s.message&&o.$Message.warning(s.message);case 13:o.formData=n;case 14:case"end":return r.stop()}},i,o)}))()},onOk:function(){var e=this;this.$refs.formCoupon.validate(function(t){t?e.saveData(e.formData):(e.posting=!1,e.$nextTick(function(){e.posting=!0}))})},getCheckBox:function(){for(var e=[],t=0;t<this.formData.skupAllowTypeLabel.length;t++){var a=this.formData.skupAllowTypeLabel[t];e.push(d[a])}this.formData.skupAllowType=e.join(",")},getChannelCheckBox:function(){for(var e=[],t=0;t<this.formData.businessClientLabel.length;t++){var a=this.formData.businessClientLabel[t];e.push(v[a])}this.formData.businessClient=e.join(",")},saveData:function(e){var t=this;return n()(r.a.mark(function a(){var o;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!t.allreadonly){a.next=3;break}return t.visiable=!1,a.abrupt("return");case 3:return a.next=5,p._post("/ufoPlatform/coupon/saveOrUpdateCoupon",{id:e.id||void 0,couponName:e.couponName,couponAmount:e.couponAmount,couponNum:e.couponNum,couponType:e.couponType,useNum:e.useNum,useLimitValue:e.useLimitValue,productLimitType:e.productLimitType,productLimitValue:e.productLimitValue,remark:e.remark,useLimitType:parseInt(e.useLimitType)>=0?e.useLimitType:void 0,startTime:e.time[0]?u()(e.time[0]).unix():void 0,endTime:e.time[1]?u()(e.time[1]).unix():void 0,skupAllowType:e.skupAllowType,businessClient:e.businessClient,receiveStartTime:e.receiveTime[0]?u()(e.receiveTime[0]).unix():void 0,receiveEndTime:e.receiveTime[1]?u()(e.receiveTime[1]).unix():void 0});case 5:o=a.sent,200===o.code?(t.$Message.success("保存成功"),t.visiable=!1,t.$emit("on-created")):(o.message&&t.$Message.warning(o.message),t.posting=!1,t.$nextTick(function(){t.posting=!0}));case 7:case"end":return a.stop()}},a,t)}))()},onBeforeUpload:function(e){var t=this;if("xlsx"!==e.name.split(".").pop().toLocaleLowerCase())return this.$Message.warning("文件格式错误"),!1;if(e.size>1048576)return this.$Message.warning("文件大小超过1M"),!1;var a=new FileReader;return a.readAsArrayBuffer(e),a.onloadstart=function(){t.uploadTxt="开始读取"},a.onprogress=function(e){t.uploadTxt="进度:"+Math.round(e.loaded/e.total*100)+"..."},a.onerror=function(){t.uploadTxt="文件读取出错"},a.onload=function(e){t.uploadTxt="";try{var a=e.target.result,o=m.a.read(a,{type:"array"}),r=o.SheetNames[0],i=o.Sheets[r],n=m.a.utils.sheet_to_json(i);t.formData.productLimitValue=n.map(function(e){return e["商品编码"]}).filter(function(e){return e}).join(",")}catch(e){t.uploadTxt="文件解析失败,请按照格式上传"}},!1},onExample:function(){var e=m.a.utils.book_new(),t=m.a.utils.json_to_sheet([{"商品编码":"123456"}]);m.a.utils.book_append_sheet(e,t,"优惠券适用范围示例"),m.a.writeFile(e,"优惠券适用范围示例.xlsx")}}}}},[139]);
\ No newline at end of file
... ...
webpackJsonp([3],{10:function(e,t){e.exports=Vue},236:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(237),i=r(18);Object(i.a)(n.a)},237:function(e,t,r){"use strict";function n(e){a||r(238)}var i=r(96),o=r(240),a=!1,s=r(0),c=n,u=s(i.a,o.a,!1,c,"data-v-34e1a97a",null);u.options.__file="src/views/price-compare/index.vue",t.a=u.exports},238:function(e,t){},239:function(e,t,r){var n;!function(i){"use strict";function o(e){function t(e,r){var n,i,o,a,s,c,l,f,p=this;if(!(p instanceof t))return new t(e,r);if(null==r){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>U?p.c=p.e=null:e.e<B?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,s=e;s>=10;s/=10,a++);return void(a>U?p.c=p.e=null:(p.e=a,p.c=[e]))}f=String(e)}else{if(!d.test(f=String(e)))return P(p,f,c);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(a=f.indexOf("."))>-1&&(f=f.replace(".","")),(s=f.search(/e/i))>0?(a<0&&(a=s),a+=+f.slice(s+1),f=f.substring(0,s)):a<0&&(a=f.length)}else{if(u(r,2,j.length,"Base"),10==r)return p=new t(e),h(p,L+p.e+1,$);if(f=String(e),c="number"==typeof e){if(0*e!=0)return P(p,f,c,r);if(p.s=1/e<0?(f=f.slice(1),-1):1,t.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(N+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=j.slice(0,r),a=s=0,l=f.length;s<l;s++)if(n.indexOf(i=f.charAt(s))<0){if("."==i){if(s>a){a=l;continue}}else if(!o&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){o=!0,s=-1,a=0;continue}return P(p,String(e),c,r)}c=!1,f=x(f,r,10,p.s),(a=f.indexOf("."))>-1?f=f.replace(".",""):a=f.length}for(s=0;48===f.charCodeAt(s);s++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(s,++l)){if(l-=s,c&&t.DEBUG&&l>15&&(e>O||e!==w(e)))throw Error(N+p.s*e);if((a=a-s-1)>U)p.c=p.e=null;else if(a<B)p.c=[p.e=0];else{if(p.e=a,p.c=[],s=(a+1)%y,a<0&&(s+=y),s<l){for(s&&p.c.push(+f.slice(0,s)),l-=y;s<l;)p.c.push(+f.slice(s,s+=y));s=y-(f=f.slice(s)).length}else s-=l;for(;s--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function r(e,r,n,i){var o,a,c,l,d;if(null==n?n=$:u(n,0,8),!e.c)return e.toString();if(o=e.c[0],c=e.e,null==r)d=s(e.c),d=1==i||2==i&&(c<=C||c>=D)?f(d,c):p(d,c,"0");else if(e=h(new t(e),r,n),a=e.e,d=s(e.c),l=d.length,1==i||2==i&&(r<=a||a<=C)){for(;l<r;d+="0",l++);d=f(d,a)}else if(r-=c,d=p(d,a,"0"),a+1>l){if(--r>0)for(d+=".";r--;d+="0");}else if((r+=a-l)>0)for(a+1==l&&(d+=".");r--;d+="0");return e.s<0&&o?"-"+d:d}function n(e,r){for(var n,i=1,o=new t(e[0]);i<e.length;i++){if(n=new t(e[i]),!n.s){o=n;break}r.call(o,n)&&(o=n)}return o}function i(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*y-1)>U?e.c=e.e=null:r<B?e.c=[e.e=0]:(e.e=r,e.c=t),e}function h(e,t,r,n){var i,o,a,s,c,u,l,f=e.c,p=k;if(f){e:{for(i=1,s=f[0];s>=10;s/=10,i++);if((o=t-i)<0)o+=y,a=t,c=f[u=0],l=c/p[i-a-1]%10|0;else if((u=m((o+1)/y))>=f.length){if(!n)break e;for(;f.length<=u;f.push(0));c=l=0,i=1,o%=y,a=o-y+1}else{for(c=s=f[u],i=1;s>=10;s/=10,i++);o%=y,a=o-y+i,l=a<0?0:c/p[i-a-1]%10|0}if(n=n||t<0||null!=f[u+1]||(a<0?c:c%p[i-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(o>0?a>0?c/p[i-a]:0:f[u-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(y-t%y)%y],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=u,s=1,u--):(f.length=u+1,s=p[y-o],f[u]=a>0?w(c/p[i-a]%p[a])*s:0),n)for(;;){if(0==u){for(o=1,a=f[0];a>=10;a/=10,o++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,f[0]==b&&(f[0]=1));break}if(f[u]+=s,f[u]!=b)break;f[u--]=0,s=1}for(o=f.length;0===f[--o];f.pop());}e.e>U?e.c=e.e=null:e.e<B&&(e.c=[e.e=0])}return e}function I(e){var t,r=e.e;return null===r?e.toString():(t=s(e.c),t=r<=C||r>=D?f(t,r):p(t,r,"0"),e.s<0?"-"+t:t)}var R,x,P,S=t.prototype={constructor:t,toString:null,valueOf:null},A=new t(1),L=20,$=4,C=-7,D=21,B=-1e7,U=1e7,M=!1,T=1,F=0,z={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz";return t.clone=o,t.ROUND_UP=0,t.ROUND_DOWN=1,t.ROUND_CEIL=2,t.ROUND_FLOOR=3,t.ROUND_HALF_UP=4,t.ROUND_HALF_DOWN=5,t.ROUND_HALF_EVEN=6,t.ROUND_HALF_CEIL=7,t.ROUND_HALF_FLOOR=8,t.EUCLID=9,t.config=t.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(v+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(r=e[t],u(r,0,_,t),L=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(r=e[t],u(r,0,8,t),$=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&(r=e[t],r&&r.pop?(u(r[0],-_,0,t),u(r[1],0,_,t),C=r[0],D=r[1]):(u(r,-_,_,t),C=-(D=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)u(r[0],-_,-1,t),u(r[1],1,_,t),B=r[0],U=r[1];else{if(u(r,-_,_,t),!r)throw Error(v+t+" cannot be zero: "+r);B=-(U=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(v+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!r,Error(v+"crypto unavailable");M=r}else M=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(r=e[t],u(r,0,9,t),T=r),e.hasOwnProperty(t="POW_PRECISION")&&(r=e[t],u(r,0,_,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(v+t+" not an object: "+r);z=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(v+t+" invalid: "+r);j=r}}return{DECIMAL_PLACES:L,ROUNDING_MODE:$,EXPONENTIAL_AT:[C,D],RANGE:[B,U],CRYPTO:M,MODULO_MODE:T,POW_PRECISION:F,FORMAT:z,ALPHABET:j}},t.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!t.DEBUG)return!0;var r,n,i=e.c,o=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(i)){if((1===a||-1===a)&&o>=-_&&o<=_&&o===w(o)){if(0===i[0]){if(0===o&&1===i.length)return!0;break e}if(r=(o+1)%y,r<1&&(r+=y),String(i[0]).length==r){for(r=0;r<i.length;r++)if((n=i[r])<0||n>=b||n!==w(n))break e;if(0!==n)return!0}}}else if(null===i&&null===o&&(null===a||1===a||-1===a))return!0;throw Error(v+"Invalid BigNumber: "+e)},t.maximum=t.max=function(){return n(arguments,S.lt)},t.minimum=t.min=function(){return n(arguments,S.gt)},t.random=function(){var e=9007199254740992*Math.random()&2097151?function(){return w(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(r){var n,i,o,a,s,c=0,l=[],f=new t(A);if(null==r?r=L:u(r,0,_),a=m(r/y),M)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(a*=2));c<a;)s=131072*n[c]+(n[c+1]>>>11),s>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),n[c]=i[0],n[c+1]=i[1]):(l.push(s%1e14),c+=2);c=a/2}else{if(!crypto.randomBytes)throw M=!1,Error(v+"crypto unavailable");for(n=crypto.randomBytes(a*=7);c<a;)s=281474976710656*(31&n[c])+1099511627776*n[c+1]+4294967296*n[c+2]+16777216*n[c+3]+(n[c+4]<<16)+(n[c+5]<<8)+n[c+6],s>=9e15?crypto.randomBytes(7).copy(n,c):(l.push(s%1e14),c+=7);c=a/7}if(!M)for(;c<a;)(s=e())<9e15&&(l[c++]=s%1e14);for(a=l[--c],r%=y,a&&r&&(s=k[y-r],l[c]=w(a/s)*s);0===l[c];l.pop(),c--);if(c<0)l=[o=0];else{for(o=-1;0===l[0];l.splice(0,1),o-=y);for(c=1,s=l[0];s>=10;s/=10,c++);c<y&&(o-=y-c)}return f.e=o,f.c=l,f}}(),t.sum=function(){for(var e=1,r=arguments,n=new t(r[0]);e<r.length;)n=n.plus(r[e++]);return n},x=function(){function e(e,t,r,n){for(var i,o,a=[0],s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(r,n,i,o,a){var c,u,l,f,h,d,g,m,w=r.indexOf("."),v=L,N=$;for(w>=0&&(f=F,F=0,r=r.replace(".",""),m=new t(n),d=m.pow(r.length-w),F=f,m.c=e(p(s(d.c),d.e,"0"),10,i,"0123456789"),m.e=m.c.length),g=e(r,n,i,a?(c=j,"0123456789"):(c="0123456789",j)),l=f=g.length;0==g[--f];g.pop());if(!g[0])return c.charAt(0);if(w<0?--l:(d.c=g,d.e=l,d.s=o,d=R(d,m,v,N,i),g=d.c,h=d.r,l=d.e),u=l+v+1,w=g[u],f=i/2,h=h||u<0||null!=g[u+1],h=N<4?(null!=w||h)&&(0==N||N==(d.s<0?3:2)):w>f||w==f&&(4==N||h||6==N&&1&g[u-1]||N==(d.s<0?8:7)),u<1||!g[0])r=h?p(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(g.length=u,h)for(--i;++g[--u]>i;)g[u]=0,u||(++l,g=[1].concat(g));for(f=g.length;!g[--f];);for(w=0,r="";w<=f;r+=c.charAt(g[w++]));r=p(r,l,c.charAt(0))}return r}}(),R=function(){function e(e,t,r){var n,i,o,a,s=0,c=e.length,u=t%E,l=t/E|0;for(e=e.slice();c--;)o=e[c]%E,a=e[c]/E|0,n=l*o+a*u,i=u*o+n%E*E+s,s=(i/r|0)+(n/E|0)+l*a,e[c]=i%r;return s&&(e=[s].concat(e)),e}function r(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(i,o,s,c,u){var l,f,p,d,g,m,v,N,O,k,E,_,I,R,x,P,S,A=i.s==o.s?1:-1,L=i.c,$=o.c;if(!(L&&L[0]&&$&&$[0]))return new t(i.s&&o.s&&(L?!$||L[0]!=$[0]:$)?L&&0==L[0]||!$?0*A:A/0:NaN);for(N=new t(A),O=N.c=[],f=i.e-o.e,A=s+f+1,u||(u=b,f=a(i.e/y)-a(o.e/y),A=A/y|0),p=0;$[p]==(L[p]||0);p++);if($[p]>(L[p]||0)&&f--,A<0)O.push(1),d=!0;else{for(R=L.length,P=$.length,p=0,A+=2,g=w(u/($[0]+1)),g>1&&($=e($,g,u),L=e(L,g,u),P=$.length,R=L.length),I=P,k=L.slice(0,P),E=k.length;E<P;k[E++]=0);S=$.slice(),S=[0].concat(S),x=$[0],$[1]>=u/2&&x++;do{if(g=0,(l=r($,k,P,E))<0){if(_=k[0],P!=E&&(_=_*u+(k[1]||0)),(g=w(_/x))>1)for(g>=u&&(g=u-1),m=e($,g,u),v=m.length,E=k.length;1==r(m,k,v,E);)g--,n(m,P<v?S:$,v,u),v=m.length,l=1;else 0==g&&(l=g=1),m=$.slice(),v=m.length;if(v<E&&(m=[0].concat(m)),n(k,m,E,u),E=k.length,-1==l)for(;r($,k,P,E)<1;)g++,n(k,P<E?S:$,E,u),E=k.length}else 0===l&&(g++,k=[0]);O[p++]=g,k[0]?k[E++]=L[I]||0:(k=[L[I]],E=1)}while((I++<R||null!=k[0])&&A--);d=null!=k[0],O[0]||O.splice(0,1)}if(u==b){for(p=1,A=O[0];A>=10;A/=10,p++);h(N,s+(N.e=p+f*y-1)+1,c,d)}else N.e=f,N.r=+d;return N}}(),P=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,n=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,s,c,u){var l,f=c?s:s.replace(o,"");if(i.test(f))a.s=isNaN(f)?null:f<0?-1:1;else{if(!c&&(f=f.replace(e,function(e,t,r){return l="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=l?e:t}),u&&(l=u,f=f.replace(r,"$1").replace(n,"0.$1")),s!=f))return new t(f,l);if(t.DEBUG)throw Error(v+"Not a"+(u?" base "+u:"")+" number: "+s);a.s=null}a.c=a.e=null}}(),S.absoluteValue=S.abs=function(){var e=new t(this);return e.s<0&&(e.s=1),e},S.comparedTo=function(e,r){return c(this,new t(e,r))},S.decimalPlaces=S.dp=function(e,r){var n,i,o,s=this;if(null!=e)return u(e,0,_),null==r?r=$:u(r,0,8),h(new t(s),e+s.e+1,r);if(!(n=s.c))return null;if(i=((o=n.length-1)-a(this.e/y))*y,o=n[o])for(;o%10==0;o/=10,i--);return i<0&&(i=0),i},S.dividedBy=S.div=function(e,r){return R(this,new t(e,r),L,$)},S.dividedToIntegerBy=S.idiv=function(e,r){return R(this,new t(e,r),0,1)},S.exponentiatedBy=S.pow=function(e,r){var n,i,o,a,s,c,u,f,p=this;if(e=new t(e),e.c&&!e.isInteger())throw Error(v+"Exponent not an integer: "+I(e));if(null!=r&&(r=new t(r)),s=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new t(Math.pow(+I(p),s?2-l(e):+I(e))),r?f.mod(r):f;if(c=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new t(NaN);i=!c&&p.isInteger()&&r.isInteger(),i&&(p=p.mod(r))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return a=p.s<0&&l(e)?-0:0,p.e>-1&&(a=1/a),new t(c?1/a:a);F&&(a=m(F/y+2))}for(s?(n=new t(.5),c&&(e.s=1),u=l(e)):(o=Math.abs(+I(e)),u=o%2),f=new t(A);;){if(u){if(f=f.times(p),!f.c)break;a?f.c.length>a&&(f.c.length=a):i&&(f=f.mod(r))}if(o){if(0===(o=w(o/2)))break;u=o%2}else if(e=e.times(n),h(e,e.e+1,1),e.e>14)u=l(e);else{if(0===(o=+I(e)))break;u=o%2}p=p.times(p),a?p.c&&p.c.length>a&&(p.c.length=a):i&&(p=p.mod(r))}return i?f:(c&&(f=A.div(f)),r?f.mod(r):a?h(f,F,$,void 0):f)},S.integerValue=function(e){var r=new t(this);return null==e?e=$:u(e,0,8),h(r,r.e+1,e)},S.isEqualTo=S.eq=function(e,r){return 0===c(this,new t(e,r))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(e,r){return c(this,new t(e,r))>0},S.isGreaterThanOrEqualTo=S.gte=function(e,r){return 1===(r=c(this,new t(e,r)))||0===r},S.isInteger=function(){return!!this.c&&a(this.e/y)>this.c.length-2},S.isLessThan=S.lt=function(e,r){return c(this,new t(e,r))<0},S.isLessThanOrEqualTo=S.lte=function(e,r){return-1===(r=c(this,new t(e,r)))||0===r},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(e,r){var n,o,s,c,u=this,l=u.s;if(e=new t(e,r),r=e.s,!l||!r)return new t(NaN);if(l!=r)return e.s=-r,u.plus(e);var f=u.e/y,p=e.e/y,h=u.c,d=e.c;if(!f||!p){if(!h||!d)return h?(e.s=-r,e):new t(d?u:NaN);if(!h[0]||!d[0])return d[0]?(e.s=-r,e):new t(h[0]?u:3==$?-0:0)}if(f=a(f),p=a(p),h=h.slice(),l=f-p){for((c=l<0)?(l=-l,s=h):(p=f,s=d),s.reverse(),r=l;r--;s.push(0));s.reverse()}else for(o=(c=(l=h.length)<(r=d.length))?l:r,l=r=0;r<o;r++)if(h[r]!=d[r]){c=h[r]<d[r];break}if(c&&(s=h,h=d,d=s,e.s=-e.s),(r=(o=d.length)-(n=h.length))>0)for(;r--;h[n++]=0);for(r=b-1;o>l;){if(h[--o]<d[o]){for(n=o;n&&!h[--n];h[n]=r);--h[n],h[o]+=b}h[o]-=d[o]}for(;0==h[0];h.splice(0,1),--p);return h[0]?i(e,h,p):(e.s=3==$?-1:1,e.c=[e.e=0],e)},S.modulo=S.mod=function(e,r){var n,i,o=this;return e=new t(e,r),!o.c||!e.s||e.c&&!e.c[0]?new t(NaN):!e.c||o.c&&!o.c[0]?new t(o):(9==T?(i=e.s,e.s=1,n=R(o,e,0,3),e.s=i,n.s*=i):n=R(o,e,0,T),e=o.minus(n.times(e)),e.c[0]||1!=T||(e.s=o.s),e)},S.multipliedBy=S.times=function(e,r){var n,o,s,c,u,l,f,p,h,d,g,m,w,v,N,O=this,k=O.c,_=(e=new t(e,r)).c;if(!(k&&_&&k[0]&&_[0]))return!O.s||!e.s||k&&!k[0]&&!_||_&&!_[0]&&!k?e.c=e.e=e.s=null:(e.s*=O.s,k&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(o=a(O.e/y)+a(e.e/y),e.s*=O.s,f=k.length,d=_.length,f<d&&(w=k,k=_,_=w,s=f,f=d,d=s),s=f+d,w=[];s--;w.push(0));for(v=b,N=E,s=d;--s>=0;){for(n=0,g=_[s]%N,m=_[s]/N|0,u=f,c=s+u;c>s;)p=k[--u]%N,h=k[u]/N|0,l=m*p+h*g,p=g*p+l%N*N+w[c]+n,n=(p/v|0)+(l/N|0)+m*h,w[c--]=p%v;w[c]=n}return n?++o:w.splice(0,1),i(e,w,o)},S.negated=function(){var e=new t(this);return e.s=-e.s||null,e},S.plus=function(e,r){var n,o=this,s=o.s;if(e=new t(e,r),r=e.s,!s||!r)return new t(NaN);if(s!=r)return e.s=-r,o.minus(e);var c=o.e/y,u=e.e/y,l=o.c,f=e.c;if(!c||!u){if(!l||!f)return new t(s/0);if(!l[0]||!f[0])return f[0]?e:new t(l[0]?o:0*s)}if(c=a(c),u=a(u),l=l.slice(),s=c-u){for(s>0?(u=c,n=f):(s=-s,n=l),n.reverse();s--;n.push(0));n.reverse()}for(s=l.length,r=f.length,s-r<0&&(n=f,f=l,l=n,r=s),s=0;r;)s=(l[--r]=l[r]+f[r]+s)/b|0,l[r]=b===l[r]?0:l[r]%b;return s&&(l=[s].concat(l),++u),i(e,l,u)},S.precision=S.sd=function(e,r){var n,i,o,a=this;if(null!=e&&e!==!!e)return u(e,1,_),null==r?r=$:u(r,0,8),h(new t(a),e,r);if(!(n=a.c))return null;if(o=n.length-1,i=o*y+1,o=n[o]){for(;o%10==0;o/=10,i--);for(o=n[0];o>=10;o/=10,i++);}return e&&a.e+1>i&&(i=a.e+1),i},S.shiftedBy=function(e){return u(e,-O,O),this.times("1e"+e)},S.squareRoot=S.sqrt=function(){var e,r,n,i,o,c=this,u=c.c,l=c.s,f=c.e,p=L+4,d=new t("0.5");if(1!==l||!u||!u[0])return new t(!l||l<0&&(!u||u[0])?NaN:u?c:1/0);if(l=Math.sqrt(+I(c)),0==l||l==1/0?(r=s(u),(r.length+f)%2==0&&(r+="0"),l=Math.sqrt(+r),f=a((f+1)/2)-(f<0||f%2),l==1/0?r="1e"+f:(r=l.toExponential(),r=r.slice(0,r.indexOf("e")+1)+f),n=new t(r)):n=new t(l+""),n.c[0])for(f=n.e,l=f+p,l<3&&(l=0);;)if(o=n,n=d.times(o.plus(R(c,o,p,1))),s(o.c).slice(0,l)===(r=s(n.c)).slice(0,l)){if(n.e<f&&--l,"9999"!=(r=r.slice(l-3,l+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(h(n,n.e+L+2,1),e=!n.times(n).eq(c));break}if(!i&&(h(o,o.e+L+2,0),o.times(o).eq(c))){n=o;break}p+=4,l+=4,i=1}return h(n,n.e+L+1,$,e)},S.toExponential=function(e,t){return null!=e&&(u(e,0,_),e++),r(this,e,t,1)},S.toFixed=function(e,t){return null!=e&&(u(e,0,_),e=e+this.e+1),r(this,e,t)},S.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=z;else if("object"!=typeof r)throw Error(v+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",l=a[0],f=a[1],p=i.s<0,h=p?l.slice(1):l,d=h.length;if(c&&(o=s,s=c,c=o,d-=o),s>0&&d>0){for(o=d%s||s,l=h.substr(0,o);o<d;o+=s)l+=u+h.substr(o,s);c>0&&(l+=u+h.slice(o)),p&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},S.toFraction=function(e){var r,n,i,o,a,c,u,l,f,p,h,d,g=this,m=g.c;if(null!=e&&(u=new t(e),!u.isInteger()&&(u.c||1!==u.s)||u.lt(A)))throw Error(v+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+I(u));if(!m)return new t(g);for(r=new t(A),f=n=new t(A),i=l=new t(A),d=s(m),a=r.e=d.length-g.e-1,r.c[0]=k[(c=a%y)<0?y+c:c],e=!e||u.comparedTo(r)>0?a>0?r:f:u,c=U,U=1/0,u=new t(d),l.c[0]=0;p=R(u,r,0,1),o=n.plus(p.times(i)),1!=o.comparedTo(e);)n=i,i=o,f=l.plus(p.times(o=f)),l=o,r=u.minus(p.times(o=r)),u=o;return o=R(e.minus(n),i,0,1),l=l.plus(o.times(f)),n=n.plus(o.times(i)),l.s=f.s=g.s,a*=2,h=R(f,i,a,$).minus(g).abs().comparedTo(R(l,n,a,$).minus(g).abs())<1?[f,i]:[l,n],U=c,h},S.toNumber=function(){return+I(this)},S.toPrecision=function(e,t){return null!=e&&u(e,1,_),r(this,e,t,2)},S.toString=function(e){var r,n=this,i=n.s,o=n.e;return null===o?i?(r="Infinity",i<0&&(r="-"+r)):r="NaN":(null==e?r=o<=C||o>=D?f(s(n.c),o):p(s(n.c),o,"0"):10===e?(n=h(new t(n),L+o+1,$),r=p(s(n.c),n.e,"0")):(u(e,2,j.length,"Base"),r=x(p(s(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(r="-"+r)),r},S.valueOf=S.toJSON=function(){return I(this)},S._isBigNumber=!0,g&&(S[Symbol.toStringTag]="BigNumber",S[Symbol.for("nodejs.util.inspect.custom")]=S.valueOf),null!=e&&t.set(e),t}function a(e){var t=0|e;return e>0||e===t?t:t-1}function s(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=y-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function c(e,t){var r,n,i=e.c,o=t.c,a=e.s,s=t.s,c=e.e,u=t.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==u,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(s=(c=i.length)<(u=o.length)?c:u,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function u(e,t,r,n){if(e<t||e>r||e!==w(e))throw Error(v+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function l(e){var t=e.c.length-1;return a(e.e/y)==t&&e.c[t]%2!=0}function f(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function p(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(n=e.length,++t>n){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var h,d=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,m=Math.ceil,w=Math.floor,v="[BigNumber Error] ",N=v+"Number primitive has more than 15 significant digits: ",b=1e14,y=14,O=9007199254740991,k=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],E=1e7,_=1e9;h=o(),h.default=h.BigNumber=h,void 0!==(n=function(){return h}.call(t,r,t,e))&&(e.exports=n)}()},240:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("LayoutContent",{attrs:{breads:[{title:"比价列表"}]}},[r("LayoutFilter",{on:{"on-filter":e.onFilter,"on-clear":e.onClear}},[r("Form",{ref:"filterForm",attrs:{inline:"",model:e.filter}},[r("FormItem",{attrs:{prop:"sku"}},[r("Input",{attrs:{placeholder:"SKU"},model:{value:e.filter.sku,callback:function(t){e.$set(e.filter,"sku",t)},expression:"filter.sku"}})],1),e._v(" "),r("FormItem",{attrs:{prop:"productId"}},[r("Input",{attrs:{placeholder:"商品编码"},model:{value:e.filter.productId,callback:function(t){e.$set(e.filter,"productId",t)},expression:"filter.productId"}})],1),e._v(" "),r("FormItem",{attrs:{prop:"status"}},[r("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:e.filter.status,callback:function(t){e.$set(e.filter,"status",t)},expression:"filter.status"}},[r("Option",{attrs:{value:0}},[e._v("正常")]),e._v(" "),r("Option",{attrs:{value:1}},[e._v("异常")])],1)],1),e._v(" "),r("FormItem",{attrs:{prop:"productName"}},[r("Input",{attrs:{placeholder:"商品名称"},model:{value:e.filter.productName,callback:function(t){e.$set(e.filter,"productName",t)},expression:"filter.productName"}})],1),e._v(" "),r("FormItem",{attrs:{prop:"sizeName"}},[r("Input",{attrs:{placeholder:"尺码"},model:{value:e.filter.sizeName,callback:function(t){e.$set(e.filter,"sizeName",t)},expression:"filter.sizeName"}})],1)],1)],1),e._v(" "),r("LayoutTable",{attrs:{page:e.page,total:e.total,columns:e.columns,data:e.data,"row-class-name":e.onRowClassName},on:{"on-page-change":e.onPageChange}},[r("template",{staticClass:"btns",slot:"footer"},[r("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:e.onExport}},[e._v("导出")])],1)],2)],1)},i=[];n._withStripped=!0;var o={render:n,staticRenderFns:i};t.a=o},5:function(e,t){e.exports=iview},96:function(e,t,r){"use strict";var n=r(13),i=r.n(n),o=r(21),a=r.n(o),s=r(22),c=r.n(s),u=r(5),l=(r.n(u),r(16)),f=r(17),p=r.n(f),h=r(44),d=r(239),g=(r.n(d),r(27)),m=r.n(g),w=new l.a,v=function(e,t,r){var n=t[r]?Object(d.BigNumber)(t[r]).times(100).toNumber():0;return e(u.InputNumber,{attrs:{value:n,max:100,min:0,formatter:function(e){return e+"%"}},style:"width: 70px",on:{input:function(e){return t[r]=Object(d.BigNumber)(e).div(100).toNumber()}}})};t.a={name:"SendRecordPage",data:function(){var e=this,t=this.$createElement;return{filter:{productId:"",sku:"",status:"",productName:"",sizeName:""},page:1,total:0,data:[],columns:[{title:"商品编码",key:"productId",width:100},{title:"商品图片",width:120,render:function(e,t){return e("img",{attrs:{src:t.row.imageUrl,width:"100"}})}},{title:"SKU",key:"sku",width:100},{title:"商品名称",key:"productName",width:150,render:function(e,t){var r=t.row;return e("a",{attrs:{href:"/ufoPlatform/html/product/productEdit.html?id="+r.id}},[r.productName])}},{title:"尺码",key:"sizeName",width:100},{renderHeader:function(){return t("span",["毒当前价",t("br"),"(A)"])},key:"channelPrice",width:100,render:function(e,t){var r=t.row;return r.channelUrl?e("a",{attrs:{href:r.channelUrl}},[r.channelPrice]):e("span",[r.channelPrice])}},{title:"毒平均价",key:"channelAveragePrice",width:100},{renderHeader:function(){return t("span",["价格低于",t("br"),"(a%)"])},width:150,render:function(t,r){var n=r.row;return n._editing?t("div",[v(t,n,"lowRate")," ",t(u.Tooltip,{attrs:{placement:"top",content:"保存"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"md-checkmark-circle"},on:{click:function(){return e.onSaveRate(n)}}})])]):t("span",[Object(d.BigNumber)(n.lowRate).times(100).toNumber(),"%  ",t(u.Tooltip,{attrs:{placement:"top",content:"修改比例"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"md-create"},on:{click:function(){return e.onEditRate(n)}}})])])}},{renderHeader:function(){return t("span",["价格高于",t("br"),"(b%)"])},width:150,render:function(t,r){var n=r.row;return n._editing?t("div",[v(t,n,"highRate")," ",t(u.Tooltip,{attrs:{placement:"top",content:"保存"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"md-checkmark-circle"},on:{click:function(){return e.onSaveRate(n)}}})])]):t("span",[Object(d.BigNumber)(n.highRate).times(100).toNumber(),"%  ",t(u.Tooltip,{attrs:{placement:"top",content:"修改比例"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"md-create"},on:{click:function(){return e.onEditRate(n)}}})])])}},{renderHeader:function(){return t("span",["对标毒的价格区间",t("br"),"A(1-a%)~A(1+b%)"])},width:150,key:"channelPriceRange"},{title:"平台建议售价",key:"suggestPriceRange",width:150},{title:"UFO当前价",key:"ufoCurrentPrice",width:100},{renderHeader:function(){return t("span",["UFO价格红线"])},key:"ufoMinPrice",width:120},{title:"状态",renderHeader:function(){return t("span",["状态",t(u.Tooltip,{attrs:{transfer:!0,placement:"top",content:"毒当前价低于UFO价格红线则标记为异常"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"ios-information-circle-outline"}})])])},render:function(e,t){return e("span",[t.row.status?"异常":"正常"])},width:100},{title:"操作",render:function(t,r){var n=r.row;return t("div",[n.status?t(u.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return e.onEditPrice(n)}}},["确认变更"]):t("span",["-"])])},width:100}]}},created:function(){var e=this;this.$nextTick(function(){var t=m.a.parse(location.search?location.search.slice(1):""),r=t.page,n=t.productId,i=t.sku,o=t.status,a=t.productName,s=t.sizeName;e.filter.productId=n||e.filter.productId,e.filter.sku=i||e.filter.sku,e.filter.status=o?parseInt(o):e.filter.status,e.filter.productName=a?decodeURIComponent(a):e.filter.productName,e.filter.sizeName=s||e.filter.sizeName,e.page=r?parseInt(r):1,e.fetchData(e.filter,e.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(e){this.fetchData(this.filter,e)},onEditRate:function(e){e._editing=!0},onRowClassName:function(e){return e.status?"row-unnormarl":"row-normarl"},onSaveRate:function(e){var t=this;return c()(a.a.mark(function r(){return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:t.$Modal.confirm({title:"提示",content:"是否确认更新",onOk:function(){var r=c()(a.a.mark(function r(){var n,i,o,s;return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.lowRate,i=e.highRate,o=e.id,t.$Loading.start(),r.next=4,w._get("/ufoPlatform/channelSkuCompare/updateSuggestRate",{id:o,suggestLowRate:n,suggestHighRate:i});case 4:s=r.sent,200===s.code?(t.$Message.success("更新成功"),t.$Loading.finish(),t.fetchData(t.filter,t.page),e._editing=!1):(s.message&&t.$Message.warning(s.message),t.$Loading.error());case 6:case"end":return r.stop()}},r,t)}));return function(){return r.apply(this,arguments)}}()});case 1:case"end":return r.stop()}},r,t)}))()},onEditPrice:function(e){var t=this,r=e.id;this.$Modal.confirm({title:"提示",content:"是否确认变更",onOk:function(){var e=c()(a.a.mark(function e(){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,w._get("/ufoPlatform/channelSkuCompare/updateSuggestPrice",{id:r,status:0});case 3:n=e.sent,200===n.code?(t.$Message.success("变更成功"),t.$Loading.finish(),t.fetchData(t.filter,t.page)):(n.message&&t.$Message.warning(n.message),t.$Loading.error());case 5:case"end":return e.stop()}},e,t)}));return function(){return e.apply(this,arguments)}}()})},fetchData:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return c()(a.a.mark(function n(){var o,s,c;return a.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t.page=r,t.$Loading.start(),n.next=4,w._get("/ufoPlatform/channelSkuCompare/queryList",i()({page:r},t.getParams(e)));case 4:o=n.sent,200===o.code?(s=0,c=[],o.data&&0!==o.data.length&&(s=o.data.total,c=o.data.list),t.total=s,t.data=c.map(function(e){return e._editing=!1,e._lowRate=e.lowRate,e._highRate=e.highRate,e}),t.$Loading.finish()):(o.message&&t.$Message.warning(o.message),t.$Loading.error());case 6:case"end":return n.stop()}},n,t)}))()},onExport:function(){var e=this;return c()(a.a.mark(function t(){var r;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.$Loading.start(),t.next=3,w._get("/ufoPlatform/batch/export.do",{type:"channelSkuCompareServiceImpl",queryConf:e.getParams(e.filter)},{responseType:"blob"});case 3:r=t.sent,r instanceof Blob?(h.a.downloadBlob(r,"比价跟价导出_"+p()().format("YYYY-MM-DD")+".xlsx"),e.$Loading.finish()):r&&(r.message&&e.$Message.warning(r.message),e.$Loading.error());case 5:case"end":return t.stop()}},t,e)}))()},getParams:function(e){return{productId:e.productId,sku:e.sku,status:parseInt(e.status)>=0?e.status:void 0,productName:e.productName,sizeName:e.sizeName}}}}}},[236]);
\ No newline at end of file
webpackJsonp([2],{10:function(e,t){e.exports=Vue},234:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(235),i=r(15);Object(i.a)(n.a)},235:function(e,t,r){"use strict";function n(e){a||r(236)}var i=r(96),o=r(238),a=!1,s=r(0),c=n,u=s(i.a,o.a,!1,c,"data-v-34e1a97a",null);u.options.__file="src/views/price-compare/index.vue",t.a=u.exports},236:function(e,t){},237:function(e,t,r){var n;!function(i){"use strict";function o(e){function t(e,r){var n,i,o,a,s,c,l,f,p=this;if(!(p instanceof t))return new t(e,r);if(null==r){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>U?p.c=p.e=null:e.e<B?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,s=e;s>=10;s/=10,a++);return void(a>U?p.c=p.e=null:(p.e=a,p.c=[e]))}f=String(e)}else{if(!d.test(f=String(e)))return P(p,f,c);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(a=f.indexOf("."))>-1&&(f=f.replace(".","")),(s=f.search(/e/i))>0?(a<0&&(a=s),a+=+f.slice(s+1),f=f.substring(0,s)):a<0&&(a=f.length)}else{if(u(r,2,j.length,"Base"),10==r)return p=new t(e),h(p,L+p.e+1,$);if(f=String(e),c="number"==typeof e){if(0*e!=0)return P(p,f,c,r);if(p.s=1/e<0?(f=f.slice(1),-1):1,t.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(N+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=j.slice(0,r),a=s=0,l=f.length;s<l;s++)if(n.indexOf(i=f.charAt(s))<0){if("."==i){if(s>a){a=l;continue}}else if(!o&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){o=!0,s=-1,a=0;continue}return P(p,String(e),c,r)}c=!1,f=x(f,r,10,p.s),(a=f.indexOf("."))>-1?f=f.replace(".",""):a=f.length}for(s=0;48===f.charCodeAt(s);s++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(s,++l)){if(l-=s,c&&t.DEBUG&&l>15&&(e>O||e!==w(e)))throw Error(N+p.s*e);if((a=a-s-1)>U)p.c=p.e=null;else if(a<B)p.c=[p.e=0];else{if(p.e=a,p.c=[],s=(a+1)%y,a<0&&(s+=y),s<l){for(s&&p.c.push(+f.slice(0,s)),l-=y;s<l;)p.c.push(+f.slice(s,s+=y));s=y-(f=f.slice(s)).length}else s-=l;for(;s--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function r(e,r,n,i){var o,a,c,l,d;if(null==n?n=$:u(n,0,8),!e.c)return e.toString();if(o=e.c[0],c=e.e,null==r)d=s(e.c),d=1==i||2==i&&(c<=C||c>=D)?f(d,c):p(d,c,"0");else if(e=h(new t(e),r,n),a=e.e,d=s(e.c),l=d.length,1==i||2==i&&(r<=a||a<=C)){for(;l<r;d+="0",l++);d=f(d,a)}else if(r-=c,d=p(d,a,"0"),a+1>l){if(--r>0)for(d+=".";r--;d+="0");}else if((r+=a-l)>0)for(a+1==l&&(d+=".");r--;d+="0");return e.s<0&&o?"-"+d:d}function n(e,r){for(var n,i=1,o=new t(e[0]);i<e.length;i++){if(n=new t(e[i]),!n.s){o=n;break}r.call(o,n)&&(o=n)}return o}function i(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*y-1)>U?e.c=e.e=null:r<B?e.c=[e.e=0]:(e.e=r,e.c=t),e}function h(e,t,r,n){var i,o,a,s,c,u,l,f=e.c,p=k;if(f){e:{for(i=1,s=f[0];s>=10;s/=10,i++);if((o=t-i)<0)o+=y,a=t,c=f[u=0],l=c/p[i-a-1]%10|0;else if((u=m((o+1)/y))>=f.length){if(!n)break e;for(;f.length<=u;f.push(0));c=l=0,i=1,o%=y,a=o-y+1}else{for(c=s=f[u],i=1;s>=10;s/=10,i++);o%=y,a=o-y+i,l=a<0?0:c/p[i-a-1]%10|0}if(n=n||t<0||null!=f[u+1]||(a<0?c:c%p[i-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(o>0?a>0?c/p[i-a]:0:f[u-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(y-t%y)%y],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=u,s=1,u--):(f.length=u+1,s=p[y-o],f[u]=a>0?w(c/p[i-a]%p[a])*s:0),n)for(;;){if(0==u){for(o=1,a=f[0];a>=10;a/=10,o++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,f[0]==b&&(f[0]=1));break}if(f[u]+=s,f[u]!=b)break;f[u--]=0,s=1}for(o=f.length;0===f[--o];f.pop());}e.e>U?e.c=e.e=null:e.e<B&&(e.c=[e.e=0])}return e}function I(e){var t,r=e.e;return null===r?e.toString():(t=s(e.c),t=r<=C||r>=D?f(t,r):p(t,r,"0"),e.s<0?"-"+t:t)}var R,x,P,S=t.prototype={constructor:t,toString:null,valueOf:null},A=new t(1),L=20,$=4,C=-7,D=21,B=-1e7,U=1e7,M=!1,T=1,F=0,z={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz";return t.clone=o,t.ROUND_UP=0,t.ROUND_DOWN=1,t.ROUND_CEIL=2,t.ROUND_FLOOR=3,t.ROUND_HALF_UP=4,t.ROUND_HALF_DOWN=5,t.ROUND_HALF_EVEN=6,t.ROUND_HALF_CEIL=7,t.ROUND_HALF_FLOOR=8,t.EUCLID=9,t.config=t.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(v+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(r=e[t],u(r,0,_,t),L=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(r=e[t],u(r,0,8,t),$=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&(r=e[t],r&&r.pop?(u(r[0],-_,0,t),u(r[1],0,_,t),C=r[0],D=r[1]):(u(r,-_,_,t),C=-(D=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)u(r[0],-_,-1,t),u(r[1],1,_,t),B=r[0],U=r[1];else{if(u(r,-_,_,t),!r)throw Error(v+t+" cannot be zero: "+r);B=-(U=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(v+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!r,Error(v+"crypto unavailable");M=r}else M=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(r=e[t],u(r,0,9,t),T=r),e.hasOwnProperty(t="POW_PRECISION")&&(r=e[t],u(r,0,_,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(v+t+" not an object: "+r);z=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(v+t+" invalid: "+r);j=r}}return{DECIMAL_PLACES:L,ROUNDING_MODE:$,EXPONENTIAL_AT:[C,D],RANGE:[B,U],CRYPTO:M,MODULO_MODE:T,POW_PRECISION:F,FORMAT:z,ALPHABET:j}},t.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!t.DEBUG)return!0;var r,n,i=e.c,o=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(i)){if((1===a||-1===a)&&o>=-_&&o<=_&&o===w(o)){if(0===i[0]){if(0===o&&1===i.length)return!0;break e}if(r=(o+1)%y,r<1&&(r+=y),String(i[0]).length==r){for(r=0;r<i.length;r++)if((n=i[r])<0||n>=b||n!==w(n))break e;if(0!==n)return!0}}}else if(null===i&&null===o&&(null===a||1===a||-1===a))return!0;throw Error(v+"Invalid BigNumber: "+e)},t.maximum=t.max=function(){return n(arguments,S.lt)},t.minimum=t.min=function(){return n(arguments,S.gt)},t.random=function(){var e=9007199254740992*Math.random()&2097151?function(){return w(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(r){var n,i,o,a,s,c=0,l=[],f=new t(A);if(null==r?r=L:u(r,0,_),a=m(r/y),M)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(a*=2));c<a;)s=131072*n[c]+(n[c+1]>>>11),s>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),n[c]=i[0],n[c+1]=i[1]):(l.push(s%1e14),c+=2);c=a/2}else{if(!crypto.randomBytes)throw M=!1,Error(v+"crypto unavailable");for(n=crypto.randomBytes(a*=7);c<a;)s=281474976710656*(31&n[c])+1099511627776*n[c+1]+4294967296*n[c+2]+16777216*n[c+3]+(n[c+4]<<16)+(n[c+5]<<8)+n[c+6],s>=9e15?crypto.randomBytes(7).copy(n,c):(l.push(s%1e14),c+=7);c=a/7}if(!M)for(;c<a;)(s=e())<9e15&&(l[c++]=s%1e14);for(a=l[--c],r%=y,a&&r&&(s=k[y-r],l[c]=w(a/s)*s);0===l[c];l.pop(),c--);if(c<0)l=[o=0];else{for(o=-1;0===l[0];l.splice(0,1),o-=y);for(c=1,s=l[0];s>=10;s/=10,c++);c<y&&(o-=y-c)}return f.e=o,f.c=l,f}}(),t.sum=function(){for(var e=1,r=arguments,n=new t(r[0]);e<r.length;)n=n.plus(r[e++]);return n},x=function(){function e(e,t,r,n){for(var i,o,a=[0],s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(r,n,i,o,a){var c,u,l,f,h,d,g,m,w=r.indexOf("."),v=L,N=$;for(w>=0&&(f=F,F=0,r=r.replace(".",""),m=new t(n),d=m.pow(r.length-w),F=f,m.c=e(p(s(d.c),d.e,"0"),10,i,"0123456789"),m.e=m.c.length),g=e(r,n,i,a?(c=j,"0123456789"):(c="0123456789",j)),l=f=g.length;0==g[--f];g.pop());if(!g[0])return c.charAt(0);if(w<0?--l:(d.c=g,d.e=l,d.s=o,d=R(d,m,v,N,i),g=d.c,h=d.r,l=d.e),u=l+v+1,w=g[u],f=i/2,h=h||u<0||null!=g[u+1],h=N<4?(null!=w||h)&&(0==N||N==(d.s<0?3:2)):w>f||w==f&&(4==N||h||6==N&&1&g[u-1]||N==(d.s<0?8:7)),u<1||!g[0])r=h?p(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(g.length=u,h)for(--i;++g[--u]>i;)g[u]=0,u||(++l,g=[1].concat(g));for(f=g.length;!g[--f];);for(w=0,r="";w<=f;r+=c.charAt(g[w++]));r=p(r,l,c.charAt(0))}return r}}(),R=function(){function e(e,t,r){var n,i,o,a,s=0,c=e.length,u=t%E,l=t/E|0;for(e=e.slice();c--;)o=e[c]%E,a=e[c]/E|0,n=l*o+a*u,i=u*o+n%E*E+s,s=(i/r|0)+(n/E|0)+l*a,e[c]=i%r;return s&&(e=[s].concat(e)),e}function r(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(i,o,s,c,u){var l,f,p,d,g,m,v,N,O,k,E,_,I,R,x,P,S,A=i.s==o.s?1:-1,L=i.c,$=o.c;if(!(L&&L[0]&&$&&$[0]))return new t(i.s&&o.s&&(L?!$||L[0]!=$[0]:$)?L&&0==L[0]||!$?0*A:A/0:NaN);for(N=new t(A),O=N.c=[],f=i.e-o.e,A=s+f+1,u||(u=b,f=a(i.e/y)-a(o.e/y),A=A/y|0),p=0;$[p]==(L[p]||0);p++);if($[p]>(L[p]||0)&&f--,A<0)O.push(1),d=!0;else{for(R=L.length,P=$.length,p=0,A+=2,g=w(u/($[0]+1)),g>1&&($=e($,g,u),L=e(L,g,u),P=$.length,R=L.length),I=P,k=L.slice(0,P),E=k.length;E<P;k[E++]=0);S=$.slice(),S=[0].concat(S),x=$[0],$[1]>=u/2&&x++;do{if(g=0,(l=r($,k,P,E))<0){if(_=k[0],P!=E&&(_=_*u+(k[1]||0)),(g=w(_/x))>1)for(g>=u&&(g=u-1),m=e($,g,u),v=m.length,E=k.length;1==r(m,k,v,E);)g--,n(m,P<v?S:$,v,u),v=m.length,l=1;else 0==g&&(l=g=1),m=$.slice(),v=m.length;if(v<E&&(m=[0].concat(m)),n(k,m,E,u),E=k.length,-1==l)for(;r($,k,P,E)<1;)g++,n(k,P<E?S:$,E,u),E=k.length}else 0===l&&(g++,k=[0]);O[p++]=g,k[0]?k[E++]=L[I]||0:(k=[L[I]],E=1)}while((I++<R||null!=k[0])&&A--);d=null!=k[0],O[0]||O.splice(0,1)}if(u==b){for(p=1,A=O[0];A>=10;A/=10,p++);h(N,s+(N.e=p+f*y-1)+1,c,d)}else N.e=f,N.r=+d;return N}}(),P=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,n=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,s,c,u){var l,f=c?s:s.replace(o,"");if(i.test(f))a.s=isNaN(f)?null:f<0?-1:1;else{if(!c&&(f=f.replace(e,function(e,t,r){return l="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=l?e:t}),u&&(l=u,f=f.replace(r,"$1").replace(n,"0.$1")),s!=f))return new t(f,l);if(t.DEBUG)throw Error(v+"Not a"+(u?" base "+u:"")+" number: "+s);a.s=null}a.c=a.e=null}}(),S.absoluteValue=S.abs=function(){var e=new t(this);return e.s<0&&(e.s=1),e},S.comparedTo=function(e,r){return c(this,new t(e,r))},S.decimalPlaces=S.dp=function(e,r){var n,i,o,s=this;if(null!=e)return u(e,0,_),null==r?r=$:u(r,0,8),h(new t(s),e+s.e+1,r);if(!(n=s.c))return null;if(i=((o=n.length-1)-a(this.e/y))*y,o=n[o])for(;o%10==0;o/=10,i--);return i<0&&(i=0),i},S.dividedBy=S.div=function(e,r){return R(this,new t(e,r),L,$)},S.dividedToIntegerBy=S.idiv=function(e,r){return R(this,new t(e,r),0,1)},S.exponentiatedBy=S.pow=function(e,r){var n,i,o,a,s,c,u,f,p=this;if(e=new t(e),e.c&&!e.isInteger())throw Error(v+"Exponent not an integer: "+I(e));if(null!=r&&(r=new t(r)),s=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return f=new t(Math.pow(+I(p),s?2-l(e):+I(e))),r?f.mod(r):f;if(c=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new t(NaN);i=!c&&p.isInteger()&&r.isInteger(),i&&(p=p.mod(r))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return a=p.s<0&&l(e)?-0:0,p.e>-1&&(a=1/a),new t(c?1/a:a);F&&(a=m(F/y+2))}for(s?(n=new t(.5),c&&(e.s=1),u=l(e)):(o=Math.abs(+I(e)),u=o%2),f=new t(A);;){if(u){if(f=f.times(p),!f.c)break;a?f.c.length>a&&(f.c.length=a):i&&(f=f.mod(r))}if(o){if(0===(o=w(o/2)))break;u=o%2}else if(e=e.times(n),h(e,e.e+1,1),e.e>14)u=l(e);else{if(0===(o=+I(e)))break;u=o%2}p=p.times(p),a?p.c&&p.c.length>a&&(p.c.length=a):i&&(p=p.mod(r))}return i?f:(c&&(f=A.div(f)),r?f.mod(r):a?h(f,F,$,void 0):f)},S.integerValue=function(e){var r=new t(this);return null==e?e=$:u(e,0,8),h(r,r.e+1,e)},S.isEqualTo=S.eq=function(e,r){return 0===c(this,new t(e,r))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(e,r){return c(this,new t(e,r))>0},S.isGreaterThanOrEqualTo=S.gte=function(e,r){return 1===(r=c(this,new t(e,r)))||0===r},S.isInteger=function(){return!!this.c&&a(this.e/y)>this.c.length-2},S.isLessThan=S.lt=function(e,r){return c(this,new t(e,r))<0},S.isLessThanOrEqualTo=S.lte=function(e,r){return-1===(r=c(this,new t(e,r)))||0===r},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(e,r){var n,o,s,c,u=this,l=u.s;if(e=new t(e,r),r=e.s,!l||!r)return new t(NaN);if(l!=r)return e.s=-r,u.plus(e);var f=u.e/y,p=e.e/y,h=u.c,d=e.c;if(!f||!p){if(!h||!d)return h?(e.s=-r,e):new t(d?u:NaN);if(!h[0]||!d[0])return d[0]?(e.s=-r,e):new t(h[0]?u:3==$?-0:0)}if(f=a(f),p=a(p),h=h.slice(),l=f-p){for((c=l<0)?(l=-l,s=h):(p=f,s=d),s.reverse(),r=l;r--;s.push(0));s.reverse()}else for(o=(c=(l=h.length)<(r=d.length))?l:r,l=r=0;r<o;r++)if(h[r]!=d[r]){c=h[r]<d[r];break}if(c&&(s=h,h=d,d=s,e.s=-e.s),(r=(o=d.length)-(n=h.length))>0)for(;r--;h[n++]=0);for(r=b-1;o>l;){if(h[--o]<d[o]){for(n=o;n&&!h[--n];h[n]=r);--h[n],h[o]+=b}h[o]-=d[o]}for(;0==h[0];h.splice(0,1),--p);return h[0]?i(e,h,p):(e.s=3==$?-1:1,e.c=[e.e=0],e)},S.modulo=S.mod=function(e,r){var n,i,o=this;return e=new t(e,r),!o.c||!e.s||e.c&&!e.c[0]?new t(NaN):!e.c||o.c&&!o.c[0]?new t(o):(9==T?(i=e.s,e.s=1,n=R(o,e,0,3),e.s=i,n.s*=i):n=R(o,e,0,T),e=o.minus(n.times(e)),e.c[0]||1!=T||(e.s=o.s),e)},S.multipliedBy=S.times=function(e,r){var n,o,s,c,u,l,f,p,h,d,g,m,w,v,N,O=this,k=O.c,_=(e=new t(e,r)).c;if(!(k&&_&&k[0]&&_[0]))return!O.s||!e.s||k&&!k[0]&&!_||_&&!_[0]&&!k?e.c=e.e=e.s=null:(e.s*=O.s,k&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(o=a(O.e/y)+a(e.e/y),e.s*=O.s,f=k.length,d=_.length,f<d&&(w=k,k=_,_=w,s=f,f=d,d=s),s=f+d,w=[];s--;w.push(0));for(v=b,N=E,s=d;--s>=0;){for(n=0,g=_[s]%N,m=_[s]/N|0,u=f,c=s+u;c>s;)p=k[--u]%N,h=k[u]/N|0,l=m*p+h*g,p=g*p+l%N*N+w[c]+n,n=(p/v|0)+(l/N|0)+m*h,w[c--]=p%v;w[c]=n}return n?++o:w.splice(0,1),i(e,w,o)},S.negated=function(){var e=new t(this);return e.s=-e.s||null,e},S.plus=function(e,r){var n,o=this,s=o.s;if(e=new t(e,r),r=e.s,!s||!r)return new t(NaN);if(s!=r)return e.s=-r,o.minus(e);var c=o.e/y,u=e.e/y,l=o.c,f=e.c;if(!c||!u){if(!l||!f)return new t(s/0);if(!l[0]||!f[0])return f[0]?e:new t(l[0]?o:0*s)}if(c=a(c),u=a(u),l=l.slice(),s=c-u){for(s>0?(u=c,n=f):(s=-s,n=l),n.reverse();s--;n.push(0));n.reverse()}for(s=l.length,r=f.length,s-r<0&&(n=f,f=l,l=n,r=s),s=0;r;)s=(l[--r]=l[r]+f[r]+s)/b|0,l[r]=b===l[r]?0:l[r]%b;return s&&(l=[s].concat(l),++u),i(e,l,u)},S.precision=S.sd=function(e,r){var n,i,o,a=this;if(null!=e&&e!==!!e)return u(e,1,_),null==r?r=$:u(r,0,8),h(new t(a),e,r);if(!(n=a.c))return null;if(o=n.length-1,i=o*y+1,o=n[o]){for(;o%10==0;o/=10,i--);for(o=n[0];o>=10;o/=10,i++);}return e&&a.e+1>i&&(i=a.e+1),i},S.shiftedBy=function(e){return u(e,-O,O),this.times("1e"+e)},S.squareRoot=S.sqrt=function(){var e,r,n,i,o,c=this,u=c.c,l=c.s,f=c.e,p=L+4,d=new t("0.5");if(1!==l||!u||!u[0])return new t(!l||l<0&&(!u||u[0])?NaN:u?c:1/0);if(l=Math.sqrt(+I(c)),0==l||l==1/0?(r=s(u),(r.length+f)%2==0&&(r+="0"),l=Math.sqrt(+r),f=a((f+1)/2)-(f<0||f%2),l==1/0?r="1e"+f:(r=l.toExponential(),r=r.slice(0,r.indexOf("e")+1)+f),n=new t(r)):n=new t(l+""),n.c[0])for(f=n.e,l=f+p,l<3&&(l=0);;)if(o=n,n=d.times(o.plus(R(c,o,p,1))),s(o.c).slice(0,l)===(r=s(n.c)).slice(0,l)){if(n.e<f&&--l,"9999"!=(r=r.slice(l-3,l+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(h(n,n.e+L+2,1),e=!n.times(n).eq(c));break}if(!i&&(h(o,o.e+L+2,0),o.times(o).eq(c))){n=o;break}p+=4,l+=4,i=1}return h(n,n.e+L+1,$,e)},S.toExponential=function(e,t){return null!=e&&(u(e,0,_),e++),r(this,e,t,1)},S.toFixed=function(e,t){return null!=e&&(u(e,0,_),e=e+this.e+1),r(this,e,t)},S.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=z;else if("object"!=typeof r)throw Error(v+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",l=a[0],f=a[1],p=i.s<0,h=p?l.slice(1):l,d=h.length;if(c&&(o=s,s=c,c=o,d-=o),s>0&&d>0){for(o=d%s||s,l=h.substr(0,o);o<d;o+=s)l+=u+h.substr(o,s);c>0&&(l+=u+h.slice(o)),p&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},S.toFraction=function(e){var r,n,i,o,a,c,u,l,f,p,h,d,g=this,m=g.c;if(null!=e&&(u=new t(e),!u.isInteger()&&(u.c||1!==u.s)||u.lt(A)))throw Error(v+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+I(u));if(!m)return new t(g);for(r=new t(A),f=n=new t(A),i=l=new t(A),d=s(m),a=r.e=d.length-g.e-1,r.c[0]=k[(c=a%y)<0?y+c:c],e=!e||u.comparedTo(r)>0?a>0?r:f:u,c=U,U=1/0,u=new t(d),l.c[0]=0;p=R(u,r,0,1),o=n.plus(p.times(i)),1!=o.comparedTo(e);)n=i,i=o,f=l.plus(p.times(o=f)),l=o,r=u.minus(p.times(o=r)),u=o;return o=R(e.minus(n),i,0,1),l=l.plus(o.times(f)),n=n.plus(o.times(i)),l.s=f.s=g.s,a*=2,h=R(f,i,a,$).minus(g).abs().comparedTo(R(l,n,a,$).minus(g).abs())<1?[f,i]:[l,n],U=c,h},S.toNumber=function(){return+I(this)},S.toPrecision=function(e,t){return null!=e&&u(e,1,_),r(this,e,t,2)},S.toString=function(e){var r,n=this,i=n.s,o=n.e;return null===o?i?(r="Infinity",i<0&&(r="-"+r)):r="NaN":(null==e?r=o<=C||o>=D?f(s(n.c),o):p(s(n.c),o,"0"):10===e?(n=h(new t(n),L+o+1,$),r=p(s(n.c),n.e,"0")):(u(e,2,j.length,"Base"),r=x(p(s(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(r="-"+r)),r},S.valueOf=S.toJSON=function(){return I(this)},S._isBigNumber=!0,g&&(S[Symbol.toStringTag]="BigNumber",S[Symbol.for("nodejs.util.inspect.custom")]=S.valueOf),null!=e&&t.set(e),t}function a(e){var t=0|e;return e>0||e===t?t:t-1}function s(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=y-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function c(e,t){var r,n,i=e.c,o=t.c,a=e.s,s=t.s,c=e.e,u=t.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=c==u,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(s=(c=i.length)<(u=o.length)?c:u,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function u(e,t,r,n){if(e<t||e>r||e!==w(e))throw Error(v+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function l(e){var t=e.c.length-1;return a(e.e/y)==t&&e.c[t]%2!=0}function f(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function p(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(n=e.length,++t>n){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var h,d=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,m=Math.ceil,w=Math.floor,v="[BigNumber Error] ",N=v+"Number primitive has more than 15 significant digits: ",b=1e14,y=14,O=9007199254740991,k=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],E=1e7,_=1e9;h=o(),h.default=h.BigNumber=h,void 0!==(n=function(){return h}.call(t,r,t,e))&&(e.exports=n)}()},238:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("LayoutContent",{attrs:{breads:[{title:"比价列表"}]}},[r("LayoutFilter",{on:{"on-filter":e.onFilter,"on-clear":e.onClear}},[r("Form",{ref:"filterForm",attrs:{inline:"",model:e.filter}},[r("FormItem",{attrs:{prop:"sku"}},[r("Input",{attrs:{placeholder:"SKU"},model:{value:e.filter.sku,callback:function(t){e.$set(e.filter,"sku",t)},expression:"filter.sku"}})],1),e._v(" "),r("FormItem",{attrs:{prop:"productId"}},[r("Input",{attrs:{placeholder:"商品编码"},model:{value:e.filter.productId,callback:function(t){e.$set(e.filter,"productId",t)},expression:"filter.productId"}})],1),e._v(" "),r("FormItem",{attrs:{prop:"status"}},[r("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:e.filter.status,callback:function(t){e.$set(e.filter,"status",t)},expression:"filter.status"}},[r("Option",{attrs:{value:0}},[e._v("正常")]),e._v(" "),r("Option",{attrs:{value:1}},[e._v("异常")])],1)],1),e._v(" "),r("FormItem",{attrs:{prop:"productName"}},[r("Input",{attrs:{placeholder:"商品名称"},model:{value:e.filter.productName,callback:function(t){e.$set(e.filter,"productName",t)},expression:"filter.productName"}})],1),e._v(" "),r("FormItem",{attrs:{prop:"sizeName"}},[r("Input",{attrs:{placeholder:"尺码"},model:{value:e.filter.sizeName,callback:function(t){e.$set(e.filter,"sizeName",t)},expression:"filter.sizeName"}})],1)],1)],1),e._v(" "),r("LayoutTable",{attrs:{page:e.page,total:e.total,columns:e.columns,data:e.data,"row-class-name":e.onRowClassName},on:{"on-page-change":e.onPageChange}},[r("template",{staticClass:"btns",slot:"footer"},[r("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:e.onExport}},[e._v("导出")])],1)],2)],1)},i=[];n._withStripped=!0;var o={render:n,staticRenderFns:i};t.a=o},5:function(e,t){e.exports=iview},96:function(e,t,r){"use strict";var n=r(12),i=r.n(n),o=r(24),a=r.n(o),s=r(25),c=r.n(s),u=r(5),l=(r.n(u),r(19)),f=r(20),p=r.n(f),h=r(44),d=r(237),g=(r.n(d),r(27)),m=r.n(g),w=new l.a,v=function(e,t,r){var n=t[r]?Object(d.BigNumber)(t[r]).times(100).toNumber():0;return e(u.InputNumber,{attrs:{value:n,max:100,min:0,formatter:function(e){return e+"%"}},style:"width: 70px",on:{input:function(e){return t[r]=Object(d.BigNumber)(e).div(100).toNumber()}}})};t.a={name:"SendRecordPage",data:function(){var e=this,t=this.$createElement;return{filter:{productId:"",sku:"",status:"",productName:"",sizeName:""},page:1,total:0,data:[],columns:[{title:"商品编码",key:"productId",width:100},{title:"商品图片",width:120,render:function(e,t){return e("img",{attrs:{src:t.row.imageUrl,width:"100"}})}},{title:"SKU",key:"sku",width:100},{title:"商品名称",key:"productName",width:150,render:function(e,t){var r=t.row;return e("a",{attrs:{href:"/ufoPlatform/html/product/productEdit.html?id="+r.id}},[r.productName])}},{title:"尺码",key:"sizeName",width:100},{renderHeader:function(){return t("span",["毒当前价",t("br"),"(A)"])},key:"channelPrice",width:100,render:function(e,t){var r=t.row;return r.channelUrl?e("a",{attrs:{href:r.channelUrl}},[r.channelPrice]):e("span",[r.channelPrice])}},{title:"毒平均价",key:"channelAveragePrice",width:100},{renderHeader:function(){return t("span",["价格低于",t("br"),"(a%)"])},width:150,render:function(t,r){var n=r.row;return n._editing?t("div",[v(t,n,"lowRate")," ",t(u.Tooltip,{attrs:{placement:"top",content:"保存"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"md-checkmark-circle"},on:{click:function(){return e.onSaveRate(n)}}})])]):t("span",[Object(d.BigNumber)(n.lowRate).times(100).toNumber(),"%  ",t(u.Tooltip,{attrs:{placement:"top",content:"修改比例"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"md-create"},on:{click:function(){return e.onEditRate(n)}}})])])}},{renderHeader:function(){return t("span",["价格高于",t("br"),"(b%)"])},width:150,render:function(t,r){var n=r.row;return n._editing?t("div",[v(t,n,"highRate")," ",t(u.Tooltip,{attrs:{placement:"top",content:"保存"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"md-checkmark-circle"},on:{click:function(){return e.onSaveRate(n)}}})])]):t("span",[Object(d.BigNumber)(n.highRate).times(100).toNumber(),"%  ",t(u.Tooltip,{attrs:{placement:"top",content:"修改比例"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"md-create"},on:{click:function(){return e.onEditRate(n)}}})])])}},{renderHeader:function(){return t("span",["对标毒的价格区间",t("br"),"A(1-a%)~A(1+b%)"])},width:150,key:"channelPriceRange"},{title:"平台建议售价",key:"suggestPriceRange",width:150},{title:"UFO当前价",key:"ufoCurrentPrice",width:100},{renderHeader:function(){return t("span",["UFO价格红线"])},key:"ufoMinPrice",width:120},{title:"状态",renderHeader:function(){return t("span",["状态",t(u.Tooltip,{attrs:{transfer:!0,placement:"top",content:"毒当前价低于UFO价格红线则标记为异常"}},[t(u.Icon,{class:"icon-edit",attrs:{type:"ios-information-circle-outline"}})])])},render:function(e,t){return e("span",[t.row.status?"异常":"正常"])},width:100},{title:"操作",render:function(t,r){var n=r.row;return t("div",[n.status?t(u.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return e.onEditPrice(n)}}},["确认变更"]):t("span",["-"])])},width:100}]}},created:function(){var e=this;this.$nextTick(function(){var t=m.a.parse(location.search?location.search.slice(1):""),r=t.page,n=t.productId,i=t.sku,o=t.status,a=t.productName,s=t.sizeName;e.filter.productId=n||e.filter.productId,e.filter.sku=i||e.filter.sku,e.filter.status=o?parseInt(o):e.filter.status,e.filter.productName=a?decodeURIComponent(a):e.filter.productName,e.filter.sizeName=s||e.filter.sizeName,e.page=r?parseInt(r):1,e.fetchData(e.filter,e.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(e){this.fetchData(this.filter,e)},onEditRate:function(e){e._editing=!0},onRowClassName:function(e){return e.status?"row-unnormarl":"row-normarl"},onSaveRate:function(e){var t=this;return c()(a.a.mark(function r(){return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:t.$Modal.confirm({title:"提示",content:"是否确认更新",onOk:function(){var r=c()(a.a.mark(function r(){var n,i,o,s;return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.lowRate,i=e.highRate,o=e.id,t.$Loading.start(),r.next=4,w._get("/ufoPlatform/channelSkuCompare/updateSuggestRate",{id:o,suggestLowRate:n,suggestHighRate:i});case 4:s=r.sent,200===s.code?(t.$Message.success("更新成功"),t.$Loading.finish(),t.fetchData(t.filter,t.page),e._editing=!1):(s.message&&t.$Message.warning(s.message),t.$Loading.error());case 6:case"end":return r.stop()}},r,t)}));return function(){return r.apply(this,arguments)}}()});case 1:case"end":return r.stop()}},r,t)}))()},onEditPrice:function(e){var t=this,r=e.id;this.$Modal.confirm({title:"提示",content:"是否确认变更",onOk:function(){var e=c()(a.a.mark(function e(){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,w._get("/ufoPlatform/channelSkuCompare/updateSuggestPrice",{id:r,status:0});case 3:n=e.sent,200===n.code?(t.$Message.success("变更成功"),t.$Loading.finish(),t.fetchData(t.filter,t.page)):(n.message&&t.$Message.warning(n.message),t.$Loading.error());case 5:case"end":return e.stop()}},e,t)}));return function(){return e.apply(this,arguments)}}()})},fetchData:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return c()(a.a.mark(function n(){var o,s,c;return a.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t.page=r,t.$Loading.start(),n.next=4,w._get("/ufoPlatform/channelSkuCompare/queryList",i()({page:r},t.getParams(e)));case 4:o=n.sent,200===o.code?(s=0,c=[],o.data&&0!==o.data.length&&(s=o.data.total,c=o.data.list),t.total=s,t.data=c.map(function(e){return e._editing=!1,e._lowRate=e.lowRate,e._highRate=e.highRate,e}),t.$Loading.finish()):(o.message&&t.$Message.warning(o.message),t.$Loading.error());case 6:case"end":return n.stop()}},n,t)}))()},onExport:function(){var e=this;return c()(a.a.mark(function t(){var r;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.$Loading.start(),t.next=3,w._get("/ufoPlatform/batch/export.do",{type:"channelSkuCompareServiceImpl",queryConf:e.getParams(e.filter)},{responseType:"blob"});case 3:r=t.sent,r instanceof Blob?(h.a.downloadBlob(r,"比价跟价导出_"+p()().format("YYYY-MM-DD")+".xlsx"),e.$Loading.finish()):r&&(r.message&&e.$Message.warning(r.message),e.$Loading.error());case 5:case"end":return t.stop()}},t,e)}))()},getParams:function(e){return{productId:e.productId,sku:e.sku,status:parseInt(e.status)>=0?e.status:void 0,productName:e.productName,sizeName:e.sizeName}}}}}},[234]);
\ No newline at end of file
webpackJsonp([7],{10:function(t,e){t.exports=Vue},133:function(t,e,a){"use strict";var o=a(13),i=a.n(o),s=a(28),r=a.n(s),l=a(2),n=a(11),c=a(45),d=a(101),m=a(131);e.a={name:"resourceEditNew",components:{Divide:m.a,bannerEditor:c.a,SmartFloor:d.a},data:function(){return{title:"",list:[],floorList:[],modalInfo:{modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",hideAddButton:!0,isSelectAction:!1},singleData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:3,template_intro:"一张图",template_name:"singleImage",resContentId:0},twoData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},1:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:4,template_intro:"两张图",template_name:"twoPicture",resContentId:0},threeData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},1:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},2:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:5,template_intro:"三张图(左一右二)",template_name:"threePicture",resContentId:0},imageListData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:6,template_intro:"热门系列",template_name:"imageList",resContentId:0},guessLikeData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:7,template_intro:"商品池Tab",template_name:"guessLike",resContentId:0},tabFloorData:{data:{list:{0:{tabName:"",code:"",url:{action:"go.channel",url:""}}}},type:8,template_intro:"首页频道Tab",template_name:"tabFloor",resContentId:0},foucsData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:9,template_intro:"焦点图",template_name:"focus",resContentId:0},resId:null,bg:"",show:!1,modalData:[],uploadData:{id:l.a.getQueryString("id"),items:[]}}},mounted:function(){this.resId=l.a.getQueryString("id"),this.platform=l.a.getQueryString("platform"),this.title=l.a.getQueryString("name"),this.resourceService=new n.a,this.getResourceDetailList()},methods:{getResourceDetailList:function(){var t=this;this.resourceService.info(this.resId).then(function(e){t.list=e,t.manageAllData(e),t.manageFloorList(e)})},manageAllData:function(t){this.uploadData.items=[];for(var e=0;e<t.length;e++){var a={id:t[e].resContentId,contentName:t[e].name,templateKey:"123",contentData:t[e].data,type:t[e].type};this.uploadData.items.push(a)}},manageFloorList:function(t){this.floorList=[];for(var e=0;e<t.length;e++){var a=JSON.parse(t[e].data);a.resContentId=t[e].resContentId,a.type=t[e].type,"imageList"===a.template_name&&5==a.size?(a.itemClass="hot-image-list-item-5",a.titleClass="item-title-5",a.imageClass="item-image-5"):(a.itemClass="",a.titleClass="",a.imageClass=""),this.floorList.push(a)}},showModal:function(t,e,a){var o=0,i="",s=!0,r=!1,l=e.data.list;l||(l=e.data);for(var n in l){var c=l[n];this.modalData.push(c)}switch(t){case"singleImage":o=3,i="一张图",s=!0,r=!1;break;case"twoPicture":o=4,i="两张图",s=!0,r=!1;break;case"threePicture":o=5,i="三张图(左一右二)",s=!0,r=!1;break;case"imageList":o=6,i="热门系列",s=!1,r=!1;break;case"guessLike":o=7,i="商品池",s=!1,r=!1;break;case"tabFloor":o=8,i="首页频道Tab",s=!1,r=!0;break;case"focus":o=9,i="焦点图",s=!1,r=!1}o&&(this.modalInfo.modalType=o,this.modalInfo.modalTitle=i,this.modalInfo.resContentId=e.resContentId,this.modalInfo.template_intro=e.template_intro,this.modalInfo.template_name=e.template_name,this.modalInfo.size=e.size||"0",this.modalInfo.floorIndex=a,this.modalInfo.hideAddButton=s,this.modalInfo.isSelectAction=r,this.show=!0)},showDeleteModal:function(t){var e=this;this.$Modal.confirm({title:"删除确认!",content:'<p style="color: red">是否确认删除该楼层?</p>',width:300,onOk:function(){e.uploadData.items.splice(t,1),e.resourceService.addOrUpdateResourceDetail(e.uploadData).then(function(t){t&&2e3===t.code?(e.$Message.success(t.message||"修改成功!"),e.getResourceDetailList()):e.$Message.error(t.message||"修改失败!"),e.modalData=[],e.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"}})}})},onOk:function(){var t=this,e=this.$refs.addEditor.getValue(),a=this.$refs.addEditor.getType(),o=0;for(var s in e)if(o++,""===e[s].url.url)return this.modalData=[],void this.$Message.error("请填写所有信息后再提交!");var l=e;"tabFloor"===this.modalInfo.template_name&&(l={list:e});var n=this.modalInfo.template_name,c=this.modalInfo.template_intro,d={id:this.modalInfo.resContentId,contentName:"楼层"+(this.floorList.length+1),templateKey:"123",contentData:r()({template_name:n,template_intro:c,data:l,size:a}),type:this.modalInfo.modalType};-1===this.modalInfo.floorIndex?this.uploadData.items.push(d):(d=i()(d,{contentName:this.uploadData.items[this.modalInfo.floorIndex].contentName}),this.uploadData.items[this.modalInfo.floorIndex]=d),this.resourceService.addOrUpdateResourceDetail(this.uploadData).then(function(e){e&&200===e.code?(t.$Message.success(e.message||"修改成功!"),t.getResourceDetailList(),t.modalData=[],t.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"},t.show=!1):t.$Message.error(e.message||"修改失败!")}),this.$refs.addEditor.reSetType()},onCancel:function(){this.modalData=[],this.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"},this.show=!1}}}},341:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a(342),i=a(18);Object(i.a)(o.a)},342:function(t,e,a){"use strict";function o(t){r||a(343)}var i=a(133),s=a(344),r=!1,l=a(0),n=o,c=l(i.a,s.a,!1,n,null,null);c.options.__file="src/views/resource-edit-new/index.vue",e.a=c.exports},343:function(t,e){},344:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("LayoutContent",{attrs:{breads:[{url:"resource-list.html",title:"资源位列表"},{title:"资源位编辑"}]}},[o("div",{staticClass:"main"},[o("div",{staticClass:"editor-container"},[o("Card",[o("p",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.title))]),t._v(" "),t._l(t.floorList,function(e,i){return[o("div",{staticClass:"floor-item"},["focus"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"100%"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("focus",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"singleImage"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"100%"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("singleImage",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"twoPicture"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"50%",height:"120px"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("img",{staticStyle:{width:"50%",height:"120px"},attrs:{src:e.data[1].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("twoPicture",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"threePicture"===e.template_name?o("div",{staticClass:"floor-image-three-root"},[o("div",{staticClass:"floor-image-three"},[o("img",{staticClass:"floor-image-three-left",attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-image-three-right-root"},[o("img",{staticClass:"floor-image-three-right-item",attrs:{src:e.data[1].src.split("?")[0]||a(12)}}),t._v(" "),o("img",{staticClass:"floor-image-three-right-item",attrs:{src:e.data[2].src.split("?")[0]||a(12)}})])]),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("threePicture",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"imageList"===e.template_name?o("div",{staticClass:"floor-image-hot"},[o("div",{staticClass:"hot-image-list"},[o("div",{staticClass:"hot-image-list-title"},[t._v(t._s(t.name)+"热门系列")]),t._v(" "),o("div",{staticClass:"hot-image-list-body"},t._l(e.data,function(a,i){return o("div",{key:i,staticClass:"hot-image-list-item",class:e.itemClass},[o("img",{staticClass:"item-image",class:e.imageClass,attrs:{src:a.src?a.src.split("?")[0]:"",alt:"",srcset:""}}),t._v(" "),o("p",{staticClass:"item-title",class:e.titleClass},[t._v(t._s(a.title))])])}),0)]),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("imageList",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"guessLike"===e.template_name?o("div",{staticClass:"floor-image-sort-tab"},[o("div",{staticClass:"sort-tab-body"},t._l(e.data,function(e,a){return o("p",{key:a,staticClass:"sort-tab"},[t._v(t._s(e.title))])}),0),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("guessLike",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"tabFloor"===e.template_name?o("div",{staticClass:"floor-image-sort-tab"},[o("div",{staticClass:"sort-tab-body"},t._l(e.data.list,function(e,a){return o("p",{key:a,staticClass:"sort-tab"},[t._v(t._s(e.tabName))])}),0),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("tabFloor",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e()]),t._v(" "),o("divide")]})],2)],1),t._v(" "),o("div",{staticClass:"button-container"},[o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("singleImage",t.singleData,-1)}}},[t._v("一张图")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("twoPicture",t.twoData,-1)}}},[t._v("两张图")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("threePicture",t.threeData,-1)}}},[t._v("三张图(左一右二)")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("imageList",t.imageListData,-1)}}},[t._v("热门系列")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("guessLike",t.guessLikeData,-1)}}},[t._v("商品池")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("tabFloor",t.tabFloorData,-1)}}},[t._v("首页频道Tab")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("focus",t.foucsData,-1)}}},[t._v("焦点图")])],1),t._v(" "),o("Modal",{attrs:{title:t.modalInfo.modalTitle,width:"650"},on:{"on-ok":t.onOk,"on-cancel":t.onCancel},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[o("banner-editor",{ref:"addEditor",attrs:{hideAddButton:t.modalInfo.hideAddButton,hideDeleteButton:!0,type:t.platform,isSelectAction:t.modalInfo.isSelectAction,templateName:t.modalInfo.template_name,size:t.modalInfo.size},model:{value:t.modalData,callback:function(e){t.modalData=e},expression:"modalData"}})],1)],1)])},i=[];o._withStripped=!0;var s={render:o,staticRenderFns:i};e.a=s},5:function(t,e){t.exports=iview}},[341]);
\ No newline at end of file
webpackJsonp([7],{10:function(t,e){t.exports=Vue},132:function(t,e,a){"use strict";var o=a(12),i=a.n(o),s=a(28),r=a.n(s),l=a(4),n=a(11),d=a(45),c=a(101),m=a(130);e.a={name:"resourceEditNew",components:{Divide:m.a,bannerEditor:d.a,SmartFloor:c.a},data:function(){return{title:"",list:[],floorList:[],modalInfo:{modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",hideAddButton:!0},singleData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:3,template_intro:"一张图",template_name:"singleImage",resContentId:0},twoData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},1:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:4,template_intro:"两张图",template_name:"twoPicture",resContentId:0},threeData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},1:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},2:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:5,template_intro:"三张图(左一右二)",template_name:"threePicture",resContentId:0},imageListData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:6,template_intro:"热门系列",template_name:"imageList",resContentId:0},guessLikeData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:7,template_intro:"商品池Tab",template_name:"guessLike",resContentId:0},resId:null,bg:"",show:!1,modalData:[],uploadData:{id:l.a.getQueryString("id"),items:[]}}},mounted:function(){this.resId=l.a.getQueryString("id"),this.platform=l.a.getQueryString("platform"),this.title=l.a.getQueryString("name"),this.resourceService=new n.a,this.getResourceDetailList()},methods:{getResourceDetailList:function(){var t=this;console.log("this.resId:"+this.resId),this.resourceService.info(this.resId).then(function(e){t.list=e,t.manageAllData(e),t.manageFloorList(e)})},manageAllData:function(t){this.uploadData.items=[];for(var e=0;e<t.length;e++){var a={id:t[e].resContentId,contentName:t[e].name,templateKey:"123",contentData:t[e].data,type:t[e].type};this.uploadData.items.push(a)}},manageFloorList:function(t){this.floorList=[];for(var e=0;e<t.length;e++){var a=JSON.parse(t[e].data);a.resContentId=t[e].resContentId,a.type=t[e].type,this.floorList.push(a)}},showModal:function(t,e,a){var o=0,i="",s=!0;for(var r in e.data){var l=e.data[r];this.modalData.push(l)}switch(t){case"singleImage":o=3,i="一张图",s=!0;break;case"twoPicture":o=4,i="两张图",s=!0;break;case"threePicture":o=5,i="三张图(左一右二)",s=!0;break;case"imageList":o=6,i="热门系列",s=!1;break;case"guessLike":o=7,i="商品池",s=!1}o&&(this.modalInfo.modalType=o,this.modalInfo.modalTitle=i,this.modalInfo.resContentId=e.resContentId,this.modalInfo.template_intro=e.template_intro,this.modalInfo.template_name=e.template_name,this.modalInfo.floorIndex=a,this.modalInfo.hideAddButton=s,this.show=!0)},showDeleteModal:function(t){var e=this;this.$Modal.confirm({title:"删除确认!",content:'<p style="color: red">是否确认删除该楼层?</p>',width:300,onOk:function(){e.uploadData.items.splice(t,1),e.resourceService.addOrUpdateResourceDetail(e.uploadData).then(function(t){t&&200===t.code?(e.$Message.success(t.message||"修改成功!"),e.getResourceDetailList(),e.modalData=[],e.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:""}):e.$Message.error(t.message||"修改失败!")})}})},onOk:function(){var t=this,e=this.$refs.addEditor.getValue();console.log("modalValue"),console.log(e);for(var a in e)if(""===e[a].url.url)return this.modalData=[],void this.$Message.error("请填写所有信息后再提交!");if("imageList"===this.modalInfo.template_name||"guessLike"===this.modalInfo.template_name);var o={id:this.modalInfo.resContentId,contentName:"楼层"+(this.floorList.length+1),templateKey:"123",contentData:r()({template_name:this.modalInfo.template_name,template_intro:this.modalInfo.template_intro,data:e}),type:this.modalInfo.modalType};-1===this.modalInfo.floorIndex?this.uploadData.items.push(o):(o=i()(o,{contentName:this.uploadData.items[this.modalInfo.floorIndex].contentName}),this.uploadData.items[this.modalInfo.floorIndex]=o),console.log("uploadData:",this.uploadData),this.resourceService.addOrUpdateResourceDetail(this.uploadData).then(function(e){e&&200===e.code?(t.$Message.success(e.message||"修改成功!"),t.getResourceDetailList(),t.modalData=[],t.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:""},t.show=!1):t.$Message.error(e.message||"修改失败!")})},onCancel:function(){this.modalData=[],this.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:""},this.show=!1}}}},336:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a(337),i=a(15);Object(i.a)(o.a)},337:function(t,e,a){"use strict";function o(t){r||a(338)}var i=a(132),s=a(339),r=!1,l=a(0),n=o,d=l(i.a,s.a,!1,n,null,null);d.options.__file="src/views/resource-edit-new/index.vue",e.a=d.exports},338:function(t,e){},339:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("LayoutContent",{attrs:{breads:[{url:"resource-list.html",title:"资源位列表"},{title:"资源位编辑"}]}},[o("div",{staticClass:"main"},[o("div",{staticClass:"editor-container"},[o("Card",[o("p",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.title))]),t._v(" "),t._l(t.floorList,function(e,i){return[o("div",{staticClass:"floor-item"},["singleImage"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"100%"},attrs:{src:e.data[0].src.split("?")[0]||a(16)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("singleImage",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"twoPicture"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"50%",height:"120px"},attrs:{src:e.data[0].src.split("?")[0]||a(16)}}),t._v(" "),o("img",{staticStyle:{width:"50%",height:"120px"},attrs:{src:e.data[1].src.split("?")[0]||a(16)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("twoPicture",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"threePicture"===e.template_name?o("div",{staticClass:"floor-image-three-root"},[o("div",{staticClass:"floor-image-three"},[o("img",{staticClass:"floor-image-three-left",attrs:{src:e.data[0].src.split("?")[0]||a(16)}}),t._v(" "),o("div",{staticClass:"floor-image-three-right-root"},[o("img",{staticClass:"floor-image-three-right-item",attrs:{src:e.data[1].src.split("?")[0]||a(16)}}),t._v(" "),o("img",{staticClass:"floor-image-three-right-item",attrs:{src:e.data[2].src.split("?")[0]||a(16)}})])]),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("threePicture",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"imageList"===e.template_name?o("div",{staticClass:"floor-image-hot"},[o("div",{staticClass:"hot-image-list"},[o("div",{staticClass:"hot-image-list-title"},[t._v(t._s(t.name)+"热门系列")]),t._v(" "),o("div",{staticClass:"hot-image-list-body"},t._l(e.data,function(e,a){return o("div",{key:a,staticClass:"hot-image-list-item"},[o("img",{staticClass:"item-image",attrs:{src:e.src.split("?")[0],alt:"",srcset:""}}),t._v(" "),o("p",{staticClass:"item-title"},[t._v(t._s(e.title))])])}),0)]),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("imageList",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"guessLike"===e.template_name?o("div",{staticClass:"floor-image-sort-tab"},[o("div",{staticClass:"sort-tab-body"},t._l(e.data,function(e,a){return o("p",{key:a,staticClass:"sort-tab"},[t._v(t._s(e.title))])}),0),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("guessLike",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e()]),t._v(" "),o("divide")]})],2)],1),t._v(" "),o("div",{staticClass:"button-container"},[o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("singleImage",t.singleData,-1)}}},[t._v("一张图")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("twoPicture",t.twoData,-1)}}},[t._v("两张图")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("threePicture",t.threeData,-1)}}},[t._v("三张图(左一右二)")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("imageList",t.imageListData,-1)}}},[t._v("热门系列")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("guessLike",t.guessLikeData,-1)}}},[t._v("商品池")])],1),t._v(" "),o("Modal",{attrs:{title:t.modalInfo.modalTitle,width:"650"},on:{"on-ok":t.onOk,"on-cancel":t.onCancel},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[o("banner-editor",{ref:"addEditor",attrs:{hideAddButton:t.modalInfo.hideAddButton,hideDeleteButton:!0,type:t.platform},model:{value:t.modalData,callback:function(e){t.modalData=e},expression:"modalData"}})],1)],1)])},i=[];o._withStripped=!0;var s={render:o,staticRenderFns:i};e.a=s},5:function(t,e){t.exports=iview}},[336]);
\ No newline at end of file
webpackJsonp([7],{10:function(t,e){t.exports=Vue},133:function(t,e,a){"use strict";var o=a(13),i=a.n(o),s=a(28),r=a.n(s),l=a(2),n=a(11),c=a(45),d=a(102),m=a(131),u=a(62),h=a.n(u);e.a={name:"resourceEditNew",components:{Divide:m.a,bannerEditor:c.a,SmartFloor:d.a,draggable:h.a},data:function(){return{title:"",list:[],floorList:[],modalInfo:{modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",hideAddButton:!0,isSelectAction:!1},singleData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:3,template_intro:"一张图",template_name:"singleImage",resContentId:0},twoData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},1:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:4,template_intro:"两张图",template_name:"twoPicture",resContentId:0},threeData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},1:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},2:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:5,template_intro:"三张图(左一右二)",template_name:"threePicture",resContentId:0},imageListData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:6,template_intro:"热门系列",template_name:"imageList",resContentId:0},guessLikeData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.pool",url:"https://m.yohobuy.com/?pagename=productList"}}}},type:7,template_intro:"商品池Tab",template_name:"guessLike",resContentId:0},tabFloorData:{data:{list:{0:{tabName:"",code:"",url:{action:"go.channel",url:""}}}},type:8,template_intro:"首页频道Tab",template_name:"tabFloor",resContentId:0},foucsData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:9,template_intro:"焦点图",template_name:"focus",resContentId:0},resId:null,bg:"",show:!1,modalData:[],uploadData:{id:l.a.getQueryString("id"),items:[]}}},mounted:function(){this.resId=l.a.getQueryString("id"),this.platform=l.a.getQueryString("platform"),this.title=l.a.getQueryString("name"),this.resourceService=new n.a,this.getResourceDetailList()},methods:{getResourceDetailList:function(){var t=this;this.resourceService.info(this.resId).then(function(e){t.list=e,t.manageAllData(e),t.manageFloorList(e)})},manageAllData:function(t){this.uploadData.items=[];for(var e=0;e<t.length;e++){var a={id:t[e].resContentId,contentName:t[e].name,templateKey:"123",contentData:t[e].data,type:t[e].type};this.uploadData.items.push(a)}},manageFloorList:function(t){this.floorList=[];for(var e=0;e<t.length;e++){var a=JSON.parse(t[e].data);a.resContentId=t[e].resContentId,a.type=t[e].type,"imageList"===a.template_name&&5==a.size?(a.itemClass="hot-image-list-item-5",a.titleClass="item-title-5",a.imageClass="item-image-5"):(a.itemClass="",a.titleClass="",a.imageClass=""),this.floorList.push(a)}},showModal:function(t,e,a){var o=0,i="",s=!0,r=!1,l=e.data.list;l||(l=e.data);for(var n in l){var c=l[n];this.modalData.push(c)}switch(t){case"singleImage":o=3,i="一张图",s=!0,r=!1;break;case"twoPicture":o=4,i="两张图",s=!0,r=!1;break;case"threePicture":o=5,i="三张图(左一右二)",s=!0,r=!1;break;case"imageList":o=6,i="热门系列",s=!1,r=!1;break;case"guessLike":o=7,i="商品池",s=!1,r=!0;break;case"tabFloor":o=8,i="首页频道Tab",s=!1,r=!0;break;case"focus":o=9,i="焦点图",s=!1,r=!1}o&&(this.modalInfo.modalType=o,this.modalInfo.modalTitle=i,this.modalInfo.resContentId=e.resContentId,this.modalInfo.template_intro=e.template_intro,this.modalInfo.template_name=e.template_name,this.modalInfo.size=e.size||"0",this.modalInfo.floorIndex=a,this.modalInfo.hideAddButton=s,this.modalInfo.isSelectAction=r,this.show=!0)},showDeleteModal:function(t){var e=this;this.$Modal.confirm({title:"删除确认!",content:'<p style="color: red">是否确认删除该楼层?</p>',width:300,onOk:function(){e.uploadData.items.splice(t,1),e.resourceService.addOrUpdateResourceDetail(e.uploadData).then(function(t){t&&2e3===t.code?(e.$Message.success(t.message||"修改成功!"),e.getResourceDetailList()):e.$Message.error(t.message||"修改失败!"),e.modalData=[],e.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"}})}})},onOk:function(){var t=this,e=this.$refs.addEditor.getValue(),a=this.$refs.addEditor.getType(),o=0;for(var s in e)if(o++,""===e[s].url.url)return this.modalData=[],void this.$Message.error("请填写所有信息后再提交!");var l=e;"tabFloor"===this.modalInfo.template_name&&(l={list:e});var n=this.modalInfo.template_name,c=this.modalInfo.template_intro,d={id:this.modalInfo.resContentId,contentName:"楼层"+(this.floorList.length+1),templateKey:"123",contentData:r()({template_name:n,template_intro:c,data:l,size:a}),type:this.modalInfo.modalType};-1===this.modalInfo.floorIndex?this.uploadData.items.push(d):(d=i()(d,{contentName:this.uploadData.items[this.modalInfo.floorIndex].contentName}),this.uploadData.items[this.modalInfo.floorIndex]=d),this.resourceService.addOrUpdateResourceDetail(this.uploadData).then(function(e){e&&200===e.code?(t.$Message.success(e.message||"修改成功!"),t.getResourceDetailList(),t.modalData=[],t.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"},t.show=!1):t.$Message.error(e.message||"修改失败!")}),this.$refs.addEditor.reSetType()},onCancel:function(){this.modalData=[],this.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"},this.show=!1}}}},341:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a(342),i=a(18);Object(i.a)(o.a)},342:function(t,e,a){"use strict";function o(t){r||a(343)}var i=a(133),s=a(344),r=!1,l=a(0),n=o,c=l(i.a,s.a,!1,n,null,null);c.options.__file="src/views/resource-edit-new/index.vue",e.a=c.exports},343:function(t,e){},344:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("LayoutContent",{attrs:{breads:[{url:"resource-list.html",title:"资源位列表"},{title:"资源位编辑"}]}},[o("div",{staticClass:"main"},[o("div",{staticClass:"editor-container"},[o("Card",[o("p",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.title))]),t._v(" "),o("draggable",{on:{start:function(e){t.drag=!0},end:function(e){t.drag=!1}},model:{value:t.floorList,callback:function(e){t.floorList=e},expression:"floorList"}},[t._l(t.floorList,function(e,i){return[o("div",{staticClass:"floor-item"},["focus"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"100%"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("focus",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"singleImage"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"100%"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("singleImage",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"twoPicture"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"50%",height:"120px"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("img",{staticStyle:{width:"50%",height:"120px"},attrs:{src:e.data[1].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("twoPicture",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"threePicture"===e.template_name?o("div",{staticClass:"floor-image-three-root"},[o("div",{staticClass:"floor-image-three"},[o("img",{staticClass:"floor-image-three-left",attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-image-three-right-root"},[o("img",{staticClass:"floor-image-three-right-item",attrs:{src:e.data[1].src.split("?")[0]||a(12)}}),t._v(" "),o("img",{staticClass:"floor-image-three-right-item",attrs:{src:e.data[2].src.split("?")[0]||a(12)}})])]),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("threePicture",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"imageList"===e.template_name?o("div",{staticClass:"floor-image-hot"},[o("div",{staticClass:"hot-image-list"},[o("div",{staticClass:"hot-image-list-title"},[t._v(t._s(t.name)+"热门系列")]),t._v(" "),o("div",{staticClass:"hot-image-list-body"},t._l(e.data,function(a,i){return o("div",{key:i,staticClass:"hot-image-list-item",class:e.itemClass},[o("img",{staticClass:"item-image",class:e.imageClass,attrs:{src:a.src?a.src.split("?")[0]:"",alt:"",srcset:""}}),t._v(" "),o("p",{staticClass:"item-title",class:e.titleClass},[t._v(t._s(a.title))])])}),0)]),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("imageList",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"guessLike"===e.template_name?o("div",{staticClass:"floor-image-sort-tab"},[o("div",{staticClass:"sort-tab-body"},t._l(e.data,function(e,a){return o("p",{key:a,staticClass:"sort-tab"},[t._v(t._s(e.title))])}),0),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("guessLike",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"tabFloor"===e.template_name?o("div",{staticClass:"floor-image-sort-tab"},[o("div",{staticClass:"sort-tab-body"},t._l(e.data.list,function(e,a){return o("p",{key:a,staticClass:"sort-tab"},[t._v(t._s(e.tabName))])}),0),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("tabFloor",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e()]),t._v(" "),o("divide")]})],2)],1)],1),t._v(" "),o("div",{staticClass:"button-container"},[o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("singleImage",t.singleData,-1)}}},[t._v("一张图")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("twoPicture",t.twoData,-1)}}},[t._v("两张图")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("threePicture",t.threeData,-1)}}},[t._v("三张图(左一右二)")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("imageList",t.imageListData,-1)}}},[t._v("热门系列")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("guessLike",t.guessLikeData,-1)}}},[t._v("商品池")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("tabFloor",t.tabFloorData,-1)}}},[t._v("首页频道Tab")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("focus",t.foucsData,-1)}}},[t._v("焦点图")])],1),t._v(" "),o("Modal",{attrs:{title:t.modalInfo.modalTitle,width:"650"},on:{"on-ok":t.onOk,"on-cancel":t.onCancel},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[o("banner-editor",{ref:"addEditor",attrs:{hideAddButton:t.modalInfo.hideAddButton,hideDeleteButton:!0,type:t.platform,isSelectAction:t.modalInfo.isSelectAction,templateName:t.modalInfo.template_name,size:t.modalInfo.size},model:{value:t.modalData,callback:function(e){t.modalData=e},expression:"modalData"}})],1)],1)])},i=[];o._withStripped=!0;var s={render:o,staticRenderFns:i};e.a=s},5:function(t,e){t.exports=iview}},[341]);
\ No newline at end of file
... ...
webpackJsonp([7],{10:function(t,e){t.exports=Vue},133:function(t,e,a){"use strict";var o=a(13),i=a.n(o),s=a(28),r=a.n(s),l=a(2),n=a(11),c=a(45),d=a(102),m=a(131),u=a(62),h=a.n(u);e.a={name:"resourceEditNew",components:{Divide:m.a,bannerEditor:c.a,SmartFloor:d.a,draggable:h.a},data:function(){return{title:"",list:[],floorList:[],modalInfo:{modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",hideAddButton:!0,isSelectAction:!1},singleData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:3,template_intro:"一张图",template_name:"singleImage",resContentId:0},twoData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},1:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:4,template_intro:"两张图",template_name:"twoPicture",resContentId:0},threeData:{data:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},1:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}},2:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}},type:5,template_intro:"三张图(左一右二)",template_name:"threePicture",resContentId:0},imageListData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:6,template_intro:"热门系列",template_name:"imageList",resContentId:0},guessLikeData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.pool",url:""}}}},type:7,template_intro:"商品池Tab",template_name:"guessLike",resContentId:0},tabFloorData:{data:{list:{0:{tabName:"",code:"",url:{action:"go.channel",url:""}}}},type:8,template_intro:"首页频道Tab",template_name:"tabFloor",resContentId:0},foucsData:{data:{list:{0:{alt:"",bgColor:"",imgId:"0",src:"",title:"",hideDeleteButton:!0,url:{action:"go.h5",url:""}}}},type:9,template_intro:"焦点图",template_name:"focus",resContentId:0},resId:null,bg:"",show:!1,modalData:[],uploadData:{id:l.a.getQueryString("id"),items:[]}}},mounted:function(){this.resId=l.a.getQueryString("id"),this.platform=l.a.getQueryString("platform"),this.title=l.a.getQueryString("name"),this.resourceService=new n.a,this.getResourceDetailList()},methods:{getResourceDetailList:function(){var t=this;this.resourceService.info(this.resId).then(function(e){t.list=e,t.manageAllData(e),t.manageFloorList(e)})},manageAllData:function(t){this.uploadData.items=[];for(var e=0;e<t.length;e++){var a={id:t[e].resContentId,contentName:t[e].name,templateKey:"123",contentData:t[e].data,type:t[e].type};this.uploadData.items.push(a)}},manageFloorList:function(t){this.floorList=[];for(var e=0;e<t.length;e++){var a=JSON.parse(t[e].data);a.resContentId=t[e].resContentId,a.type=t[e].type,"imageList"===a.template_name&&5==a.size?(a.itemClass="hot-image-list-item-5",a.titleClass="item-title-5",a.imageClass="item-image-5"):(a.itemClass="",a.titleClass="",a.imageClass=""),this.floorList.push(a)}},showModal:function(t,e,a){var o=0,i="",s=!0,r=!1,l=e.data.list;l||(l=e.data);for(var n in l){var c=l[n];this.modalData.push(c)}switch(t){case"singleImage":o=3,i="一张图",s=!0,r=!1;break;case"twoPicture":o=4,i="两张图",s=!0,r=!1;break;case"threePicture":o=5,i="三张图(左一右二)",s=!0,r=!1;break;case"imageList":o=6,i="热门系列",s=!1,r=!1;break;case"guessLike":o=7,i="商品池",s=!1,r=!0;break;case"tabFloor":o=8,i="首页频道Tab",s=!1,r=!0;break;case"focus":o=9,i="焦点图",s=!1,r=!1}o&&(this.modalInfo.modalType=o,this.modalInfo.modalTitle=i,this.modalInfo.resContentId=e.resContentId,this.modalInfo.template_intro=e.template_intro,this.modalInfo.template_name=e.template_name,this.modalInfo.size=e.size||"0",this.modalInfo.floorIndex=a,this.modalInfo.hideAddButton=s,this.modalInfo.isSelectAction=r,this.show=!0)},showDeleteModal:function(t){var e=this;this.$Modal.confirm({title:"删除确认!",content:'<p style="color: red">是否确认删除该楼层?</p>',width:300,onOk:function(){e.uploadData.items.splice(t,1),e.resourceService.addOrUpdateResourceDetail(e.uploadData).then(function(t){t&&2e3===t.code?(e.$Message.success(t.message||"修改成功!"),e.getResourceDetailList()):e.$Message.error(t.message||"修改失败!"),e.modalData=[],e.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"}})}})},onOk:function(){var t=this,e=this.$refs.addEditor.getValue(),a=this.$refs.addEditor.getType(),o=0;for(var s in e)if(o++,""===e[s].url.url)return this.modalData=[],void this.$Message.error("请填写所有信息后再提交!");var l=e;"tabFloor"===this.modalInfo.template_name&&(l={list:e});var n=this.modalInfo.template_name,c=this.modalInfo.template_intro,d={id:this.modalInfo.resContentId,contentName:"楼层"+(this.floorList.length+1),templateKey:"123",contentData:r()({template_name:n,template_intro:c,data:l,size:a}),type:this.modalInfo.modalType};-1===this.modalInfo.floorIndex?this.uploadData.items.push(d):(d=i()(d,{contentName:this.uploadData.items[this.modalInfo.floorIndex].contentName}),this.uploadData.items[this.modalInfo.floorIndex]=d),this.resourceService.addOrUpdateResourceDetail(this.uploadData).then(function(e){e&&200===e.code?(t.$Message.success(e.message||"修改成功!"),t.getResourceDetailList(),t.modalData=[],t.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"},t.show=!1):t.$Message.error(e.message||"修改失败!")}),this.$refs.addEditor.reSetType()},onCancel:function(){this.modalData=[],this.modalInfo={modalType:0,modalTitle:"",resContentId:0,floorIndex:-1,template_intro:"",template_name:"",size:"0"},this.show=!1}}}},341:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a(342),i=a(18);Object(i.a)(o.a)},342:function(t,e,a){"use strict";function o(t){r||a(343)}var i=a(133),s=a(344),r=!1,l=a(0),n=o,c=l(i.a,s.a,!1,n,null,null);c.options.__file="src/views/resource-edit-new/index.vue",e.a=c.exports},343:function(t,e){},344:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("LayoutContent",{attrs:{breads:[{url:"resource-list.html",title:"资源位列表"},{title:"资源位编辑"}]}},[o("div",{staticClass:"main"},[o("div",{staticClass:"editor-container"},[o("Card",[o("p",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.title))]),t._v(" "),o("draggable",{on:{start:function(e){t.drag=!0},end:function(e){t.drag=!1}},model:{value:t.floorList,callback:function(e){t.floorList=e},expression:"floorList"}},[t._l(t.floorList,function(e,i){return[o("div",{staticClass:"floor-item"},["focus"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"100%"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("focus",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"singleImage"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"100%"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("singleImage",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"twoPicture"===e.template_name?o("div",{staticClass:"floor-image"},[o("img",{staticStyle:{width:"50%",height:"120px"},attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("img",{staticStyle:{width:"50%",height:"120px"},attrs:{src:e.data[1].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("twoPicture",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"threePicture"===e.template_name?o("div",{staticClass:"floor-image-three-root"},[o("div",{staticClass:"floor-image-three"},[o("img",{staticClass:"floor-image-three-left",attrs:{src:e.data[0].src.split("?")[0]||a(12)}}),t._v(" "),o("div",{staticClass:"floor-image-three-right-root"},[o("img",{staticClass:"floor-image-three-right-item",attrs:{src:e.data[1].src.split("?")[0]||a(12)}}),t._v(" "),o("img",{staticClass:"floor-image-three-right-item",attrs:{src:e.data[2].src.split("?")[0]||a(12)}})])]),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("threePicture",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"imageList"===e.template_name?o("div",{staticClass:"floor-image-hot"},[o("div",{staticClass:"hot-image-list"},[o("div",{staticClass:"hot-image-list-title"},[t._v(t._s(t.name)+"热门系列")]),t._v(" "),o("div",{staticClass:"hot-image-list-body"},t._l(e.data,function(a,i){return o("div",{key:i,staticClass:"hot-image-list-item",class:e.itemClass},[o("img",{staticClass:"item-image",class:e.imageClass,attrs:{src:a.src?a.src.split("?")[0]:"",alt:"",srcset:""}}),t._v(" "),o("p",{staticClass:"item-title",class:e.titleClass},[t._v(t._s(a.title))])])}),0)]),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("imageList",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"guessLike"===e.template_name?o("div",{staticClass:"floor-image-sort-tab"},[o("div",{staticClass:"sort-tab-body"},t._l(e.data,function(e,a){return o("p",{key:a,staticClass:"sort-tab"},[t._v(t._s(e.title))])}),0),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("guessLike",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e(),t._v(" "),"tabFloor"===e.template_name?o("div",{staticClass:"floor-image-sort-tab"},[o("div",{staticClass:"sort-tab-body"},t._l(e.data.list,function(e,a){return o("p",{key:a,staticClass:"sort-tab"},[t._v(t._s(e.tabName))])}),0),t._v(" "),o("div",{staticClass:"floor-mask"},[o("div",{staticClass:"floor-edit-buttons"},[o("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return t.showModal("tabFloor",e,i)}}},[t._v("编 辑")]),t._v(" "),o("a",{staticStyle:{"background-color":"red"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.showDeleteModal(i)}}},[t._v("删 除")])])])]):t._e()]),t._v(" "),o("divide")]})],2)],1)],1),t._v(" "),o("div",{staticClass:"button-container"},[o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("singleImage",t.singleData,-1)}}},[t._v("一张图")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("twoPicture",t.twoData,-1)}}},[t._v("两张图")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("threePicture",t.threeData,-1)}}},[t._v("三张图(左一右二)")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("imageList",t.imageListData,-1)}}},[t._v("热门系列")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("guessLike",t.guessLikeData,-1)}}},[t._v("商品池")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("tabFloor",t.tabFloorData,-1)}}},[t._v("首页频道Tab")]),t._v(" "),o("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showModal("focus",t.foucsData,-1)}}},[t._v("焦点图")])],1),t._v(" "),o("Modal",{attrs:{title:t.modalInfo.modalTitle,width:"650"},on:{"on-ok":t.onOk,"on-cancel":t.onCancel},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[o("banner-editor",{ref:"addEditor",attrs:{hideAddButton:t.modalInfo.hideAddButton,hideDeleteButton:!0,type:t.platform,isSelectAction:t.modalInfo.isSelectAction,templateName:t.modalInfo.template_name,size:t.modalInfo.size},model:{value:t.modalData,callback:function(e){t.modalData=e},expression:"modalData"}})],1)],1)])},i=[];o._withStripped=!0;var s={render:o,staticRenderFns:i};e.a=s},5:function(t,e){t.exports=iview}},[341]);
\ No newline at end of file
webpackJsonp([0],{10:function(t,e){t.exports=Vue},100:function(t,e,i){t.exports=i.p+"img/apptitle.74e80a1.png"},241:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(242),r=i(18);Object(r.a)(n.a)},242:function(t,e,i){"use strict";function n(t){a||i(243)}var r=i(97),s=i(340),a=!1,o=i(0),u=n,c=o(r.a,s.a,!1,u,null,null);c.options.__file="src/views/resource-edit/index.vue",e.a=c.exports},243:function(t,e){},244:function(t,e,i){"use strict";function n(t){a||i(245)}var r=i(98),s=i(339),a=!1,o=i(0),u=n,c=o(r.a,s.a,!1,u,"data-v-724c5842",null);c.options.__file="src/views/resource-edit/home.vue",e.a=c.exports},245:function(t,e){},246:function(t,e,i){"use strict";function n(t){a||i(247)}var r=i(99),s=i(248),a=!1,o=i(0),u=n,c=o(r.a,s.a,!1,u,null,null);c.options.__file="src/components/miniapp.vue",e.a=c.exports},247:function(t,e){},248:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-frame"},[i("div",{staticClass:"title"},[t._v(t._s(t.title))]),t._v(" "),i("div",{staticClass:"app-title"},[i("img",{attrs:{src:t.bg,alt:"",srcset:"",width:"100%"}})]),t._v(" "),i("div",[t._t("default")],2)])},r=[];n._withStripped=!0;var s={render:n,staticRenderFns:r};e.a=s},338:function(t,e,i){t.exports=i.p+"img/sort_title.ba4687f.png"},339:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"index"},[t.resId<4?i("miniapp",{attrs:{title:t.title,bg:t.bg}},[[t._l(t.list,function(e){return[i("smartfloor",{key:e.resContentId,attrs:{item:e}}),t._v(" "),i("divide")]})]],2):t._e()],1)},r=[];n._withStripped=!0;var s={render:n,staticRenderFns:r};e.a=s},340:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("LayoutContent",{attrs:{breads:[{url:"resource-list.html",title:"资源位列表"},{title:"资源位编辑"}]}},[i("home-page")],1)},r=[];n._withStripped=!0;var s={render:n,staticRenderFns:r};e.a=s},5:function(t,e){t.exports=iview},97:function(t,e,i){"use strict";var n=i(244);e.a={data:function(){return{}},mounted:function(){},beforeDestroy:function(){},methods:{},components:{"home-page":n.a}}},98:function(t,e,i){"use strict";var n=i(246),r=i(101),s=i(131),a=i(2),o=i(11),u={1:i(100),2:i(338)};e.a={data:function(){return{list:[],resId:null,bg:"",title:""}},mounted:function(){var t=this;this.resId=a.a.getQueryString("id")||1,this.title=a.a.getQueryString("name")||"资源位管理",this.resourceService=new o.a,this.init(),this.$bus.$on("updated",function(){console.log("updated"),t.init()}),this.bg=this.getBg()},methods:{init:function(){var t=this;this.resourceService.info(this.resId).then(function(e){console.log(e),t.list=e})},getBg:function(){return u[this.resId]}},components:{miniapp:n.a,smartfloor:r.a,divide:s.a}}},99:function(t,e,i){"use strict";e.a={name:"miniapp",props:{title:{type:String,default:function(){return""}},bg:{type:String,default:function(){return i(100)}}}}}},[241]);
\ No newline at end of file
webpackJsonp([0],{10:function(t,e){t.exports=Vue},100:function(t,e,i){t.exports=i.p+"img/apptitle.74e80a1.png"},239:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(240),r=i(15);Object(r.a)(n.a)},240:function(t,e,i){"use strict";function n(t){a||i(241)}var r=i(97),s=i(335),a=!1,o=i(0),u=n,c=o(r.a,s.a,!1,u,null,null);c.options.__file="src/views/resource-edit/index.vue",e.a=c.exports},241:function(t,e){},242:function(t,e,i){"use strict";function n(t){a||i(243)}var r=i(98),s=i(334),a=!1,o=i(0),u=n,c=o(r.a,s.a,!1,u,"data-v-724c5842",null);c.options.__file="src/views/resource-edit/home.vue",e.a=c.exports},243:function(t,e){},244:function(t,e,i){"use strict";function n(t){a||i(245)}var r=i(99),s=i(246),a=!1,o=i(0),u=n,c=o(r.a,s.a,!1,u,null,null);c.options.__file="src/components/miniapp.vue",e.a=c.exports},245:function(t,e){},246:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-frame"},[i("div",{staticClass:"title"},[t._v(t._s(t.title))]),t._v(" "),i("div",{staticClass:"app-title"},[i("img",{attrs:{src:t.bg,alt:"",srcset:"",width:"100%"}})]),t._v(" "),i("div",[t._t("default")],2)])},r=[];n._withStripped=!0;var s={render:n,staticRenderFns:r};e.a=s},333:function(t,e,i){t.exports=i.p+"img/sort_title.ba4687f.png"},334:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"index"},[t.resId<4?i("miniapp",{attrs:{title:t.title,bg:t.bg}},[[t._l(t.list,function(e){return[i("smartfloor",{key:e.resContentId,attrs:{item:e}}),t._v(" "),i("divide")]})]],2):t._e()],1)},r=[];n._withStripped=!0;var s={render:n,staticRenderFns:r};e.a=s},335:function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("LayoutContent",{attrs:{breads:[{url:"resource-list.html",title:"资源位列表"},{title:"资源位编辑"}]}},[i("home-page")],1)},r=[];n._withStripped=!0;var s={render:n,staticRenderFns:r};e.a=s},5:function(t,e){t.exports=iview},97:function(t,e,i){"use strict";var n=i(242);e.a={data:function(){return{}},mounted:function(){},beforeDestroy:function(){},methods:{},components:{"home-page":n.a}}},98:function(t,e,i){"use strict";var n=i(244),r=i(101),s=i(130),a=i(4),o=i(11),u={1:i(100),2:i(333)};e.a={data:function(){return{list:[],resId:null,bg:"",title:""}},mounted:function(){var t=this;this.resId=a.a.getQueryString("id")||1,this.title=a.a.getQueryString("name")||"资源位管理",this.resourceService=new o.a,this.init(),this.$bus.$on("updated",function(){console.log("updated"),t.init()}),this.bg=this.getBg()},methods:{init:function(){var t=this;this.resourceService.info(this.resId).then(function(e){console.log(e),t.list=e})},getBg:function(){return u[this.resId]}},components:{miniapp:n.a,smartfloor:r.a,divide:s.a}}},99:function(t,e,i){"use strict";e.a={name:"miniapp",props:{title:{type:String,default:function(){return""}},bg:{type:String,default:function(){return i(100)}}}}}},[239]);
\ No newline at end of file
webpackJsonp([6],{10:function(t,e){t.exports=Vue},134:function(t,e,r){"use strict";var a=r(13),s=r.n(a),o=r(21),n=r.n(o),i=r(22),c=r.n(i),l=r(5),u=(r.n(l),r(11)),d=r(17),p=r.n(d),m=r(2);e.a={name:"resourcelist",data:function(){var t=this;return{data:[],columns:[{title:"ID",key:"id",width:100},{title:"资源名称",key:"name",width:200},{title:"平台",key:"platform",width:100},{title:"位置码",key:"code",width:300},{title:"创建时间",key:"createTime",width:200,render:function(t,e){var r=e.row;return t("div",{style:{color:"#999"}},p.a.unix(r.createTime).format("YYYY-MM-DD HH:mm:ss"))}},{title:"操作",width:270,align:"center",render:function(e,r){var a=r.row;return e("div",{},[e("i-button",{props:{type:"success",size:"small"},on:{click:function(){return t.onToEditor(a)}}},"内容编辑"),e("i-button",{props:{type:"primary",size:"small"},style:{marginLeft:"20px",display:a.showEditButton},on:{click:function(){return t.onEditResource(a)}}},"修改信息")])}}],showAddPan:!1,platform:"1",resourceName:"",editResourceId:0}},created:function(){this.resourceService=new u.a,this.fetchData()},methods:{onToEditor:function(t){var e=t.id,r=t.name,a=t.sortId,s=t.platform;2===a?m.a.jumpUrl("resource-edit.html?id="+e+"&name="+r+"&platform="+s):3===a&&m.a.jumpUrl("resource-edit-new.html?id="+e+"&name="+r+"&platform="+s)},fetchData:function(){var t=this;return c()(n.a.mark(function e(){var r,a;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,t.resourceService.list();case 3:if(r=e.sent,200===r.code){for(a=0;a<r.data.length;a++)r.data[a].showEditButton="inline-block",2===r.data[a].sortId&&(r.data[a].showEditButton="none");t.data=r.data,t.$Loading.finish()}else r.message&&t.$Message.warning(r.message),t.$Loading.error();case 5:case"end":return e.stop()}},e,t)}))()},showAddResourcePannel:function(t){this.showAddPan=t},saveResource:function(){var t=this;if(this.resourceName){console.log(this.resourceName),console.log(this.platform);var e={name:this.resourceName,platformId:this.platform,sortId:3};console.log(this.platform),this.editResourceId&&s()(e,{},{id:this.editResourceId}),this.resourceService.addOrUpdateResource(e).then(function(e){e&&200===e.code?(t.showAddPan=!1,t.$Message.success("保存成功!"),t.fetchData(),t.platform="1",t.editResourceId=0,t.resourceName=""):t.$Message.error(e.message)})}},onEditResource:function(t){console.log(t),this.platform=["0","APP","小程序","H5"].indexOf(t.platform).toString(),this.resourceName=t.name,this.editResourceId=t.id,this.showAddResourcePannel(!0)}}}},345:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=r(346),s=r(18);Object(s.a)(a.a)},346:function(t,e,r){"use strict";function a(t){n||r(347)}var s=r(134),o=r(348),n=!1,i=r(0),c=a,l=i(s.a,o.a,!1,c,null,null);l.options.__file="src/views/resource-list/index.vue",e.a=l.exports},347:function(t,e){},348:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("LayoutContent",{attrs:{breads:[{title:"资源位列表"}]}},[r("div",[r("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showAddResourcePannel(!0)}}},[t._v("添加资源位")])],1),t._v(" "),r("LayoutTable",{attrs:{columns:t.columns,data:t.data}}),t._v(" "),t.showAddPan?r("div",{staticClass:"resource-add-container"},[r("Card",{staticClass:"resource-add-card"},[r("p",{attrs:{slot:"title"},slot:"title"},[t._v("添加资源位")]),t._v(" "),r("a",{attrs:{slot:"extra",href:"javascript:void(0)"},on:{click:function(e){return t.showAddResourcePannel(!1)}},slot:"extra"},[r("Icon",{attrs:{type:"ios-close",size:"24"}})],1),t._v(" "),r("div",{staticClass:"resource-add-content"},[r("Row",[r("Col",{attrs:{span:"8"}},[r("label",[t._v("选择平台:")])]),t._v(" "),r("Col",{attrs:{span:"16"}},[r("Select",{staticClass:"platform-select",model:{value:t.platform,callback:function(e){t.platform=e},expression:"platform"}},[r("Option",{attrs:{value:"1"}},[t._v("App")]),t._v(" "),r("Option",{attrs:{value:"2"}},[t._v("小程序")]),t._v(" "),r("Option",{attrs:{value:"3"}},[t._v("H5")])],1)],1)],1),t._v(" "),r("Row",[r("Col",{attrs:{span:"8"}},[r("label",[t._v("资源名称:")])]),t._v(" "),r("Col",{attrs:{span:"16"}},[r("Input",{staticClass:"name-input",attrs:{placeholder:"请输入资源名称"},model:{value:t.resourceName,callback:function(e){t.resourceName=e},expression:"resourceName"}})],1)],1),t._v(" "),r("Row",[r("Col",{attrs:{span:"24"}},[r("Button",{attrs:{type:"primary"},on:{click:t.saveResource}},[t._v("保 存")])],1)],1)],1)])],1):t._e()],1)},s=[];a._withStripped=!0;var o={render:a,staticRenderFns:s};e.a=o},5:function(t,e){t.exports=iview}},[345]);
\ No newline at end of file
webpackJsonp([6],{10:function(t,e){t.exports=Vue},133:function(t,e,r){"use strict";var a=r(12),s=r.n(a),o=r(24),n=r.n(o),i=r(25),c=r.n(i),l=r(5),u=(r.n(l),r(11)),d=r(20),p=r.n(d),m=r(4);e.a={name:"resourcelist",data:function(){var t=this;return{data:[],columns:[{title:"ID",key:"id",width:100},{title:"资源名称",key:"name",width:200},{title:"平台",key:"platform",width:100},{title:"位置码",key:"code",width:300},{title:"创建时间",key:"createTime",width:200,render:function(t,e){var r=e.row;return t("div",{style:{color:"#999"}},p.a.unix(r.createTime).format("YYYY-MM-DD HH:mm:ss"))}},{title:"操作",width:270,align:"center",render:function(e,r){var a=r.row;return e("div",{},[e("i-button",{props:{type:"success",size:"small"},on:{click:function(){return t.onToEditor(a)}}},"内容编辑"),e("i-button",{props:{type:"primary",size:"small"},style:{marginLeft:"20px",display:a.showEditButton},on:{click:function(){return t.onEditResource(a)}}},"修改信息")])}}],showAddPan:!1,platform:"1",resourceName:"",editResourceId:0}},created:function(){this.resourceService=new u.a,this.fetchData()},methods:{onToEditor:function(t){var e=t.id,r=t.name,a=t.sortId,s=t.platform;2===a?m.a.jumpUrl("resource-edit.html?id="+e+"&name="+r+"&platform="+s):3===a&&m.a.jumpUrl("resource-edit-new.html?id="+e+"&name="+r+"&platform="+s)},fetchData:function(){var t=this;return c()(n.a.mark(function e(){var r,a;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,t.resourceService.list();case 3:if(r=e.sent,200===r.code){for(a=0;a<r.data.length;a++)r.data[a].showEditButton="inline-block",2===r.data[a].sortId&&(r.data[a].showEditButton="none");t.data=r.data,t.$Loading.finish()}else r.message&&t.$Message.warning(r.message),t.$Loading.error();case 5:case"end":return e.stop()}},e,t)}))()},showAddResourcePannel:function(t){this.showAddPan=t},saveResource:function(){var t=this;if(this.resourceName){console.log(this.resourceName),console.log(this.platform);var e={name:this.resourceName,platformId:this.platform,sortId:3};console.log(this.platform),this.editResourceId&&s()(e,{},{id:this.editResourceId}),this.resourceService.addOrUpdateResource(e).then(function(e){e&&200===e.code?(t.showAddPan=!1,t.$Message.success("保存成功!"),t.fetchData(),t.platform="1",t.editResourceId=0,t.resourceName=""):t.$Message.error(e.message)})}},onEditResource:function(t){console.log(t),this.platform=["0","APP","小程序","H5"].indexOf(t.platform).toString(),this.resourceName=t.name,this.editResourceId=t.id,this.showAddResourcePannel(!0)}}}},340:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=r(341),s=r(15);Object(s.a)(a.a)},341:function(t,e,r){"use strict";function a(t){n||r(342)}var s=r(133),o=r(343),n=!1,i=r(0),c=a,l=i(s.a,o.a,!1,c,null,null);l.options.__file="src/views/resource-list/index.vue",e.a=l.exports},342:function(t,e){},343:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("LayoutContent",{attrs:{breads:[{title:"资源位列表"}]}},[r("div",[r("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showAddResourcePannel(!0)}}},[t._v("添加资源位")])],1),t._v(" "),r("LayoutTable",{attrs:{columns:t.columns,data:t.data}}),t._v(" "),t.showAddPan?r("div",{staticClass:"resource-add-container"},[r("Card",{staticClass:"resource-add-card"},[r("p",{attrs:{slot:"title"},slot:"title"},[t._v("添加资源位")]),t._v(" "),r("a",{attrs:{slot:"extra",href:"javascript:void(0)"},on:{click:function(e){return t.showAddResourcePannel(!1)}},slot:"extra"},[r("Icon",{attrs:{type:"ios-close",size:"24"}})],1),t._v(" "),r("div",{staticClass:"resource-add-content"},[r("Row",[r("Col",{attrs:{span:"8"}},[r("label",[t._v("选择平台:")])]),t._v(" "),r("Col",{attrs:{span:"16"}},[r("Select",{staticClass:"platform-select",model:{value:t.platform,callback:function(e){t.platform=e},expression:"platform"}},[r("Option",{attrs:{value:"1"}},[t._v("App")]),t._v(" "),r("Option",{attrs:{value:"2"}},[t._v("小程序")]),t._v(" "),r("Option",{attrs:{value:"3"}},[t._v("H5")])],1)],1)],1),t._v(" "),r("Row",[r("Col",{attrs:{span:"8"}},[r("label",[t._v("资源名称:")])]),t._v(" "),r("Col",{attrs:{span:"16"}},[r("Input",{staticClass:"name-input",attrs:{placeholder:"请输入资源名称"},model:{value:t.resourceName,callback:function(e){t.resourceName=e},expression:"resourceName"}})],1)],1),t._v(" "),r("Row",[r("Col",{attrs:{span:"24"}},[r("Button",{attrs:{type:"primary"},on:{click:t.saveResource}},[t._v("保 存")])],1)],1)],1)])],1):t._e()],1)},s=[];a._withStripped=!0;var o={render:a,staticRenderFns:s};e.a=o},5:function(t,e){t.exports=iview}},[340]);
\ No newline at end of file
webpackJsonp([6],{10:function(t,e){t.exports=Vue},134:function(t,e,r){"use strict";var a=r(13),s=r.n(a),o=r(21),n=r.n(o),i=r(22),c=r.n(i),u=r(5),d=(r.n(u),r(11)),l=r(17),p=r.n(l),f=r(2);e.a={name:"resourcelist",data:function(){var t=this;return{data:[],columns:[{title:"ID",key:"id",width:100},{title:"资源名称",key:"name",width:200},{title:"平台",key:"platform",width:100},{title:"位置码",key:"code",width:300},{title:"创建时间",key:"createTime",width:200,render:function(t,e){var r=e.row;return t("div",{style:{color:"#999"}},p.a.unix(r.createTime).format("YYYY-MM-DD HH:mm:ss"))}},{title:"操作",width:270,align:"center",render:function(e,r){var a=r.row;return e("div",{},[e("i-button",{props:{type:"success",size:"small"},on:{click:function(){return t.onToEditor(a)}}},"内容编辑"),e("i-button",{props:{type:"primary",size:"small"},style:{marginLeft:"20px",display:a.showEditButton},on:{click:function(){return t.onEditResource(a)}}},"修改信息")])}}],showAddPan:!1,platform:"1",resourceName:"",editResourceId:0}},created:function(){this.resourceService=new d.a,this.fetchData()},methods:{onToEditor:function(t){var e=t.id,r=t.name,a=t.sortId,s=t.platform;2===a?f.a.jumpUrl("resource-edit.html?id="+e+"&name="+r+"&platform="+s):3===a&&f.a.jumpUrl("resource-edit-new.html?id="+e+"&name="+r+"&platform="+s)},fetchData:function(){var t=this;return c()(n.a.mark(function e(){var r,a;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,t.resourceService.list();case 3:if(r=e.sent,200===r.code){for(a=0;a<r.data.length;a++)r.data[a].showEditButton="inline-block",2===r.data[a].sortId&&(r.data[a].showEditButton="none");t.data=r.data,t.$Loading.finish()}else r.message&&t.$Message.warning(r.message),t.$Loading.error();case 5:case"end":return e.stop()}},e,t)}))()},showAddResourcePannel:function(t){this.showAddPan=t},saveResource:function(){var t=this;if(this.resourceName){var e={name:this.resourceName,platformId:this.platform,sortId:3};this.editResourceId&&s()(e,{},{id:this.editResourceId}),this.resourceService.addOrUpdateResource(e).then(function(e){e&&200===e.code?(t.showAddPan=!1,t.$Message.success("保存成功!"),t.fetchData(),t.platform="1",t.editResourceId=0,t.resourceName=""):t.$Message.error(e.message)})}},onEditResource:function(t){this.platform=["0","APP","小程序","H5"].indexOf(t.platform).toString(),this.resourceName=t.name,this.editResourceId=t.id,this.showAddResourcePannel(!0)}}}},345:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=r(346),s=r(18);Object(s.a)(a.a)},346:function(t,e,r){"use strict";function a(t){n||r(347)}var s=r(134),o=r(348),n=!1,i=r(0),c=a,u=i(s.a,o.a,!1,c,null,null);u.options.__file="src/views/resource-list/index.vue",e.a=u.exports},347:function(t,e){},348:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("LayoutContent",{attrs:{breads:[{title:"资源位列表"}]}},[r("div",[r("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showAddResourcePannel(!0)}}},[t._v("添加资源位")])],1),t._v(" "),r("LayoutTable",{attrs:{columns:t.columns,data:t.data}}),t._v(" "),t.showAddPan?r("div",{staticClass:"resource-add-container"},[r("Card",{staticClass:"resource-add-card"},[r("p",{attrs:{slot:"title"},slot:"title"},[t._v("添加资源位")]),t._v(" "),r("a",{attrs:{slot:"extra",href:"javascript:void(0)"},on:{click:function(e){return t.showAddResourcePannel(!1)}},slot:"extra"},[r("Icon",{attrs:{type:"ios-close",size:"24"}})],1),t._v(" "),r("div",{staticClass:"resource-add-content"},[r("Row",[r("Col",{attrs:{span:"8"}},[r("label",[t._v("选择平台:")])]),t._v(" "),r("Col",{attrs:{span:"16"}},[r("Select",{staticClass:"platform-select",model:{value:t.platform,callback:function(e){t.platform=e},expression:"platform"}},[r("Option",{attrs:{value:"1"}},[t._v("App")]),t._v(" "),r("Option",{attrs:{value:"2"}},[t._v("小程序")]),t._v(" "),r("Option",{attrs:{value:"3"}},[t._v("H5")])],1)],1)],1),t._v(" "),r("Row",[r("Col",{attrs:{span:"8"}},[r("label",[t._v("资源名称:")])]),t._v(" "),r("Col",{attrs:{span:"16"}},[r("Input",{staticClass:"name-input",attrs:{placeholder:"请输入资源名称"},model:{value:t.resourceName,callback:function(e){t.resourceName=e},expression:"resourceName"}})],1)],1),t._v(" "),r("Row",[r("Col",{attrs:{span:"24"}},[r("Button",{attrs:{type:"primary"},on:{click:t.saveResource}},[t._v("保 存")])],1)],1)],1)])],1):t._e()],1)},s=[];a._withStripped=!0;var o={render:a,staticRenderFns:s};e.a=o},5:function(t,e){t.exports=iview}},[345]);
\ No newline at end of file
... ...
webpackJsonp([6],{10:function(t,e){t.exports=Vue},134:function(t,e,r){"use strict";var a=r(13),s=r.n(a),o=r(21),n=r.n(o),i=r(22),c=r.n(i),l=r(5),u=(r.n(l),r(11)),d=r(17),p=r.n(d),m=r(2);e.a={name:"resourcelist",data:function(){var t=this;return{data:[],columns:[{title:"ID",key:"id",width:100},{title:"资源名称",key:"name",width:200},{title:"平台",key:"platform",width:100},{title:"位置码",key:"code",width:300},{title:"创建时间",key:"createTime",width:200,render:function(t,e){var r=e.row;return t("div",{style:{color:"#999"}},p.a.unix(r.createTime).format("YYYY-MM-DD HH:mm:ss"))}},{title:"操作",width:270,align:"center",render:function(e,r){var a=r.row;return e("div",{},[e("i-button",{props:{type:"success",size:"small"},on:{click:function(){return t.onToEditor(a)}}},"内容编辑"),e("i-button",{props:{type:"primary",size:"small"},style:{marginLeft:"20px",display:a.showEditButton},on:{click:function(){return t.onEditResource(a)}}},"修改信息")])}}],showAddPan:!1,platform:"1",resourceName:"",editResourceId:0}},created:function(){this.resourceService=new u.a,this.fetchData()},methods:{onToEditor:function(t){var e=t.id,r=t.name,a=t.sortId,s=t.platform;2===a?m.a.jumpUrl("resource-edit.html?id="+e+"&name="+r+"&platform="+s):3===a&&m.a.jumpUrl("resource-edit-new.html?id="+e+"&name="+r+"&platform="+s)},fetchData:function(){var t=this;return c()(n.a.mark(function e(){var r,a;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,t.resourceService.list();case 3:if(r=e.sent,200===r.code){for(a=0;a<r.data.length;a++)r.data[a].showEditButton="inline-block",2===r.data[a].sortId&&(r.data[a].showEditButton="none");t.data=r.data,t.$Loading.finish()}else r.message&&t.$Message.warning(r.message),t.$Loading.error();case 5:case"end":return e.stop()}},e,t)}))()},showAddResourcePannel:function(t){this.showAddPan=t},saveResource:function(){var t=this;if(this.resourceName){console.log(this.resourceName),console.log(this.platform);var e={name:this.resourceName,platformId:this.platform,sortId:3};console.log(this.platform),this.editResourceId&&s()(e,{},{id:this.editResourceId}),this.resourceService.addOrUpdateResource(e).then(function(e){e&&200===e.code?(t.showAddPan=!1,t.$Message.success("保存成功!"),t.fetchData(),t.platform="1",t.editResourceId=0,t.resourceName=""):t.$Message.error(e.message)})}},onEditResource:function(t){console.log(t),this.platform=["0","APP","小程序","H5"].indexOf(t.platform).toString(),this.resourceName=t.name,this.editResourceId=t.id,this.showAddResourcePannel(!0)}}}},345:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=r(346),s=r(18);Object(s.a)(a.a)},346:function(t,e,r){"use strict";function a(t){n||r(347)}var s=r(134),o=r(348),n=!1,i=r(0),c=a,l=i(s.a,o.a,!1,c,null,null);l.options.__file="src/views/resource-list/index.vue",e.a=l.exports},347:function(t,e){},348:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("LayoutContent",{attrs:{breads:[{title:"资源位列表"}]}},[r("div",[r("Button",{attrs:{type:"primary"},on:{click:function(e){return t.showAddResourcePannel(!0)}}},[t._v("添加资源位")])],1),t._v(" "),r("LayoutTable",{attrs:{columns:t.columns,data:t.data}}),t._v(" "),t.showAddPan?r("div",{staticClass:"resource-add-container"},[r("Card",{staticClass:"resource-add-card"},[r("p",{attrs:{slot:"title"},slot:"title"},[t._v("添加资源位")]),t._v(" "),r("a",{attrs:{slot:"extra",href:"javascript:void(0)"},on:{click:function(e){return t.showAddResourcePannel(!1)}},slot:"extra"},[r("Icon",{attrs:{type:"ios-close",size:"24"}})],1),t._v(" "),r("div",{staticClass:"resource-add-content"},[r("Row",[r("Col",{attrs:{span:"8"}},[r("label",[t._v("选择平台:")])]),t._v(" "),r("Col",{attrs:{span:"16"}},[r("Select",{staticClass:"platform-select",model:{value:t.platform,callback:function(e){t.platform=e},expression:"platform"}},[r("Option",{attrs:{value:"1"}},[t._v("App")]),t._v(" "),r("Option",{attrs:{value:"2"}},[t._v("小程序")]),t._v(" "),r("Option",{attrs:{value:"3"}},[t._v("H5")])],1)],1)],1),t._v(" "),r("Row",[r("Col",{attrs:{span:"8"}},[r("label",[t._v("资源名称:")])]),t._v(" "),r("Col",{attrs:{span:"16"}},[r("Input",{staticClass:"name-input",attrs:{placeholder:"请输入资源名称"},model:{value:t.resourceName,callback:function(e){t.resourceName=e},expression:"resourceName"}})],1)],1),t._v(" "),r("Row",[r("Col",{attrs:{span:"24"}},[r("Button",{attrs:{type:"primary"},on:{click:t.saveResource}},[t._v("保 存")])],1)],1)],1)])],1):t._e()],1)},s=[];a._withStripped=!0;var o={render:a,staticRenderFns:s};e.a=o},5:function(t,e){t.exports=iview}},[345]);
\ No newline at end of file
webpackJsonp([5],{10:function(t,e){t.exports=Vue},134:function(t,e,n){"use strict";var a=n(19),o=n(20),s=(n.n(o),n(44),n(27)),i=n.n(s),l=new a.a;e.a={components:{},name:"SendCouponPage",data:function(){return{parentUrl:"",couponId:0,couponToken:"",uidValue:"",fileName:"",showModal:!1,message:"",uploadMessage:"",isSending:!1}},created:function(){var t=this;this.$nextTick(function(){var e=i.a.parse(location.search?location.search.slice(1):"");t.parentUrl="coupon.html?"+i.a.stringify(e.param),t.couponId=e.id,t.couponToken=e.token})},methods:{manualSend:function(){var t=this;if(this.uidValue&&!this.isSending){var e=this.uidValue.replace(/,/g,",").split(",");e.length>50&&(e.length=50),e.length>0&&(this.isSending=!0,l._get("/ufoPlatform/coupon/couponSend",{couponToken:this.couponToken,uids:e.join(",")}).then(function(e){t.showModal=!0,t.message=e.message,t.isSending=!1;var n="提示信息";200!==e.code&&(n="操作失败"),t.$Modal.info({title:n,content:e.message,onOK:t.ok})}).catch(function(){t.isSending=!1,t.$Modal.info({title:"提示",content:"发送失败",onOK:t.ok})}))}},fileChange:function(){var t=document.getElementById("upload");t.files.length>0&&(this.fileName=t.files[0].name)},importSend:function(){var t=this;if(this.fileName&&!this.isSending){var e=new FormData,n=document.getElementById("upload").files[0],a={headers:{"Content-Type":"multipart/form-data"}};e.append("file",n),e.append("couponToken",this.couponToken),this.isSending=!0,this.uploadMessage="文件上传中...",l._postForm("/ufoPlatform/coupon/couponSendByImport",e,!1,a).then(function(e){t.isSending=!1,t.uploadMessage="";var n="提示信息";200!==e.code&&(n="操作失败"),t.$Modal.info({title:n,content:e.message,onOK:t.ok})}).catch(function(){t.isSending=!1,t.uploadMessage="",t.$Modal.info({title:"提示信息",content:"上传失败",onOK:t.ok})})}},ok:function(){this.showModal=!1}}}},344:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(345),o=n(15);Object(o.a)(a.a)},345:function(t,e,n){"use strict";function a(t){i||n(346)}var o=n(134),s=n(347),i=!1,l=n(0),r=a,c=l(o.a,s.a,!1,r,null,null);c.options.__file="src/views/send-coupon/index.vue",e.a=c.exports},346:function(t,e){},347:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("LayoutContent",{attrs:{breads:[{url:t.parentUrl,title:"优惠券列表"},{title:"优惠券发放"}]}},[n("Form",[n("Card",{staticClass:"manual-send-wrapper"},[n("p",{attrs:{slot:"title"},slot:"title"},[t._v("手动发放")]),t._v(" "),n("div",[n("Row",{staticClass:"manual-send-container"},[n("Col",{staticClass:"title",attrs:{span:"4"}},[t._v("\n UID"),n("span",{staticClass:"red"},[t._v("*")])]),t._v(" "),n("Col",{staticClass:"content",attrs:{span:"14"}},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.uidValue,expression:"uidValue"}],attrs:{rows:"5",id:"txt_uids",placeholder:"请输入UID,多个UID用英文逗号分隔,单次限制输入50个UID"},domProps:{value:t.uidValue},on:{input:function(e){e.target.composing||(t.uidValue=e.target.value)}}})]),t._v(" "),n("Col",{staticClass:"button",attrs:{span:"5"}},[n("Button",{attrs:{type:"success"},on:{click:t.manualSend}},[t._v("发送")])],1)],1)],1)]),t._v(" "),n("Card",{staticClass:"import-send-wrapper"},[n("p",{attrs:{slot:"title"},slot:"title"},[t._v("批量发放")]),t._v(" "),n("div",[n("Row",{staticClass:"import-send-container"},[n("Col",{attrs:{span:"3"}},[t._v(" ")]),t._v(" "),n("Col",{attrs:{span:"4"}},[n("div",{staticClass:"button-upload"},[t._v("\n 上传文件\n "),n("form",{attrs:{id:"formUpload"}},[n("input",{attrs:{type:"file",id:"upload",accept:".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},on:{change:t.fileChange}})])]),t._v(" "),n("span",{staticClass:"file-name"},[t._v(t._s(t.fileName))])]),t._v(" "),n("Col",{attrs:{span:"2"}},[t._v(" ")]),t._v(" "),n("Col",{attrs:{span:"8"}},[t._v(" ")])],1),t._v(" "),n("Row",{staticStyle:{"margin-top":"20px"}},[n("Col",{attrs:{span:"3"}},[t._v(" ")]),t._v(" "),n("Col",{attrs:{span:"4"}},[n("a",{staticClass:"btn-download",attrs:{href:"..\\..\\common/uid_import.xlsx",target:"_blank"}},[t._v("下载样例")]),t._v(" "),n("p",[t._v("1.表头:UID")]),t._v(" "),n("p",[t._v("2.同一张券可以给同一个用户发多张")])]),t._v(" "),n("Col",{attrs:{span:"2"}},[t._v(" ")]),t._v(" "),n("Col",{attrs:{span:"8"}},[n("a",{staticStyle:{color:"red"},attrs:{href:"javascript:void(0)"}}),t._v(" "),n("p"),t._v(" "),n("p")])],1),t._v(" "),n("Row",[n("p",{staticStyle:{color:"red","text-align":"center","margin-top":"30px","font-size":"30px"}},[t._v(t._s(t.uploadMessage))])])],1)]),t._v(" "),n("div",{staticClass:"bottom"},[n("Button",{attrs:{type:"success",id:"btn_import_send"},on:{click:t.importSend}},[t._v("批量发送")])],1)],1)],1)},o=[];a._withStripped=!0;var s={render:a,staticRenderFns:o};e.a=s},5:function(t,e){t.exports=iview}},[344]);
\ No newline at end of file
webpackJsonp([5],{10:function(t,e){t.exports=Vue},135:function(t,e,n){"use strict";var a=n(16),o=n(17),s=(n.n(o),n(44),n(27)),i=n.n(s),l=new a.a;e.a={components:{},name:"SendCouponPage",data:function(){return{parentUrl:"",couponId:0,couponToken:"",uidValue:"",fileName:"",showModal:!1,message:"",uploadMessage:"",isSending:!1}},created:function(){var t=this;this.$nextTick(function(){var e=i.a.parse(location.search?location.search.slice(1):"");t.parentUrl="coupon.html?"+i.a.stringify(e.param),t.couponId=e.id,t.couponToken=e.token})},methods:{manualSend:function(){var t=this;if(this.uidValue&&!this.isSending){var e=this.uidValue.replace(/,/g,",").split(",");e.length>50&&(e.length=50),e.length>0&&(this.isSending=!0,l._get("/ufoPlatform/coupon/couponSend",{couponToken:this.couponToken,uids:e.join(",")}).then(function(e){t.showModal=!0,t.message=e.message,t.isSending=!1;var n="提示信息";200!==e.code&&(n="操作失败"),t.$Modal.info({title:n,content:e.message,onOK:t.ok})}).catch(function(){t.isSending=!1,t.$Modal.info({title:"提示",content:"发送失败",onOK:t.ok})}))}},fileChange:function(){var t=document.getElementById("upload");t.files.length>0&&(this.fileName=t.files[0].name)},importSend:function(){var t=this;if(this.fileName&&!this.isSending){var e=new FormData,n=document.getElementById("upload").files[0],a={headers:{"Content-Type":"multipart/form-data"}};e.append("file",n),e.append("couponToken",this.couponToken),this.isSending=!0,this.uploadMessage="文件上传中...",l._postForm("/ufoPlatform/coupon/couponSendByImport",e,!1,a).then(function(e){t.isSending=!1,t.uploadMessage="";var n="提示信息";200!==e.code&&(n="操作失败"),t.$Modal.info({title:n,content:e.message,onOK:t.ok})}).catch(function(){t.isSending=!1,t.uploadMessage="",t.$Modal.info({title:"提示信息",content:"上传失败",onOK:t.ok})})}},ok:function(){this.showModal=!1}}}},349:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(350),o=n(18);Object(o.a)(a.a)},350:function(t,e,n){"use strict";function a(t){i||n(351)}var o=n(135),s=n(352),i=!1,l=n(0),r=a,c=l(o.a,s.a,!1,r,null,null);c.options.__file="src/views/send-coupon/index.vue",e.a=c.exports},351:function(t,e){},352:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("LayoutContent",{attrs:{breads:[{url:t.parentUrl,title:"优惠券列表"},{title:"优惠券发放"}]}},[n("Form",[n("Card",{staticClass:"manual-send-wrapper"},[n("p",{attrs:{slot:"title"},slot:"title"},[t._v("手动发放")]),t._v(" "),n("div",[n("Row",{staticClass:"manual-send-container"},[n("Col",{staticClass:"title",attrs:{span:"4"}},[t._v("\n UID"),n("span",{staticClass:"red"},[t._v("*")])]),t._v(" "),n("Col",{staticClass:"content",attrs:{span:"14"}},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.uidValue,expression:"uidValue"}],attrs:{rows:"5",id:"txt_uids",placeholder:"请输入UID,多个UID用英文逗号分隔,单次限制输入50个UID"},domProps:{value:t.uidValue},on:{input:function(e){e.target.composing||(t.uidValue=e.target.value)}}})]),t._v(" "),n("Col",{staticClass:"button",attrs:{span:"5"}},[n("Button",{attrs:{type:"success"},on:{click:t.manualSend}},[t._v("发送")])],1)],1)],1)]),t._v(" "),n("Card",{staticClass:"import-send-wrapper"},[n("p",{attrs:{slot:"title"},slot:"title"},[t._v("批量发放")]),t._v(" "),n("div",[n("Row",{staticClass:"import-send-container"},[n("Col",{attrs:{span:"3"}},[t._v(" ")]),t._v(" "),n("Col",{attrs:{span:"4"}},[n("div",{staticClass:"button-upload"},[t._v("\n 上传文件\n "),n("form",{attrs:{id:"formUpload"}},[n("input",{attrs:{type:"file",id:"upload",accept:".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},on:{change:t.fileChange}})])]),t._v(" "),n("span",{staticClass:"file-name"},[t._v(t._s(t.fileName))])]),t._v(" "),n("Col",{attrs:{span:"2"}},[t._v(" ")]),t._v(" "),n("Col",{attrs:{span:"8"}},[t._v(" ")])],1),t._v(" "),n("Row",{staticStyle:{"margin-top":"20px"}},[n("Col",{attrs:{span:"3"}},[t._v(" ")]),t._v(" "),n("Col",{attrs:{span:"4"}},[n("a",{staticClass:"btn-download",attrs:{href:"..\\..\\common/uid_import.xlsx",target:"_blank"}},[t._v("下载样例")]),t._v(" "),n("p",[t._v("1.表头:UID")]),t._v(" "),n("p",[t._v("2.同一张券可以给同一个用户发多张")])]),t._v(" "),n("Col",{attrs:{span:"2"}},[t._v(" ")]),t._v(" "),n("Col",{attrs:{span:"8"}},[n("a",{staticStyle:{color:"red"},attrs:{href:"javascript:void(0)"}}),t._v(" "),n("p"),t._v(" "),n("p")])],1),t._v(" "),n("Row",[n("p",{staticStyle:{color:"red","text-align":"center","margin-top":"30px","font-size":"30px"}},[t._v(t._s(t.uploadMessage))])])],1)]),t._v(" "),n("div",{staticClass:"bottom"},[n("Button",{attrs:{type:"success",id:"btn_import_send"},on:{click:t.importSend}},[t._v("批量发送")])],1)],1)],1)},o=[];a._withStripped=!0;var s={render:a,staticRenderFns:o};e.a=s},5:function(t,e){t.exports=iview}},[349]);
\ No newline at end of file
webpackJsonp([2],{10:function(e,t){e.exports=Vue},136:function(e,t,o){"use strict";var a=o(21),n=o.n(a),r=o(13),s=o.n(r),i=o(22),u=o.n(i),l=o(5),c=(o.n(l),o(16)),p=o(17),d=o.n(p),m=o(44),f=o(27),v=o.n(f),g=o(356),h=new c.a;t.a={name:"SendRecordPage",data:function(){var e=this;this.$createElement;return{filter:{couponId:0,couponCode:"",uid:"",status:""},parentUrl:"",page:1,total:0,data:[],columns:[{title:"单券号",key:"couponCode"},{title:"用户ID",key:"uid"},{title:"发放时间",render:function(e,t){return e("span",[t.row.createTime])}},{title:"使用状态",key:"status"},{title:"使用时间",render:function(e,t){return e("span",[t.row.useTime||"--"])}},{title:"操作",align:"center",width:200,render:function(t,o){var a=o.row;return t("div",["未使用"===a.status||"0"===a.statusValue?t(l.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return e.onUpdateTime(a)}}},["延期"]):void 0,"未使用"===a.status||"0"===a.statusValue?t(l.Button,{attrs:{type:"error",size:"small"},on:{click:function(){return e.onUpDateStatus(a)}}},["作废"]):void 0])}}]}},created:function(){var e=this;this.$nextTick(function(){var t=v.a.parse(location.search?location.search.slice(1):"");e.filter.couponId=t.id,e.filter.couponCode=t.couponCode||e.filter.couponCode,e.filter.uid=t.uid||e.filter.uid,e.filter.status=t.status?parseInt(t.status):e.filter.status,e.parentUrl="coupon.html?"+v.a.stringify(t.param),e.page=t.page?parseInt(t.page):1,e.fetchData(e.filter,e.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(e){this.fetchData(this.filter,e)},onUpdateTime:function(e){console.log("延期==onUpdateTime"),console.log(e),this.$refs.sendRecordModalCreateCoupon.show(e)},onUpDateStatus:function(e){console.log("作废==onUpDateStatus"),console.log(e);var t={uid:e.uid,couponCode:e.couponCode};console.log(t),this.invalidateUserCoupon(t)},fetchData:function(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return u()(n.a.mark(function a(){var r;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t.page=o,t.$Loading.start(),a.next=4,h._get("/ufoPlatform/coupon/queryUserCoupons",s()({page:o},t.getParams(e)));case 4:r=a.sent,200===r.code?(t.total=r.data.total,t.data=r.data.userCoupons,t.$Loading.finish()):(r.message&&t.$Message.warning(r.message),t.$Loading.error());case 6:case"end":return a.stop()}},a,t)}))()},invalidateUserCoupon:function(e){var t=this;return u()(n.a.mark(function o(){var a;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return t.$Loading.start(),o.next=3,h._get("/ufoPlatform/coupon/invalidateUserCoupon",e);case 3:a=o.sent,200===a.code?t.$Loading.finish():(a.message&&t.$Message.warning(a.message),t.$Loading.error());case 5:case"end":return o.stop()}},o,t)}))()},onExport:function(){var e=this;return u()(n.a.mark(function t(){var o;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.$Loading.start(),t.next=3,h._get("/ufoPlatform/coupon/export",{param:{method:"userCoupon",param:h._2params(e.getParams(e.filter))}},{responseType:"blob"});case 3:o=t.sent,o instanceof Blob?(m.a.downloadBlob(o,"优惠券发放记录导出_"+d()().format("YYYY-MM-DD")+".xlsx"),e.$Loading.finish()):o&&(o.message&&e.$Message.warning(o.message),e.$Loading.error());case 5:case"end":return t.stop()}},t,e)}))()},getParams:function(e){return{couponId:e.couponId,couponCode:e.couponCode,uid:e.uid,status:parseInt(e.status)>=0?e.status:void 0}}},components:{SendRecordModalCreateCoupon:g.a}}},137:function(e,t,o){"use strict";var a=o(21),n=o.n(a),r=o(22),s=o.n(r),i=o(16),u=o(17),l=o.n(u),c=new i.a;t.a={components:{},name:"ModalCreateCoupon",data:function(){return{readonly:!1,allreadonly:!1,visiable:!1,loading:!1,posting:!0,uploadTxt:"",couponToken:"",formData:{uid:0,couponToken:"",couponId:"",couponCode:"",couponName:"",time:["",""],remark:""},ruleValidate:{time:{required:!0,validator:function(e,t,o){t.some(function(e){return!e})?o(new Error("请选择使用期限")):o()}}}}},methods:{show:function(e){var t=this;return s()(n.a.mark(function o(){var a;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:console.log("console.log(item)"),console.log(e),t.posting=t.visiable=!0,t.$refs.formCoupon.resetFields(),a={uid:e.uid,couponToken:e.couponToken,couponId:e.couponId,couponCode:e.couponCode,couponName:e.couponName,time:[l.a.unix(e.startTime).format("YYYY-MM-DD HH:mm:ss"),l.a.unix(e.endTime).format("YYYY-MM-DD HH:mm:ss")],remark:e.remark,startTimeStr:l.a.unix(e.startTime).format("YYYY-MM-DD HH:mm:ss"),endTimeStr:l.a.unix(e.endTime).format("YYYY-MM-DD HH:mm:ss")},t.formData=a;case 6:case"end":return o.stop()}},o,t)}))()},onOk:function(){var e=this;this.$refs.formCoupon.validate(function(t){t?e.saveData(e.formData):(e.posting=!1,e.$nextTick(function(){e.posting=!0}))})},getCheckBox:function(){for(var e=[],t=0;t<this.formData.skupAllowTypeLabel.length;t++){var o=this.formData.skupAllowTypeLabel[t];console.log(o),e.push(allowTypeMap[o])}console.log(e),this.formData.skupAllowType=e.join(",")},getChannelCheckBox:function(){for(var e=[],t=0;t<this.formData.businessClientLabel.length;t++){var o=this.formData.businessClientLabel[t];console.log(o),e.push(businessClientTypeMap[o])}console.log(e),this.formData.businessClient=e.join(",")},saveData:function(e){var t=this;return s()(n.a.mark(function o(){var a;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!t.allreadonly){o.next=3;break}return t.visiable=!1,o.abrupt("return");case 3:return console.log("params"),console.log(e),o.next=7,c._post("/ufoPlatform/coupon/updateUserCoupon",{uid:e.uid||void 0,couponId:e.couponId||void 0,couponCode:e.couponCode,endTime:e.time[1]?l()(e.time[1]).unix():void 0});case 7:a=o.sent,console.log("result=",a),200===a.code?(t.$Message.success("保存成功"),t.visiable=!1,t.$emit("on-created")):(a.message&&t.$Message.warning(a.message),t.posting=!1,t.$nextTick(function(){t.posting=!0}));case 10:case"end":return o.stop()}},o,t)}))()}}}},353:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=o(354),n=o(18);Object(n.a)(a.a)},354:function(e,t,o){"use strict";function a(e){s||o(355)}var n=o(136),r=o(359),s=!1,i=o(0),u=a,l=i(n.a,r.a,!1,u,null,null);l.options.__file="src/views/send-record/index.vue",t.a=l.exports},355:function(e,t){},356:function(e,t,o){"use strict";function a(e){s||o(357)}var n=o(137),r=o(358),s=!1,i=o(0),u=a,l=i(n.a,r.a,!1,u,"data-v-c6807168",null);l.options.__file="src/views/coupon/components/modal-update-time-coupon.vue",t.a=l.exports},357:function(e,t){},358:function(e,t,o){"use strict";var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("Modal",{attrs:{loading:e.posting,title:e.allreadonly?"查看优惠券":"创建/编辑优惠券",width:"600"},on:{"on-ok":e.onOk},model:{value:e.visiable,callback:function(t){e.visiable=t},expression:"visiable"}},[e.loading?o("Spin"):o("Form",{ref:"formCoupon",attrs:{rules:e.ruleValidate,model:e.formData,"label-width":80}},[o("FormItem",{staticClass:"form-group",attrs:{label:"基本信息"}}),e._v(" "),o("FormItem",{attrs:{label:"Token"}},[e._v("\n "+e._s(e.formData.couponToken)+"\n ")]),e._v(" "),o("FormItem",{attrs:{label:"名称",prop:"couponName"}},[o("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"名称建议30字以内",disabled:!0},model:{value:e.formData.couponName,callback:function(t){e.$set(e.formData,"couponName",t)},expression:"formData.couponName"}})],1),e._v(" "),o("FormItem",{attrs:{label:"使用期限",prop:"time"}},[o("DatePicker",{staticStyle:{width:"200px"},attrs:{type:"datetimerange",prop:"startTimeStr",placeholder:"使用期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.time,callback:function(t){e.$set(e.formData,"time",t)},expression:"formData.time"}})],1),e._v(" "),o("FormItem",{attrs:{label:"优惠券说明",prop:"remark"}},[o("Input",{attrs:{type:"textarea",placeholder:"优惠券使用条件简介",disabled:!0},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1)],1)],1)},n=[];a._withStripped=!0;var r={render:a,staticRenderFns:n};t.a=r},359:function(e,t,o){"use strict";var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("LayoutContent",{attrs:{breads:[{url:e.parentUrl,title:"优惠券列表"},{title:"发放记录"}]}},[o("LayoutFilter",{on:{"on-filter":e.onFilter,"on-clear":e.onClear}},[o("Form",{ref:"filterForm",attrs:{inline:"",model:e.filter}},[o("FormItem",{attrs:{prop:"couponCode"}},[o("Input",{attrs:{placeholder:"输入ID"},model:{value:e.filter.couponCode,callback:function(t){e.$set(e.filter,"couponCode",t)},expression:"filter.couponCode"}})],1),e._v(" "),o("FormItem",{attrs:{prop:"uid"}},[o("Input",{attrs:{placeholder:"输入uid"},model:{value:e.filter.uid,callback:function(t){e.$set(e.filter,"uid",t)},expression:"filter.uid"}})],1),e._v(" "),o("FormItem",{attrs:{prop:"status"}},[o("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:e.filter.status,callback:function(t){e.$set(e.filter,"status",t)},expression:"filter.status"}},[o("Option",{attrs:{value:0}},[e._v("未使用")]),e._v(" "),o("Option",{attrs:{value:1}},[e._v("已使用")])],1)],1)],1)],1),e._v(" "),o("LayoutTable",{attrs:{page:e.page,total:e.total,columns:e.columns,data:e.data},on:{"on-page-change":e.onPageChange}},[o("template",{staticClass:"btns",slot:"footer"},[o("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:e.onExport}},[e._v("导出")])],1)],2),e._v(" "),o("SendRecordModalCreateCoupon",{ref:"sendRecordModalCreateCoupon"})],1)},n=[];a._withStripped=!0;var r={render:a,staticRenderFns:n};t.a=r},5:function(e,t){e.exports=iview}},[353]);
\ No newline at end of file
webpackJsonp([4],{10:function(t,e){t.exports=Vue},135:function(t,e,a){"use strict";var o=a(24),n=a.n(o),r=a(12),s=a.n(r),i=a(25),u=a.n(i),c=a(19),l=a(20),p=a.n(l),d=a(44),f=a(27),m=a.n(f),g=new c.a;e.a={name:"SendRecordPage",data:function(){this.$createElement;return{filter:{couponId:0,couponCode:"",uid:"",status:""},parentUrl:"",page:1,total:0,data:[],columns:[{title:"单券号",key:"couponCode"},{title:"用户ID",key:"uid"},{title:"发放时间",render:function(t,e){return t("span",[e.row.createTime])}},{title:"使用状态",key:"status"},{title:"使用时间",render:function(t,e){return t("span",[e.row.useTime||"--"])}}]}},created:function(){var t=this;this.$nextTick(function(){var e=m.a.parse(location.search?location.search.slice(1):"");t.filter.couponId=e.id,t.filter.couponCode=e.couponCode||t.filter.couponCode,t.filter.uid=e.uid||t.filter.uid,t.filter.status=e.status?parseInt(e.status):t.filter.status,t.parentUrl="coupon.html?"+m.a.stringify(e.param),t.page=e.page?parseInt(e.page):1,t.fetchData(t.filter,t.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(t){this.fetchData(this.filter,t)},fetchData:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return u()(n.a.mark(function o(){var r;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return e.page=a,e.$Loading.start(),o.next=4,g._get("/ufoPlatform/coupon/queryUserCoupons",s()({page:a},e.getParams(t)));case 4:r=o.sent,200===r.code?(e.total=r.data.total,e.data=r.data.userCoupons,e.$Loading.finish()):(r.message&&e.$Message.warning(r.message),e.$Loading.error());case 6:case"end":return o.stop()}},o,e)}))()},onExport:function(){var t=this;return u()(n.a.mark(function e(){var a;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,g._get("/ufoPlatform/coupon/export",{param:{method:"userCoupon",param:g._2params(t.getParams(t.filter))}},{responseType:"blob"});case 3:a=e.sent,a instanceof Blob?(d.a.downloadBlob(a,"优惠券发放记录导出_"+p()().format("YYYY-MM-DD")+".xlsx"),t.$Loading.finish()):a&&(a.message&&t.$Message.warning(a.message),t.$Loading.error());case 5:case"end":return e.stop()}},e,t)}))()},getParams:function(t){return{couponId:t.couponId,couponCode:t.couponCode,uid:t.uid,status:parseInt(t.status)>=0?t.status:void 0}}}}},348:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a(349),n=a(15);Object(n.a)(o.a)},349:function(t,e,a){"use strict";function o(t){s||a(350)}var n=a(135),r=a(351),s=!1,i=a(0),u=o,c=i(n.a,r.a,!1,u,null,null);c.options.__file="src/views/send-record/index.vue",e.a=c.exports},350:function(t,e){},351:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("LayoutContent",{attrs:{breads:[{url:t.parentUrl,title:"优惠券列表"},{title:"发放记录"}]}},[a("LayoutFilter",{on:{"on-filter":t.onFilter,"on-clear":t.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:t.filter}},[a("FormItem",{attrs:{prop:"couponCode"}},[a("Input",{attrs:{placeholder:"输入ID"},model:{value:t.filter.couponCode,callback:function(e){t.$set(t.filter,"couponCode",e)},expression:"filter.couponCode"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"uid"}},[a("Input",{attrs:{placeholder:"输入uid"},model:{value:t.filter.uid,callback:function(e){t.$set(t.filter,"uid",e)},expression:"filter.uid"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"status"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:t.filter.status,callback:function(e){t.$set(t.filter,"status",e)},expression:"filter.status"}},[a("Option",{attrs:{value:0}},[t._v("未使用")]),t._v(" "),a("Option",{attrs:{value:1}},[t._v("已使用")])],1)],1)],1)],1),t._v(" "),a("LayoutTable",{attrs:{page:t.page,total:t.total,columns:t.columns,data:t.data},on:{"on-page-change":t.onPageChange}},[a("template",{staticClass:"btns",slot:"footer"},[a("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:t.onExport}},[t._v("导出")])],1)],2)],1)},n=[];o._withStripped=!0;var r={render:o,staticRenderFns:n};e.a=r},5:function(t,e){t.exports=iview}},[348]);
\ No newline at end of file
webpackJsonp([2],{10:function(t,e){t.exports=Vue},136:function(t,e,a){"use strict";var o=a(21),n=a.n(o),r=a(13),s=a.n(r),i=a(22),u=a.n(i),c=a(5),l=(a.n(c),a(16)),p=a(17),d=a.n(p),f=a(44),m=a(27),v=a.n(m),h=a(356),g=new l.a;e.a={name:"SendRecordPage",data:function(){var t=this;this.$createElement;return{filter:{couponId:0,couponCode:"",uid:"",status:""},parentUrl:"",page:1,total:0,data:[],columns:[{title:"单券号",key:"couponCode"},{title:"用户ID",key:"uid"},{title:"发放时间",render:function(t,e){return t("span",[e.row.createTime])}},{title:"使用状态",key:"status"},{title:"使用时间",render:function(t,e){return t("span",[e.row.useTime||"--"])}},{title:"操作",align:"center",width:200,render:function(e,a){var o=a.row;return e("div",["未使用"===o.status||"0"===o.statusValue?e(c.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return t.onUpdateTime(o)}}},["延期"]):void 0,"未使用"===o.status||"0"===o.statusValue?e(c.Button,{attrs:{type:"error",size:"small"},on:{click:function(){return t.onUpDateStatus(o)}}},["作废"]):void 0])}}]}},created:function(){var t=this;this.$nextTick(function(){var e=v.a.parse(location.search?location.search.slice(1):"");t.filter.couponId=e.id,t.filter.couponCode=e.couponCode||t.filter.couponCode,t.filter.uid=e.uid||t.filter.uid,t.filter.status=e.status?parseInt(e.status):t.filter.status,t.parentUrl="coupon.html?"+v.a.stringify(e.param),t.page=e.page?parseInt(e.page):1,t.fetchData(t.filter,t.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(t){this.fetchData(this.filter,t)},onUpdateTime:function(t){this.$refs.sendRecordModalCreateCoupon.show(t)},onUpDateStatus:function(t){var e={uid:t.uid,couponCode:t.couponCode};this.invalidateUserCoupon(e)},fetchData:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return u()(n.a.mark(function o(){var r;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return e.page=a,e.$Loading.start(),o.next=4,g._get("/ufoPlatform/coupon/queryUserCoupons",s()({page:a},e.getParams(t)));case 4:r=o.sent,200===r.code?(e.total=r.data.total,e.data=r.data.userCoupons,e.$Loading.finish()):(r.message&&e.$Message.warning(r.message),e.$Loading.error());case 6:case"end":return o.stop()}},o,e)}))()},invalidateUserCoupon:function(t){var e=this;return u()(n.a.mark(function a(){var o;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e.$Loading.start(),a.next=3,g._get("/ufoPlatform/coupon/invalidateUserCoupon",t);case 3:o=a.sent,200===o.code?e.$Loading.finish():(o.message&&e.$Message.warning(o.message),e.$Loading.error());case 5:case"end":return a.stop()}},a,e)}))()},onExport:function(){var t=this;return u()(n.a.mark(function e(){var a;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$Loading.start(),e.next=3,g._get("/ufoPlatform/coupon/export",{param:{method:"userCoupon",param:g._2params(t.getParams(t.filter))}},{responseType:"blob"});case 3:a=e.sent,a instanceof Blob?(f.a.downloadBlob(a,"优惠券发放记录导出_"+d()().format("YYYY-MM-DD")+".xlsx"),t.$Loading.finish()):a&&(a.message&&t.$Message.warning(a.message),t.$Loading.error());case 5:case"end":return e.stop()}},e,t)}))()},getParams:function(t){return{couponId:t.couponId,couponCode:t.couponCode,uid:t.uid,status:parseInt(t.status)>=0?t.status:void 0}}},components:{SendRecordModalCreateCoupon:h.a}}},137:function(t,e,a){"use strict";var o=a(21),n=a.n(o),r=a(22),s=a.n(r),i=a(16),u=a(17),c=a.n(u),l=new i.a;e.a={components:{},name:"ModalCreateCoupon",data:function(){return{readonly:!1,allreadonly:!1,visiable:!1,loading:!1,posting:!0,uploadTxt:"",couponToken:"",formData:{uid:0,couponToken:"",couponId:"",couponCode:"",couponName:"",time:["",""],remark:""},ruleValidate:{time:{required:!0,validator:function(t,e,a){e.some(function(t){return!t})?a(new Error("请选择使用期限")):a()}}}}},methods:{show:function(t){var e=this;return s()(n.a.mark(function a(){var o;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e.posting=e.visiable=!0,e.$refs.formCoupon.resetFields(),o={uid:t.uid,couponToken:t.couponToken,couponId:t.couponId,couponCode:t.couponCode,couponName:t.couponName,time:[c.a.unix(t.startTime).format("YYYY-MM-DD HH:mm:ss"),c.a.unix(t.endTime).format("YYYY-MM-DD HH:mm:ss")],remark:t.remark,startTimeStr:c.a.unix(t.startTime).format("YYYY-MM-DD HH:mm:ss"),endTimeStr:c.a.unix(t.endTime).format("YYYY-MM-DD HH:mm:ss")},e.formData=o;case 4:case"end":return a.stop()}},a,e)}))()},onOk:function(){var t=this;this.$refs.formCoupon.validate(function(e){e?t.saveData(t.formData):(t.posting=!1,t.$nextTick(function(){t.posting=!0}))})},getCheckBox:function(){for(var t=[],e=0;e<this.formData.skupAllowTypeLabel.length;e++){var a=this.formData.skupAllowTypeLabel[e];t.push(allowTypeMap[a])}this.formData.skupAllowType=t.join(",")},getChannelCheckBox:function(){for(var t=[],e=0;e<this.formData.businessClientLabel.length;e++){var a=this.formData.businessClientLabel[e];t.push(businessClientTypeMap[a])}this.formData.businessClient=t.join(",")},saveData:function(t){var e=this;return s()(n.a.mark(function a(){var o;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!e.allreadonly){a.next=3;break}return e.visiable=!1,a.abrupt("return");case 3:return a.next=5,l._post("/ufoPlatform/coupon/updateUserCoupon",{uid:t.uid||void 0,couponId:t.couponId||void 0,couponCode:t.couponCode,endTime:t.time[1]?c()(t.time[1]).unix():void 0});case 5:o=a.sent,200===o.code?(e.$Message.success("保存成功"),e.visiable=!1,e.$emit("on-created")):(o.message&&e.$Message.warning(o.message),e.posting=!1,e.$nextTick(function(){e.posting=!0}));case 7:case"end":return a.stop()}},a,e)}))()}}}},353:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a(354),n=a(18);Object(n.a)(o.a)},354:function(t,e,a){"use strict";function o(t){s||a(355)}var n=a(136),r=a(359),s=!1,i=a(0),u=o,c=i(n.a,r.a,!1,u,null,null);c.options.__file="src/views/send-record/index.vue",e.a=c.exports},355:function(t,e){},356:function(t,e,a){"use strict";function o(t){s||a(357)}var n=a(137),r=a(358),s=!1,i=a(0),u=o,c=i(n.a,r.a,!1,u,"data-v-c6807168",null);c.options.__file="src/views/coupon/components/modal-update-time-coupon.vue",e.a=c.exports},357:function(t,e){},358:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("Modal",{attrs:{loading:t.posting,title:t.allreadonly?"查看优惠券":"创建/编辑优惠券",width:"600"},on:{"on-ok":t.onOk},model:{value:t.visiable,callback:function(e){t.visiable=e},expression:"visiable"}},[t.loading?a("Spin"):a("Form",{ref:"formCoupon",attrs:{rules:t.ruleValidate,model:t.formData,"label-width":80}},[a("FormItem",{staticClass:"form-group",attrs:{label:"基本信息"}}),t._v(" "),a("FormItem",{attrs:{label:"Token"}},[t._v("\n "+t._s(t.formData.couponToken)+"\n ")]),t._v(" "),a("FormItem",{attrs:{label:"名称",prop:"couponName"}},[a("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"名称建议30字以内",disabled:!0},model:{value:t.formData.couponName,callback:function(e){t.$set(t.formData,"couponName",e)},expression:"formData.couponName"}})],1),t._v(" "),a("FormItem",{attrs:{label:"使用期限",prop:"time"}},[a("DatePicker",{staticStyle:{width:"200px"},attrs:{type:"datetimerange",prop:"startTimeStr",placeholder:"使用期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:t.formData.time,callback:function(e){t.$set(t.formData,"time",e)},expression:"formData.time"}})],1),t._v(" "),a("FormItem",{attrs:{label:"优惠券说明",prop:"remark"}},[a("Input",{attrs:{type:"textarea",placeholder:"优惠券使用条件简介",disabled:!0},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1)],1)],1)},n=[];o._withStripped=!0;var r={render:o,staticRenderFns:n};e.a=r},359:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("LayoutContent",{attrs:{breads:[{url:t.parentUrl,title:"优惠券列表"},{title:"发放记录"}]}},[a("LayoutFilter",{on:{"on-filter":t.onFilter,"on-clear":t.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:t.filter}},[a("FormItem",{attrs:{prop:"couponCode"}},[a("Input",{attrs:{placeholder:"输入ID"},model:{value:t.filter.couponCode,callback:function(e){t.$set(t.filter,"couponCode",e)},expression:"filter.couponCode"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"uid"}},[a("Input",{attrs:{placeholder:"输入uid"},model:{value:t.filter.uid,callback:function(e){t.$set(t.filter,"uid",e)},expression:"filter.uid"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"status"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:t.filter.status,callback:function(e){t.$set(t.filter,"status",e)},expression:"filter.status"}},[a("Option",{attrs:{value:0}},[t._v("未使用")]),t._v(" "),a("Option",{attrs:{value:1}},[t._v("已使用")])],1)],1)],1)],1),t._v(" "),a("LayoutTable",{attrs:{page:t.page,total:t.total,columns:t.columns,data:t.data},on:{"on-page-change":t.onPageChange}},[a("template",{staticClass:"btns",slot:"footer"},[a("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:t.onExport}},[t._v("导出")])],1)],2),t._v(" "),a("SendRecordModalCreateCoupon",{ref:"sendRecordModalCreateCoupon"})],1)},n=[];o._withStripped=!0;var r={render:o,staticRenderFns:n};e.a=r},5:function(t,e){t.exports=iview}},[353]);
\ No newline at end of file
... ...
webpackJsonp([2],{10:function(e,t){e.exports=Vue},136:function(e,t,o){"use strict";var a=o(21),n=o.n(a),r=o(13),s=o.n(r),i=o(22),u=o.n(i),l=o(5),c=(o.n(l),o(16)),p=o(17),d=o.n(p),m=o(44),f=o(27),v=o.n(f),g=o(356),h=new c.a;t.a={name:"SendRecordPage",data:function(){var e=this;this.$createElement;return{filter:{couponId:0,couponCode:"",uid:"",status:""},parentUrl:"",page:1,total:0,data:[],columns:[{title:"单券号",key:"couponCode"},{title:"用户ID",key:"uid"},{title:"发放时间",render:function(e,t){return e("span",[t.row.createTime])}},{title:"使用状态",key:"status"},{title:"使用时间",render:function(e,t){return e("span",[t.row.useTime||"--"])}},{title:"操作",align:"center",width:200,render:function(t,o){var a=o.row;return t("div",["未使用"===a.status||"0"===a.statusValue?t(l.Button,{attrs:{type:"primary",size:"small"},on:{click:function(){return e.onUpdateTime(a)}}},["延期"]):void 0,"未使用"===a.status||"0"===a.statusValue?t(l.Button,{attrs:{type:"error",size:"small"},on:{click:function(){return e.onUpDateStatus(a)}}},["作废"]):void 0])}}]}},created:function(){var e=this;this.$nextTick(function(){var t=v.a.parse(location.search?location.search.slice(1):"");e.filter.couponId=t.id,e.filter.couponCode=t.couponCode||e.filter.couponCode,e.filter.uid=t.uid||e.filter.uid,e.filter.status=t.status?parseInt(t.status):e.filter.status,e.parentUrl="coupon.html?"+v.a.stringify(t.param),e.page=t.page?parseInt(t.page):1,e.fetchData(e.filter,e.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(e){this.fetchData(this.filter,e)},onUpdateTime:function(e){console.log("延期==onUpdateTime"),console.log(e),this.$refs.sendRecordModalCreateCoupon.show(e)},onUpDateStatus:function(e){console.log("作废==onUpDateStatus"),console.log(e);var t={uid:e.uid,couponCode:e.couponCode};console.log(t),this.invalidateUserCoupon(t)},fetchData:function(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return u()(n.a.mark(function a(){var r;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t.page=o,t.$Loading.start(),a.next=4,h._get("/ufoPlatform/coupon/queryUserCoupons",s()({page:o},t.getParams(e)));case 4:r=a.sent,200===r.code?(t.total=r.data.total,t.data=r.data.userCoupons,t.$Loading.finish()):(r.message&&t.$Message.warning(r.message),t.$Loading.error());case 6:case"end":return a.stop()}},a,t)}))()},invalidateUserCoupon:function(e){var t=this;return u()(n.a.mark(function o(){var a;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return t.$Loading.start(),o.next=3,h._get("/ufoPlatform/coupon/invalidateUserCoupon",e);case 3:a=o.sent,200===a.code?t.$Loading.finish():(a.message&&t.$Message.warning(a.message),t.$Loading.error());case 5:case"end":return o.stop()}},o,t)}))()},onExport:function(){var e=this;return u()(n.a.mark(function t(){var o;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.$Loading.start(),t.next=3,h._get("/ufoPlatform/coupon/export",{param:{method:"userCoupon",param:h._2params(e.getParams(e.filter))}},{responseType:"blob"});case 3:o=t.sent,o instanceof Blob?(m.a.downloadBlob(o,"优惠券发放记录导出_"+d()().format("YYYY-MM-DD")+".xlsx"),e.$Loading.finish()):o&&(o.message&&e.$Message.warning(o.message),e.$Loading.error());case 5:case"end":return t.stop()}},t,e)}))()},getParams:function(e){return{couponId:e.couponId,couponCode:e.couponCode,uid:e.uid,status:parseInt(e.status)>=0?e.status:void 0}}},components:{SendRecordModalCreateCoupon:g.a}}},137:function(e,t,o){"use strict";var a=o(21),n=o.n(a),r=o(22),s=o.n(r),i=o(16),u=o(17),l=o.n(u),c=new i.a;t.a={components:{},name:"ModalCreateCoupon",data:function(){return{readonly:!1,allreadonly:!1,visiable:!1,loading:!1,posting:!0,uploadTxt:"",couponToken:"",formData:{uid:0,couponToken:"",couponId:"",couponCode:"",couponName:"",time:["",""],remark:""},ruleValidate:{time:{required:!0,validator:function(e,t,o){t.some(function(e){return!e})?o(new Error("请选择使用期限")):o()}}}}},methods:{show:function(e){var t=this;return s()(n.a.mark(function o(){var a;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:console.log("console.log(item)"),console.log(e),t.posting=t.visiable=!0,t.$refs.formCoupon.resetFields(),a={uid:e.uid,couponToken:e.couponToken,couponId:e.couponId,couponCode:e.couponCode,couponName:e.couponName,time:[l.a.unix(e.startTime).format("YYYY-MM-DD HH:mm:ss"),l.a.unix(e.endTime).format("YYYY-MM-DD HH:mm:ss")],remark:e.remark,startTimeStr:l.a.unix(e.startTime).format("YYYY-MM-DD HH:mm:ss"),endTimeStr:l.a.unix(e.endTime).format("YYYY-MM-DD HH:mm:ss")},t.formData=a;case 6:case"end":return o.stop()}},o,t)}))()},onOk:function(){var e=this;this.$refs.formCoupon.validate(function(t){t?e.saveData(e.formData):(e.posting=!1,e.$nextTick(function(){e.posting=!0}))})},getCheckBox:function(){for(var e=[],t=0;t<this.formData.skupAllowTypeLabel.length;t++){var o=this.formData.skupAllowTypeLabel[t];console.log(o),e.push(allowTypeMap[o])}console.log(e),this.formData.skupAllowType=e.join(",")},getChannelCheckBox:function(){for(var e=[],t=0;t<this.formData.businessClientLabel.length;t++){var o=this.formData.businessClientLabel[t];console.log(o),e.push(businessClientTypeMap[o])}console.log(e),this.formData.businessClient=e.join(",")},saveData:function(e){var t=this;return s()(n.a.mark(function o(){var a;return n.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!t.allreadonly){o.next=3;break}return t.visiable=!1,o.abrupt("return");case 3:return console.log("params"),console.log(e),o.next=7,c._post("/ufoPlatform/coupon/updateUserCoupon",{uid:e.uid||void 0,couponId:e.couponId||void 0,couponCode:e.couponCode,endTime:e.time[1]?l()(e.time[1]).unix():void 0});case 7:a=o.sent,console.log("result=",a),200===a.code?(t.$Message.success("保存成功"),t.visiable=!1,t.$emit("on-created")):(a.message&&t.$Message.warning(a.message),t.posting=!1,t.$nextTick(function(){t.posting=!0}));case 10:case"end":return o.stop()}},o,t)}))()}}}},353:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=o(354),n=o(18);Object(n.a)(a.a)},354:function(e,t,o){"use strict";function a(e){s||o(355)}var n=o(136),r=o(359),s=!1,i=o(0),u=a,l=i(n.a,r.a,!1,u,null,null);l.options.__file="src/views/send-record/index.vue",t.a=l.exports},355:function(e,t){},356:function(e,t,o){"use strict";function a(e){s||o(357)}var n=o(137),r=o(358),s=!1,i=o(0),u=a,l=i(n.a,r.a,!1,u,"data-v-c6807168",null);l.options.__file="src/views/coupon/components/modal-update-time-coupon.vue",t.a=l.exports},357:function(e,t){},358:function(e,t,o){"use strict";var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("Modal",{attrs:{loading:e.posting,title:e.allreadonly?"查看优惠券":"创建/编辑优惠券",width:"600"},on:{"on-ok":e.onOk},model:{value:e.visiable,callback:function(t){e.visiable=t},expression:"visiable"}},[e.loading?o("Spin"):o("Form",{ref:"formCoupon",attrs:{rules:e.ruleValidate,model:e.formData,"label-width":80}},[o("FormItem",{staticClass:"form-group",attrs:{label:"基本信息"}}),e._v(" "),o("FormItem",{attrs:{label:"Token"}},[e._v("\n "+e._s(e.formData.couponToken)+"\n ")]),e._v(" "),o("FormItem",{attrs:{label:"名称",prop:"couponName"}},[o("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"名称建议30字以内",disabled:!0},model:{value:e.formData.couponName,callback:function(t){e.$set(e.formData,"couponName",t)},expression:"formData.couponName"}})],1),e._v(" "),o("FormItem",{attrs:{label:"使用期限",prop:"time"}},[o("DatePicker",{staticStyle:{width:"200px"},attrs:{type:"datetimerange",prop:"startTimeStr",placeholder:"使用期限",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.formData.time,callback:function(t){e.$set(e.formData,"time",t)},expression:"formData.time"}})],1),e._v(" "),o("FormItem",{attrs:{label:"优惠券说明",prop:"remark"}},[o("Input",{attrs:{type:"textarea",placeholder:"优惠券使用条件简介",disabled:!0},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1)],1)],1)},n=[];a._withStripped=!0;var r={render:a,staticRenderFns:n};t.a=r},359:function(e,t,o){"use strict";var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("LayoutContent",{attrs:{breads:[{url:e.parentUrl,title:"优惠券列表"},{title:"发放记录"}]}},[o("LayoutFilter",{on:{"on-filter":e.onFilter,"on-clear":e.onClear}},[o("Form",{ref:"filterForm",attrs:{inline:"",model:e.filter}},[o("FormItem",{attrs:{prop:"couponCode"}},[o("Input",{attrs:{placeholder:"输入ID"},model:{value:e.filter.couponCode,callback:function(t){e.$set(e.filter,"couponCode",t)},expression:"filter.couponCode"}})],1),e._v(" "),o("FormItem",{attrs:{prop:"uid"}},[o("Input",{attrs:{placeholder:"输入uid"},model:{value:e.filter.uid,callback:function(t){e.$set(e.filter,"uid",t)},expression:"filter.uid"}})],1),e._v(" "),o("FormItem",{attrs:{prop:"status"}},[o("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:e.filter.status,callback:function(t){e.$set(e.filter,"status",t)},expression:"filter.status"}},[o("Option",{attrs:{value:0}},[e._v("未使用")]),e._v(" "),o("Option",{attrs:{value:1}},[e._v("已使用")])],1)],1)],1)],1),e._v(" "),o("LayoutTable",{attrs:{page:e.page,total:e.total,columns:e.columns,data:e.data},on:{"on-page-change":e.onPageChange}},[o("template",{staticClass:"btns",slot:"footer"},[o("Button",{attrs:{type:"primary",icon:"ios-cloud-download"},on:{click:e.onExport}},[e._v("导出")])],1)],2),e._v(" "),o("SendRecordModalCreateCoupon",{ref:"sendRecordModalCreateCoupon"})],1)},n=[];a._withStripped=!0;var r={render:a,staticRenderFns:n};t.a=r},5:function(e,t){e.exports=iview}},[353]);
\ No newline at end of file
webpackJsonp([4],{10:function(t,e){t.exports=Vue},138:function(t,e,a){"use strict";var i=a(38),s=a.n(i),r=a(21),n=a.n(r),l=a(13),o=a.n(l),c=a(22),d=a.n(c),v=a(17),u=a.n(v),p=a(16),m=a(27),f=a.n(m),h=a(5),_=(a.n(h),new p.a);e.a={components:{},name:"SendRecordPage",data:function(){this.$createElement;return{filter:{certName:"",mobile:"",uid:"",investName:"",validStatus:"",entryType:""},page:1,total:0,data:[],detail:{},investInfo:{},nowSelectedRow:{},isShowDetail:!1,isShowInvest:!1,columns:[{title:"UID",key:"uid",align:"center",width:100},{title:"商家类型",align:"center",render:function(t,e){return t("span",{},["","入驻卖家","超级入驻卖家","","普通卖家"][e.row.entryType])},width:90},{title:"商家名称",key:"certName",align:"center",width:100},{title:"手机号",align:"center",key:"mobile",width:120},{title:"身份证",align:"center",key:"certNo",width:140},{title:"上架SKUP",align:"center",key:"selfSkuNum",width:95},{title:"违规次数",key:"breakRuleTimes",width:90},{title:"账户余额",align:"center",render:function(t,e){var a=e.row;return t("span",{style:{color:parseInt(a.money,10)>999?"inherit":"red"}},a.money)},width:90},{title:"入驻时间",align:"center",render:function(t,e){var a=e.row;return t("span",[a.enterTime?u()(a.enterTime).format("YYYY-MM-DD"):"--"])},width:100},{title:"退出入驻时间",align:"center",render:function(t,e){var a=e.row;return t("span",[a.quitTime?u()(a.quitTime).format("YYYY-MM-DD"):"--"])},width:100},{title:"入驻状态",align:"center",key:"validStatusDesc"}]}},created:function(){var t=this;this.$nextTick(function(){var e=f.a.parse(location.search?location.search.slice(1):""),a=e.page,i=e.certName,s=e.investName,r=e.mobile,n=e.uid,l=e.validStatus;t.filter.certName=i?decodeURIComponent(i):t.filter.certName,t.filter.mobile=r||t.filter.mobile,t.filter.uid=n||t.filter.uid,t.filter.validStatus=l?parseInt(l):t.filter.validStatus,t.filter.investName=s?decodeURIComponent(s):t.filter.investName,t.page=a?parseInt(a):1,t.fetchData(t.filter,t.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(t){this.fetchData(this.filter,t)},fetchData:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return d()(n.a.mark(function i(){var s;return n.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e.page=a,e.$Loading.start(),i.next=4,_._get("/ufoPlatform/storedSeller/queryStoredSeller",o()({page:a},e.getParams(t)));case 4:s=i.sent,console.log(s),200===s.code?(e.total=s.data.total,e.data=s.data.list,e.$Loading.finish()):(s.message&&e.$Message.warning(s.message),e.$Loading.error());case 7:case"end":return i.stop()}},i,e)}))()},onShowDetail:function(t){var e=this;return d()(n.a.mark(function a(){var i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(i=o()({},t),i.enterTime=t.enterTime?u()(t.enterTime).format("YYYY-MM-DD HH:mm:ss"):"--",i.quitTime=t.quitTime?u()(t.quitTime).format("YYYY-MM-DD HH:mm:ss"):"--",e.detail=o()({},i),i.idCardFrontUrl&&(e.detail.idCardFrontUrl=""),e.isShowDetail=!0,!i.idCardFrontUrl){a.next=10;break}return a.next=9,e.drawMask(i.idCardFrontUrl);case 9:e.detail.idCardFrontUrl=a.sent;case 10:case"end":return a.stop()}},a,e)}))()},drawMask:function(t){var e=this;return d()(n.a.mark(function a(){var i,r,l,o,c;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return i=document.createElement("canvas"),r=document.createElement("canvas"),l=i.getContext("2d"),o=r.getContext("2d"),c=new Image,c.src=t,c.setAttribute("crossOrigin","anonymous"),a.abrupt("return",new s.a(function(a,s){c.onload=function(){var t=void 0;r.width=c.width,r.height=c.height,i.width=c.width,i.height=c.height,o.drawImage(c,0,0),t=o.getImageData(0,0,r.width,r.height);return e.createMosaic(o,r.width,r.height,12,t),l.drawImage(r,0,0),a(i.toDataURL("image/jpeg"))},c.onerror=function(){return a(t)}}));case 8:case"end":return a.stop()}},a,e)}))()},createMosaic:function(t,e,a,i,s){for(var r=0;r<a;r+=i)for(var n=0;n<e;n+=i){var l=s.data[4*(r*e+n)],o=s.data[4*(r*e+n)+1],c=s.data[4*(r*e+n)+2],d=s.data[4*(r*e+n)+3];t.fillStyle="rgba("+l+","+o+","+c+","+d+")",t.fillRect(n,r,n+i,r+i)}},onEditInvest:function(t){this.nowSelectedRow=t,this.isShowInvest=!0,this.investInfo={uid:t.uid,investName:t.investName||""}},submitInvist:function(){var t=this;this.investInfo.uid&&_._post("/ufoPlatform/storedSeller/saveInvestUser",this.investInfo).then(function(e){200===e.code?(t.closePopup(),t.fetchData(t.filter,t.page),t.$Modal.info({title:"提示",content:e.message})):(t.closePopup(),t.$Modal.info({title:"提示",content:"保存失败"}))})},closePopup:function(){this.detail={},this.investInfo={},this.isShowDetail=!1,this.isShowInvest=!1},getParams:function(t){return{certName:t.certName,mobile:t.mobile,uid:t.uid,investName:t.investName,validStatus:parseInt(t.validStatus)>=0?t.validStatus:void 0,entryType:parseInt(t.entryType)>=0?t.entryType:void 0}}}}},360:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(361),s=a(18);Object(s.a)(i.a)},361:function(t,e,a){"use strict";function i(t){n||a(362)}var s=a(138),r=a(363),n=!1,l=a(0),o=i,c=l(s.a,r.a,!1,o,null,null);c.options.__file="src/views/shop/index.vue",e.a=c.exports},362:function(t,e){},363:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("LayoutContent",{attrs:{breads:[{title:"店铺列表"}]}},[a("LayoutFilter",{on:{"on-filter":t.onFilter,"on-clear":t.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:t.filter}},[a("FormItem",{attrs:{prop:"uid"}},[a("Input",{attrs:{placeholder:"输入uid"},model:{value:t.filter.uid,callback:function(e){t.$set(t.filter,"uid",e)},expression:"filter.uid"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"certName"}},[a("Input",{attrs:{placeholder:"商家名称"},model:{value:t.filter.certName,callback:function(e){t.$set(t.filter,"certName",e)},expression:"filter.certName"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"mobile"}},[a("Input",{attrs:{placeholder:"手机号"},model:{value:t.filter.mobile,callback:function(e){t.$set(t.filter,"mobile",e)},expression:"filter.mobile"}})],1),t._v(" "),a("FormItem",[a("Input",{staticStyle:{display:"none"},attrs:{placeholder:"招商人"},model:{value:t.filter.investName,callback:function(e){t.$set(t.filter,"investName",e)},expression:"filter.investName"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"validStatus"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:t.filter.validStatus,callback:function(e){t.$set(t.filter,"validStatus",e)},expression:"filter.validStatus"}},[a("Option",{attrs:{value:1}},[t._v("已入驻")]),t._v(" "),a("Option",{attrs:{value:9}},[t._v("已退驻")])],1)],1),t._v(" "),a("FormItem",{attrs:{prop:"entryType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"商家类型"},model:{value:t.filter.entryType,callback:function(e){t.$set(t.filter,"entryType",e)},expression:"filter.entryType"}},[a("Option",{attrs:{value:1}},[t._v("入驻卖家")]),t._v(" "),a("Option",{attrs:{value:2}},[t._v("超级入驻卖家")]),t._v(" "),a("Option",{attrs:{value:4}},[t._v("普通卖家")])],1)],1)],1)],1),t._v(" "),a("LayoutTable",{attrs:{page:t.page,total:t.total,columns:t.columns,data:t.data},on:{"on-page-change":t.onPageChange}}),t._v(" "),a("div",{staticClass:"popup-detail-wrapper",class:{show:t.isShowDetail}},[a("Card",{staticClass:"popup-detail-container"},[a("p",{attrs:{slot:"title"},slot:"title"},[t._v("商家详情")]),t._v(" "),a("Button",{staticClass:"btn-close",attrs:{slot:"extra"},on:{click:t.closePopup},slot:"extra"},[t._v("X")]),t._v(" "),a("div",{staticClass:"pop-detail-content"},[a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("UID")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.uid||" "))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("商家类型")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(["","入驻卖家","超级入驻","","普通卖家"][t.detail.entryType]))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("商家名称")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.certName||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("手机号")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.mobile||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("招商人员")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.investName||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("违规次数")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.breakRuleTimes||"0"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("账户余额")]),t._v(" "),a("Col",{staticStyle:{color:"red"},attrs:{span:"8"}},[t._v(t._s(t.detail.money||"0.00"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("入驻状态")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.validStatusDesc||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("入驻时间")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.enterTime||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("退出入驻时间")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.quitTime||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("身份证号")]),t._v(" "),a("Col",{attrs:{span:"20"}},[t._v(t._s(t.detail.certNo||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title no-border-right",staticStyle:{"min-height":"150px","line-height":"150px"},attrs:{span:"4"}},[t._v("身份证照片")]),t._v(" "),a("Col",{staticClass:"border-left",staticStyle:{"min-height":"150px"},attrs:{span:"20"}},[t.detail.idCardFrontUrl?a("img",{staticClass:"cert-image",attrs:{src:t.detail.idCardFrontUrl}}):t._e(),t._v(" "),t.detail.idCardBackUrl?a("img",{staticClass:"cert-image",attrs:{src:t.detail.idCardBackUrl}}):t._e()])],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"popup-invist-wrapper",class:{show:t.isShowInvest}},[a("Card",{staticClass:"popup-invist-container"},[a("p",{attrs:{slot:"title"},slot:"title"},[t._v("绑定招商人")]),t._v(" "),a("Button",{staticClass:"btn-close",attrs:{slot:"extra"},on:{click:t.closePopup},slot:"extra"},[t._v("X")]),t._v(" "),a("div",{staticClass:"popup-invist-content"},[a("Row",[a("Col",{staticClass:"invist-title",attrs:{span:"8"}},[t._v("招商人员")]),t._v(" "),a("Col",{attrs:{span:"16"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.investInfo.investName,expression:"investInfo.investName"}],staticStyle:{width:"80%"},attrs:{type:"text",placeholder:"请输入招商人"},domProps:{value:t.investInfo.investName},on:{input:function(e){e.target.composing||t.$set(t.investInfo,"investName",e.target.value)}}})])],1),t._v(" "),a("Row",[a("Col",{staticStyle:{"text-align":"center"},attrs:{span:"24"}},[a("Button",{attrs:{type:"success"},on:{click:t.submitInvist}},[t._v("保存")])],1)],1)],1)],1)],1)],1)},s=[];i._withStripped=!0;var r={render:i,staticRenderFns:s};e.a=r},5:function(t,e){t.exports=iview}},[360]);
\ No newline at end of file
webpackJsonp([3],{10:function(t,e){t.exports=Vue},136:function(t,e,a){"use strict";var i=a(38),s=a.n(i),r=a(24),n=a.n(r),l=a(12),o=a.n(l),c=a(25),d=a.n(c),v=a(20),u=a.n(v),p=a(19),m=a(27),f=a.n(m),h=a(5),_=(a.n(h),new p.a);e.a={components:{},name:"SendRecordPage",data:function(){this.$createElement;return{filter:{certName:"",mobile:"",uid:"",investName:"",validStatus:"",entryType:""},page:1,total:0,data:[],detail:{},investInfo:{},nowSelectedRow:{},isShowDetail:!1,isShowInvest:!1,columns:[{title:"UID",key:"uid",align:"center",width:100},{title:"商家类型",align:"center",render:function(t,e){return t("span",{},["","入驻卖家","超级入驻卖家","","普通卖家"][e.row.entryType])},width:90},{title:"商家名称",key:"certName",align:"center",width:100},{title:"手机号",align:"center",key:"mobile",width:120},{title:"身份证",align:"center",key:"certNo",width:140},{title:"上架SKUP",align:"center",key:"selfSkuNum",width:95},{title:"违规次数",key:"breakRuleTimes",width:90},{title:"账户余额",align:"center",render:function(t,e){var a=e.row;return t("span",{style:{color:parseInt(a.money,10)>999?"inherit":"red"}},a.money)},width:90},{title:"入驻时间",align:"center",render:function(t,e){var a=e.row;return t("span",[a.enterTime?u()(a.enterTime).format("YYYY-MM-DD"):"--"])},width:100},{title:"退出入驻时间",align:"center",render:function(t,e){var a=e.row;return t("span",[a.quitTime?u()(a.quitTime).format("YYYY-MM-DD"):"--"])},width:100},{title:"入驻状态",align:"center",key:"validStatusDesc"}]}},created:function(){var t=this;this.$nextTick(function(){var e=f.a.parse(location.search?location.search.slice(1):""),a=e.page,i=e.certName,s=e.investName,r=e.mobile,n=e.uid,l=e.validStatus;t.filter.certName=i?decodeURIComponent(i):t.filter.certName,t.filter.mobile=r||t.filter.mobile,t.filter.uid=n||t.filter.uid,t.filter.validStatus=l?parseInt(l):t.filter.validStatus,t.filter.investName=s?decodeURIComponent(s):t.filter.investName,t.page=a?parseInt(a):1,t.fetchData(t.filter,t.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(t){this.fetchData(this.filter,t)},fetchData:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return d()(n.a.mark(function i(){var s;return n.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e.page=a,e.$Loading.start(),i.next=4,_._get("/ufoPlatform/storedSeller/queryStoredSeller",o()({page:a},e.getParams(t)));case 4:s=i.sent,console.log(s),200===s.code?(e.total=s.data.total,e.data=s.data.list,e.$Loading.finish()):(s.message&&e.$Message.warning(s.message),e.$Loading.error());case 7:case"end":return i.stop()}},i,e)}))()},onShowDetail:function(t){var e=this;return d()(n.a.mark(function a(){var i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(i=o()({},t),i.enterTime=t.enterTime?u()(t.enterTime).format("YYYY-MM-DD HH:mm:ss"):"--",i.quitTime=t.quitTime?u()(t.quitTime).format("YYYY-MM-DD HH:mm:ss"):"--",e.detail=o()({},i),i.idCardFrontUrl&&(e.detail.idCardFrontUrl=""),e.isShowDetail=!0,!i.idCardFrontUrl){a.next=10;break}return a.next=9,e.drawMask(i.idCardFrontUrl);case 9:e.detail.idCardFrontUrl=a.sent;case 10:case"end":return a.stop()}},a,e)}))()},drawMask:function(t){var e=this;return d()(n.a.mark(function a(){var i,r,l,o,c;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return i=document.createElement("canvas"),r=document.createElement("canvas"),l=i.getContext("2d"),o=r.getContext("2d"),c=new Image,c.src=t,c.setAttribute("crossOrigin","anonymous"),a.abrupt("return",new s.a(function(a,s){c.onload=function(){var t=void 0;r.width=c.width,r.height=c.height,i.width=c.width,i.height=c.height,o.drawImage(c,0,0),t=o.getImageData(0,0,r.width,r.height);return e.createMosaic(o,r.width,r.height,12,t),l.drawImage(r,0,0),a(i.toDataURL("image/jpeg"))},c.onerror=function(){return a(t)}}));case 8:case"end":return a.stop()}},a,e)}))()},createMosaic:function(t,e,a,i,s){for(var r=0;r<a;r+=i)for(var n=0;n<e;n+=i){var l=s.data[4*(r*e+n)],o=s.data[4*(r*e+n)+1],c=s.data[4*(r*e+n)+2],d=s.data[4*(r*e+n)+3];t.fillStyle="rgba("+l+","+o+","+c+","+d+")",t.fillRect(n,r,n+i,r+i)}},onEditInvest:function(t){this.nowSelectedRow=t,this.isShowInvest=!0,this.investInfo={uid:t.uid,investName:t.investName||""}},submitInvist:function(){var t=this;this.investInfo.uid&&_._post("/ufoPlatform/storedSeller/saveInvestUser",this.investInfo).then(function(e){200===e.code?(t.closePopup(),t.fetchData(t.filter,t.page),t.$Modal.info({title:"提示",content:e.message})):(t.closePopup(),t.$Modal.info({title:"提示",content:"保存失败"}))})},closePopup:function(){this.detail={},this.investInfo={},this.isShowDetail=!1,this.isShowInvest=!1},getParams:function(t){return{certName:t.certName,mobile:t.mobile,uid:t.uid,investName:t.investName,validStatus:parseInt(t.validStatus)>=0?t.validStatus:void 0,entryType:parseInt(t.entryType)>=0?t.entryType:void 0}}}}},352:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(353),s=a(15);Object(s.a)(i.a)},353:function(t,e,a){"use strict";function i(t){n||a(354)}var s=a(136),r=a(355),n=!1,l=a(0),o=i,c=l(s.a,r.a,!1,o,null,null);c.options.__file="src/views/shop/index.vue",e.a=c.exports},354:function(t,e){},355:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("LayoutContent",{attrs:{breads:[{title:"店铺列表"}]}},[a("LayoutFilter",{on:{"on-filter":t.onFilter,"on-clear":t.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:t.filter}},[a("FormItem",{attrs:{prop:"uid"}},[a("Input",{attrs:{placeholder:"输入uid"},model:{value:t.filter.uid,callback:function(e){t.$set(t.filter,"uid",e)},expression:"filter.uid"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"certName"}},[a("Input",{attrs:{placeholder:"商家名称"},model:{value:t.filter.certName,callback:function(e){t.$set(t.filter,"certName",e)},expression:"filter.certName"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"mobile"}},[a("Input",{attrs:{placeholder:"手机号"},model:{value:t.filter.mobile,callback:function(e){t.$set(t.filter,"mobile",e)},expression:"filter.mobile"}})],1),t._v(" "),a("FormItem",[a("Input",{staticStyle:{display:"none"},attrs:{placeholder:"招商人"},model:{value:t.filter.investName,callback:function(e){t.$set(t.filter,"investName",e)},expression:"filter.investName"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"validStatus"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:t.filter.validStatus,callback:function(e){t.$set(t.filter,"validStatus",e)},expression:"filter.validStatus"}},[a("Option",{attrs:{value:1}},[t._v("已入驻")]),t._v(" "),a("Option",{attrs:{value:9}},[t._v("已退驻")])],1)],1),t._v(" "),a("FormItem",{attrs:{prop:"entryType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"商家类型"},model:{value:t.filter.entryType,callback:function(e){t.$set(t.filter,"entryType",e)},expression:"filter.entryType"}},[a("Option",{attrs:{value:1}},[t._v("入驻卖家")]),t._v(" "),a("Option",{attrs:{value:2}},[t._v("超级入驻卖家")]),t._v(" "),a("Option",{attrs:{value:4}},[t._v("普通卖家")])],1)],1)],1)],1),t._v(" "),a("LayoutTable",{attrs:{page:t.page,total:t.total,columns:t.columns,data:t.data},on:{"on-page-change":t.onPageChange}}),t._v(" "),a("div",{staticClass:"popup-detail-wrapper",class:{show:t.isShowDetail}},[a("Card",{staticClass:"popup-detail-container"},[a("p",{attrs:{slot:"title"},slot:"title"},[t._v("商家详情")]),t._v(" "),a("Button",{staticClass:"btn-close",attrs:{slot:"extra"},on:{click:t.closePopup},slot:"extra"},[t._v("X")]),t._v(" "),a("div",{staticClass:"pop-detail-content"},[a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("UID")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.uid||" "))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("商家类型")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(["","入驻卖家","超级入驻","","普通卖家"][t.detail.entryType]))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("商家名称")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.certName||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("手机号")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.mobile||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("招商人员")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.investName||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("违规次数")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.breakRuleTimes||"0"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("账户余额")]),t._v(" "),a("Col",{staticStyle:{color:"red"},attrs:{span:"8"}},[t._v(t._s(t.detail.money||"0.00"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("入驻状态")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.validStatusDesc||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("入驻时间")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.enterTime||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("退出入驻时间")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.quitTime||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("身份证号")]),t._v(" "),a("Col",{attrs:{span:"20"}},[t._v(t._s(t.detail.certNo||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title no-border-right",staticStyle:{"min-height":"150px","line-height":"150px"},attrs:{span:"4"}},[t._v("身份证照片")]),t._v(" "),a("Col",{staticClass:"border-left",staticStyle:{"min-height":"150px"},attrs:{span:"20"}},[t.detail.idCardFrontUrl?a("img",{staticClass:"cert-image",attrs:{src:t.detail.idCardFrontUrl}}):t._e(),t._v(" "),t.detail.idCardBackUrl?a("img",{staticClass:"cert-image",attrs:{src:t.detail.idCardBackUrl}}):t._e()])],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"popup-invist-wrapper",class:{show:t.isShowInvest}},[a("Card",{staticClass:"popup-invist-container"},[a("p",{attrs:{slot:"title"},slot:"title"},[t._v("绑定招商人")]),t._v(" "),a("Button",{staticClass:"btn-close",attrs:{slot:"extra"},on:{click:t.closePopup},slot:"extra"},[t._v("X")]),t._v(" "),a("div",{staticClass:"popup-invist-content"},[a("Row",[a("Col",{staticClass:"invist-title",attrs:{span:"8"}},[t._v("招商人员")]),t._v(" "),a("Col",{attrs:{span:"16"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.investInfo.investName,expression:"investInfo.investName"}],staticStyle:{width:"80%"},attrs:{type:"text",placeholder:"请输入招商人"},domProps:{value:t.investInfo.investName},on:{input:function(e){e.target.composing||t.$set(t.investInfo,"investName",e.target.value)}}})])],1),t._v(" "),a("Row",[a("Col",{staticStyle:{"text-align":"center"},attrs:{span:"24"}},[a("Button",{attrs:{type:"success"},on:{click:t.submitInvist}},[t._v("保存")])],1)],1)],1)],1)],1)],1)},s=[];i._withStripped=!0;var r={render:i,staticRenderFns:s};e.a=r},5:function(t,e){t.exports=iview}},[352]);
\ No newline at end of file
webpackJsonp([4],{10:function(t,e){t.exports=Vue},138:function(t,e,a){"use strict";var i=a(38),s=a.n(i),r=a(21),n=a.n(r),l=a(13),o=a.n(l),c=a(22),d=a.n(c),v=a(17),u=a.n(v),p=a(16),m=a(27),f=a.n(m),h=a(5),_=(a.n(h),new p.a);e.a={components:{},name:"SendRecordPage",data:function(){this.$createElement;return{filter:{certName:"",mobile:"",uid:"",investName:"",validStatus:"",entryType:""},page:1,total:0,data:[],detail:{},investInfo:{},nowSelectedRow:{},isShowDetail:!1,isShowInvest:!1,columns:[{title:"UID",key:"uid",align:"center",width:100},{title:"商家类型",align:"center",render:function(t,e){return t("span",{},["","入驻卖家","超级入驻卖家","","普通卖家"][e.row.entryType])},width:90},{title:"商家名称",key:"certName",align:"center",width:100},{title:"手机号",align:"center",key:"mobile",width:120},{title:"身份证",align:"center",key:"certNo",width:140},{title:"上架SKUP",align:"center",key:"selfSkuNum",width:95},{title:"违规次数",key:"breakRuleTimes",width:90},{title:"账户余额",align:"center",render:function(t,e){var a=e.row;return t("span",{style:{color:parseInt(a.money,10)>999?"inherit":"red"}},a.money)},width:90},{title:"入驻时间",align:"center",render:function(t,e){var a=e.row;return t("span",[a.enterTime?u()(a.enterTime).format("YYYY-MM-DD"):"--"])},width:100},{title:"退出入驻时间",align:"center",render:function(t,e){var a=e.row;return t("span",[a.quitTime?u()(a.quitTime).format("YYYY-MM-DD"):"--"])},width:100},{title:"入驻状态",align:"center",key:"validStatusDesc"}]}},created:function(){var t=this;this.$nextTick(function(){var e=f.a.parse(location.search?location.search.slice(1):""),a=e.page,i=e.certName,s=e.investName,r=e.mobile,n=e.uid,l=e.validStatus;t.filter.certName=i?decodeURIComponent(i):t.filter.certName,t.filter.mobile=r||t.filter.mobile,t.filter.uid=n||t.filter.uid,t.filter.validStatus=l?parseInt(l):t.filter.validStatus,t.filter.investName=s?decodeURIComponent(s):t.filter.investName,t.page=a?parseInt(a):1,t.fetchData(t.filter,t.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(t){this.fetchData(this.filter,t)},fetchData:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return d()(n.a.mark(function i(){var s;return n.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e.page=a,e.$Loading.start(),i.next=4,_._get("/ufoPlatform/storedSeller/queryStoredSeller",o()({page:a},e.getParams(t)));case 4:s=i.sent,200===s.code?(e.total=s.data.total,e.data=s.data.list,e.$Loading.finish()):(s.message&&e.$Message.warning(s.message),e.$Loading.error());case 6:case"end":return i.stop()}},i,e)}))()},onShowDetail:function(t){var e=this;return d()(n.a.mark(function a(){var i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(i=o()({},t),i.enterTime=t.enterTime?u()(t.enterTime).format("YYYY-MM-DD HH:mm:ss"):"--",i.quitTime=t.quitTime?u()(t.quitTime).format("YYYY-MM-DD HH:mm:ss"):"--",e.detail=o()({},i),i.idCardFrontUrl&&(e.detail.idCardFrontUrl=""),e.isShowDetail=!0,!i.idCardFrontUrl){a.next=10;break}return a.next=9,e.drawMask(i.idCardFrontUrl);case 9:e.detail.idCardFrontUrl=a.sent;case 10:case"end":return a.stop()}},a,e)}))()},drawMask:function(t){var e=this;return d()(n.a.mark(function a(){var i,r,l,o,c;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return i=document.createElement("canvas"),r=document.createElement("canvas"),l=i.getContext("2d"),o=r.getContext("2d"),c=new Image,c.src=t,c.setAttribute("crossOrigin","anonymous"),a.abrupt("return",new s.a(function(a,s){c.onload=function(){var t=void 0;r.width=c.width,r.height=c.height,i.width=c.width,i.height=c.height,o.drawImage(c,0,0),t=o.getImageData(0,0,r.width,r.height);return e.createMosaic(o,r.width,r.height,12,t),l.drawImage(r,0,0),a(i.toDataURL("image/jpeg"))},c.onerror=function(){return a(t)}}));case 8:case"end":return a.stop()}},a,e)}))()},createMosaic:function(t,e,a,i,s){for(var r=0;r<a;r+=i)for(var n=0;n<e;n+=i){var l=s.data[4*(r*e+n)],o=s.data[4*(r*e+n)+1],c=s.data[4*(r*e+n)+2],d=s.data[4*(r*e+n)+3];t.fillStyle="rgba("+l+","+o+","+c+","+d+")",t.fillRect(n,r,n+i,r+i)}},onEditInvest:function(t){this.nowSelectedRow=t,this.isShowInvest=!0,this.investInfo={uid:t.uid,investName:t.investName||""}},submitInvist:function(){var t=this;this.investInfo.uid&&_._post("/ufoPlatform/storedSeller/saveInvestUser",this.investInfo).then(function(e){200===e.code?(t.closePopup(),t.fetchData(t.filter,t.page),t.$Modal.info({title:"提示",content:e.message})):(t.closePopup(),t.$Modal.info({title:"提示",content:"保存失败"}))})},closePopup:function(){this.detail={},this.investInfo={},this.isShowDetail=!1,this.isShowInvest=!1},getParams:function(t){return{certName:t.certName,mobile:t.mobile,uid:t.uid,investName:t.investName,validStatus:parseInt(t.validStatus)>=0?t.validStatus:void 0,entryType:parseInt(t.entryType)>=0?t.entryType:void 0}}}}},360:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(361),s=a(18);Object(s.a)(i.a)},361:function(t,e,a){"use strict";function i(t){n||a(362)}var s=a(138),r=a(363),n=!1,l=a(0),o=i,c=l(s.a,r.a,!1,o,null,null);c.options.__file="src/views/shop/index.vue",e.a=c.exports},362:function(t,e){},363:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("LayoutContent",{attrs:{breads:[{title:"店铺列表"}]}},[a("LayoutFilter",{on:{"on-filter":t.onFilter,"on-clear":t.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:t.filter}},[a("FormItem",{attrs:{prop:"uid"}},[a("Input",{attrs:{placeholder:"输入uid"},model:{value:t.filter.uid,callback:function(e){t.$set(t.filter,"uid",e)},expression:"filter.uid"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"certName"}},[a("Input",{attrs:{placeholder:"商家名称"},model:{value:t.filter.certName,callback:function(e){t.$set(t.filter,"certName",e)},expression:"filter.certName"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"mobile"}},[a("Input",{attrs:{placeholder:"手机号"},model:{value:t.filter.mobile,callback:function(e){t.$set(t.filter,"mobile",e)},expression:"filter.mobile"}})],1),t._v(" "),a("FormItem",[a("Input",{staticStyle:{display:"none"},attrs:{placeholder:"招商人"},model:{value:t.filter.investName,callback:function(e){t.$set(t.filter,"investName",e)},expression:"filter.investName"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"validStatus"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:t.filter.validStatus,callback:function(e){t.$set(t.filter,"validStatus",e)},expression:"filter.validStatus"}},[a("Option",{attrs:{value:1}},[t._v("已入驻")]),t._v(" "),a("Option",{attrs:{value:9}},[t._v("已退驻")])],1)],1),t._v(" "),a("FormItem",{attrs:{prop:"entryType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"商家类型"},model:{value:t.filter.entryType,callback:function(e){t.$set(t.filter,"entryType",e)},expression:"filter.entryType"}},[a("Option",{attrs:{value:1}},[t._v("入驻卖家")]),t._v(" "),a("Option",{attrs:{value:2}},[t._v("超级入驻卖家")]),t._v(" "),a("Option",{attrs:{value:4}},[t._v("普通卖家")])],1)],1)],1)],1),t._v(" "),a("LayoutTable",{attrs:{page:t.page,total:t.total,columns:t.columns,data:t.data},on:{"on-page-change":t.onPageChange}}),t._v(" "),a("div",{staticClass:"popup-detail-wrapper",class:{show:t.isShowDetail}},[a("Card",{staticClass:"popup-detail-container"},[a("p",{attrs:{slot:"title"},slot:"title"},[t._v("商家详情")]),t._v(" "),a("Button",{staticClass:"btn-close",attrs:{slot:"extra"},on:{click:t.closePopup},slot:"extra"},[t._v("X")]),t._v(" "),a("div",{staticClass:"pop-detail-content"},[a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("UID")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.uid||" "))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("商家类型")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(["","入驻卖家","超级入驻","","普通卖家"][t.detail.entryType]))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("商家名称")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.certName||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("手机号")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.mobile||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("招商人员")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.investName||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("违规次数")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.breakRuleTimes||"0"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("账户余额")]),t._v(" "),a("Col",{staticStyle:{color:"red"},attrs:{span:"8"}},[t._v(t._s(t.detail.money||"0.00"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("入驻状态")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.validStatusDesc||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("入驻时间")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.enterTime||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("退出入驻时间")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.quitTime||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("身份证号")]),t._v(" "),a("Col",{attrs:{span:"20"}},[t._v(t._s(t.detail.certNo||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title no-border-right",staticStyle:{"min-height":"150px","line-height":"150px"},attrs:{span:"4"}},[t._v("身份证照片")]),t._v(" "),a("Col",{staticClass:"border-left",staticStyle:{"min-height":"150px"},attrs:{span:"20"}},[t.detail.idCardFrontUrl?a("img",{staticClass:"cert-image",attrs:{src:t.detail.idCardFrontUrl}}):t._e(),t._v(" "),t.detail.idCardBackUrl?a("img",{staticClass:"cert-image",attrs:{src:t.detail.idCardBackUrl}}):t._e()])],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"popup-invist-wrapper",class:{show:t.isShowInvest}},[a("Card",{staticClass:"popup-invist-container"},[a("p",{attrs:{slot:"title"},slot:"title"},[t._v("绑定招商人")]),t._v(" "),a("Button",{staticClass:"btn-close",attrs:{slot:"extra"},on:{click:t.closePopup},slot:"extra"},[t._v("X")]),t._v(" "),a("div",{staticClass:"popup-invist-content"},[a("Row",[a("Col",{staticClass:"invist-title",attrs:{span:"8"}},[t._v("招商人员")]),t._v(" "),a("Col",{attrs:{span:"16"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.investInfo.investName,expression:"investInfo.investName"}],staticStyle:{width:"80%"},attrs:{type:"text",placeholder:"请输入招商人"},domProps:{value:t.investInfo.investName},on:{input:function(e){e.target.composing||t.$set(t.investInfo,"investName",e.target.value)}}})])],1),t._v(" "),a("Row",[a("Col",{staticStyle:{"text-align":"center"},attrs:{span:"24"}},[a("Button",{attrs:{type:"success"},on:{click:t.submitInvist}},[t._v("保存")])],1)],1)],1)],1)],1)],1)},s=[];i._withStripped=!0;var r={render:i,staticRenderFns:s};e.a=r},5:function(t,e){t.exports=iview}},[360]);
\ No newline at end of file
... ...
webpackJsonp([4],{10:function(t,e){t.exports=Vue},138:function(t,e,a){"use strict";var i=a(38),s=a.n(i),r=a(21),n=a.n(r),l=a(13),o=a.n(l),c=a(22),d=a.n(c),v=a(17),u=a.n(v),p=a(16),m=a(27),f=a.n(m),h=a(5),_=(a.n(h),new p.a);e.a={components:{},name:"SendRecordPage",data:function(){this.$createElement;return{filter:{certName:"",mobile:"",uid:"",investName:"",validStatus:"",entryType:""},page:1,total:0,data:[],detail:{},investInfo:{},nowSelectedRow:{},isShowDetail:!1,isShowInvest:!1,columns:[{title:"UID",key:"uid",align:"center",width:100},{title:"商家类型",align:"center",render:function(t,e){return t("span",{},["","入驻卖家","超级入驻卖家","","普通卖家"][e.row.entryType])},width:90},{title:"商家名称",key:"certName",align:"center",width:100},{title:"手机号",align:"center",key:"mobile",width:120},{title:"身份证",align:"center",key:"certNo",width:140},{title:"上架SKUP",align:"center",key:"selfSkuNum",width:95},{title:"违规次数",key:"breakRuleTimes",width:90},{title:"账户余额",align:"center",render:function(t,e){var a=e.row;return t("span",{style:{color:parseInt(a.money,10)>999?"inherit":"red"}},a.money)},width:90},{title:"入驻时间",align:"center",render:function(t,e){var a=e.row;return t("span",[a.enterTime?u()(a.enterTime).format("YYYY-MM-DD"):"--"])},width:100},{title:"退出入驻时间",align:"center",render:function(t,e){var a=e.row;return t("span",[a.quitTime?u()(a.quitTime).format("YYYY-MM-DD"):"--"])},width:100},{title:"入驻状态",align:"center",key:"validStatusDesc"}]}},created:function(){var t=this;this.$nextTick(function(){var e=f.a.parse(location.search?location.search.slice(1):""),a=e.page,i=e.certName,s=e.investName,r=e.mobile,n=e.uid,l=e.validStatus;t.filter.certName=i?decodeURIComponent(i):t.filter.certName,t.filter.mobile=r||t.filter.mobile,t.filter.uid=n||t.filter.uid,t.filter.validStatus=l?parseInt(l):t.filter.validStatus,t.filter.investName=s?decodeURIComponent(s):t.filter.investName,t.page=a?parseInt(a):1,t.fetchData(t.filter,t.page)})},methods:{onFilter:function(){this.fetchData(this.filter)},onClear:function(){this.$refs.filterForm.resetFields(),this.fetchData(this.filter)},onPageChange:function(t){this.fetchData(this.filter,t)},fetchData:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return d()(n.a.mark(function i(){var s;return n.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e.page=a,e.$Loading.start(),i.next=4,_._get("/ufoPlatform/storedSeller/queryStoredSeller",o()({page:a},e.getParams(t)));case 4:s=i.sent,console.log(s),200===s.code?(e.total=s.data.total,e.data=s.data.list,e.$Loading.finish()):(s.message&&e.$Message.warning(s.message),e.$Loading.error());case 7:case"end":return i.stop()}},i,e)}))()},onShowDetail:function(t){var e=this;return d()(n.a.mark(function a(){var i;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(i=o()({},t),i.enterTime=t.enterTime?u()(t.enterTime).format("YYYY-MM-DD HH:mm:ss"):"--",i.quitTime=t.quitTime?u()(t.quitTime).format("YYYY-MM-DD HH:mm:ss"):"--",e.detail=o()({},i),i.idCardFrontUrl&&(e.detail.idCardFrontUrl=""),e.isShowDetail=!0,!i.idCardFrontUrl){a.next=10;break}return a.next=9,e.drawMask(i.idCardFrontUrl);case 9:e.detail.idCardFrontUrl=a.sent;case 10:case"end":return a.stop()}},a,e)}))()},drawMask:function(t){var e=this;return d()(n.a.mark(function a(){var i,r,l,o,c;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return i=document.createElement("canvas"),r=document.createElement("canvas"),l=i.getContext("2d"),o=r.getContext("2d"),c=new Image,c.src=t,c.setAttribute("crossOrigin","anonymous"),a.abrupt("return",new s.a(function(a,s){c.onload=function(){var t=void 0;r.width=c.width,r.height=c.height,i.width=c.width,i.height=c.height,o.drawImage(c,0,0),t=o.getImageData(0,0,r.width,r.height);return e.createMosaic(o,r.width,r.height,12,t),l.drawImage(r,0,0),a(i.toDataURL("image/jpeg"))},c.onerror=function(){return a(t)}}));case 8:case"end":return a.stop()}},a,e)}))()},createMosaic:function(t,e,a,i,s){for(var r=0;r<a;r+=i)for(var n=0;n<e;n+=i){var l=s.data[4*(r*e+n)],o=s.data[4*(r*e+n)+1],c=s.data[4*(r*e+n)+2],d=s.data[4*(r*e+n)+3];t.fillStyle="rgba("+l+","+o+","+c+","+d+")",t.fillRect(n,r,n+i,r+i)}},onEditInvest:function(t){this.nowSelectedRow=t,this.isShowInvest=!0,this.investInfo={uid:t.uid,investName:t.investName||""}},submitInvist:function(){var t=this;this.investInfo.uid&&_._post("/ufoPlatform/storedSeller/saveInvestUser",this.investInfo).then(function(e){200===e.code?(t.closePopup(),t.fetchData(t.filter,t.page),t.$Modal.info({title:"提示",content:e.message})):(t.closePopup(),t.$Modal.info({title:"提示",content:"保存失败"}))})},closePopup:function(){this.detail={},this.investInfo={},this.isShowDetail=!1,this.isShowInvest=!1},getParams:function(t){return{certName:t.certName,mobile:t.mobile,uid:t.uid,investName:t.investName,validStatus:parseInt(t.validStatus)>=0?t.validStatus:void 0,entryType:parseInt(t.entryType)>=0?t.entryType:void 0}}}}},360:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(361),s=a(18);Object(s.a)(i.a)},361:function(t,e,a){"use strict";function i(t){n||a(362)}var s=a(138),r=a(363),n=!1,l=a(0),o=i,c=l(s.a,r.a,!1,o,null,null);c.options.__file="src/views/shop/index.vue",e.a=c.exports},362:function(t,e){},363:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("LayoutContent",{attrs:{breads:[{title:"店铺列表"}]}},[a("LayoutFilter",{on:{"on-filter":t.onFilter,"on-clear":t.onClear}},[a("Form",{ref:"filterForm",attrs:{inline:"",model:t.filter}},[a("FormItem",{attrs:{prop:"uid"}},[a("Input",{attrs:{placeholder:"输入uid"},model:{value:t.filter.uid,callback:function(e){t.$set(t.filter,"uid",e)},expression:"filter.uid"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"certName"}},[a("Input",{attrs:{placeholder:"商家名称"},model:{value:t.filter.certName,callback:function(e){t.$set(t.filter,"certName",e)},expression:"filter.certName"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"mobile"}},[a("Input",{attrs:{placeholder:"手机号"},model:{value:t.filter.mobile,callback:function(e){t.$set(t.filter,"mobile",e)},expression:"filter.mobile"}})],1),t._v(" "),a("FormItem",[a("Input",{staticStyle:{display:"none"},attrs:{placeholder:"招商人"},model:{value:t.filter.investName,callback:function(e){t.$set(t.filter,"investName",e)},expression:"filter.investName"}})],1),t._v(" "),a("FormItem",{attrs:{prop:"validStatus"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"选择状态"},model:{value:t.filter.validStatus,callback:function(e){t.$set(t.filter,"validStatus",e)},expression:"filter.validStatus"}},[a("Option",{attrs:{value:1}},[t._v("已入驻")]),t._v(" "),a("Option",{attrs:{value:9}},[t._v("已退驻")])],1)],1),t._v(" "),a("FormItem",{attrs:{prop:"entryType"}},[a("Select",{staticStyle:{width:"100px"},attrs:{placeholder:"商家类型"},model:{value:t.filter.entryType,callback:function(e){t.$set(t.filter,"entryType",e)},expression:"filter.entryType"}},[a("Option",{attrs:{value:1}},[t._v("入驻卖家")]),t._v(" "),a("Option",{attrs:{value:2}},[t._v("超级入驻卖家")]),t._v(" "),a("Option",{attrs:{value:4}},[t._v("普通卖家")])],1)],1)],1)],1),t._v(" "),a("LayoutTable",{attrs:{page:t.page,total:t.total,columns:t.columns,data:t.data},on:{"on-page-change":t.onPageChange}}),t._v(" "),a("div",{staticClass:"popup-detail-wrapper",class:{show:t.isShowDetail}},[a("Card",{staticClass:"popup-detail-container"},[a("p",{attrs:{slot:"title"},slot:"title"},[t._v("商家详情")]),t._v(" "),a("Button",{staticClass:"btn-close",attrs:{slot:"extra"},on:{click:t.closePopup},slot:"extra"},[t._v("X")]),t._v(" "),a("div",{staticClass:"pop-detail-content"},[a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("UID")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.uid||" "))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("商家类型")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(["","入驻卖家","超级入驻","","普通卖家"][t.detail.entryType]))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("商家名称")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.certName||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("手机号")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.mobile||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("招商人员")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.investName||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("违规次数")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.breakRuleTimes||"0"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("账户余额")]),t._v(" "),a("Col",{staticStyle:{color:"red"},attrs:{span:"8"}},[t._v(t._s(t.detail.money||"0.00"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("入驻状态")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.validStatusDesc||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("入驻时间")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.enterTime||"--"))]),t._v(" "),a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("退出入驻时间")]),t._v(" "),a("Col",{attrs:{span:"8"}},[t._v(t._s(t.detail.quitTime||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title",attrs:{span:"4"}},[t._v("身份证号")]),t._v(" "),a("Col",{attrs:{span:"20"}},[t._v(t._s(t.detail.certNo||"--"))])],1),t._v(" "),a("Row",[a("Col",{staticClass:"detail-title no-border-right",staticStyle:{"min-height":"150px","line-height":"150px"},attrs:{span:"4"}},[t._v("身份证照片")]),t._v(" "),a("Col",{staticClass:"border-left",staticStyle:{"min-height":"150px"},attrs:{span:"20"}},[t.detail.idCardFrontUrl?a("img",{staticClass:"cert-image",attrs:{src:t.detail.idCardFrontUrl}}):t._e(),t._v(" "),t.detail.idCardBackUrl?a("img",{staticClass:"cert-image",attrs:{src:t.detail.idCardBackUrl}}):t._e()])],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"popup-invist-wrapper",class:{show:t.isShowInvest}},[a("Card",{staticClass:"popup-invist-container"},[a("p",{attrs:{slot:"title"},slot:"title"},[t._v("绑定招商人")]),t._v(" "),a("Button",{staticClass:"btn-close",attrs:{slot:"extra"},on:{click:t.closePopup},slot:"extra"},[t._v("X")]),t._v(" "),a("div",{staticClass:"popup-invist-content"},[a("Row",[a("Col",{staticClass:"invist-title",attrs:{span:"8"}},[t._v("招商人员")]),t._v(" "),a("Col",{attrs:{span:"16"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.investInfo.investName,expression:"investInfo.investName"}],staticStyle:{width:"80%"},attrs:{type:"text",placeholder:"请输入招商人"},domProps:{value:t.investInfo.investName},on:{input:function(e){e.target.composing||t.$set(t.investInfo,"investName",e.target.value)}}})])],1),t._v(" "),a("Row",[a("Col",{staticStyle:{"text-align":"center"},attrs:{span:"24"}},[a("Button",{attrs:{type:"success"},on:{click:t.submitInvist}},[t._v("保存")])],1)],1)],1)],1)],1)],1)},s=[];i._withStripped=!0;var r={render:i,staticRenderFns:s};e.a=r},5:function(t,e){t.exports=iview}},[360]);
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.fda52726821106658b27.css" rel="stylesheet"><link href="css/price-compare.fda52726821106658b27.css" rel="stylesheet"></head>
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/price-compare.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.fda52726821106658b27.js"></script><script type="text/javascript" src="js/price-compare.fda52726821106658b27.js"></script></body>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/price-compare.f3f566c7ebfba974ad02.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.fda52726821106658b27.css" rel="stylesheet"><link href="css/resource-edit-new.fda52726821106658b27.css" rel="stylesheet"></head>
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/resource-edit-new.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.fda52726821106658b27.js"></script><script type="text/javascript" src="js/resource-edit-new.fda52726821106658b27.js"></script></body>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/resource-edit-new.f3f566c7ebfba974ad02.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.fda52726821106658b27.css" rel="stylesheet"><link href="css/resource-edit.fda52726821106658b27.css" rel="stylesheet"></head>
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/resource-edit.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.fda52726821106658b27.js"></script><script type="text/javascript" src="js/resource-edit.fda52726821106658b27.js"></script></body>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/resource-edit.f3f566c7ebfba974ad02.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.fda52726821106658b27.css" rel="stylesheet"><link href="css/resource-list.fda52726821106658b27.css" rel="stylesheet"></head>
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/resource-list.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.fda52726821106658b27.js"></script><script type="text/javascript" src="js/resource-list.fda52726821106658b27.js"></script></body>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/resource-list.f3f566c7ebfba974ad02.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.fda52726821106658b27.css" rel="stylesheet"><link href="css/send-coupon.fda52726821106658b27.css" rel="stylesheet"></head>
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/send-coupon.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.fda52726821106658b27.js"></script><script type="text/javascript" src="js/send-coupon.fda52726821106658b27.js"></script></body>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/send-coupon.f3f566c7ebfba974ad02.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.fda52726821106658b27.css" rel="stylesheet"><link href="css/send-record.fda52726821106658b27.css" rel="stylesheet"></head>
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/send-record.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -22,6 +22,6 @@
<script type="text/javascript" src="https://cdn.yoho.cn/20190712/xlsx.full.min.js"> </script>
<script type="text/javascript" src="js/vendors.fda52726821106658b27.js"></script><script type="text/javascript" src="js/send-record.fda52726821106658b27.js"></script></body>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/send-record.f3f566c7ebfba974ad02.js"></script></body>
</html>
... ...
... ... @@ -5,7 +5,7 @@
<title>ufo后台管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link href="css/vendors.fda52726821106658b27.css" rel="stylesheet"><link href="css/shop.fda52726821106658b27.css" rel="stylesheet"></head>
<link href="css/vendors.f3f566c7ebfba974ad02.css" rel="stylesheet"><link href="css/shop.f3f566c7ebfba974ad02.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
... ... @@ -19,6 +19,6 @@
<script type="text/javascript" src="js/vendors.fda52726821106658b27.js"></script><script type="text/javascript" src="js/shop.fda52726821106658b27.js"></script></body>
<script type="text/javascript" src="js/vendors.f3f566c7ebfba974ad02.js"></script><script type="text/javascript" src="js/shop.f3f566c7ebfba974ad02.js"></script></body>
</html>
... ...