(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["showGoodsForm-form-index"],{"0d54":function(t,e,n){"use strict";n.r(e);var i=n("34b5"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},"123e":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 1==t.shenheStatus&&t.shenheAliStatus?1==t.shenheStatus?n("Shenhe"):t._e():n("v-uni-view",{staticClass:"page"},[t.form?n("v-uni-view",{staticClass:"content"},[n("v-uni-view",{staticClass:"title"},[t._v(t._s(t.form.name))]),n("toolsForm",{ref:"form",attrs:{form:t.form,disabled:t.disabled},on:{"update:form":function(e){arguments[0]=e=t.$handleEvent(e),t.form=e}}}),t.disabled?t._e():n("v-uni-view",{staticClass:"submit safe-area-inset-bottom",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"m-btn"},[t._v("确认提交")])],1)],1):t._e()],1)},a=[]},1462:function(t,e,n){"use strict";n.r(e);var i=n("123e"),a=n("0d54");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("3f80");var r=n("828b"),s=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"4e14be17",null,!1,i["a"],void 0);e["default"]=s.exports},"33ca":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-4e14be17] .u-form-item--right__content__slot > uni-view,[data-v-4e14be17] .u-form-item--right__content__slot > div,[data-v-4e14be17] .u-form-item--right__content__slot > span,[data-v-4e14be17] .u-form-item--right__content__slot > uni-text{width:100%}.page[data-v-4e14be17]{background:#f2f2f2;padding:%?24?%;min-height:100vh}.content[data-v-4e14be17]{margin-bottom:%?180?%;padding:0 %?24?% %?24?%;border-radius:10px;background:#fff}.content .title[data-v-4e14be17]{padding:%?24?% 0;font-size:%?32?%;color:#262626;border-bottom:1px solid #efefef}.submit[data-v-4e14be17]{position:fixed;left:0;right:0;bottom:0;background:#fff}.submit .m-btn[data-v-4e14be17]{margin:%?10?% %?36?%;height:%?80?%;background:#f0250e;border-radius:32px;text-align:center;color:#fff;font-size:%?32?%;line-height:%?80?%}',""]),t.exports=e},"34b5":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("bf0f"),n("2797"),n("d4b5");var a=i(n("2634")),o=i(n("2fdc")),r=i(n("2ba3")),s=i(n("4380")),d={components:{Shenhe:r.default,toolsForm:s.default},data:function(){return{goods_id:"",form:null,disabled:!1}},onLoad:function(t){var e=this;return(0,o.default)((0,a.default)().mark((function n(){var i,o;return(0,a.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!t.disabled){n.next=7;break}return n.next=3,e.$allrequest.goods.formDataInfo({id:t.id});case 3:return i=n.sent,e.form=i.data.form,e.disabled=!0,n.abrupt("return");case 7:return t.goods_id&&(e.goods_id=t.goods_id),n.next=10,e.$allrequest.goods.formInfo({goods_id:e.goods_id});case 10:o=n.sent,o.code||(e.form=o.data,e.form.list.length||e.$utils.showModal("提示","当前商品未开启表单提交功能",!1,(function(){uni.navigateBack()}),(function(){})),e.form.is_form||(e.disabled=!0));case 12:case"end":return n.stop()}}),n)})))()},methods:{submit:function(){var t=this;this.$u.throttle((0,o.default)((0,a.default)().mark((function e(){var n;return(0,a.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.form.list.forEach((function(t){if(1==t.required&&0==t.default.length)throw t.tip;"checkbox"==t.type&&Array.isArray(t.default)&&(t.default=t.default.join(","))})),e.next=4,t.$allrequest.goods.formDataSave({goods_id:t.goods_id,form:JSON.stringify(t.form)},!0);case 4:if(n=e.sent,n.code){e.next=8;break}return t.$utils.showModal("提示","提交成功",!1,(function(){t.$utils.toUrl("/showGoodsForm/result/index","redirectTo")})),e.abrupt("return");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](0),t.$utils.toast(e.t0||"请完善表单必填项");case 13:case"end":return e.stop()}}),e,null,[[0,10]])}))),500)}}};e.default=d},"3f80":function(t,e,n){"use strict";var i=n("d73b"),a=n.n(i);a.a},4380:function(t,e,n){"use strict";n.r(e);var i=n("ec3d"),a=n("78766");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("f86b2");var r=n("828b"),s=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"825eb468",null,!1,i["a"],void 0);e["default"]=s.exports},78766:function(t,e,n){"use strict";n.r(e);var i=n("c742"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},a319:function(t,e,n){var i=n("df4e");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("204f32ed",i,!0,{sourceMap:!1,shadowMode:!1})},c742:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("aa77"),n("bf0f"),n("2797"),n("5ef2"),n("d4b5");var a=i(n("be91")),o={components:{toolsFile:a.default},props:{disabled:{type:Boolean,default:!1},form:{type:Object,default:function(){return{list:[],name:"",is_form:1}}}},computed:{getFileList:function(){return function(t){return t?[{url:t}]:[]}}},data:function(){return{newForm:{list:[]}}},methods:{changeBlur:function(t,e){var n=this,i=t.detail.value,a=this.newForm.list.find((function(t){return t.id===e}));this.$nextTick((function(){n.$set(a,"default",i),n.changeValueCallBack()}))},fileSuccess:function(t,e){var n=this,i=this.newForm.list.find((function(t){return t.id===e}));this.$nextTick((function(){n.$set(i,"default",t),n.changeValueCallBack()}))},fileRemove:function(t){var e=this,n=this.newForm.list.find((function(e){return e.id===t}));this.$nextTick((function(){e.$set(n,"default",""),e.changeValueCallBack()}))},changePicker:function(t,e){var n=this,i=t.detail.value,a=this.newForm.list.find((function(t){return t.id===e}));this.$nextTick((function(){n.$set(a,"default",i),n.changeValueCallBack()}))},changeGroup:function(t,e){var n=this,i=t.detail.value,a=this.newForm.list.find((function(t){return t.id===e}));"radio"===a.type?this.$nextTick((function(){a.default=i,a.default_list.forEach((function(t){t.checked=!1,t.name===i&&(t.checked=!0)})),n.changeValueCallBack()})):this.$nextTick((function(){a.default=i.join(","),a.default_list.forEach((function(t){-1!==i.indexOf(t.name)?t.checked=!0:t.checked=!1})),n.changeValueCallBack()}))},changeValueCallBack:function(){this.$emit("update:form",this.newForm)}},options:{styleIsolation:"shared"},mounted:function(){this.newForm=JSON.parse(JSON.stringify(this.form))}};e.default=o},d73b:function(t,e,n){var i=n("33ca");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("a4b125c0",i,!0,{sourceMap:!1,shadowMode:!1})},df4e:function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-825eb468] .u-form-item--right__content__slot > uni-view,[data-v-825eb468] .u-form-item--right__content__slot > div,[data-v-825eb468] .u-form-item--right__content__slot > span,[data-v-825eb468] .u-form-item--right__content__slot > uni-text{width:100%}.toolsForm .label[data-v-825eb468]{padding:%?48?% 0 %?24?%;font-size:%?30?%}.toolsForm .label .ts[data-v-825eb468]{margin-right:%?5?%;color:red}.tools[data-v-825eb468]{flex:1;overflow:hidden}.tools uni-input[data-v-825eb468],\n.tools uni-picker[data-v-825eb468],\n.tools .picker[data-v-825eb468]{line-height:%?80?%;height:%?80?%;box-sizing:border-box}.tools .icon-arrow-right[data-v-825eb468]{font-size:%?24?%;color:#cdcdcd}.tools uni-input[data-v-825eb468],\n.tools uni-picker[data-v-825eb468],\n.tools uni-textarea[data-v-825eb468]{width:100%;font-size:%?30?%;background:#f8f8f8;border-radius:%?10?%;border:%?2?% solid #efefef;padding:0 %?24?%}.tools .picker[data-v-825eb468]{display:flex;justify-content:space-between;width:100%;font-size:%?30?%}.tools uni-textarea[data-v-825eb468]{padding:%?25?%;height:%?184?%}.textRig[data-v-825eb468]{padding-top:%?5?%}.textRig uni-label[data-v-825eb468]{display:flex;align-items:center;margin:%?10?% 0 0 %?10?%}.tools[data-v-825eb468] .uni-radio-input{border-radius:50%}.tools[data-v-825eb468] .uni-checkbox-input,\n.tools[data-v-825eb468] .uni-radio-input{-webkit-transform:scale(.7);transform:scale(.7)}.tools[data-v-825eb468] uni-radio .uni-radio-input{margin-right:0}.tools[data-v-825eb468] .uni-checkbox-input-checked,\n.tools[data-v-825eb468] .uni-radio-input-checked{border-color:#f0250e!important;background:#f0250e!important;color:#fff!important}.readonly[data-v-825eb468]{padding:%?20?% 0 0}',""]),t.exports=e},ec3d:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.form?n("v-uni-view",{staticClass:"toolsForm"},t._l(t.newForm.list,(function(e){return n("v-uni-view",{key:e.id,staticClass:"item"},[n("v-uni-view",{staticClass:"label"},["1"==e.required?n("v-uni-text",{staticClass:"ts"},[t._v("*")]):t._e(),t._v(t._s(e.name))],1),n("v-uni-view",{staticClass:"tools"},["text"===e.type?n("v-uni-view",{staticClass:"inp"},[n("v-uni-input",{attrs:{disabled:t.disabled,type:"text",placeholder:e.tip},on:{blur:function(n){arguments[0]=n=t.$handleEvent(n),function(n){return t.changeBlur(n,e.id)}.apply(void 0,arguments)}},model:{value:e.default,callback:function(n){t.$set(e,"default","string"===typeof n?n.trim():n)},expression:"item.default"}})],1):t._e(),"textarea"===e.type?n("v-uni-view",{staticClass:"inp"},[n("v-uni-textarea",{attrs:{disabled:t.disabled,placeholder:e.tip},on:{blur:function(n){arguments[0]=n=t.$handleEvent(n),function(n){return t.changeBlur(n,e.id)}.apply(void 0,arguments)}},model:{value:e.default,callback:function(n){t.$set(e,"default","string"===typeof n?n.trim():n)},expression:"item.default"}})],1):t._e(),"time"===e.type?n("v-uni-view",{staticClass:"inp"},[n("v-uni-picker",{attrs:{disabled:t.disabled,value:e.default,mode:"time"},on:{change:function(n){arguments[0]=n=t.$handleEvent(n),function(n){return t.changePicker(n,e.id)}.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"picker"},[n("v-uni-view",[t._v(t._s(e.default||e.tip))]),t.disabled?t._e():n("v-uni-text",{staticClass:"iconfont icon-arrow-right"})],1)],1)],1):t._e(),"date"===e.type?n("v-uni-view",{staticClass:"inp"},[n("v-uni-picker",{attrs:{disabled:t.disabled,value:e.default,mode:"date"},on:{change:function(n){arguments[0]=n=t.$handleEvent(n),function(n){return t.changePicker(n,e.id)}.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"picker"},[n("v-uni-view",[t._v(t._s(e.default||e.tip))]),t.disabled?t._e():n("v-uni-text",{staticClass:"iconfont icon-arrow-right"})],1)],1)],1):t._e(),"uploadImg"===e.type?n("v-uni-view",{staticClass:"inp tr"},[n("toolsFile",{attrs:{disabled:t.disabled,fileList:t.getFileList(e.default),max:1},on:{success:function(n){arguments[0]=n=t.$handleEvent(n),function(n){return t.fileSuccess(n,e.id)}.apply(void 0,arguments)},remove:function(n){arguments[0]=n=t.$handleEvent(n),t.fileRemove(e.id)}}})],1):t._e(),"radio"===e.type?n("v-uni-view",{staticClass:"inp"},[n("v-uni-radio-group",{staticClass:"textRig",on:{change:function(n){arguments[0]=n=t.$handleEvent(n),function(n){return t.changeGroup(n,e.id)}.apply(void 0,arguments)}}},t._l(e.default_list,(function(e){return n("v-uni-label",{key:e.name},[n("v-uni-radio",{attrs:{value:e.name,checked:e.checked,disabled:t.disabled}}),n("v-uni-text",[t._v(t._s(e.name))])],1)})),1)],1):t._e(),"checkbox"===e.type?n("v-uni-view",{staticClass:"inp"},[n("v-uni-checkbox-group",{staticClass:"textRig",on:{change:function(n){arguments[0]=n=t.$handleEvent(n),function(n){return t.changeGroup(n,e.id)}.apply(void 0,arguments)}}},t._l(e.default_list,(function(e){return n("v-uni-label",{key:e.name},[n("v-uni-checkbox",{attrs:{value:e.name,checked:e.checked,disabled:t.disabled}}),n("v-uni-text",[t._v(t._s(e.name))])],1)})),1)],1):t._e()],1)],1)})),1):t._e()},a=[]},f86b2:function(t,e,n){"use strict";var i=n("a319"),a=n.n(i);a.a}}]);