1 line
46 KiB
JavaScript
1 line
46 KiB
JavaScript
![]() |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-commissionedSales-addDelegation-index"],{"1cd3":function(t,e,i){"use strict";i.r(e);var n=i("c144"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},"21d8":function(t,e,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("a434"),i("ac1f"),i("14d9"),i("d3b7"),i("159b"),i("c740"),i("13d5");var a=n(i("d359")),o=n(i("5492")),r=i("5600"),s=i("26cb"),c={props:{checkedObj:{type:Array,default:[]}},computed:(0,s.mapGetters)(["viewColor"]),components:{Loading:a.default,subtractive:o.default},data:function(){return{isActive:0,loadedb:!1,loadingb:!1,loadedc:!1,loadingc:!1,loadeds:!1,loadings:!1,whereb:{page:1,limit:10,keyword:""},peicenumber:0,searchVal:"",checked:[],list:[],bought:[],checkedArr:[],aryys:[],storageCustomList:[{CustGoodsCode:"TEST001",CustGoodsName:"测试货主001",IfBoxId:0,IfProductId:0},{CustGoodsCode:"TEST002",CustGoodsName:"测试货主002",IfBoxId:0,IfProductId:0},{CustGoodsCode:"TEST003",CustGoodsName:"测试货主003",IfBoxId:0,IfProductId:0}],index:0,pickerData:"请选择",itstock:""}},watch:{checkedObj:{handler:function(t){this.checkedArr=t},deep:!0}},mounted:function(){this.checkedArr=this.checkedObj,this.aryys=this.checkedObj,this.getBounht()},methods:{producrprice:function(t,e,i){for(var n in this.bought[e].price=t.detail.value,this.$set(i,"check",!1),this.checkedArr)this.checkedArr[n].product_id==i.product_id&&this.checkedArr.splice(n,1)},incrementTotal:function(t,e,i){for(var n in this.$set(i,"check",!1),this.checkedArr)this.checkedArr[n].product_id==i.product_id&&this.checkedArr.splice(n,1)},bindPickerChange:function(t,e,i){this.bought[i].attrValue[this.index].sku=e[t.detail.value].sku,this.bought[i].attrValue[this.index].stock=e[t.detail.value].stock,this.bought[i].product_attr_unique=e[t.detail.value].unique,this.pickerData=e[this.index],0==this.bought[i].attrValue[this.index].stock&&this.$util.Tips({title:"库存不足"})},close:function(){this.$emit("close")},numberChange:function(t,e){this.peicenumber=t.number,this.bought[e].number=t.number},tabs:function(t){this.isActive=t,this.$set(this.whereb,"keyword",""),this.searchVal="",this.searchBut()},onTouchmove:function(t){var e=this;if(!this.loadendb&&!this.loadingb){var i=uni.createSelectorQuery().in(this);i.select("#goods").boundingClientRect((function(t){t.bottom<1500&&t.top<0&&e.getBounht()})).exec()}},setValue:function(t){this.$set(this.whereb,"keyword",t.detail.value),t.detail.value||(this.whereb.page=1,this.loadedb=!1,this.getBounht())},searchBut:function(){this.bought=[],this.whereb.page=1,this.loadedb=!1,this.getBounht()},getBounht:function(){var t=this;t.loadingb||t.loadedb||(t.loadingb=!0,(0,r.getCommunitygetOrderList)(t.whereb).then((function(e){t.loadingb=!1,t.loadedb=e.data.list.length<t.whereb.limit,t.bought.push.apply(t.bought,e.data.list),t.whereb.page=t.whereb.page+1,t.getInitchecked(t.bought)}),(function(e){t.$util.Tips({title:e.msg})})))},getInitchecked:function(t){var e=this;t.forEach((function(t,i){e.$set(t,"check",!1),e.checkedArr.forEach((function(i,n){t.product_id==i.product_id&&(e.$set(t,"check",!0),e.$set(t,"number",i.number),e.$set(t,"price",i.price),e.peicenumber=i.number)}))}))},getCheckedGoods:function(){var t=this;this.checked=[],this.checkedArr.forEach((function(e,i){t.checkedArr.push(e)}))},goodsCheck:function(t){this.$set(t,"check",!t.check),t.check?(0==this.peicenumber&&(t.number=1),t.product_attr_unique||(t.product_attr_unique=t.attrValue[0].unique),this.checkedArr.push(t),this.arrayUnique(this.checkedArr,"product_id")):this.checkedArr.splice(this.checkedArr.findIndex((function(e){return e.product_id==t.product_id})),1)},arrayUnique:function(t,e){var i={},n=t.reduce((function(t,n,a){return i[n[e]]?t.splice(i[n[e]]["index"],1,n):(i[n[e]]={index:t.length},t.push(n)),t}),[]);this.checkedArr=n},submit:function(){this.$emit("getProduct",this.checkedArr)}}};e.default=c},"246d":function(t,e,i){"use strict";i.d(e,"b",(fun
|