1 line
3.8 KiB
JavaScript
1 line
3.8 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/workreport/createWork"],{6058:function(e,t,n){"use strict";var i=n("7f37"),a=n.n(i);a.a},"6ca1":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=n("dc92"),o=n("0c59"),r=n("8683"),c={mixins:[r.commonF],components:{formItem:function(){Promise.all([n.e("common/vendor"),n.e("components/form/formitem")]).then(function(){return resolve(n("d7bf"))}.bind(null,n)).catch(n.oe)}},data:function(){return{BASE_IMG_URL:o.BASE_IMG_URL,noClick:!0,info:{},listForm:[],remindPeople:[],remindType:"approval",typeList:[{id:1,name:"日报",value:"daily"},{id:2,name:"周报",value:"weekly"},{id:3,name:"月报",value:"monthly"},{id:4,name:"季报",value:"quarterly"},{id:5,name:"年报",value:"yearly"}],typeIndex:0,typename:"日报",isRequired:!1}},onLoad:function(e){var t=this;1==e.type?(this.typename="日报",this.typeIndex=0):2==e.type?(this.typename="周报",this.typeIndex=1):3==e.type?(this.typename="月报",this.typeIndex=2):4==e.type?(this.typename="季报",this.typeIndex=3):5==e.type&&(this.typename="年报",this.typeIndex=4),this.getForm(),i=setInterval((function(){t.subSaveDraft()}),3e4)},onShow:function(){e.getStorageInfoSync("isJumpPage")||this.getDetail()},onUnload:function(){clearInterval(i),e.removeStorageSync("remindlist")},methods:{changeRequired:function(e){this.isRequired=e.detail.value},changeType:function(e){this.typeIndex=e.detail.value,this.getForm()},moreClick:function(){this.subSaveDraft(),e.navigateTo({url:"/pagesA/crm/selectMember/selectMember"})},getForm:function(){var e=this,t={type:this.typeList[this.typeIndex].value};(0,a.netSetForm)(t).then((function(t){e.listForm=t.data.data}))},changeData:function(e,t,n){var i=this,a=this.listForm;a.forEach((function(e,a){e.id==n.id&&(e.value=t,i.$set(i.listForm,a,e))}))},subSave:function(){var t=this.checkCommonForm(this.listForm);if(t){var n=[];this.remindPeople.forEach((function(e){n.push(e.id)})),t.reminds_id=n.join(","),t.type=this.typename,(0,a.netCreateWork)(t).then((function(t){e.showToast({title:t.msg,icon:"none"}),setTimeout((function(){e.navigateBack({delta:1})}),2e3)}))}},subSaveDraft:function(){var e=this.checkCommonForm(this.listForm);if(e){var t=[];this.remindPeople.forEach((function(e){t.push(e.id)})),e.reminds_id=t.join(","),e.type=this.typename,(0,a.netCreateStraf)(e).then((function(e){}))}},getDetail:function(){var e=this;(0,a.netWorkDraftDetail)({type:this.typename}).then((function(t){t.data&&(e.info=t.data,t.data.type_index&&(e.typeIndex=t.data.type_index),e.getForminfo())}))},getForminfo:function(){var e=this,t={type:this.typeList[this.typeIndex].value};(0,a.netSetForm)(t).then((function(t){t=t.data.data,t&&(e.listForm=[]),t.forEach((function(t){"type"!=t.id&&(t.value=e.info[t.id],e.listForm.push(t))}))}))}}};t.default=c}).call(this,n("543d")["default"])},7355:function(e,t,n){"use strict";(function(e,t){var i=n("4ea4");n("8886");i(n("66fd"));var a=i(n("bde4"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"7f37":function(e,t,n){},b6c6:function(e,t,n){"use strict";n.r(t);var i=n("6ca1"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=a.a},bde4:function(e,t,n){"use strict";n.r(t);var i=n("d800"),a=n("b6c6");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("6058");var r=n("f0c5"),c=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"0e3e910c",null,!1,i["a"],void 0);t["default"]=c.exports},d800:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var i=function(){var e=this.$createElement;this._self._c},a=[]}},[["7355","common/runtime","common/vendor"]]]); |