<template>
	<view class="mainBox">
		<u-cell-group>
			<u-cell title="客户编码" arrow-direction="down">
				<text slot="value">
					{{form.code||''}}
				</text>
			</u-cell>
			<u-cell title="客户名称" arrow-direction="down">
				<text slot="value">
					{{form.name||''}}
				</text>
			</u-cell>
			<u-cell title="客户分类" arrow-direction="down">
				<text slot="value">
					{{form.categoryName||''}}
				</text>
			</u-cell>
			<u-cell title="客户代号" arrow-direction="down">
				<text slot="value">
					{{form.serialNo||''}}
				</text>
			</u-cell>
			<u-cell title="客户简称" arrow-direction="down">
				<text slot="value">
					{{form.simpleName||''}}
				</text>
			</u-cell>
			<u-cell title="法定代表人" arrow-direction="down">
				<text slot="value">
					{{form.legalPerson||''}}
				</text>
			</u-cell>
			<u-cell title="注册资金" arrow-direction="down">
				<text slot="value">
					{{form.registeredCapital||''}}
				</text>
			</u-cell>
			<u-cell title="授信额度" arrow-direction="down">
				<text slot="value">
					{{form.authorizationLimit||''}}
				</text>
			</u-cell>
			<u-cell title="单位电话" arrow-direction="down">
				<text slot="value">
					{{form.phone||''}}
				</text>
			</u-cell>
			<u-cell title="注册地址" arrow-direction="down">
				<text slot="value">
					{{(form.addressName||'')+form.address||''}}
				</text>
			</u-cell>
			<u-cell title="联系地址" arrow-direction="down">
				<text slot="value">
					{{(otherForm.addressName||'')+otherForm.address||''}}
				</text>
			</u-cell>
			<u-cell title="统一社会信用代码" arrow-direction="down">
				<text slot="value">
					{{form.unifiedSocialCreditCode||''}}
				</text>
			</u-cell>
			<u-cell title="所属行业" arrow-direction="down">
				<text slot="value">
					{{form.industryFullName||''}}
				</text>
			</u-cell>
			<u-cell title="营业类型" arrow-direction="down">
				<text slot="value">
					{{form.companyCategoryName||''}}
				</text>
			</u-cell>
			<u-cell title="企业类型" arrow-direction="down">
				<text slot="value">
					{{form.enterpriseTypeName||''}}
				</text>
			</u-cell>
			<u-cell title="登记日期" arrow-direction="down">
				<text slot="value">
					{{form.registerDate||''}}
				</text>
			</u-cell>
			<u-cell title="主营产品" arrow-direction="down">
				<text slot="value">
					{{form.mainProduct||''}}
				</text>
			</u-cell>
			<u-cell title="级别" arrow-direction="down">
				<text slot="value">
					{{form.contact_level||''}}
				</text>
			</u-cell>
	<!-- 		<u-cell title="结算方式" arrow-direction="down">
				<text slot="value">
					{{otherForm.settlementModeName||''}}
				</text>
			</u-cell>
			<u-cell title="税率" arrow-direction="down">
				<text slot="value">
					{{otherForm.taxRate||''}}
				</text>
			</u-cell>
			<u-cell title="折扣率" arrow-direction="down">
				<text slot="value">
					{{otherForm.discount||''}}
				</text>
			</u-cell>
			<u-cell title="收件人" arrow-direction="down">
				<text slot="value">
					{{otherForm.sender||''}}
				</text>
			</u-cell>
			<u-cell title="收件人电话" arrow-direction="down">
				<text slot="value">
					{{otherForm.senderPhone||''}}
				</text>
			</u-cell> -->
	
			<u-cell title="经营范围" arrow-direction="down">
				<text slot="value">
					{{otherForm.businessScope||''}}
				</text>
			</u-cell>
			<u-cell title="备注" arrow-direction="down">
				<text slot="value">
					{{otherForm.remark||''}}
				</text>
			</u-cell>
		</u-cell-group>
	</view>
</template>

<script>
	import {
		getInfoByIds
	} from "@/api/saleManage/contact/index.js"
	export default {
		data() {
			return {

				form: {},
				otherForm: {}
			}
		},

		created() {

		},
		methods: {
			init(data) {
				if (data) {
					this.form = data.form
					this.otherForm = data.otherForm
					getInfoByIds(this.form.categoryId).then((res) => {
						let categoryName = res.map((item) => item.name)?.join(',');
						this.$set(this.form, 'categoryName', categoryName);
					});
				}
			},

		}
	}
</script>

<style lang="scss" scoped>
	/deep/.u-swipe-action-item__right__button__wrapper {
		background-color: #f56c6c !important;
	}
	/deep/.u-cell__body,/deep/.u-cell__title-text{
		font-size: 26rpx;
	}
</style>