1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-distribute-index"],{"08bd":function(t,e,i){"use strict";i.r(e);var n=i("e223"),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},"0a71":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("bf0f"),i("2797"),i("aa9c");var a=n(i("90d8")),s=(i("5a26"),{data:function(){return{curindex:1,istrue:!1,form:{integral:"",subject:"",type:2,userIds:[],productType:"integral"},customerBusinessAll:[],users:[],showPicker:!1,typename:"积分",form2:{mobile:"",import_id:""},list:[],name:uni.getStorageSync("adminname"),items:[],nickname:uni.getStorageSync("nickname"),isdis:!1}},components:{SelectCheckBox:a.default},onLoad:function(t){console.log(this.nickname),"超级管理员"!=this.nickname&&(this.isdis=!0),this.getprople()},methods:{chosewho:function(t){this.curindex=t,1==t?this.getprople():this.getuser()},getuser:function(){var t=this;uni.showLoading({title:"加载中..."}),this.api.getusers(this.form2).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"}))}))},getprople:function(){var t=this;uni.showLoading({title:"加载中..."}),this.items=[],this.api.getitems(this.form2).then((function(e){console.log(e),200==e.data.code?(e.data.data.forEach((function(e,i){e.id=e.id+"",t.items.push(e)})),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){t.list.push(e)})),t.istrue=!0}else t.istrue=!0,uni.hideLoading(),uni.showToast({title:e.data.message,icon:"none"})}))},confirm:function(t){"product"==t.types?this.form.productIds=t.arr:this.form.userIds=t.arr},confirm2:function(t){this.form2.import_id=t},godis:function(t,e){uni.showLoading({title:"分发中..."}),"duo"==t?this.goduo():this.godan()},goduo:function(){var t=this;t.api.godistribute(t.form).then((function(e){console.log(e),200==e.data.code?(uni.hideLoading(),uni.showToast({title:"划拨成功",icon:"success",duration:1200}),setTimeout((function(){uni.navigateTo({url:"/pages/directory/index"})}),1200)):(t.istrue=!0,uni.hideLoading(),uni.showToast({title:e.data.message,icon:"none"}))}))},godan:function(){var t=this;t.api.fenout(t.form2).then((function(e){console.log(e),200==e.data.code?(uni.hideLoading(),uni.showToast({title:"分发成功",icon:"success",duration:1200}),setTimeout((function(){uni.switchTab({url:"/pages/index/index"})}),1200)):(t.istrue=!0,uni.hideLoading(),uni.showToast({title:e.data.message,icon:"none"})),"integral"==t.form.productType?t.form.productType=0:t.form.productType=1}))}},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},2128:function(t,e,i){var n=i("9ba5");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("82d348c4",n,!0,{sourceMap:!1,shadowMode:!1})},"28b3":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=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",1==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("1")}}},[t._v("内容分发")]),i("div",{class:["f-center","f26",0==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("0")}}},[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("van-field",{staticClass:"mr20",staticStyle:{width:"200rpx","padding-right":"0"},attrs:{disabled:t.isdis,"input-align":"right",label:"",placeholder:"额度"},model:{value:t.form.integral,callback:function(e){t.$set(t.form,"integral",e)},expression:"form.integral"}})],1),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:{disabled:t.isdis,"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("分发对象")]),t.isdis?i("v-uni-view",{staticStyle:{height:"88rpx"}}):i("v-uni-view",[i("SelectCheckBox",{attrs:{kind:"duo",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("duo")}}},[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"}},[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("van-field",{staticClass:"mr20",staticStyle:{width:"200rpx","padding-right":"0"},attrs:{"input-align":"right",label:"",placeholder:"姓名"},model:{value:t.form2.username,callback:function(e){t.$set(t.form2,"username",e)},expression:"form2.username"}})],1),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.form2.mobile,callback:function(e){t.$set(t.form2,"mobile",e)},expression:"form2.mobile"}})],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:{kind:"dan",types:"user",label:"",placeholder:"请选择",requireMessage:"请选择",columns:t.items,selectradio:t.form2.import_id,"label-width":"100",option:{label:"name",value:"id"}},on:{confirm2:function(e){arguments[0]=e=t.$handleEvent(e),t.confirm2.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("dan")}}},[i("v-uni-text",{staticClass:"f28",staticStyle:{color:"#fff"}},[t._v("确认分发")])],1)],1)],1)]):t._e()},a=[]},"67d3":function(t,e,i){"use strict";i.r(e);var n=i("28b3"),a=i("7361");for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);i("f1af");var o=i("828b"),l=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"3917682e",null,!1,n["a"],void 0);e["default"]=l.exports},"6f2b":function(t,e,i){"use strict";var n=i("2128"),a=i.n(n);a.a},7361:function(t,e,i){"use strict";i.r(e);var n=i("0a71"),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},"90d8":function(t,e,i){"use strict";i.r(e);var n=i("b756"),a=i("08bd");for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);i("6f2b");var o=i("828b"),l=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"2bb5b533",null,!1,n["a"],void 0);e["default"]=l.exports},9398:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,"uni-page-body[data-v-3917682e]{background:#fafbfd!important}body.?%PAGE?%[data-v-3917682e]{background:#fafbfd!important}.chosethis[data-v-3917682e]{background:#1f1057;color:#fff;border:%?2?% solid #1f1057}.nochose[data-v-3917682e]{border:%?2?% solid #1f1057;color:#1f1057}.xia .van-dropdown-menu__item[data-v-3917682e]{box-shadow:none!important}.distribute .van-dropdown-menu__bar[data-v-3917682e]{box-shadow:none!important}.distribute .van-field__control[data-v-3917682e]{text-align:right!important}.one[data-v-3917682e]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}",""]),t.exports=e},"9ba5":function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-2bb5b533] .van-cell__title{padding:0 .3rem}.dh-field[data-v-2bb5b533]{padding:0;background:#fff}.dh-field .dh-cell.van-cell[data-v-2bb5b533]{padding:10px 0}.dh-field .dh-cell.van-cell--required[data-v-2bb5b533]::before{left:-8px}.dh-field .van-popup[data-v-2bb5b533]{border-radius:20px 20px 0 0}',""]),t.exports=e},b756:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dh-field"},[n("div",{staticClass:"van-hairline--bottom"},[n("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("d147"),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)),n("van-popup",{style:{height:"30%"},attrs:{position:"bottom"},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[n("div",{staticClass:"van-picker__toolbar flex_around flex_items mt30 plr50"},[n("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("取消")]),n("div",{staticClass:"van-ellipsis van-picker__title"},[t._v(t._s(t.$attrs.label))]),n("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),"duo"==t.kind?n("div",{staticStyle:{"max-height":"264px","overflow-y":"auto"}},[n("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"}},[n("van-cell-group",t._l(t.columnsData,(function(e,i){return n("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[n("div",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggle(i)}}},[n("van-checkbox",{ref:"checkboxes",refInFor:!0,attrs:{name:e[t.option.value]}})],1)]},proxy:!0}],null,!0)})})),1)],1)],1):t._e(),"dan"==t.kind?n("div",{staticStyle:{"max-height":"264px","overflow-y":"auto"}},[n("van-radio-group",{model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[n("van-cell-group",t._l(t.columnsData,(function(e,i){return n("van-cell",{key:i,attrs:{title:e.name,clickable:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.choseradio(i)}},scopedSlots:t._u([{key:"right-icon",fn:function(){return[n("van-radio",{attrs:{name:e.id}})]},proxy:!0}],null,!0)})})),1)],1)],1):t._e()])],1)])},a=[]},d147: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="d147"},e223:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("8f71"),i("bf0f"),i("5ef2"),i("fd3c"),i("d4b5"),i("aa9c");var n={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[]}},kind:{type:String,default:"duo"},selectradio:{type:String,default:"duo"},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)),radio:this.selectradio}},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(){if("duo"==this.kind){var t={arr:this.checkboxValue,types:this.types};this.resultValue=this.checkboxValue,this.show=!this.show,this.$emit("confirm",t,this.getData(this.resultValue))}else this.show=!this.show,this.resultValue=[],this.resultValue.push(this.radio),this.$emit("confirm2",this.radio)},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(this.columnsData=JSON.parse(JSON.stringify(this.columns)),this.checkboxValue=JSON.parse(JSON.stringify(this.selectValue)),"duo"==this.kind&&(this.resultValue=JSON.parse(JSON.stringify(this.selectValue))),void 0!==t&&!1!==t)return!1;this.show=!this.show},choseradio:function(t){this.radio=this.columnsData[t].id}},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=n},e80f:function(t,e,i){var n=i("9398");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("71c80f0e",n,!0,{sourceMap:!1,shadowMode:!1})},f1af:function(t,e,i){"use strict";var n=i("e80f"),a=i.n(n);a.a}}]); |