(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/trade/recordTrade1"],{"3c1d":function(n,t,e){},"3eb4":function(n,t,e){"use strict";e.r(t);var a=e("fd16"),i=e.n(a);for(var o in a)["default"].indexOf(o)<0&&function(n){e.d(t,n,(function(){return a[n]}))}(o);t["default"]=i.a},"62ed":function(n,t,e){"use strict";(function(n,t){var a=e("4ea4");e("2ab2");a(e("66fd"));var i=a(e("6cda"));n.__webpack_require_UNI_MP_PLUGIN__=e,t(i.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])},"6cda":function(n,t,e){"use strict";e.r(t);var a=e("735f"),i=e("3eb4");for(var o in i)["default"].indexOf(o)<0&&function(n){e.d(t,n,(function(){return i[n]}))}(o);e("cf29");var r=e("f0c5"),u=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);t["default"]=u.exports},"735f":function(n,t,e){"use strict";e.d(t,"b",(function(){return i})),e.d(t,"c",(function(){return o})),e.d(t,"a",(function(){return a}));var a={uForm:function(){return e.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(e.bind(null,"e893"))},uFormItem:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(e.bind(null,"a81d"))},uInput:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(e.bind(null,"830c"))},uImage:function(){return e.e("uni_modules/vk-uview-ui/components/u-image/u-image").then(e.bind(null,"9340"))},uGap:function(){return e.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(e.bind(null,"9db7"))},uButton:function(){return e.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(e.bind(null,"51b1b"))},uToast:function(){return e.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(e.bind(null,"9568"))},uSelect:function(){return e.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(e.bind(null,"17bf"))},uCalendar:function(){return e.e("uni_modules/vk-uview-ui/components/u-calendar/u-calendar").then(e.bind(null,"6028"))}},i=function(){var n=this.$createElement;this._self._c},o=[]},cf29:function(n,t,e){"use strict";var a=e("3c1d"),i=e.n(a);i.a},fd16:function(n,t,e){"use strict";(function(n){var a=e("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(e("448a")),o=(e("66f6"),{data:function(){return{frontMoneyList:[],realEstateList:[],buyIdCardList:[],sellIdCardList:[],contractImgList:[],signTimeShow:!1,isLoanBankShow:!1,loanBankList:[],form:{contract_no:"",sign_time:"",loan_amount:"",loan_bank:"",loan_manager:"",brokerage_fee1:"",brokerage_fee2:"",loan_fee:"",agency_fee:""},trade_id:null}},onLoad:function(n){this.trade_id=n.id,this.getData()},onShow:function(){},created:function(){var t=n.getStorageSync("MD_dict")||{},e=t.loan_bank||[],a=[];e.forEach((function(n){a.push(n)})),this.loanBankList=[].concat(a)},onReady:function(){},methods:{loanBankOpen:function(){this.isLoanBankShow=!0},loanBankClose:function(n){this.isLoanBankShow=!1,n&&(this.form.loan_bank=n[0].label,this.form.loan_manager=n[0].value)},getData:function(){var t=this;n.api.cust.apitradestepinfo({trade_id:this.trade_id}).then((function(n){t.form={contract_no:n.contract_no,sign_time:n.sign_time,loan_amount:n.loan_amount,loan_bank:n.loan_bank,loan_manager:n.loan_manager,brokerage_fee1:n.brokerage_fee1,brokerage_fee2:n.brokerage_fee2,loan_fee:n.loan_fee,agency_fee:n.agency_fee},t.frontMoneyList=n.front_money&&n.front_money.length>0?n.front_money.split(","):[],t.realEstateList=n.real_estate&&n.real_estate.length>0?n.real_estate.split(","):[],t.contractImgList=n.contract&&n.contract.length>0?n.contract.split(","):[],t.buyIdCardList=n.buy_id_card&&n.buy_id_card.length>0?n.buy_id_card.split(","):[],t.sellIdCardList=n.sell_id_card&&n.sell_id_card.length>0?n.sell_id_card.split(","):[]}))},opensignTimePopoup:function(){this.signTimeShow=!0},signTimeChange:function(n){this.form.sign_time=n.result||""},contractAddImg:function(){var n=this;this.uploadComImg((function(t){var e=[].concat((0,i.default)(n.contractImgList),(0,i.default)(t));n.contractImgList=JSON.parse(JSON.stringify(e))}),9)},contractDelImg:function(n){var t=(0,i.default)(this.contractImgList);t.splice(n,1),this.contractImgList=JSON.parse(JSON.stringify(t))},buyIdCardAddImg:function(){var n=this,t=JSON.parse(JSON.stringify(this.buyIdCardList));this.uploadComImg((function(e){var a=[].concat((0,i.default)(t),(0,i.default)(e));n.buyIdCardList=JSON.parse(JSON.stringify(a))}),9)},buyIdCardDelImg:function(n){var t=(0,i.default)(this.buyIdCardList);t.splice(n,1),this.buyIdCardList=JSON.parse(JSON.stringify(t))},sellIdCardAddImg:function(){var n=this,t=JSON.parse(JSON.stringify(this.sellIdCardList));this.uploadComImg((function(e){var a=[].concat((0,i.default)(t),(0,i.default)(e));n.sellIdCardList=JSON.parse(JSON.stringify(a))}),9)},sellIdCardDelImg:function(n){var t=(0,i.default)(this.sellIdCardList);t.splice(n,1),this.sellIdCardList=JSON.parse(JSON.stringify(t))},realEstateAddImg:function(){var n=this;this.uploadComImg((function(t){var e=[].concat((0,i.default)(n.realEstateList),(0,i.default)(t));n.realEstateList=JSON.parse(JSON.stringify(e))}),9)},realEstateDelImg:function(n){var t=(0,i.default)(this.realEstateList);t.splice(n,1),this.realEstateList=JSON.parse(JSON.stringify(t))},frontMoneyAddImg:function(){var n=this;this.uploadComImg((function(t){var e=[].concat((0,i.default)(n.frontMoneyList),(0,i.default)(t));n.frontMoneyList=JSON.parse(JSON.stringify(e))}),9)},frontMoneyDelImg:function(n){var t=(0,i.default)(this.frontMoneyList);t.splice(n,1),this.frontMoneyList=JSON.parse(JSON.stringify(t))},uploadComImg:function(t,e,a){var i=this;n.chooseImage({count:e||1,sizeType:["compressed"],sourceType:["album","camera"],success:function(n){var e=n.tempFilePaths;if(e.length>0){var o=[];e.forEach((function(n,r){i.diyUploadFile(n,a).then((function(n){o.push(n),t&&o.length===e.length&&t(o)}))}))}}})},diyUploadFile:function(t,e){return new Promise((function(e,a){var i=n.getStorageSync("MD_token"),o=n.baseUrl+"api/upload/cloud";n.uploadFile({url:o,filePath:t,name:"upload",formData:{token:i},success:function(n){var t=JSON.parse(n.data),a=t.data.url||"";e(a)}})}))},previewImageHandle:function(t,e){n.previewImage({current:t,urls:e})},submitHandle:function(){var t=this,e={contract_no:t.form.contract_no||"",sign_time:t.form.sign_time||"",loan_amount:t.form.loan_amount||"",loan_bank:t.form.loan_bank||"",loan_manager:t.form.loan_manager||"",brokerage_fee1:t.form.brokerage_fee1||"",brokerage_fee2:t.form.brokerage_fee2||"",loan_fee:t.form.loan_fee||"",agency_fee:t.form.agency_fee||"",trade_id:t.trade_id};e.front_money=t.frontMoneyList.join(","),e.real_estate=t.realEstateList.join(","),e.contract=t.contractImgList.join(","),e.buy_id_card=t.buyIdCardList.join(","),e.sell_id_card=t.sellIdCardList.join(","),n.api.cust["apitradecontractedit"](e).then((function(e){n.$msgConfirm("修改成功,是否前往跟踪合同?",(function(){n.navigateTo({url:"/pages/trade/recordTrade2?id=".concat(t.trade_id)})}),(function(){}))}))}}});t.default=o}).call(this,e("543d")["default"])}},[["62ed","common/runtime","common/vendor"]]]);