1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6a5dcc76"],{"09bb":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var i=n("f0e1");function o(e){return Object(i["a"])({url:"qiniu/token",method:"get",params:e})}function a(e){return Object(i["a"])({url:"send_verify_code",method:"get",params:e})}},"0b33":function(e,t,n){"use strict";n("cfa2")},"1d32":function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",[e.dropDown?n("span",{staticClass:"px-2",on:{click:e.showSelect}},[e._v(" "+e._s(e.columns.find((function(t){return t[e.valueKey]==e.value}))?e.columns.find((function(t){return t[e.valueKey]==e.value}))[e.labelKey]:"")+" "),n("van-icon",{attrs:{name:"arrow-down"}})],1):n("van-field",{attrs:{readonly:"",clickable:e.edit,border:e.border,label:e.label,value:e.columns.find((function(t){return t[e.valueKey]==e.value}))?e.columns.find((function(t){return t[e.valueKey]==e.value}))[e.labelKey]:"",placeholder:e.placeholder,disabled:e.disabled,rules:e.rules},on:{click:e.showSelect}}),n("van-popup",{attrs:{round:"",position:"bottom"},model:{value:e.showPicker,callback:function(t){e.showPicker=t},expression:"showPicker"}},[n("van-picker",{attrs:{"show-toolbar":"",title:e.label,columns:e.columns.map((function(t){return{text:t[e.labelKey],value:t[e.valueKey]}})),"default-index":e.columns.find((function(t){return t[e.valueKey]==e.value}))?e.columns.findIndex((function(t){return t[e.valueKey]==e.value})):0},on:{cancel:function(t){e.showPicker=!1},confirm:e.onConfirm}})],1)],1)},o=[],a={name:"Select",components:{},props:{value:{default:""},label:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1},data:{type:String,default:""},edit:{type:Boolean,default:!0},rules:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},labelKey:{default:"name"},valueKey:{default:"id"},dropDown:{type:Boolean,default:!1}},data:function(){return{showPicker:!1}},methods:{showSelect:function(){this.edit&&(this.showPicker=!0)},onConfirm:function(e){e=e.value;this.$emit("input",e),this.$emit("change",e),this.showPicker=!1}}},r=a,s=n("cba8"),l=Object(s["a"])(r,i,o,!1,null,"6cfad04c",null);t["a"]=l.exports},"22f7":function(e,t,n){"use strict";var i=n("4d31"),o=n("8655"),a=n("5008"),r=n("ee57"),s=n("9e15"),l=n("0d3d"),c=n("89a5"),u=n("dd2f"),d=n("f6d3"),h=n("5fd5"),f=n("2c48"),p=n("c826").f,v=n("4b4d").f,g=n("657f").f,b=n("49f4"),y=n("b5db").trim,m="Number",k=o[m],w=k.prototype,x=o.TypeError,_=a("".slice),S=a("".charCodeAt),L=function(e){var t=h(e,"number");return"bigint"==typeof t?t:I(t)},I=function(e){var t,n,i,o,a,r,s,l,c=h(e,"number");if(d(c))throw x("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=y(c),t=S(c,0),43===t||45===t){if(n=S(c,2),88===n||120===n)return NaN}else if(48===t){switch(S(c,1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+c}for(a=_(c,2),r=a.length,s=0;s<r;s++)if(l=S(a,s),l<48||l>o)return NaN;return parseInt(a,i)}return+c};if(r(m,!k(" 0o1")||!k("0b1")||k("+0x1"))){for(var $,O=function(e){var t=arguments.length<1?0:k(L(e)),n=this;return u(w,n)&&f((function(){b(n)}))?c(Object(t),n,O):t},j=i?p(k):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),C=0;j.length>C;C++)l(k,$=j[C])&&!l(O,$)&&g(O,$,v(k,$));O.prototype=w,w.constructor=O,s(o,m,O)}},"34f1":function(e,t,n){"use strict";n("456d"),n("eeea"),n("b920"),n("895b"),n("fdd9"),n("a4c0")},"49f4":function(e,t,n){var i=n("5008");e.exports=i(1..valueOf)},"531f":function(e,t,n){"use strict";var i=n("9c15"),o=n("8655"),a=n("2c48"),r=n("81c6"),s=n("1b4d"),l=n("059d"),c=n("d7ab"),u=n("5311"),d=n("6326"),h=n("462a"),f=n("ae28"),p=n("d006"),v=f("isConcatSpreadable"),g=9007199254740991,b="Maximum allowed index exceeded",y=o.TypeError,m=p>=51||!a((function(){var e=[];return e[v]=!1,e.concat()[0]!==e})),k=h("concat"),w=function(e){if(!s(e))return!1;var t=e[v];return void 0!==t?!!t:r(e)},x=!m||!k;i({target:"Array",proto:!0,forced:x},{concat:function(e){var t,n,i,o,a,r=l(this),s=d(r,0),h=0;for(t=-1,i=arguments.length;t<i;t++)if(a=-1===t?r:arguments[t],w(a)){if(o=c(a),h+o>g)throw y(b);for(n=0;n<o;n++,h++)n in a&&u(s,h,a[n])}else{if(h>=g)throw y(b);u(s,h++,a)}return s.length=h,s}})},7829:function(e,t,n){"use strict";n.r(t);var i,o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("van-sticky",[e.tableid?n("van-nav-bar",{staticClass:"shadow",attrs:{title:e.tableid?"选择工人":"工人管理","left-text":"返回","left-arrow":""},on:{"click-left":function(t){return e.$router.back(-1)}},scopedSlots:e._u([{key:"right",fn:function(){return[n("van-icon",{directives:[{name:"auth",rawName:"v-auth",value:["employee:worker:add"],expression:"['employee:worker:add']"}],attrs:{name:"plus",size:"18"},on:{click:function(t){return e.$router.push("/worker/add")}}})]},proxy:!0}],null,!1,2433742734)}):e._e(),n("van-search",{attrs:{placeholder:"请输入关键词","show-action":""},on:{search:e.changeQuery},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}},[n("template",{slot:"left"},[n("Select",{attrs:{edit:!e.tableid,"drop-down":"",columns:[{id:"",name:"全部"}].concat(e.types)},on:{change:e.changeQuery},model:{value:e.type_ids,callback:function(t){e.type_ids=t},expression:"type_ids"}})],1),n("template",{slot:"action"},[n("AddressCode",{attrs:{span:"",placeholder:"区域",level:3},on:{change:e.changeQuery},model:{value:e.areacode,callback:function(t){e.areacode=t},expression:"areacode"}})],1)],2)],1),n("van-list",{attrs:{finished:e.finished,error:e.error,"error-text":"请求失败,点击重新加载","finished-text":""},on:{"update:error":function(t){e.error=t},load:e.loadWorkers},model:{value:e.loading,callback:function(t){e.loading=t},expression:"loading"}},[n("van-cell-group",e._l(e.workers,(function(t,i){return n("van-cell",{key:i,attrs:{clickable:!1,center:""},scopedSlots:e._u([{key:"title",fn:function(){return[n("div",{staticClass:"block",on:{click:function(n){return e.select(t)}}},[n("span",{staticStyle:{"margin-left":"6px"}},[e._v(e._s(t.name))])])]},proxy:!0},{key:"label",fn:function(){return[n("div",{staticClass:"block",on:{click:function(n){return e.select(t)}}},[n("span",{staticStyle:{"margin-left":"6px"}},[e._v(e._s(t.type_names))])])]},proxy:!0},{key:"icon",fn:function(){return[n("div",{staticClass:"block",on:{click:function(n){return e.select(t)}}},[n("van-image",{attrs:{src:"https://image.nczyzs.com/zhiyuan-logo.png",width:"45px",height:"45px"}})],1)]},proxy:!0},e.tableid?{key:"extra",fn:function(){return[n("van-button",{staticStyle:{"margin-left":"5px"},attrs:{type:"primary",size:"mini"},on:{click:function(n){return e.dispatch(t)}}},[e._v("派单")])]},proxy:!0}:null],null,!0)},[[n("div",[e._v(" "+e._s(t.phone)+" "),t.phone?n("a",{attrs:{href:"tel:"+t.phone}},[n("van-icon",{attrs:{name:"phone",size:"22",color:"#009688"}})],1):e._e()]),n("div",[n("AddressCode",{attrs:{value:t.areacode,span:"",level:3,edit:!1}})],1)]],2)})),1)],1)],1)},a=[],r=n("d696"),s=(n("97e1"),n("ade4")),l=(n("34f1"),n("a241")),c=(n("d64c"),n("ccee"),n("3714"),n("f8c2"),n("4d38"),n("531f"),n("da1a")),u=(n("09bb"),n("a03f")),d=n("46e0"),h=n("1d32"),f={components:(i={Select:h["a"]},Object(r["a"])(i,l["a"].name,l["a"]),Object(r["a"])(i,s["a"].name,s["a"]),Object(r["a"])(i,"AddressCode",u["a"]),i),data:function(){return{tableid:0,search:"",type_ids:"",areacode:"",types:[],workers:[],loading:!1,finished:!1,error:!1,page:1,size:10}},created:function(){this.$route.query&&this.$route.query.type&&(this.type_ids=this.$route.query.type),this.$route.query&&this.$route.query.areacode&&(this.areacode=this.$route.query.areacode),this.$route.query&&this.$route.query.search&&(this.search=this.$route.query.search),this.$route.params&&this.$route.params.id&&(this.tableid=this.$route.params.id),this.loadWorkTypes()},methods:{loadWorkTypes:function(){var e=this;this.$store.commit("loading/showLoading"),Object(c["v"])().then((function(t){e.types=t.data.list,e.$store.commit("loading/hideLoading")})).catch((function(){e.$store.commit("loading/hideLoading")}))},changeQuery:function(){this.$router.replace({path:this.$route.path,query:{type:this.type_ids,areacode:this.areacode,search:this.search}}),this.beforeChange()},beforeChange:function(){this.finished=!1,this.loading=!1,this.error=!1,this.page=1,this.workers=[],this.loadWorkers()},loadWorkers:function(){var e=this;this.loading=!0,Object(c["x"])({search:this.search,type_ids:this.type_ids,areacode:this.areacode.toString(),page:this.page++,size:this.size}).then((function(t){e.workers=e.workers.concat(t.data.list),e.workers.length>=t.data.count&&(e.finished=!0),e.loading=!1})).catch((function(){e.loading=!1,e.error=!0}))},select:function(e){Object(d["a"])(["employee:worker:edit"])&&this.$router.push("/worker/".concat(e.id,"/edit"))},dispatch:function(e){var t=this;this.$store.commit("loading/showLoading"),Object(c["a"])({table_id:this.tableid,worker_id:e.id}).then((function(e){t.$router.go(-1),t.$store.commit("loading/hideLoading")})).catch((function(){t.$store.commit("loading/hideLoading")}))}}},p=f,v=n("cba8"),g=Object(v["a"])(p,o,a,!1,null,"b57650d8",null);t["default"]=g.exports},9185:function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},9259:function(e,t,n){"use strict";var i=n("9c15"),o=n("8655"),a=n("5e9e3"),r=n("2b20"),s=n("d7ab"),l=n("059d"),c=n("6326"),u=n("5311"),d=n("462a"),h=d("splice"),f=o.TypeError,p=Math.max,v=Math.min,g=9007199254740991,b="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var n,i,o,d,h,y,m=l(this),k=s(m),w=a(e,k),x=arguments.length;if(0===x?n=i=0:1===x?(n=0,i=k-w):(n=x-2,i=v(p(r(t),0),k-w)),k+n-i>g)throw f(b);for(o=c(m,i),d=0;d<i;d++)h=w+d,h in m&&u(o,d,m[h]);if(o.length=i,n<i){for(d=w;d<k-i;d++)h=d+i,y=d+n,h in m?m[y]=m[h]:delete m[y];for(d=k;d>k-i+n;d--)delete m[d-1]}else if(n>i)for(d=k-i;d>w;d--)h=d+i-1,y=d+n-1,h in m?m[y]=m[h]:delete m[y];for(d=0;d<n;d++)m[d+w]=arguments[d+2];return m.length=k-i+n,o}})},"97e1":function(e,t,n){"use strict";n("456d"),n("79be")},a03f:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.span?n("span",{on:{click:e.showSelect}},[e._v(e._s(0==e.valList.length?e.placeholder:e.valList.map((function(e){return e.name})).join(" ")))]):n("van-field",{attrs:{readonly:"",clickable:e.edit,border:e.border,label:e.label,value:e.valList.map((function(e){return e.name})).join(" "),placeholder:e.placeholder,disabled:e.disabled,"input-align":"right"},on:{click:e.showSelect}}),n("van-popup",{attrs:{round:"",position:"bottom"},model:{value:e.showPicker,callback:function(t){e.showPicker=t},expression:"showPicker"}},[n("div",{staticClass:"van-picker__toolbar"},[n("button",{staticClass:"van-picker__cancel",attrs:{type:"button"},on:{click:function(t){e.showPicker=!1}}},[e._v(" 取消 ")]),n("button",{staticClass:"van-picker__confirm",attrs:{type:"button"},on:{click:e.change}},[e._v(" 确认 ")])]),n("div",{staticStyle:{position:"relative"}},[n("van-overlay",{staticStyle:{position:"absolute"},attrs:{show:e.loading,"z-index":"1000"}},[n("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center",height:"100%"}},[n("van-loading")],1)]),e.stepShow?n("van-steps",{attrs:{direction:"vertical",active:e.list.length-1}},[e._l(e.list,(function(t,i){return n("van-step",{key:i},[n("div",{on:{click:function(n){return e.reselect(t,i)}}},[n("span",[e._v(e._s(t.name))])])])})),n("van-step",{directives:[{name:"show",rawName:"v-show",value:0==e.list.length||e.geoList.findIndex((function(t){return t==e.list[e.list.length-1].code.length}))!=e.level,expression:"\n list.length == 0 ||\n geoList.findIndex(\n (n) => n == list[list.length - 1].code.length\n ) != level\n "}]},[n("div",[n("span",[e._v("请选择")])])])],2):e._e(),n("div",{staticStyle:{position:"relative","margin-top":"0.5rem"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.list.length||e.geoList.findIndex((function(t){return t==e.list[e.list.length-1].code.length}))!=e.level,expression:"\n list.length == 0 ||\n geoList.findIndex(\n (n) => n == list[list.length - 1].code.length\n ) != level\n "}],staticClass:"index-box"},[n("van-index-bar",e._l(e.option.map((function(t){return e.pinyinFirst(t.name)[0]})).filter((function(e,t,n){return n.indexOf(e,0)===t})).sort(),(function(t,i){return n("div",{key:i},[n("van-index-anchor",{attrs:{index:t}}),e._l(e.option.filter((function(n){return e.pinyinFirst(n.name)[0]===t})),(function(t,i){return n("van-cell",{key:i,attrs:{title:t.name},on:{click:function(n){return e.select(t)}}})}))],2)})),0)],1)])],1)])],1)},o=[],a=n("7fe3"),r=(n("22f7"),n("fd61"),n("f8c2"),n("4d38"),n("c510"),n("531f"),n("9259"),n("c1d8"),n("f0e1"));function s(e){return Object(r["a"])({url:"/geo/lower"+(e?"/"+e:""),method:"get"})}function l(e){return Object(r["a"])({url:"/geo/code"+(e?"/"+e:""),method:"get"})}var c=n("6923"),u={name:"AddressCode",components:{},props:{value:{type:String,default:""},label:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1},edit:{type:Boolean,default:!0},level:{type:Number,default:4},span:{type:Boolean,default:!1}},watch:{value:{deep:!0,immediate:!0,handler:function(){var e=this;this.loading=!0,this.value?l(this.value).then((function(t){console.log(t),0!=t.data.list.length?e.lazyLoad(t.data.list[t.data.list.length-1].code,(function(t){console.log(t),e.valList=[];for(var n=e.value,i=e.$root.options,o=function(){var t=n.toString().slice(0,e.geoList[a]);if(r=i.findIndex((function(e){return e.code==t})),-1===r)return"break";e.valList.push(i[r]),i=i[r]["children"]},a=0;a<=e.geoList.findIndex((function(e){return e==n.toString().length}));a++){var r,s=o();if("break"===s)break}e.valOption=i,e.loading=!1})):e.loading=!1})).catch((function(){})):this.lazyLoad("",(function(t){e.valOption=t}))}}},data:function(){return{list:[],option:[],geoList:[2,4,6,9,12],showPicker:!1,pickerShow:!0,loading:!1,stepShow:!0,valList:[],valOption:[]}},created:function(){this.pinyinFirst=c["a"]},methods:{showSelect:function(){this.edit&&(this.list=[].concat(this.valList),this.option=this.valOption,this.showPicker=!0)},reselect:function(e,t){var n=this;this.list.splice(t,this.list.length-t),0==this.list.length?this.option=this.$root.options:this.option=this.list[this.list.length-1].children,this.stepShow=!1,this.$nextTick((function(){n.stepShow=!0}))},select:function(e){var t=this;0!=this.list.length&&this.geoList.findIndex((function(e){return e==t.list[t.list.length-1].code.toString().length}))==this.level||(this.list.push(e),this.geoList.findIndex((function(e){return e==t.list[t.list.length-1].code.toString().length}))!=this.level&&(e.children?this.option=e.children:this.lazyLoad(e.code,(function(e){t.option=e}))))},setChildren:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=this.$root.options;if(0!=o.length){for(var r=function(){var a=e.toString().slice(0,n.geoList[s]);return l=o.find((function(e){return e.code==a})),l?(o=l.children,o||s==n.geoList.findIndex((function(t){return t==e.toString().length}))?void 0:(n.lazyLoad(a,(function(){n.setChildren(e,t,i)})),{v:void 0})):{v:void 0}},s=0;s<=this.geoList.findIndex((function(t){return t==e.toString().length}));s++){var l,c=r();if("object"===Object(a["a"])(c))return c.v}this.$set(l,"children",t),i()}else this.lazyLoad("",(function(){n.setChildren(e,t,i)}))},lazyLoad:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};this.loading=!0,s(t).then((function(i){console.log(i);var o=i.data.list;t?e.setChildren(t,o,(function(){e.loading=!1,n(o)})):(e.$root.options=o,e.loading=!1,n(o))})).catch((function(){}))},change:function(){this.valList=[].concat(this.list),this.valOption=this.option,this.$emit("input",0==this.valList.length?"":this.valList[this.valList.length-1].code),this.$emit("change",0==this.valList.length?"":this.valList[this.valList.length-1].code),this.showPicker=!1}}},d=u,h=(n("0b33"),n("cba8")),f=Object(h["a"])(d,i,o,!1,null,"57f66985",null);t["a"]=f.exports},a241:function(e,t,n){"use strict";var i=n("4c02"),o=n.n(i),a=n("6da8"),r=n("32be"),s=n("c60e"),l=n("18f0"),c=n("9ec8"),u=Object(r["a"])("search"),d=u[0],h=u[1],f=u[2];function p(e,t,n,i){function r(){if(n.label||t.label)return e("div",{class:h("label")},[n.label?n.label():t.label])}function u(){if(t.showAction)return e("div",{class:h("action"),attrs:{role:"button",tabindex:"0"},on:{click:o}},[n.action?n.action():t.actionText||f("cancel")]);function o(){n.action||(Object(s["a"])(i,"input",""),Object(s["a"])(i,"cancel"))}}var d={attrs:i.data.attrs,on:Object(a["a"])({},i.listeners,{keypress:function(e){13===e.keyCode&&(Object(l["c"])(e),Object(s["a"])(i,"search",t.value)),Object(s["a"])(i,"keypress",e)}})},p=Object(s["b"])(i);return p.attrs=void 0,e("div",o()([{class:h({"show-action":t.showAction}),style:{background:t.background}},p]),[null==n.left?void 0:n.left(),e("div",{class:h("content",t.shape)},[r(),e(c["a"],o()([{attrs:{type:"search",border:!1,value:t.value,leftIcon:t.leftIcon,rightIcon:t.rightIcon,clearable:t.clearable,clearTrigger:t.clearTrigger},scopedSlots:{"left-icon":n["left-icon"],"right-icon":n["right-icon"]}},d]))]),u()])}p.props={value:String,label:String,rightIcon:String,actionText:String,background:String,showAction:Boolean,clearTrigger:String,shape:{type:String,default:"square"},clearable:{type:Boolean,default:!0},leftIcon:{type:String,default:"search"}},t["a"]=d(p)},a4c0:function(e,t,n){},c1d8:function(e,t,n){"use strict";var i=n("9c15"),o=n("9901").find,a=n("080d"),r="find",s=!0;r in[]&&Array(1)[r]((function(){s=!1})),i({target:"Array",proto:!0,forced:s},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a(r)},ccee:function(e,t,n){"use strict";var i=n("6805"),o=n("cf8e"),a=n("d748"),r=n("458e"),s=n("9185"),l=n("ffb3"),c=n("3ea3"),u=n("9fee");o("search",(function(e,t,n){return[function(t){var n=r(this),o=void 0==t?void 0:c(t,e);return o?i(o,t,n):new RegExp(t)[e](l(n))},function(e){var i=a(this),o=l(e),r=n(t,i,o);if(r.done)return r.value;var c=i.lastIndex;s(c,0)||(i.lastIndex=0);var d=u(i,o);return s(i.lastIndex,c)||(i.lastIndex=c),null===d?-1:d.index}]}))},cfa2:function(e,t,n){}}]);
|