require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/admin/writeOffCard/index"],{"277d":function(t,i,n){"use strict";n.r(i);var u=n("8b98"),r=n.n(u);for(var s in u)["default"].indexOf(s)<0&&function(t){n.d(i,t,(function(){return u[t]}))}(s);i["default"]=r.a},5043:function(t,i,n){"use strict";n.d(i,"b",(function(){return u})),n.d(i,"c",(function(){return r})),n.d(i,"a",(function(){}));var u=function(){var t=this.$createElement,i=(this._self._c,this.recordList.length),n=this.list.cart_info&&this.list.cart_info[0].surplus_num&&this.hasKefuAuth("kefu-order-writeoff-submit");this.$mp.data=Object.assign({},{$root:{g0:i,m0:n}})},r=[]},"8b98":function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var u=n("6af6"),r={data:function(){return{list:{},recordList:[],lists:{},checkModel:[],nums:[],auth:1,id:0}},watch:{checkModel:function(){this.lengt==this.checkModel.length?this.checked=!0:this.checked=!1}},onLoad:function(t){this.checkKefuAuth("kefu-order-writeoff-submit")&&(this.auth=t.auth||1,this.id=t.id,this.getCartList(),this.orderWirteOffRecords())},methods:{numInput:function(t){var i=this,n=t.detail.value;n&&(n=Number(n),this.$nextTick((function(){n>i.list.cart_info[0].surplus_num?i.list.cart_info[0].surplus_num_input=i.list.cart_info[0].surplus_num:n<1&&(i.list.cart_info[0].surplus_num_input=1)})))},numBlur:function(t){var i=this,n=t.detail.value;n||this.$nextTick((function(){i.list.cart_info[0].surplus_num_input=1}))},orderWirteOffRecords:function(){var t=this;this.checkKefuAuth("kefu-order-writeoff-submit")&&(0,u.orderWirteOffRecords)(this.id,{product_type:4}).then((function(i){t.recordList=i.data.list}))},num:function(){for(var t=0;t<this.lists.cart_info.length;t++)this.nums.push({num:0})},getCartList:function(){var t=this;this.checkKefuAuth("kefu-order-writeoff-submit")&&(0,u.orderCartInfo)({oid:this.id,auth:this.auth}).then((function(i){for(var n=i.data,u=0;u<n.cart_info.length;u++)n.cart_info[u].surplus_num_input=1;t.list=i.data,t.lists=JSON.parse(JSON.stringify(i.data)),t.listlet=i.data.cart_info.length,t.$set(t.attr,"id",t.list.id),t.num()})).catch((function(i){t.$util.Tips({title:i})}))},subCart:function(t,i){this.list.cart_info[i].surplus_num_input--},addCart:function(t,i){this.list.cart_info[i].surplus_num_input++},verification:function(){var t=this;if(this.checkKefuAuth("kefu-order-writeoff-submit")){for(var i=[],n=0;n<this.list.cart_info.length;n++)i.push({cart_id:this.list.cart_info[n].cart_id,cart_num:this.list.cart_info[n].surplus_num_input});(0,u.orderWriteoff)({auth:this.auth,oid:this.id,cart_ids:i}).then((function(i){t.$util.Tips({title:i.msg},(function(){t.orderWirteOffRecords()})),t.list.cart_info[0].surplus_num=t.list.cart_info[0].surplus_num-t.list.cart_info[0].surplus_num_input})).catch((function(i){t.$util.Tips({title:i})}))}}}};i.default=r},"8c55":function(t,i,n){"use strict";var u=n("e006"),r=n.n(u);r.a},aac5:function(t,i,n){"use strict";n.r(i);var u=n("5043"),r=n("277d");for(var s in r)["default"].indexOf(s)<0&&function(t){n.d(i,t,(function(){return r[t]}))}(s);n("8c55");var e=n("828b"),c=Object(e["a"])(r["default"],u["b"],u["c"],!1,null,"3a23f009",null,!1,u["a"],void 0);i["default"]=c.exports},ab0c:function(t,i,n){"use strict";(function(t,i){var u=n("47a9");n("f076");u(n("3240"));var r=u(n("aac5"));t.__webpack_require_UNI_MP_PLUGIN__=n,i(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},e006:function(t,i,n){}},[["ab0c","common/runtime","common/vendor"]]]);