crm_second_opening_mini/pagesA/work/approve/createForm.js

1 line
3.9 KiB
JavaScript
Raw Permalink Normal View History

2023-03-13 01:13:08 +00:00
require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/work/approve/createForm"],{"1ede":function(e,t,n){"use strict";(function(e){var i=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n("448a")),a=n("dc92"),r=n("0c59"),c=n("4de3"),s={mixins:[c.commonJS],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)},fixedApproval:function(){n.e("components/fixedApproval").then(function(){return resolve(n("d3f7"))}.bind(null,n)).catch(n.oe)}},data:function(){return{BASE_IMG_URL:r.BASE_IMG_URL,noClick:!0,id:"",listForm:[],remindPeople:[],copyList:[],approvalPro:{},isRequired:!1}},onLoad:function(t){this.id=t.id,e.setNavigationBarTitle({title:t.name}),this.getForm()},onShow:function(){this.getProcess()},onUnload:function(){e.removeStorageSync("remindlist")},methods:{changeRequired:function(e){this.isRequired=e.detail.value},getProcess:function(){var e=this;(0,a.netApprovalProcess)({type:"approval_"+this.id}).then((function(t){e.approvalPro=t.data,0==t.data.status&&e.getDefaultRemind()}))},getDefaultRemind:function(){var t=this;(0,a.netWorkExamineForm)({id:this.id}).then((function(n){n=n.data.staff;var i=e.getStorageSync("remindlist")?e.getStorageSync("remindlist"):[];i.forEach((function(e,t){n.forEach((function(t){e.id==t.id&&(e.isDel=!1)}))})),t.remindPeople=t.checkReport([].concat((0,o.default)(n),(0,o.default)(e.getStorageSync("remindlist"))))}))},getForm:function(){var e=this;(0,a.netWorkExamineForm)({id:this.id}).then((function(t){var n=t.data.data;n.forEach((function(e){e.value=""})),e.listForm=n}))},moreClick:function(){e.navigateTo({url:"/pagesA/crm/selectMember/selectMember"})},delRemind:function(t){this.remindPeople.splice(t,1),e.setStorageSync("remindlist",this.remindPeople)},changeData:function(e,t,n){var i=this,o=this.listForm;o.forEach((function(e,o){e.id==n.id&&(e.value=t,i.$set(i.listForm,o,e))}))},changeCheckboxs:function(e,t,n){var i=this,o=this.listForm;o.forEach((function(e,o){e.id==n.id&&(e.value=t,e.config.content.forEach((function(e){-1!=t.indexOf(e.value)&&(e.checked=!0)})),i.$set(i.listForm,o,e))}))},subSave:function(){var t=this.checkCommonForm(this.listForm);if(t)if(0!=this.remindPeople.length||0!=this.approvalPro.status){var n=[];this.remindPeople.forEach((function(e){n.push(e.id)}));var i=[];this.copyList.forEach((function(e){i.push(e.id)}));var o=i.join(","),r={formapproval_id:this.id,flow_staff_ids:0==this.approvalPro.status?n.join(","):"",reminds_id:o,relation_type:"approval",data:t};(0,a.netCreateWorkExamine)(r).then((function(t){e.showToast({title:t.msg,icon:"none"}),setTimeout((function(){e.redirectTo({url:"/pagesA/work/approve/index"})}),2e3)}))}else e.showToast({title:"请选择审批人",icon:"none"})}}};t.default=s}).call(this,n("543d")["default"])},"2c68":function(e,t,n){},"333d":function(e,t,n){"use strict";n.r(t);var i=n("1ede"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);t["default"]=o.a},"60ee":function(e,t,n){"use strict";var i=n("2c68"),o=n.n(i);o.a},"653d":function(e,t,n){"use strict";(function(e,t){var i=n("4ea4");n("8886");i(n("66fd"));var o=i(n("959b"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"959b":function(e,t,n){"use strict";n.r(t);var i=n("ac0d"),o=n("333d");for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);n("60ee");var r=n("f0c5"),c=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"5f67e74d",null,!1,i["a"],void 0);t["default"]=c.exports},ac0d:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){}));var i=function(){var e=this.$createElement;this._self._c},o=[]}},[["653d","common/runtime","common/vendor","pagesA/common/vendor"]]]);