MrShi
2025-06-16 a5f75b8c4acff2ffd49d490c314d95a8c5f5db7e
wx/unpackage/dist/dev/mp-weixin/pages/addition_subtraction/addition_subtraction.js
@@ -1,2 +1,2 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/addition_subtraction/addition_subtraction"],{260:function(e,n,t){"use strict";(function(e,n){var i=t(4);t(26);i(t(25));var o=i(t(261));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t(1)["default"],t(2)["createPage"])},261:function(e,n,t){"use strict";t.r(n);var i=t(262),o=t(264);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);t(266),t(268);var a,d=t(32),u=Object(d["default"])(o["default"],i["render"],i["staticRenderFns"],!1,null,"4cad58b4",null,!1,i["components"],a);u.options.__file="pages/addition_subtraction/addition_subtraction.vue",n["default"]=u.exports},262:function(e,n,t){"use strict";t.r(n);var i=t(263);t.d(n,"render",(function(){return i["render"]})),t.d(n,"staticRenderFns",(function(){return i["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return i["recyclableRender"]})),t.d(n,"components",(function(){return i["components"]}))},263:function(e,n,t){"use strict";var i;t.r(n),t.d(n,"render",(function(){return o})),t.d(n,"staticRenderFns",(function(){return a})),t.d(n,"recyclableRender",(function(){return r})),t.d(n,"components",(function(){return i}));try{i={uTabs:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-tabs/u-tabs")]).then(t.bind(null,441))},uButton:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-button/u-button")]).then(t.bind(null,416))},uToast:function(){return t.e("node-modules/uview-ui/components/u-toast/u-toast").then(t.bind(null,495))},uPopup:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(t.bind(null,502))}}}catch(d){if(-1===d.message.indexOf("Cannot find module")||-1===d.message.indexOf(".vue"))throw d;console.error(d.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var e=this,n=e.$createElement,t=(e._self._c,e.__map(1===e.type?e.del:e.add,(function(n,t){var i=e.__get_orig(n),o=e.IdCard(n.idCard,2),r=e.IdCard(n.idCard,3);return{$orig:i,m0:o,m1:r}}))),i=e.add.length,o=e.del.length;e._isMounted||(e.e0=function(n){e.show=!0},e.e1=function(n){e.show=!1}),e.$mp.data=Object.assign({},{$root:{l0:t,g0:i,g1:o}})},r=!1,a=[];o._withStripped=!0},264:function(e,n,t){"use strict";t.r(n);var i=t(265),o=t.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);n["default"]=o.a},265:function(e,n,t){"use strict";(function(e){var i=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(t(18)),r={data:function(){return{id:null,show:!1,codeId:null,fangan:{},code:null,startDate:null,cyclePrice:null,info:null,add:[],del:[],type:0,cate:[{name:"加保人员"},{name:"减保人员"}]}},onLoad:function(n){var t=this;this.id=n.id,this.codeId=n.codeId,this.code=n.code,this.startDate=n.startDate,this.cyclePrice=n.cyclePrice,this.getDetails(),e.$on("add",(function(e){-1===JSON.stringify(t.add).indexOf(e.model.idCard)?t.add.unshift(e.model):t.$refs.uToast.show({type:"default",message:"[".concat(e.model.name,"]人员身份证重复")})})),e.$on("del",(function(e){var n;(n=t.del).unshift.apply(n,(0,o.default)(e))}))},computed:{totalPrice:function(){var e=0;return this.del.forEach((function(n){e+=n.fee})),(this.cyclePrice*this.add.length+e).toFixed(2)}},methods:{dele:function(e){1===this.type?this.del.splice(e,1):this.add.splice(e,1)},submit:function(){var n=this;if(0===this.add.length&&0===this.del.length)return e.showToast({title:"至少选择一名人员",icon:"none"});var t=this.add.map((function(e){return{duId:e.pqId,duName:e.pqName,idcardNo:e.idCard,memberName:e.name,workTypeName:e.gzName,worktypeId:e.gzId,fee:n.cyclePrice}})),i=this.del.map((function(e){return{memberId:e.id,duId:e.pqId,duName:e.pqName,idcardNo:e.idCard,memberName:e.name,workTypeName:e.gzName,worktypeId:e.gzId,fee:e.fee}}));this.$u.api.applyChangeCreate({applyId:this.codeId,addDetailList:t,delDetailList:i,validTime:this.startDate,type:0}).then((function(n){200===n.code&&(e.showToast({title:"提交成功",icon:"success"}),setTimeout((function(){e.navigateBack({delta:2})}),1500))}))},IdCard:function(e,n){var t=e.toString();if(1==n)return birth=t.substring(6,10)+"-"+t.substring(10,12)+"-"+t.substring(12,14),birth;if(2==n)return parseInt(t.substr(16,1))%2==1?"男":"女";if(3==n){var i=new Date,o=i.getMonth()+1,r=i.getDate(),a=i.getFullYear()-t.substring(6,10)-1;return(t.substring(10,12)<o||t.substring(10,12)==o&&t.substring(12,14)<=r)&&a++,a}},getDetails:function(){var e=this;e.$u.api.insuranceApplyById(e.codeId).then((function(n){e.info=n.data,e.$u.api.solutionsById(n.data.newVersionSolutionId).then((function(n){e.fangan=n.data}))}))},jump:function(){0===this.type?e.navigateTo({url:"/pages/add_insured_personnel/add_insured_personnel?solutionId=".concat(this.id)}):e.navigateTo({url:"/pages/selectPersonnel/selectPersonnel?insuranceApplyId=".concat(this.codeId,"&validTime=").concat(this.startDate)})},clickCate:function(e){this.type=e.index}}};n.default=r}).call(this,t(2)["default"])},266:function(e,n,t){"use strict";t.r(n);var i=t(267),o=t.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);n["default"]=o.a},267:function(e,n,t){},268:function(e,n,t){"use strict";t.r(n);var i=t(269),o=t.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);n["default"]=o.a},269:function(e,n,t){}},[[260,"common/runtime","common/vendor"]]]);
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/addition_subtraction/addition_subtraction"],{260:function(e,n,t){"use strict";(function(e,n){var i=t(4);t(26);i(t(25));var o=i(t(261));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t(1)["default"],t(2)["createPage"])},261:function(e,n,t){"use strict";t.r(n);var i=t(262),o=t(264);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);t(266),t(268);var a,d=t(32),u=Object(d["default"])(o["default"],i["render"],i["staticRenderFns"],!1,null,"4cad58b4",null,!1,i["components"],a);u.options.__file="pages/addition_subtraction/addition_subtraction.vue",n["default"]=u.exports},262:function(e,n,t){"use strict";t.r(n);var i=t(263);t.d(n,"render",(function(){return i["render"]})),t.d(n,"staticRenderFns",(function(){return i["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return i["recyclableRender"]})),t.d(n,"components",(function(){return i["components"]}))},263:function(e,n,t){"use strict";var i;t.r(n),t.d(n,"render",(function(){return o})),t.d(n,"staticRenderFns",(function(){return a})),t.d(n,"recyclableRender",(function(){return r})),t.d(n,"components",(function(){return i}));try{i={uTabs:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-tabs/u-tabs")]).then(t.bind(null,458))},uButton:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-button/u-button")]).then(t.bind(null,425))},uToast:function(){return t.e("node-modules/uview-ui/components/u-toast/u-toast").then(t.bind(null,495))},uPopup:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(t.bind(null,502))}}}catch(d){if(-1===d.message.indexOf("Cannot find module")||-1===d.message.indexOf(".vue"))throw d;console.error(d.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var e=this,n=e.$createElement,t=(e._self._c,e.__map(1===e.type?e.del:e.add,(function(n,t){var i=e.__get_orig(n),o=e.IdCard(n.idCard,2),r=e.IdCard(n.idCard,3);return{$orig:i,m0:o,m1:r}}))),i=e.add.length,o=e.del.length;e._isMounted||(e.e0=function(n){e.show=!0},e.e1=function(n){e.show=!1}),e.$mp.data=Object.assign({},{$root:{l0:t,g0:i,g1:o}})},r=!1,a=[];o._withStripped=!0},264:function(e,n,t){"use strict";t.r(n);var i=t(265),o=t.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);n["default"]=o.a},265:function(e,n,t){"use strict";(function(e){var i=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(t(18)),r={data:function(){return{id:null,show:!1,codeId:null,fangan:{},code:null,startDate:null,cyclePrice:null,info:null,add:[],del:[],type:0,cate:[{name:"加保人员"},{name:"减保人员"}]}},onLoad:function(n){var t=this;this.id=n.id,this.codeId=n.codeId,this.code=n.code,this.startDate=n.startDate,this.cyclePrice=n.cyclePrice,this.getDetails(),e.$on("add",(function(e){-1===JSON.stringify(t.add).indexOf(e.model.idCard)?t.add.unshift(e.model):t.$refs.uToast.show({type:"default",message:"[".concat(e.model.name,"]人员身份证重复")})})),e.$on("del",(function(e){var n;(n=t.del).unshift.apply(n,(0,o.default)(e))}))},computed:{totalPrice:function(){var e=0;return this.del.forEach((function(n){e+=n.fee})),(this.cyclePrice*this.add.length+e).toFixed(2)}},methods:{dele:function(e){1===this.type?this.del.splice(e,1):this.add.splice(e,1)},submit:function(){var n=this;if(0===this.add.length&&0===this.del.length)return e.showToast({title:"至少选择一名人员",icon:"none"});var t=this.add.map((function(e){return{duId:e.pqId,duName:e.pqName,idcardNo:e.idCard,memberName:e.name,workTypeName:e.gzName,worktypeId:e.gzId,fee:n.cyclePrice}})),i=this.del.map((function(e){return{memberId:e.id,duId:e.pqId,duName:e.pqName,idcardNo:e.idCard,memberName:e.name,workTypeName:e.gzName,worktypeId:e.gzId,fee:e.fee}}));this.$u.api.applyChangeCreate({applyId:this.codeId,addDetailList:t,delDetailList:i,validTime:this.startDate,type:0}).then((function(n){200===n.code&&(e.showToast({title:"提交成功",icon:"success"}),setTimeout((function(){e.navigateBack({delta:2})}),1500))}))},IdCard:function(e,n){var t=e.toString();if(1==n)return birth=t.substring(6,10)+"-"+t.substring(10,12)+"-"+t.substring(12,14),birth;if(2==n)return parseInt(t.substr(16,1))%2==1?"男":"女";if(3==n){var i=new Date,o=i.getMonth()+1,r=i.getDate(),a=i.getFullYear()-t.substring(6,10)-1;return(t.substring(10,12)<o||t.substring(10,12)==o&&t.substring(12,14)<=r)&&a++,a}},getDetails:function(){var e=this;e.$u.api.insuranceApplyById(e.codeId).then((function(n){e.info=n.data,e.$u.api.solutionsById(n.data.newVersionSolutionId).then((function(n){e.fangan=n.data}))}))},jump:function(){0===this.type?e.navigateTo({url:"/pages/add_insured_personnel/add_insured_personnel?solutionId=".concat(this.id)}):e.navigateTo({url:"/pages/selectPersonnel/selectPersonnel?insuranceApplyId=".concat(this.codeId,"&validTime=").concat(this.startDate)})},clickCate:function(e){this.type=e.index}}};n.default=r}).call(this,t(2)["default"])},266:function(e,n,t){"use strict";t.r(n);var i=t(267),o=t.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);n["default"]=o.a},267:function(e,n,t){},268:function(e,n,t){"use strict";t.r(n);var i=t(269),o=t.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);n["default"]=o.a},269:function(e,n,t){}},[[260,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/addition_subtraction/addition_subtraction.js.map