| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <view class="mainBox">
- <uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="跟进记录"
- @clickLeft="back">
- </uni-nav-bar>
- <followList ref="followListRef" :linkList="linkList" :isDrawer="true">
- </followList>
- </view>
- </template>
- <script>
- import followList from "@/pages/saleManage/contact/components/followList.vue"
- import {
- contactDetail,
- contactSave
- } from '@/api/saleManage/contact/index.js'
- export default {
- components: {
- followList,
- },
- data() {
- return {
- form: {
- address: '',
- addressId: '',
- addressName: '',
- authorizationLimit: 0,
- businessLicenseFiles: [],
- businessLicenseFile: [],
- businessScope: '',
- categoryId: '',
- categoryName: '',
- companyCategoryId: '',
- companyCategoryName: '',
- enterpriseTypeId: '',
- enterpriseTypeName: '',
- legalPerson: '',
- registeredCapital: '',
- parentId: '',
- industry: [],
- industryCode: '',
- industryFullName: '',
- mainProduct: '',
- name: '',
- officialIndustry: '',
- phone: '',
- registerDate: '',
- remark: '',
- serialNo: '',
- simpleName: '',
- type: 1,
- unifiedSocialCreditCode: ''
- },
- otherForm: {
- settlementMode: '',
- settlementModeName: '',
- taxRate: 0,
- address: '',
- addressId: '',
- deptId: '',
- deptName: '',
- discount: 0,
- salesmanId: '',
- salesmanName: '',
- sender: '',
- senderPhone: ''
- },
- bankList: [],
- linkList: [],
- }
- },
- computed: {
- },
- onLoad(data) {
- uni.$off('setContact')
- uni.$on('setContact', ({
- key,
- data
- }) => {
- this[key] = data
- this.save()
- })
- contactDetail(data.id).then(async res => {
- this.form = res.base
- this.otherForm = res.other
- this.bankList = res.bankList
- this.linkList = res.linkList
- this.$nextTick(() => {
- this.$refs.followListRef.init(res.base)
- })
- })
- },
- onUnload() {
- uni.$off('setContact')
- },
- methods: {
- save() {
- try {
- const data = {
- base: this.form,
- other: this.otherForm,
- bankList: this.bankList,
- linkList: this.linkList,
- };
- contactSave(data)
- } catch (error) {
- console.log(error, 'error')
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .add {
- width: 96rpx;
- height: 96rpx;
- border-radius: 48rpx;
- background: #3c9cff;
- position: fixed;
- bottom: 100rpx;
- right: 24rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .top-wrapper {
- background-color: #fff;
- display: flex;
- width: 750rpx;
- height: 88rpx;
- padding: 16rpx 32rpx;
- align-items: center;
- gap: 16rpx;
- /deep/.uni-section {
- margin-top: 0px;
- }
- /deep/.uni-section-header {
- padding: 0px;
- }
- .search_btn {
- width: 120rpx;
- height: 70rpx;
- line-height: 70rpx;
- padding: 0 24rpx;
- background: $theme-color;
- font-size: 32rpx;
- color: #fff;
- margin: 0;
- margin-left: 26rpx;
- }
- .menu_icon {
- width: 44rpx;
- height: 44rpx;
- margin-left: 14rpx;
- }
- }
- </style>
|