java-mall-app/unpackage/dist/build/mp-weixin/seller/product/save.js
2025-12-12 17:04:03 +08:00

1 line
5.0 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["seller/product/save"],{"0038":function(t,e,n){"use strict";var i=n("e53e"),o=n.n(i);o.a},"053d":function(t,e,n){"use strict";n.r(e);var i=n("2417"),o=n.n(i);for(var u in i)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=o.a},"20b9":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}));var i={uniNumberBox:function(){return n.e("components/uni-number-box/uni-number-box").then(n.bind(null,"2fde"))}},o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.product_uniqid.length),i=n>0?t.sprintf(t.__("商品名称: %s"),t.product_name):null,o=n>0?t.__map(t.product_uniqid,(function(e,n){var i=t.__get_orig(e),o=t.__("库存");return{$orig:i,m1:o}})):null,u=n>0?t.__("确定"):null;t.$mp.data=Object.assign({},{$root:{g0:n,m0:i,l0:o,m2:u}})},u=[]},2417:function(t,e,n){"use strict";var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,u=i(n("7ca3")),r=n("8f59");function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){(0,u.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var s=(o={data:function(){return{scrollTop:0,search_name:"",page:1,rows:10,productlist:[],ispage:!0,flag:!0,type:0,item_quantity:0,itemInfo:[],index:0,product_id:0,product_uniqid:[],product_name:"",product_image:"",items:[],num:0}},computed:(0,r.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin"]),components:{uniNumberBox:function(){n.e("components/uni-number-box/uni-number-box").then(function(){return resolve(n("2fde"))}.bind(null,n)).catch(n.oe)},uniDrawer:function(){n.e("components/uni-drawer/uni-drawer").then(function(){return resolve(n("efd5"))}.bind(null,n)).catch(n.oe)},uniList:function(){n.e("components/uni-list/uni-list").then(function(){return resolve(n("14fd"))}.bind(null,n)).catch(n.oe)},uniListItem:function(){n.e("components/uni-list-item/uni-list-item").then(function(){return resolve(n("5627"))}.bind(null,n)).catch(n.oe)},uniBadge:function(){n.e("components/uni-badge").then(function(){return resolve(n("9bed"))}.bind(null,n)).catch(n.oe)}}},(0,u.default)(o,"computed",(0,r.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin"])),(0,u.default)(o,"onLoad",(function(t){this.setData({product_id:t.id,productlist:[],type:t.type?t.type:0,product_state_id:t.type?t.type:1001}),this.getProductlist()})),(0,u.default)(o,"onUnload",(function(){})),(0,u.default)(o,"methods",a(a({},(0,r.mapMutations)(["login","logout","getPlantformInfo","forceUserInfo","getUserInfo"])),{},{getProductlist:function(){var t=this,e={product_id:t.product_id};t.$.request({url:this.Config.URL.product.item,data:e,success:function(e,n,i,o){if(200==n)for(var u in t.setData({product_name:e.item_row.product_name,product_image:e.item_row.product_image}),e.item_row.product_uniqid)t.product_uniqid.push(e.item_row.product_uniqid[u])}})},saveQuantity:function(){var t=this,e={product_id:t.product_id,product_items:JSON.stringify(t.items)};t.$.request({url:t.Config.URL.seller.edit_quantity,method:"POST",data:e,success:function(e,n,i,o){200==n?t.$.alert(t.__("修改成功!"),(function(){setTimeout((function(){t.product_uniqid=[],t.getProductlist()}),1e3)})):t.$.alert(t.__("修改失败"))}})},scrollbottom:function(){if(this.flag){var t=this;t.setData({flag:!1}),clearTimeout(e);var e=setTimeout((function(){t.setData({state_type:t.type,flag:!1,page:parseInt(t.page)+1,rows:10}),t.getProductlist()}),100)}},changes:function(t,e,n){if(this.items[e]){var i=this.items[e].item_unit_price;this.items[e]={item_unit_price:i,item_quantity:t,item_id:n}}else this.items[e]={item_unit_price:this.product_uniqid[1],item_quantity:t,item_id:n}},changeprice:function(t,e,n){if(this.items[e]){var i=this.items[e].item_quantity;this.items[e]={item_unit_price:t,item_quantity:i,item_id:n}}else this.items[e]={item_unit_price:t,item_quantity:this.product_uniqid[4],item_id:n}}})),o);e.default=s},9989:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("ec76");i(n("3240"));var o=i(n("d602"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},d602:function(t,e,n){"use strict";n.r(e);var i=n("20b9"),o=n("053d");for(var u in o)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(u);n("0038");var r=n("828b"),c=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=c.exports},e53e:function(t,e,n){t.exports={theme_bg:"#f30213"}}},[["9989","common/runtime","common/vendor"]]]);