1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-distribute-index"],{"0636":function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"dh-field"},[a("div",{staticClass:"van-hairline--bottom"},[a("van-field",t._b({staticClass:"dh-cell",attrs:{readonly:!0,label:t.label,"is-link":void 0===t.$attrs.disabled,"error-message-align":"right","input-align":"right",rules:[{required:i("647c"),message:t.requireMessage}]},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showPopu(t.$attrs.disabled)}},model:{value:t.resultLabel,callback:function(e){t.resultLabel=e},expression:"resultLabel"}},"van-field",t.$attrs,!1)),a("van-popup",{style:{height:"30%"},attrs:{position:"bottom"},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[a("div",{staticClass:"van-picker__toolbar flex_around flex_items mt30 plr50"},[a("v-uni-view",{staticClass:"van-picker__cancel",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.cancel.apply(void 0,arguments)}}},[t._v("取消")]),a("div",{staticClass:"van-ellipsis van-picker__title"},[t._v(t._s(t.$attrs.label))]),a("v-uni-view",{staticClass:"van-picker__confirm",staticStyle:{color:"#409EFF"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm.apply(void 0,arguments)}}},[t._v("确认")])],1),a("div",{staticStyle:{"max-height":"264px","overflow-y":"auto"}},[a("van-checkbox-group",{ref:"checkboxGroup",on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.change.apply(void 0,arguments)}},model:{value:t.checkboxValue,callback:function(e){t.checkboxValue=e},expression:"checkboxValue"}},[a("van-cell-group",t._l(t.columnsData,(function(e,i){return a("van-cell",{key:e[t.option.value],attrs:{title:e[t.option.label],clickable:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggle(i)}},scopedSlots:t._u([{key:"right-icon",fn:function(){return[a("div",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggle(i)}}},[a("van-checkbox",{ref:"checkboxes",refInFor:!0,attrs:{name:e[t.option.value]}})],1)]},proxy:!0}],null,!0)})})),1)],1)],1)])],1)])},n=[]},"0a7a":function(t,e,i){var a=i("6b65");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("717c10e6",a,!0,{sourceMap:!1,shadowMode:!1})},"0abf":function(t,e,i){"use strict";i.r(e);var a=i("f6ca"),n=i("c033");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);i("2a48");var o=i("f0c5"),l=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"9d686952",null,!1,a["a"],void 0);e["default"]=l.exports},"10da":function(t,e,i){"use strict";var a=i("bd1f"),n=i.n(a);n.a},"2a48":function(t,e,i){"use strict";var a=i("0a7a"),n=i.n(a);n.a},3579:function(t,e,i){"use strict";i("7a82");var a=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("d3b7"),i("159b"),i("14d9");var n=a(i("b20d")),s=(i("bf08"),{data:function(){return{curindex:0,istrue:!1,protypes:[{value:0,text:"积分"},{value:1,text:"商品"}],form:{productType:0,productIds:[],subject:"",userIds:[],type:1},customerBusinessAll:[],users:[],showPicker:!1,typename:"积分",form2:{page:1,pageSize:10},list:[],name:uni.getStorageSync("adminname")}},components:{SelectCheckBox:n.default},onLoad:function(){this.getp()},methods:{chosewho:function(t){this.curindex=t,1==t&&this.getrecored()},getp:function(){var t=this;uni.showLoading({title:"加载中..."}),this.api.getProducts().then((function(e){console.log(e),200==e.data.code?(t.customerBusinessAll=e.data.data.data,t.getprople()):(t.istrue=!0,uni.hideLoading(),uni.showToast({title:e.data.message,icon:"none"}))}))},getprople:function(){var t=this;this.api.getusers({type:1}).then((function(e){console.log(e),200==e.data.code?(t.users=e.data.data,t.istrue=!0):(t.istrue=!0,uni.hideLoading(),uni.showToast({title:e.data.message,icon:"none"}))}))},getrecored:function(){var t=this;uni.showLoading({title:"加载中..."}),this.api.getrecord(this.form2).then((function(e){if(console.log(e),200==e.data.code){if(uni.stopPullDownRefresh(),0==e.data.data.data.length)return t.istrue=!0,uni.showToast({title:"暂无数据",icon:"none"}),!1;e.data.data.data.forEach((function(e,i){e.pname="",0!=e.product_list.length&&e.product_list.forEach((function(t,i){e.pname+=t.name+","})),t.list.push(e)})),t.istrue=!0}else t.istrue=!0,uni.hideLoading(),uni.showToast({title:e.data.message,icon:"none"})}))},onConfirm:function(t){this.form.productType=t.value,this.typename=t.text,this.showPicker=!1},confirm:function(t){"product"==t.types?this.form.productIds=t.arr:this.form.userIds=t.arr},godis:function(t){uni.showLoading({title:"分发中..."}),"first"!=t&&(this.form.productType=t.product_type,this.form.subject=t.subject,this.form.integral=t.integral,null==t.product_type_params&&(t.product_type_params=[]),this.form.productIds=t.product_type_params,this.form.userIds.push(t.to_account_id)),0==this.form.productType?this.form.productType="integral":this.form.productType="goods";var e=this;e.api.godistribute(e.form).then((function(t){console.log(t),200==t.data.code?(uni.hideLoading(),uni.showToast({title:"分发成功",icon:"success",duration:1200}),setTimeout((function(){e.curindex=1,e.getrecored()}),1200)):(e.istrue=!0,uni.hideLoading(),uni.showToast({title:t.data.message,icon:"none"}))}))}},onReachBottom:function(){var t=this;uni.showLoading({title:"加载中..."}),setTimeout((function(){t.form2.page+=1,t.getrecored()}),1e3)},onPullDownRefresh:function(){this.form2.page=1,this.list=[],this.form2.name="",this.getrecored()}});e.default=s},"3e52":function(t,e,i){"use strict";i.r(e);var a=i("d99b"),n=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);e["default"]=n.a},"647c":function(t,e){function i(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id="647c"},"6b65":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,"uni-page-body[data-v-9d686952]{background:#fafbfd!important}body.?%PAGE?%[data-v-9d686952]{background:#fafbfd!important}.chosethis[data-v-9d686952]{background:#1f1057;color:#fff;border:%?2?% solid #1f1057}.nochose[data-v-9d686952]{border:%?2?% solid #1f1057;color:#1f1057}.xia .van-dropdown-menu__item[data-v-9d686952]{box-shadow:none!important}.distribute .van-dropdown-menu__bar[data-v-9d686952]{box-shadow:none!important}.distribute .van-field__control[data-v-9d686952]{text-align:right!important}.one[data-v-9d686952]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}",""]),t.exports=e},b20d:function(t,e,i){"use strict";i.r(e);var a=i("0636"),n=i("3e52");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);i("10da");var o=i("f0c5"),l=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"d5f4582a",null,!1,a["a"],void 0);e["default"]=l.exports},bd1f:function(t,e,i){var a=i("c0c8");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("cfbb9c4a",a,!0,{sourceMap:!1,shadowMode:!1})},c033:function(t,e,i){"use strict";i.r(e);var a=i("3579"),n=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);e["default"]=n.a},c0c8:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */[data-v-d5f4582a] .van-cell__title{padding:0 .3rem}.dh-field[data-v-d5f4582a]{padding:0;background:#fff}.dh-field .dh-cell.van-cell[data-v-d5f4582a]{padding:10px 0}.dh-field .dh-cell.van-cell--required[data-v-d5f4582a]::before{left:-8px}.dh-field .van-popup[data-v-d5f4582a]{border-radius:20px 20px 0 0}',""]),t.exports=e},d99b:function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("4de4"),i("d3b7"),i("c975"),i("d81d"),i("e9c4");var a={name:"VanFieldCheckbox",model:{prop:"selectValue"},props:{require:{type:Boolean,default:!0},requireMessage:{type:String,default:"此处显示校验内容"},label:{type:String,default:"标题"},columns:{type:Array,default:function(){return[]}},selectValue:{type:Array,default:function(){return[]}},types:{type:String,default:"product"},option:{type:Object,default:function(){return{label:"label",value:"value"}}},isSearch:{type:Boolean,default:!0}},computed:{resultLabel:{get:function(){var t=this,e=this.columns.filter((function(e){return t.resultValue.indexOf(e[t.option.value])>-1})),i=e.map((function(e){return e[t.option.label]}));return i.join(",")},set:function(){}}},data:function(){return{show:!1,searchVal:"",columnsData:JSON.parse(JSON.stringify(this.columns)),checkboxValue:JSON.parse(JSON.stringify(this.selectValue)),checkedAll:!1,resultValue:JSON.parse(JSON.stringify(this.selectValue))}},methods:{search:function(t){var e=this;this.columnsData=t?this.columnsData.filter((function(i){return i[e.option.label].indexOf(t)>-1})):JSON.parse(JSON.stringify(this.columns))},getData:function(t){var e=this,i=this.columnsData.filter((function(i){return t.indexOf(i[e.option.value])>-1}));return i},onConfirm:function(){var t={arr:this.checkboxValue,types:this.types};this.resultValue=this.checkboxValue,this.show=!this.show,this.$emit("confirm",t,this.getData(this.resultValue))},change:function(t){this.$emit("change",t,this.getData(this.resultValue))},cancel:function(){this.show=!this.show,this.$emit("cancel",this.resultValue)},toggle:function(t){this.$refs.checkboxes[t].toggle()},toggleAll:function(t){console.log(t),this.$refs.checkboxGroup.toggleAll(this.checkedAll)},showPopu:function(t){if(console.log(t),this.columnsData=JSON.parse(JSON.stringify(this.columns)),this.checkboxValue=JSON.parse(JSON.stringify(this.selectValue)),this.resultValue=JSON.parse(JSON.stringify(this.selectValue)),void 0!==t&&!1!==t)return!1;this.show=!this.show}},watch:{selectValue:function(t){this.resultValue=t},resultValue:function(t){this.searchVal="",this.columnsData=JSON.parse(JSON.stringify(this.columns)),this.$emit("input",t)},columnsData:{handler:function(t){t.length&&t.length===this.checkboxValue.length?this.checkedAll=!0:this.checkedAll=!1},immediate:!0},checkboxValue:{handler:function(t){t.length&&t.length===this.columnsData.length?this.checkedAll=!0:this.checkedAll=!1},immediate:!0}}};e.default=a},f6ca:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.istrue?i("div",{staticClass:"distribute plr30"},[i("div",{staticClass:"flex_start flex_items mt40"},[i("div",{class:["f-center","f26",0==t.curindex?"chosethis":"nochose"],staticStyle:{width:"50%",height:"76rpx","line-height":"76rpx","border-radius":"8rpx 0rpx 0 8rpx"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.chosewho("0")}}},[t._v("内容分发")]),i("div",{class:["f-center","f26",1==t.curindex?"chosethis":"nochose"],staticStyle:{width:"50%",height:"76rpx","line-height":"76rpx","border-radius":"0 8rpx 8rpx 0"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.chosewho("1")}}},[t._v("分发记录")])]),0==t.curindex?i("div",{staticClass:"mt40 bgwhite pt20 pb40 pr20",staticStyle:{"box-shadow":"0rpx 10rpx 16rpx 0rpx rgba(220,224,236,0.28)","border-radius":"16rpx"}},[i("v-uni-view",{staticClass:"flex_between flex_items"},[i("v-uni-view",{staticClass:"flex_start flex_items"},[i("v-uni-view",{staticStyle:{width:"12rpx",height:"51rpx",background:"#100072","border-radius":"12rpx 40rpx 40rpx 12rpx"}}),i("v-uni-text",{staticClass:"f28 bold ml30",staticStyle:{color:"#000"}},[t._v("操作人")])],1),i("v-uni-text",{staticClass:"f24 mr20",staticStyle:{color:"#1F1057"}},[t._v(t._s(t.name))])],1),i("v-uni-view",{staticClass:"flex_between flex_items"},[i("v-uni-text",{staticClass:"f26 ml15 bold",staticStyle:{color:"#333333"}},[t._v("分发类型")]),i("v-uni-view",[i("van-field",{staticStyle:{width:"300rpx","padding-right":"0"},attrs:{"input-align":"right","is-link":!0,readonly:!0,placeholder:"选择类型"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showPicker=!0}},model:{value:t.typename,callback:function(e){t.typename=e},expression:"typename"}}),i("van-popup",{attrs:{round:!0,position:"bottom"},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},[i("van-picker",{attrs:{"show-toolbar":!0,columns:t.protypes},on:{cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.showPicker=!1},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm.apply(void 0,arguments)}}})],1)],1)],1),0==t.form.productType?i("v-uni-view",{staticClass:"flex_between flex_items"},[i("v-uni-text",{staticClass:"f26 ml15 bold",staticStyle:{color:"#333333"}},[t._v("积分")]),i("van-field",{staticClass:"mr20",staticStyle:{width:"200rpx","padding-right":"0"},attrs:{"input-align":"right",label:"",placeholder:"积分"},model:{value:t.form.integral,callback:function(e){t.$set(t.form,"integral",e)},expression:"form.integral"}})],1):t._e(),1==t.form.productType?i("v-uni-view",{staticClass:"flex_between flex_items"},[i("v-uni-text",{staticClass:"f26 ml15 bold",staticStyle:{color:"#333333"}},[t._v("商品")]),i("v-uni-view",[i("SelectCheckBox",{attrs:{types:"product",label:"",placeholder:"请选择",requireMessage:"请选择",columns:t.customerBusinessAll,selectValue:t.form.productIds,"label-width":"100",option:{label:"name",value:"id"}},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirm.apply(void 0,arguments)}}})],1)],1):t._e(),i("v-uni-view",{staticClass:"flex_between flex_items"},[i("v-uni-text",{staticClass:"f26 ml15 bold",staticStyle:{color:"#333333"}},[t._v("分发缘由")]),i("van-field",{staticClass:"mr20",staticStyle:{width:"200rpx","padding-right":"0"},attrs:{"input-align":"right",label:"",placeholder:"分发缘由"},model:{value:t.form.subject,callback:function(e){t.$set(t.form,"subject",e)},expression:"form.subject"}})],1),i("v-uni-view",{staticClass:"flex_between flex_items"},[i("v-uni-text",{staticClass:"f26 ml15 bold",staticStyle:{color:"#333333"}},[t._v("分发对象")]),i("v-uni-view",[i("SelectCheckBox",{attrs:{types:"user",label:"",placeholder:"请选择",requireMessage:"请选择",columns:t.users,selectValue:t.form.userIds,"label-width":"100",option:{label:"name",value:"id"}},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirm.apply(void 0,arguments)}}})],1)],1),i("v-uni-view",{staticClass:"mt60 flex_items flex_center"},[i("v-uni-view",{staticClass:"flex_items flex_center",staticStyle:{width:"654rpx",height:"86rpx",background:"linear-gradient(90deg, #A21E2E 0%, #190F58 100%)","box-shadow":"0rpx 8rpx 14rpx 0rpx rgba(83,139,135,0.2)","border-radius":"12rpx"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.godis("first")}}},[i("v-uni-text",{staticClass:"f28",staticStyle:{color:"#fff"}},[t._v("确认分发")])],1)],1)],1):i("div",{staticClass:"mt40 bgwhite pt20 pb40 pr20",staticStyle:{"box-shadow":"0rpx 10rpx 16rpx 0rpx rgba(220,224,236,0.28)","border-radius":"16rpx"}},[0!=t.list.length?i("v-uni-view",t._l(t.list,(function(e,a){return i("v-uni-view",{key:a,staticClass:"plr20 pb30 pos bgwhite mt30",staticStyle:{"box-shadow":"0rpx 10rpx 16rpx 0rpx rgba(220,224,236,0.28)","border-radius":"16rpx"}},[i("v-uni-view",{staticClass:"flex_between flex_items"},[i("v-uni-text",{staticClass:"f26 bold",staticStyle:{color:"#333"}},[t._v("分发人:")]),i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#1F1057"}},[t._v(t._s(e.from_phone))])],1),1==e.product_type?i("v-uni-view",{staticClass:"flex_between flex_items mt30"},[i("v-uni-text",{staticClass:"f26 bold",staticStyle:{color:"#333"}},[t._v("分发积分:")]),i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#1F1057"}},[t._v(t._s(e.integral))])],1):t._e(),2==e.product_type?i("v-uni-view",{staticClass:"flex_between flex_items mt30"},[i("v-uni-text",{staticClass:"f26 bold",staticStyle:{color:"#333"}},[t._v("分发商品:")]),i("v-uni-view",{staticClass:"f24 one",staticStyle:{color:"#1F1057"}},[t._v(t._s(e.pname))])],1):t._e(),i("v-uni-view",{staticClass:"flex_between flex_items mt30"},[i("v-uni-text",{staticClass:"f26 bold",staticStyle:{color:"#333"}},[t._v("分发缘由:")]),i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#1F1057"}},[t._v(t._s(e.subject))])],1),i("v-uni-view",{staticClass:"flex_between flex_items mt30"},[i("v-uni-text",{staticClass:"f26 bold",staticStyle:{color:"#333"}},[t._v("分发对象:")]),i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#1F1057"}},[t._v(t._s(e.to_phone))])],1),i("v-uni-view",{staticClass:"flex_between flex_items mt30"},[i("v-uni-text",{staticClass:"f26 bold",staticStyle:{color:"#333"}},[t._v("创建时间:")]),i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#1F1057"}},[t._v(t._s(e.create_time))])],1),i("v-uni-view",{staticClass:"mt60 flex_items flex_center"},[i("v-uni-view",{staticClass:"flex_items flex_center",staticStyle:{width:"654rpx",height:"86rpx",background:"linear-gradient(90deg, #A21E2E 0%, #190F58 100%)","box-shadow":"0rpx 8rpx 14rpx 0rpx rgba(83,139,135,0.2)","border-radius":"12rpx"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.godis(e)}}},[i("v-uni-text",{staticClass:"f28",staticStyle:{color:"#fff"}},[t._v("重新分发")])],1)],1)],1)})),1):i("v-uni-view",{staticClass:"ptb50 plr30 f26 f-center",staticStyle:{color:"#9a9a9a","margin-top":"80rpx"}},[t._v("--暂无数据--")])],1)]):t._e()},n=[]}}]); |