1 line
7.1 KiB
JavaScript
1 line
7.1 KiB
JavaScript
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/groupCompany/contract/editContract"],{"00fd":function(t,n,i){"use strict";i.r(n);var e=i("fbfb"),s=i("f1a7");for(var o in s)["default"].indexOf(o)<0&&function(t){i.d(n,t,(function(){return s[t]}))}(o);i("0fee");var c=i("f0c5"),a=Object(c["a"])(s["default"],e["b"],e["c"],!1,null,"ed77a604",null,!1,e["a"],void 0);n["default"]=a.exports},"029f":function(t,n,i){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=i("76dd"),s=i("dc92"),o=i("0c59"),c=i("8683"),a={mixins:[c.commonF],components:{formItem:function(){Promise.all([i.e("common/vendor"),i.e("components/form/formitem")]).then(function(){return resolve(i("d7bf"))}.bind(null,i)).catch(i.oe)},popupList:function(){Promise.all([i.e("common/vendor"),i.e("components/selectProduct/index")]).then(function(){return resolve(i("a99f"))}.bind(null,i)).catch(i.oe)},popupProductConfig:function(){i.e("components/selectProductConfig/index").then(function(){return resolve(i("55ad"))}.bind(null,i)).catch(i.oe)},fixedApproval:function(){i.e("components/fixedApproval").then(function(){return resolve(i("d3f7"))}.bind(null,i)).catch(i.oe)},selectBusiness:function(){Promise.all([i.e("common/vendor"),i.e("components/selectBusiness")]).then(function(){return resolve(i("be33"))}.bind(null,i)).catch(i.oe)}},data:function(){return{id:"",BASE_IMG_URL:o.BASE_IMG_URL,order_staff_id:"",staffname:"",staffList:[],staffIndex:null,customer_id:"",contacts_id:"",contactname:"",contactList:[],contactName:"",contactIndex:null,customerlist:[],customerName:"",cuslist:[],cusIndex:null,dateTime:null,dateTimeArray:null,startYear:2e3,remindPeople:[],remindType:"contract",info:{},listForm:[],productList:[],total_price:0,configIndex:null,approvalPro:{},businessObj:{}}},onLoad:function(t){this.customer_id=t.kehuid,this.id=t.id,this.getCustomerList(),this.getStaffList(),this.getContractDetail(),this.getProcess()},methods:{changeBusiness:function(){this.customer_id?this.$refs.businessChild.init(this.customer_id):t.showToast({title:"请先选择客户",icon:"none"})},sureBusiness:function(t){this.businessObj=t},getProcess:function(){var t=this;(0,s.netApprovalProcess)({type:"contract"}).then((function(n){t.approvalPro=n.data}))},getContractDetail:function(){var t=this;(0,e.netContractDetail)({id:this.id}).then((function(n){n=n.data,t.info=n,n.contacts&&(t.contacts_id=n.contacts.id,t.contactname=n.contacts.name),n.owner_staff&&(t.order_staff_id=n.owner_staff.id,t.staffname=n.owner_staff.name),t.businessObj=n.business,t.productList=n.product,t.handleTotalMoney(),t.getForm()}))},getForm:function(){var t=this;(0,s.netSetForm)({type:"contract"}).then((function(n){n=n.data.data,n.forEach((function(n){n.value=t.info[n.id]})),t.listForm=n}))},changeOtherData:function(t,n,i){var e=this,s=this.listForm;s.forEach((function(t,s){t.id==i.id&&(t.value=n,e.$set(e.listForm,s,t))}))},getStaffList:function(){var t=this;(0,e.netStaffList)().then((function(n){t.staffList=n.data}))},getCustomerList:function(){var t=this;(0,e.netPrevCustomer)().then((function(n){t.customerlist=n.data,t.handleCus(n.data)}))},handleCus:function(t){var n=[];t.forEach((function(t){n.push(t.name)})),this.cuslist=n,this.setDefaultKehu()},setDefaultKehu:function(){var t=this,n=this.customer_id;this.customerlist.forEach((function(i,e){i.id==n&&(t.customerName=i.name,t.cusIndex=e)})),this.getLianxiren()},changeCus:function(t){this.cusIndex=t.detail.value,this.customerName=this.customerlist[t.detail.value].name,this.customer_id=this.customerlist[t.detail.value].id,this.getLianxiren()},getLianxiren:function(){var t=this,n={customer_id:this.customer_id};(0,e.netLianxiren)(n).then((function(n){t.contactList=n.data}))},changeContact:function(t){this.contactIndex=t.detail.value,this.contacts_id=this.contactList[t.detail.value].id,this.contactname=this.contactList[t.detail.value].name},changeStaff:function(t){this.staffIndex=t.detail.value,this.order_staff_id=this.staffList[t.detail.value].id,this.staffname=this.staffList[t.detail.value].name},moreClick:func
|