(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-supply-product-assemble-product-edit"],{"4d57":function(t,e,s){"use strict";(function(t){s("acd8"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={components:{},data:function(){return{loadding:!0,form:{},model:{},sku:{}}},onLoad:function(t){this.assemble_product_id=t.assemble_product_id?t.assemble_product_id:0},onShow:function(){},mounted:function(){this.getData()},methods:{getData:function(){var e=this,s=e.assemble_product_id;uni.showLoading({title:"加载中"}),e._get("plus.supply.assemble/edit",{assemble_product_id:s},(function(s){t("log",s," at pages/supply/product/assemble/product/edit.vue:91"),e.form=s.data.detail,e.sku=s.data.detail.assembleSku[0].productSku,t("log",e.sku," at pages/supply/product/assemble/product/edit.vue:94"),uni.hideLoading()}))},alert:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";uni.showToast({title:t,duration:1e3,icon:"none"})},formSubmit:function(t){var e=this,s=e.form,i={assemble_product_id:e.assemble_product_id};return i.product_data=JSON.stringify(s),0==s.assemble_price?(e.alert("请输入拼团价"),!1):s.assemble_price<parseFloat(e.sku.product_supply_price)?(e.alert("拼团价不能低于供货价"),!1):0==s.stock?(e.alert("请输入拼团库存"),!1):0==s.assemble_num?(e.alert("请输入开团人数"),!1):0==s.limit_num?(e.alert("请输入限购数量"),!1):(uni.showLoading({title:"正在提交",mask:!0}),void e._post("plus.supply.assemble/edit",i,(function(t){uni.hideLoading(),uni.showModal({title:"提示",content:t.msg,showCancel:!1,success:function(){uni.redirectTo({url:"/pages/supply/product/assemble/product?assemble_activity_id="+s.assemble_activity_id})}})})))}}};e.default=i}).call(this,s("0de9")["log"])},"670b":function(t,e,s){"use strict";var i;s.d(e,"b",(function(){return a})),s.d(e,"c",(function(){return n})),s.d(e,"a",(function(){return i}));var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-uni-view",{staticClass:" pb100"},[s("v-uni-form",{on:{submit:function(e){arguments[0]=e=t.$handleEvent(e),t.formSubmit.apply(void 0,arguments)},reset:function(e){arguments[0]=e=t.$handleEvent(e),t.formReset.apply(void 0,arguments)}}},[s("v-uni-view",{staticClass:"bg-white p-0-30 f30"},[s("v-uni-view",{staticClass:"d-s-c border-b-e"},[s("v-uni-text",{staticClass:"key-name"},[t._v("商品名：")]),s("v-uni-view",{staticClass:"p-30-0"},[t._v(t._s(t.form.product.product_name))])],1),s("v-uni-view",{staticClass:"d-s-c border-b-e"},[s("v-uni-text",{staticClass:"key-name"},[t._v("图片：")]),s("v-uni-view",{staticClass:"upload-list d-s-c"},[s("v-uni-view",{staticClass:"item"},[s("v-uni-image",{attrs:{src:t.form.product.image[0].file_path,mode:"aspectFit"}})],1)],1)],1),s("v-uni-view",{staticClass:"d-s-c border-b-e"},[s("v-uni-text",{staticClass:"key-name"},[t._v("拼团价：")]),s("v-uni-input",{staticClass:"ml20 flex-1 p-30-0",attrs:{name:"assemble_price",type:"text",placeholder:"请输入"},model:{value:t.form.assemble_price,callback:function(e){t.$set(t.form,"assemble_price",e)},expression:"form.assemble_price"}})],1),s("v-uni-view",{staticClass:"d-s-c border-b-e"},[s("v-uni-text",{staticClass:"key-name"},[t._v("拼团库存：")]),s("v-uni-input",{staticClass:"ml20 flex-1 p-30-0",attrs:{name:"stock",type:"text",placeholder:"请输入"},model:{value:t.form.stock,callback:function(e){t.$set(t.form,"stock",e)},expression:"form.stock"}})],1),s("v-uni-view",{staticClass:"d-s-c border-b-e"},[s("v-uni-text",{staticClass:"key-name"},[t._v("开团人数：")]),s("v-uni-input",{staticClass:"ml20 flex-1 p-30-0",attrs:{name:"assemble_num",type:"text",placeholder:"请输入"},model:{value:t.form.assemble_num,callback:function(e){t.$set(t.form,"assemble_num",e)},expression:"form.assemble_num"}})],1),s("v-uni-view",{staticClass:"d-s-c border-b-e"},[s("v-uni-text",{staticClass:"key-name"},[t._v("限购数量：")]),s("v-uni-input",{staticClass:"ml20 flex-1 p-30-0",attrs:{name:"limit_num",type:"text",placeholder:"请输入"},model:{value:t.form.limit_num,callback:function(e){t.$set(t.form,"limit_num",e)},expression:"form.limit_num"}})],1),s("v-uni-view",{staticClass:"d-s-c border-b-e"},[s("v-uni-text",{staticClass:"key-name"},[t._v("销售价：")]),s("v-uni-view",{staticClass:"p-30-0"},[t._v(t._s(t.form.line_price))])],1),s("v-uni-view",{staticClass:"d-s-c border-b-e"},[s("v-uni-text",{staticClass:"key-name"},[t._v("供货价：")]),s("v-uni-view",{staticClass:"p-30-0"},[t._v(t._s(t.sku.product_supply_price))])],1)],1),s("v-uni-view",{staticClass:"p30"},[s("v-uni-button",{staticClass:"btn-red f30 mt30",attrs:{"form-type":"submit",type:"default"}},[t._v("确定")])],1)],1)],1)},n=[]},a48a:function(t,e,s){"use strict";s.r(e);var i=s("670b"),a=s("a95e");for(var n in a)"default"!==n&&function(t){s.d(e,t,(function(){return a[t]}))}(n);var u,l=s("f0c5"),o=Object(l["a"])(a["default"],i["b"],i["c"],!1,null,"abff6680",null,!1,i["a"],u);e["default"]=o.exports},a95e:function(t,e,s){"use strict";s.r(e);var i=s("4d57"),a=s.n(i);for(var n in i)"default"!==n&&function(t){s.d(e,t,(function(){return i[t]}))}(n);e["default"]=a.a}}]);