billDetail.js 3.4 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageIndex/billDetail/billDetail"],{"0cb4":function(t,i,e){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n=e("1a49"),o={data:function(){return{billId:"",type:"",detail:{},operationBtn:[]}},onLoad:function(i){var e=this;this.billId=i.billId,this.type=i.type,this.init(),t.$on("reloadBill",(function(){e.init()}))},methods:{init:function(){this.billId&&(this.operationBtn=[],1==this.type?(0,n.getPaymentDetailById)(this.billId).then(this.billSuccess):(0,n.getCommonPaymentDetailById)(this.billId).then(this.billSuccess))},operation:function(i){var e=this;3==i.id?t.showModal({title:"有极提示",content:"是否将账单发送给客户?",success:function(t){t.confirm&&(0,n.updatePayment)({id:e.billId,status:3}).then((function(t){200===t.code&&(e.init(),e.$toast("操作成功"))}))}}):this.$navigateTo(i.type+"?billId="+this.billId+"&type="+this.type)},billSuccess:function(t){200===t.code&&(this.detail=t.data,this.detail.status&&3!=this.detail.status||1!==this.$store.getters.identity.id&&4!==this.$store.getters.identity.id||this.operationBtn.push({id:1,name:"账单付款",type:"/pageIndex/billRecord/billRecord"}),1===this.detail.status&&this.detail.organizationId===this.$store.getters.organization.id&&this.operationBtn.push({id:2,name:"账单发票",type:"/pageIndex/billInvoice/billInvoice"}),2!=this.type||this.detail.status||this.detail.organizationId!==this.$store.getters.organization.id||this.operationBtn.push({id:3,name:"发送账单给客户",type:"/pageIndex/billInvoice/billInvoice"}))}},components:{upload:function(){Promise.all([e.e("common/vendor"),e.e("components/common/upload")]).then(function(){return resolve(e("a455"))}.bind(null,e)).catch(e.oe)}}};i.default=o}).call(this,e("df3c")["default"])},"50f8":function(t,i,e){"use strict";e.r(i);var n=e("e636"),o=e("ab5c");for(var a in o)["default"].indexOf(a)<0&&function(t){e.d(i,t,(function(){return o[t]}))}(a);var l=e("828b"),s=Object(l["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);i["default"]=s.exports},"820f":function(t,i,e){"use strict";(function(t,i){var n=e("47a9");e("7748");n(e("3240"));var o=n(e("50f8"));t.__webpack_require_UNI_MP_PLUGIN__=e,i(o.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},ab5c:function(t,i,e){"use strict";e.r(i);var n=e("0cb4"),o=e.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(a);i["default"]=o.a},e636:function(t,i,e){"use strict";e.d(i,"b",(function(){return o})),e.d(i,"c",(function(){return a})),e.d(i,"a",(function(){return n}));var n={uniIcons:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(e.bind(null,"3d33"))}},o=function(){var t=this,i=t.$createElement,e=(t._self._c,t.detail.id?t.__map(t.detail.paymentRecordList,(function(i,e){var n=t.__get_orig(i),o=i.attachment?JSON.parse(i.attachment):null;return{$orig:n,g0:o}})):null),n=t.detail.id?t.__map(t.detail.paymentInvoiceList,(function(i,e){var n=t.__get_orig(i),o=t.$field.findTypeName("invoiceType",i.type),a=i.attachment?JSON.parse(i.attachment):null;return{$orig:n,g1:o,g2:a}})):null,o=t.detail.id?t.operationBtn.length:null;t.$mp.data=Object.assign({},{$root:{l0:e,l1:n,g3:o}})},a=[]}},[["820f","common/runtime","common/vendor","pageIndex/common/vendor"]]]);