Commit 3f6d1ec5587a9c04b90b69d84b6ffd7bf7b85032

Authored by 史婷婷
1 parent bac64d86

feat: 资信审核&审核详情+开发审核&审核详情-样式优化

pages/credit_manage/viewer.vue renamed from pages/credit_manage/approve.vue
1 1 <template>
2   - <view class="page">
3   - <scroll-view class="scroll" scroll-y>
4   - <view class="detail-page">
  2 + <view class="detail-page">
5 3 <view class="section">
6   - <text class="row company">{{ form.companyName }}</text>
7   - <view class="row"><text class="label">编号</text><text class="value">{{ form.serialNumber }}</text></view>
8   - <view class="row"><text class="label">区域</text><text class="value">{{ form.region }}</text></view>
9   - <view class="row"><text class="label">客户简称</text><text class="value">{{ form.customerShortName }}</text>
10   - </view>
11   - <view class="row"><text class="label">企业类型</text><text class="value">{{ getDicName('ENTERPRISE_TYPE',
12   - form.enterpriseType, enterpriseTypeOptions) }}</text></view>
13   - <view class="row"><text class="label">企业操作类型</text><text class="value">{{ form.enterpriseOperationType
14   - }}</text></view>
15   - <view class="row"><text class="label">登记日期</text><text class="value">{{ form.registerDate }}</text></view>
  4 + <text class="row company">{{ form.companyName }}</text>
  5 + <view class="row"><text class="label">编号</text><text class="value">{{ form.serialNumber }}</text></view>
  6 + <view class="row"><text class="label">区域</text><text class="value">{{ form.region }}</text></view>
  7 + <view class="row"><text class="label">客户简称</text><text class="value">{{ form.customerShortName }}</text>
  8 + </view>
  9 + <view class="row"><text class="label">企业类型</text><text class="value">{{ getDicName('ENTERPRISE_TYPE',
  10 + form.enterpriseType, enterpriseTypeOptions) }}</text></view>
  11 + <view class="row"><text class="label">企业操作类型</text><text class="value">{{ form.enterpriseOperationType
  12 + }}</text></view>
  13 + <view class="row"><text class="label">登记日期</text><text class="value">{{ form.registerDate }}</text></view>
16 14 </view>
17 15
18 16 <view class="title-header">
19   - <image class="title-header_icon" src="/static/images/title.png" />
20   - <span>基础资料</span>
  17 + <image class="title-header_icon" src="/static/images/title.png" />
  18 + <span>基础资料</span>
21 19 </view>
22 20 <view class="section">
23   - <view class="row"><text class="label">企业性质</text><text class="value">{{ form.companyNature }}</text></view>
24   - <view class="row"><text class="label">注册资本</text><text class="value">{{ form.registeredCapital }} 万元</text>
25   - </view>
26   - <view class="row"><text class="label">账号</text><text class="value">{{ form.bankAccount }}</text></view>
27   - <view class="row"><text class="label">开户行</text><text class="value">{{ form.bankName }}</text></view>
28   - <view class="row"><text class="label">税号</text><text class="value">{{ form.taxNumber }}</text></view>
29   - <view class="row"><text class="label">注册时间</text><text class="value">{{ form.registrationTime }}</text></view>
30   - <view class="row"><text class="label">经营年限</text><text class="value">{{ form.businessYears }}</text></view>
31   - <view class="row"><text class="label">单位地址</text><text class="value">{{ form.companyAddress }}</text></view>
32   - <view class="row"><text class="label">经营范围</text><text class="value">{{ form.businessScope }}</text></view>
33   - <view class="row"><text class="label">工商信息</text><text class="value act">{{ form.businessFileName }}</text>
34   - </view>
35   - <view class="row"><text class="label">股东信息</text><text class="value act">{{ form.shareholderFileName }}</text>
36   - </view>
  21 + <view class="row"><text class="label">企业性质</text><text class="value">{{ form.companyNature }}</text></view>
  22 + <view class="row"><text class="label">注册资本</text><text class="value">{{ form.registeredCapital }} 万元</text>
  23 + </view>
  24 + <view class="row"><text class="label">账号</text><text class="value">{{ form.bankAccount }}</text></view>
  25 + <view class="row"><text class="label">开户行</text><text class="value">{{ form.bankName }}</text></view>
  26 + <view class="row"><text class="label">税号</text><text class="value">{{ form.taxNumber }}</text></view>
  27 + <view class="row"><text class="label">注册时间</text><text class="value">{{ form.registrationTime }}</text>
  28 + </view>
  29 + <view class="row"><text class="label">经营年限</text><text class="value">{{ form.businessYears }}</text></view>
  30 + <view class="row"><text class="label">单位地址</text><text class="value">{{ form.companyAddress }}</text></view>
  31 + <view class="row"><text class="label">经营范围</text><text class="value">{{ form.businessScope }}</text></view>
  32 + <view class="row"><text class="label">工商信息</text><text class="value act">{{ form.businessFileName }}</text>
  33 + </view>
  34 + <view class="row"><text class="label">股东信息</text><text class="value act">{{ form.shareholderFileName
  35 + }}</text>
  36 + </view>
37 37 </view>
38 38
39 39 <view class="mgb10">
40   - <CorePersonnel mode="view" :options="genderOptions" :list="form.corePersonnelList" />
  40 + <CorePersonnel mode="view" :options="genderOptions" :list="form.corePersonnelList" />
41 41 </view>
42 42
43 43 <view class="title-header">
44   - <image class="title-header_icon" src="/static/images/title.png" />
45   - <span>资产经营情况</span>
  44 + <image class="title-header_icon" src="/static/images/title.png" />
  45 + <span>资产经营情况</span>
46 46 </view>
47 47 <view class="section">
48   - <view class="row"><text class="label">经营场地属性</text><text class="value">{{ form.businessProperty }}</text>
49   - </view>
50   - <view class="row"><text class="label">占地面积</text><text class="value">{{ form.landArea }} 平方米</text></view>
51   - <view class="row"><text class="label">仓储条件</text><text class="value">{{ form.storageConditions }}</text>
52   - </view>
53   - <view class="row"><text class="label">员工人数</text><text class="value">{{ form.employeeCount }}</text></view>
54   - <view class="row"><text class="label">设备属性</text><text class="value">{{ form.equipmentAttributes }}</text>
55   - </view>
56   - <view class="row"><text class="label">资产评估</text><text class="value">{{ form.assetEvaluation }}</text></view>
57   - <view class="row"><text class="label">上年度销售额</text><text class="value">{{ form.lastYearSales }}</text></view>
58   - <view class="row"><text class="label">月均销量</text><text class="value">{{ form.monthlyAvgSales }}</text></view>
59   - <view class="row"><text class="label">销项发票所开品名与计量单位</text><text class="value">{{ form.invoiceItemUnit
60   - }}</text></view>
61   - <view class="row"><text class="label">认证证书</text><text class="value">{{ form.certificationCertificate
62   - }}</text></view>
63   - <view class="row"><text class="label">我司售与产品于经营范围是否匹配</text><text class="value">{{ form.productMatch }}</text>
64   - </view>
65   - <view class="row"><text class="label">主要客户</text><text class="value">{{ form.majorCustomers }}</text></view>
66   - <view class="row"><text class="label">主营项目</text><text class="value">{{ form.mainProjects }}</text></view>
67   - <view class="row"><text class="label">从事行业</text><text class="value">{{ form.industryInvolved }}</text></view>
68   - <view class="row"><text class="label">在该行业中的经验</text><text class="value">{{ form.industryExperience }}</text>
69   - </view>
70   - <view class="row"><text class="label">是否与其他企业有经济纠纷 违规信息 拖欠员工薪资</text><text class="value">{{ form.hasDispute
71   - }}</text></view>
  48 + <view class="row"><text class="label">经营场地属性</text><text class="value">{{ form.businessProperty }}</text>
  49 + </view>
  50 + <view class="row"><text class="label">占地面积</text><text class="value">{{ form.landArea }} 平方米</text></view>
  51 + <view class="row"><text class="label">仓储条件</text><text class="value">{{ form.storageConditions }}</text>
  52 + </view>
  53 + <view class="row"><text class="label">员工人数</text><text class="value">{{ form.employeeCount }}</text></view>
  54 + <view class="row"><text class="label">设备属性</text><text class="value">{{ form.equipmentAttributes }}</text>
  55 + </view>
  56 + <view class="row"><text class="label">资产评估</text><text class="value">{{ form.assetEvaluation }}</text>
  57 + </view>
  58 + <view class="row"><text class="label">上年度销售额</text><text class="value">{{ form.lastYearSales }}</text>
  59 + </view>
  60 + <view class="row"><text class="label">月均销量</text><text class="value">{{ form.monthlyAvgSales }}</text>
  61 + </view>
  62 + <view class="row"><text class="label">销项发票所开品名与计量单位</text><text class="value">{{ form.invoiceItemUnit
  63 + }}</text></view>
  64 + <view class="row"><text class="label">认证证书</text><text class="value">{{ form.certificationCertificate
  65 + }}</text></view>
  66 + <view class="row"><text class="label">我司售与产品于经营范围是否匹配</text><text class="value">{{ form.productMatch
  67 + }}</text>
  68 + </view>
  69 + <view class="row"><text class="label">主要客户</text><text class="value">{{ form.majorCustomers }}</text></view>
  70 + <view class="row"><text class="label">主营项目</text><text class="value">{{ form.mainProjects }}</text></view>
  71 + <view class="row"><text class="label">从事行业</text><text class="value">{{ form.industryInvolved }}</text>
  72 + </view>
  73 + <view class="row"><text class="label">在该行业中的经验</text><text class="value">{{ form.industryExperience
  74 + }}</text>
  75 + </view>
  76 + <view class="row"><text class="label">是否与其他企业有经济纠纷 违规信息 拖欠员工薪资</text><text class="value">{{ form.hasDispute
  77 + }}</text></view>
72 78 </view>
73 79
74 80 <view class="title-header">
75   - <image class="title-header_icon" src="/static/images/title.png" />
76   - <span>与我司合作</span>
  81 + <image class="title-header_icon" src="/static/images/title.png" />
  82 + <span>与我司合作</span>
77 83 </view>
78 84 <view class="section">
79   - <view class="row"><text class="label">与我司合作时间</text><text class="value">{{ form.cooperationStartDate }}</text>
80   - </view>
81   - <view class="row"><text class="label">月均操作量</text><text class="value">{{ form.monthlyAvgVolume }}</text>
82   - </view>
83   - <view class="row"><text class="label">是否口头协议操作</text><text class="value">{{ form.isVerbalAgreement }}</text>
84   - </view>
85   - <view class="row"><text class="label">是否签订其他协议</text><text class="value">{{ form.otherAgreements }}</text>
86   - </view>
87   - <view class="row"><text class="label">与我司操作是否签订长年合同</text><text class="value">{{ form.hasLongTermContract
88   - }}</text></view>
89   - <view class="row"><text class="label">合同类型</text><text class="value">{{ form.contractType }}</text></view>
90   - <view class="row"><text class="label">是否有过中断及中断原因</text><text class="value">{{ form.hasInterruption }}</text>
91   - </view>
  85 + <view class="row"><text class="label">与我司合作时间</text><text class="value">{{ form.cooperationStartDate
  86 + }}</text>
  87 + </view>
  88 + <view class="row"><text class="label">月均操作量</text><text class="value">{{ form.monthlyAvgVolume }}</text>
  89 + </view>
  90 + <view class="row"><text class="label">是否口头协议操作</text><text class="value">{{ form.isVerbalAgreement }}</text>
  91 + </view>
  92 + <view class="row"><text class="label">是否签订其他协议</text><text class="value">{{ form.otherAgreements }}</text>
  93 + </view>
  94 + <view class="row"><text class="label">与我司操作是否签订长年合同</text><text class="value">{{ form.hasLongTermContract
  95 + }}</text></view>
  96 + <view class="row"><text class="label">合同类型</text><text class="value">{{ form.contractType }}</text></view>
  97 + <view class="row"><text class="label">是否有过中断及中断原因</text><text class="value">{{ form.hasInterruption
  98 + }}</text>
  99 + </view>
92 100 </view>
93 101
94 102 <view class="title-header">
95   - <image class="title-header_icon" src="/static/images/title.png" />
96   - <span>办事处意见</span>
  103 + <image class="title-header_icon" src="/static/images/title.png" />
  104 + <span>办事处意见</span>
97 105 </view>
98 106 <view class="section">
99   - <view class="row"><text class="label">建议客户分类</text>
100   - <text class="value">
101   - <text
102   - :class="[form.suggestedCategory ? 'category' : '', getCategoryClass(getDicName('CUSTOMER_CATEGORY', form.suggestedCategory, categoryOptions))]">{{
103   - getDicName('CUSTOMER_CATEGORY', form.suggestedCategory, categoryOptions) }}</text>
104   - </text>
105   - </view>
106   - <view class="row"><text class="label">授信额度</text><text class="value">{{ form.creditLimit }} 万元</text></view>
107   - <view class="row"><text class="label">结算期限</text><text class="value">{{ form.settlementPeriod }}</text></view>
108   - <view class="row"><text class="label">加工操作方案</text><text class="value">{{ form.materialSupplyPlan }}</text>
109   - </view>
110   - <view class="row"><text class="label">调查人</text><text class="value">{{ form.investigatorName }}</text></view>
111   - <view class="row"><text class="label">审核主管</text><text class="value">{{ form.supervisorReviewName }}</text>
112   - </view>
  107 + <view class="row"><text class="label">建议客户分类</text>
  108 + <text class="value">
  109 + <text
  110 + :class="[form.suggestedCategory ? 'category' : '', getCategoryClass(getDicName('CUSTOMER_CATEGORY', form.suggestedCategory, categoryOptions))]">{{
  111 + getDicName('CUSTOMER_CATEGORY', form.suggestedCategory, categoryOptions) }}</text>
  112 + </text>
  113 + </view>
  114 + <view class="row"><text class="label">授信额度</text><text class="value">{{ form.creditLimit }} 万元</text></view>
  115 + <view class="row"><text class="label">结算期限</text><text class="value">{{ form.settlementPeriod }}</text>
  116 + </view>
  117 + <view class="row"><text class="label">加工操作方案</text><text class="value">{{ form.materialSupplyPlan }}</text>
  118 + </view>
  119 + <view class="row"><text class="label">调查人</text><text class="value">{{ form.investigatorName }}</text>
  120 + </view>
  121 + <view class="row"><text class="label">审核主管</text><text class="value">{{ form.supervisorReviewName }}</text>
  122 + </view>
113 123 </view>
114 124
115 125 <view class="title-header">
116   - <image class="title-header_icon" src="/static/images/title.png" />
117   - <span>职能核对</span>
  126 + <image class="title-header_icon" src="/static/images/title.png" />
  127 + <span>职能核对</span>
118 128 </view>
119 129 <view class="section">
120   - <view class="row"><text class="label">年度总销量</text><text class="value">{{ form.annualTotalSales }}</text>
121   - </view>
122   - <view class="row"><text class="label">主要行业</text><text class="value">{{ form.mainIndustry }}</text></view>
123   - <view class="row"><text class="label">年度款料概况</text><text class="value">{{ form.annualMaterialOverview
124   - }}</text></view>
  130 + <view class="row"><text class="label">年度总销量</text><text class="value">{{ form.annualTotalSales }}</text>
  131 + </view>
  132 + <view class="row"><text class="label">主要行业</text><text class="value">{{ form.mainIndustry }}</text></view>
  133 + <view class="row"><text class="label">年度款料概况</text><text class="value">{{ form.annualMaterialOverview
  134 + }}</text></view>
125 135 </view>
126 136
127 137 <view class="title-header">
128   - <image class="title-header_icon" src="/static/images/title.png" />
129   - <span>公司评审</span>
  138 + <image class="title-header_icon" src="/static/images/title.png" />
  139 + <span>公司评审</span>
130 140 </view>
131 141 <view class="section">
132   - <view class="row"><text class="label">客户分类</text>
133   - <text class="value">
134   - <text
135   - :class="[form.companySuggestedCategory ? 'category' : '', getCategoryClass(getDicName('CUSTOMER_CATEGORY', form.companySuggestedCategory, categoryOptions))]">{{
136   - getDicName('CUSTOMER_CATEGORY', form.companySuggestedCategory, categoryOptions) }}</text>
137   - </text>
138   - </view>
139   - <view class="row"><text class="label">授信额度</text><text class="value">{{ form.companyCreditLimit }} 万元</text>
140   - </view>
141   - <view class="row"><text class="label">结算期限</text><text class="value">{{ form.companySettlementPeriod }}</text>
142   - </view>
143   - <view class="row"><text class="label">加工操作方案</text><text class="value">{{ form.companyMaterialSupplyPlan
144   - }}</text></view>
  142 + <view class="row"><text class="label">客户分类</text>
  143 + <text class="value">
  144 + <text
  145 + :class="[form.companySuggestedCategory ? 'category' : '', getCategoryClass(getDicName('CUSTOMER_CATEGORY', form.companySuggestedCategory, categoryOptions))]">{{
  146 + getDicName('CUSTOMER_CATEGORY', form.companySuggestedCategory, categoryOptions) }}</text>
  147 + </text>
  148 + </view>
  149 + <view class="row"><text class="label">授信额度</text><text class="value">{{ form.companyCreditLimit }} 万元</text>
  150 + </view>
  151 + <view class="row"><text class="label">结算期限</text><text class="value">{{ form.companySettlementPeriod
  152 + }}</text>
  153 + </view>
  154 + <view class="row"><text class="label">加工操作方案</text><text class="value">{{ form.companyMaterialSupplyPlan
  155 + }}</text></view>
145 156 </view>
146 157
147 158 <view class="title-header">
148   - <image class="title-header_icon" src="/static/images/title.png" />
149   - <span>变更记录</span>
  159 + <image class="title-header_icon" src="/static/images/title.png" />
  160 + <span>变更记录</span>
150 161 </view>
151 162 <view class="section">
152   - <view class="history-header">
153   - <text class="col col1">序号</text>
154   - <text class="col col2">变更时间</text>
155   - <text class="col col3">操作</text>
156   - </view>
157   - <view v-for="(h, i) in historyList" :key="(h && (h.id || h.code)) || i" class="history-row">
158   - <text class="col col1">{{ i + 1 }}</text>
159   - <text class="col col2">{{ h.createTime || '' }}</text>
160   - <text class="col col3 link" @click="onViewHistory(h)">查看</text>
161   - </view>
  163 + <view class="history-header">
  164 + <text class="col col1">序号</text>
  165 + <text class="col col2">变更时间</text>
  166 + <text class="col col3">操作</text>
  167 + </view>
  168 + <view v-for="(h, i) in historyList" :key="(h && (h.id || h.code)) || i" class="history-row">
  169 + <text class="col col1">{{ i + 1 }}</text>
  170 + <text class="col col2">{{ h.createTime || '' }}</text>
  171 + <text class="col col3 link" @click="onViewHistory(h)">查看</text>
  172 + </view>
162 173 </view>
163   - </view>
164   - </scroll-view>
165   - </view>
  174 + </view>
166 175 </template>
167 176
168 177 <script>
... ... @@ -172,260 +181,250 @@ import { getDicByCodeApi } from '@/api/base.js'
172 181 import CorePersonnel from './corePersonnel.vue'
173 182
174 183 export default {
175   - name: 'CustomerCreditApprove',
176   - props: { id: { type: [String, Number], default: '' } },
177   - components: { CorePersonnel },
178   - data() {
179   - return {
180   - form: {},
181   - enterpriseTypeOptions: [],
182   - genderOptions: [],
183   - categoryOptions: [],
184   - historyList: []
185   - }
186   - },
187   - created() {
188   - this.loadEnterpriseTypeOptions()
189   - this.loadGenderOptions()
190   - this.loadCategoryOptions()
191   - },
192   - watch: {
193   - id: {
194   - immediate: true,
195   - handler(val) {
196   - const v = (val !== undefined && val !== null) ? String(val) : ''
197   - if (v) this.loadDetail(v)
198   - }
199   - }
200   - },
201   - methods: {
202   - async loadDetail(id) {
203   - try {
204   - const res = await getExamineById(id)
205   - const data = res.data || {}
206   - this.form = { ...data }
207   - const cid = this.form.id || this.form.code || id
208   - if (cid) this.loadHistoryList(cid)
209   - } catch (e) {
210   - this.form = {}
211   - }
212   - },
213   - async loadEnterpriseTypeOptions() {
214   - try {
215   - const res = await getDicByCodeApi('ENTERPRISE_TYPE')
216   - const list = res.data || []
217   - this.enterpriseTypeOptions = Array.isArray(list) ? list : []
218   - } catch (e) {
219   - this.enterpriseTypeOptions = []
220   - }
221   - },
222   - async loadGenderOptions() {
223   - try {
224   - const res = await getDicByCodeApi('GENDER_TYPE')
225   - const list = res.data || []
226   - this.genderOptions = Array.isArray(list) ? list : []
227   - } catch (e) {
228   - this.genderOptions = []
229   - }
230   - },
231   - async loadCategoryOptions() {
232   - try {
233   - const res = await getDicByCodeApi('CUSTOMER_CATEGORY')
234   - const list = res.data || []
235   - this.categoryOptions = Array.isArray(list) ? list : []
236   - } catch (e) {
237   - this.categoryOptions = []
238   - }
239   - },
240   - async loadHistoryList(creditId) {
241   - try {
242   - const res = await getByIdExamineCustomerCreditHistoryList(creditId)
243   - const _data = res.data || []
244   - this.historyList = Array.isArray(_data) ? _data : []
245   - } catch (e) {
246   - this.historyList = []
247   - }
  184 + name: 'CustomerCreditApprove',
  185 + props: { id: { type: [String, Number], default: '' } },
  186 + components: { CorePersonnel },
  187 + data() {
  188 + return {
  189 + form: {},
  190 + enterpriseTypeOptions: [],
  191 + genderOptions: [],
  192 + categoryOptions: [],
  193 + historyList: []
  194 + }
248 195 },
249   - onViewHistory(item) {
250   - const id = item && (item.id)
251   - if (!id) return
252   - const query = '?id=' + encodeURIComponent(id)
253   - uni.navigateTo({ url: '/pages/credit_manage/history_detail' + query })
  196 + created() {
  197 + this.loadEnterpriseTypeOptions()
  198 + this.loadGenderOptions()
  199 + this.loadCategoryOptions()
254 200 },
255   - getDicName,
256   - getCategoryClass(categoryName) {
257   - if (!categoryName) return ''
258   - if (categoryName.includes('A') || categoryName.includes('a')) {
259   - return 'category_A'
260   - } else if (categoryName.includes('B') || categoryName.includes('b')) {
261   - return 'category_B'
262   - } else if (categoryName.includes('C') || categoryName.includes('c')) {
263   - return 'category_C'
264   - } else if (categoryName.includes('D') || categoryName.includes('d')) {
265   - return 'category_D'
266   - }
  201 + watch: {
  202 + id: {
  203 + immediate: true,
  204 + handler(val) {
  205 + const v = (val !== undefined && val !== null) ? String(val) : ''
  206 + if (v) this.loadDetail(v)
  207 + }
  208 + }
267 209 },
268   - getFormValues() {
269   - const m = this.form || {}
270   - return JSON.parse(JSON.stringify(m))
  210 + methods: {
  211 + async loadDetail(id) {
  212 + try {
  213 + const res = await getExamineById(id)
  214 + const data = res.data || {}
  215 + this.form = { ...data }
  216 + const cid = this.form.id || this.form.code || id
  217 + if (cid) this.loadHistoryList(cid)
  218 + } catch (e) {
  219 + this.form = {}
  220 + }
  221 + },
  222 + async loadEnterpriseTypeOptions() {
  223 + try {
  224 + const res = await getDicByCodeApi('ENTERPRISE_TYPE')
  225 + const list = res.data || []
  226 + this.enterpriseTypeOptions = Array.isArray(list) ? list : []
  227 + } catch (e) {
  228 + this.enterpriseTypeOptions = []
  229 + }
  230 + },
  231 + async loadGenderOptions() {
  232 + try {
  233 + const res = await getDicByCodeApi('GENDER_TYPE')
  234 + const list = res.data || []
  235 + this.genderOptions = Array.isArray(list) ? list : []
  236 + } catch (e) {
  237 + this.genderOptions = []
  238 + }
  239 + },
  240 + async loadCategoryOptions() {
  241 + try {
  242 + const res = await getDicByCodeApi('CUSTOMER_CATEGORY')
  243 + const list = res.data || []
  244 + this.categoryOptions = Array.isArray(list) ? list : []
  245 + } catch (e) {
  246 + this.categoryOptions = []
  247 + }
  248 + },
  249 + async loadHistoryList(creditId) {
  250 + try {
  251 + const res = await getByIdExamineCustomerCreditHistoryList(creditId)
  252 + const _data = res.data || []
  253 + this.historyList = Array.isArray(_data) ? _data : []
  254 + } catch (e) {
  255 + this.historyList = []
  256 + }
  257 + },
  258 + onViewHistory(item) {
  259 + const id = item && (item.id)
  260 + if (!id) return
  261 + const query = '?id=' + encodeURIComponent(id)
  262 + uni.navigateTo({ url: '/pages/credit_manage/history_detail' + query })
  263 + },
  264 + getDicName,
  265 + getCategoryClass(categoryName) {
  266 + if (!categoryName) return ''
  267 + if (categoryName.includes('A') || categoryName.includes('a')) {
  268 + return 'category_A'
  269 + } else if (categoryName.includes('B') || categoryName.includes('b')) {
  270 + return 'category_B'
  271 + } else if (categoryName.includes('C') || categoryName.includes('c')) {
  272 + return 'category_C'
  273 + } else if (categoryName.includes('D') || categoryName.includes('d')) {
  274 + return 'category_D'
  275 + }
  276 + },
  277 + getFormValues() {
  278 + const m = this.form || {}
  279 + return JSON.parse(JSON.stringify(m))
  280 + }
271 281 }
272   - }
273 282 }
274 283 </script>
275 284
276 285 <style lang="scss" scoped>
277   -.page {
278   - display: flex;
279   - flex-direction: column;
280   - height: 100%;
281   -}
282   -
283   -.scroll {
284   - flex: 1;
285   - padding-bottom: 144rpx;
286   -}
287 286
288 287 .detail-page {
289   - background: #f3f3f3;
  288 + background: #f3f3f3;
290 289 }
291 290
292 291 .section {
293   - padding: 32rpx;
294   - background: #fff;
295   - margin-bottom: 20rpx;
296   - position: relative;
297   -
298   - .row {
299   - display: flex;
300   - margin-bottom: 28rpx;
301   -
302   - &:last-child {
303   - margin-bottom: 0;
304   - }
  292 + padding: 32rpx;
  293 + background: #fff;
  294 + margin-bottom: 20rpx;
  295 + position: relative;
305 296
306   - &.company {
307   - font-size: 36rpx;
308   - font-weight: 600;
309   - color: rgba(0, 0, 0, 0.9);
310   - }
311   -
312   - .label {
313   - max-width: 420rpx;
314   - line-height: 32rpx;
315   - font-size: 28rpx;
316   - color: rgba(0, 0, 0, 0.6);
317   - }
  297 + .row {
  298 + display: flex;
  299 + margin-bottom: 28rpx;
318 300
319   - .value {
320   - flex: 1;
321   - line-height: 32rpx;
322   - font-size: 28rpx;
323   - color: rgba(0, 0, 0, 0.9);
324   - text-align: right;
325   -
326   - .category {
327   - display: inline-block;
328   - padding: 4rpx 12rpx;
329   - border-radius: 6rpx;
330   - font-size: 24rpx;
331   - width: auto;
332   -
333   - &.category_A {
334   - background: #FFF0ED;
335   - color: #D54941;
  301 + &:last-child {
  302 + margin-bottom: 0;
336 303 }
337 304
338   - &.category_B {
339   - background: #FFF1E9;
340   - color: #E37318;
  305 + &.company {
  306 + font-size: 36rpx;
  307 + font-weight: 600;
  308 + color: rgba(0, 0, 0, 0.9);
341 309 }
342 310
343   - &.category_C {
344   - background: #F2F3FF;
345   - color: $theme-primary;
  311 + .label {
  312 + max-width: 420rpx;
  313 + line-height: 32rpx;
  314 + font-size: 28rpx;
  315 + color: rgba(0, 0, 0, 0.6);
346 316 }
347 317
348   - &.category_D {
349   - background: #E3F9E9;
350   - color: #2BA471;
  318 + .value {
  319 + flex: 1;
  320 + line-height: 32rpx;
  321 + font-size: 28rpx;
  322 + color: rgba(0, 0, 0, 0.9);
  323 + text-align: right;
  324 +
  325 + .category {
  326 + display: inline-block;
  327 + padding: 4rpx 12rpx;
  328 + border-radius: 6rpx;
  329 + font-size: 24rpx;
  330 + width: auto;
  331 +
  332 + &.category_A {
  333 + background: #FFF0ED;
  334 + color: #D54941;
  335 + }
  336 +
  337 + &.category_B {
  338 + background: #FFF1E9;
  339 + color: #E37318;
  340 + }
  341 +
  342 + &.category_C {
  343 + background: #F2F3FF;
  344 + color: $theme-primary;
  345 + }
  346 +
  347 + &.category_D {
  348 + background: #E3F9E9;
  349 + color: #2BA471;
  350 + }
  351 + }
351 352 }
352   - }
353   - }
354 353
355   - .act {
356   - color: $theme-primary;
  354 + .act {
  355 + color: $theme-primary;
  356 + }
357 357 }
358   - }
359 358 }
360 359
361 360 .title-header {
362   - background-color: #fff;
363   - display: flex;
364   - align-items: center;
365   - padding: 32rpx 32rpx 22rpx;
366   - border-bottom: 1rpx dashed #f0f0f0;
367   -
368   - &_icon {
369   - width: 32rpx;
370   - height: 28rpx;
371   - margin-right: 16rpx;
372   - }
373   -
374   - span {
375   - color: rgba(0, 0, 0, 0.9);
376   - font-size: 32rpx;
377   - line-height: 44rpx;
378   - font-weight: 600;
379   - }
  361 + background-color: #fff;
  362 + display: flex;
  363 + align-items: center;
  364 + padding: 32rpx 32rpx 22rpx;
  365 + border-bottom: 1rpx dashed #f0f0f0;
  366 +
  367 + &_icon {
  368 + width: 32rpx;
  369 + height: 28rpx;
  370 + margin-right: 16rpx;
  371 + }
  372 +
  373 + span {
  374 + color: rgba(0, 0, 0, 0.9);
  375 + font-size: 32rpx;
  376 + line-height: 44rpx;
  377 + font-weight: 600;
  378 + }
380 379 }
381 380
382 381 .history-header {
383   - display: flex;
384   - margin-bottom: 20rpx;
385   - font-size: 28rpx;
386   - color: rgba(0, 0, 0, 0.6);
387   -
388   - .col1 {
389   - width: 120rpx;
390   - }
391   -
392   - .col2 {
393   - flex: 1;
394   - text-align: center;
395   - }
396   -
397   - .col3 {
398   - width: 160rpx;
399   - text-align: right;
400   - }
  382 + display: flex;
  383 + margin-bottom: 20rpx;
  384 + font-size: 28rpx;
  385 + color: rgba(0, 0, 0, 0.6);
  386 +
  387 + .col1 {
  388 + width: 120rpx;
  389 + }
  390 +
  391 + .col2 {
  392 + flex: 1;
  393 + text-align: center;
  394 + }
  395 +
  396 + .col3 {
  397 + width: 160rpx;
  398 + text-align: right;
  399 + }
401 400 }
402 401
403 402 .history-row {
404   - display: flex;
405   - align-items: center;
406   - margin-bottom: 16rpx;
407   - font-size: 28rpx;
408   -
409   - .col1 {
410   - width: 120rpx;
411   - }
412   -
413   - .col2 {
414   - flex: 1;
415   - text-align: center;
416   - }
417   -
418   - .col3 {
419   - width: 160rpx;
420   - text-align: right;
421   - }
422   -
423   - .link {
424   - color: $theme-primary;
425   - }
  403 + display: flex;
  404 + align-items: center;
  405 + margin-bottom: 16rpx;
  406 + font-size: 28rpx;
  407 +
  408 + .col1 {
  409 + width: 120rpx;
  410 + }
  411 +
  412 + .col2 {
  413 + flex: 1;
  414 + text-align: center;
  415 + }
  416 +
  417 + .col3 {
  418 + width: 160rpx;
  419 + text-align: right;
  420 + }
  421 +
  422 + .link {
  423 + color: $theme-primary;
  424 + }
426 425 }
427 426
428 427 .mgb10 {
429   - margin-bottom: 20rpx;
  428 + margin-bottom: 20rpx;
430 429 }
431 430 </style>
\ No newline at end of file
... ...
1 1 <template>
2   - <view class="page">
3   - <scroll-view class="scroll" scroll-y>
4   - <view class="detail-page">
5   - <view class="section">
6   - <text class="row customer">{{ form.customer.name }}</text>
7   - <view class="row"><text class="label">生产厂</text><text class="value">{{ form.workshop ? form.workshop.name : '' }}</text>
8   - </view>
9   - <view class="row"><text class="label">科办</text><text class="value">{{ form.office ? form.office.name : '' }}</text>
10   - </view>
11   - <view class="row"><text class="label">客户类型</text><text
12   - class="value">{{ getDicName('ENTERPRISE_TYPE', form.customerType, customerTypeOptions) }}</text>
13   - </view>
14   - <view class="row"><text class="label">产品品种</text><text
15   - class="value">{{ form.productVariety.name }}</text></view>
16   - <view class="row"><text class="label">月用量</text><text class="value">{{ form.monthlyUsage }}</text>
17   - </view>
18   - <view class="row"><text class="label">目标量</text><text class="value">{{ form.targetQuantity }}</text>
19   - </view>
20   - <view class="row"><text class="label">行业</text><text class="value">{{ form.industry }}</text></view>
21   - <view class="row"><text class="label">创建日期</text><text class="value">{{ form.createTime }}</text>
22   - </view>
23   - </view>
24   - <view class="section">
25   - <view class="row"><text class="label">牌号</text><text class="value">{{ form.mark }}</text></view>
26   - <view class="row"><text class="label">厚度</text><text class="value">{{ form.thickness }}</text>
27   - </view>
28   - <view class="row"><text class="label">宽度</text><text class="value">{{ form.width }}</text></view>
29   - <view class="row"><text class="label">材质要求</text><text
30   - class="value">{{ form.materialRequire }}</text></view>
31   - <view class="row"><text class="label">品质要求</text><text
32   - class="value">{{ form.qualityRequire }}</text></view>
33   - <view class="row"><text class="label">同行</text><text class="value">{{ form.peer }}</text></view>
34   - </view>
35   - <view class="section">
36   - <view class="row"><text class="label">核价模式</text><text class="value">{{ form.pricingMode }}</text>
37   - </view>
38   - <view class="row"><text class="label">结算天数</text><text class="value">{{ form.settleDays }}</text>
39   - </view>
40   - </view>
41   - <view class="section">
42   - <view class="row"><text class="label">责任人</text><text class="value">{{ form.chargeUserName }}</text>
43   - </view>
44   - </view>
  2 + <view class="detail-page">
  3 + <view class="section">
  4 + <text class="row customer">{{ form.customer.name }}</text>
  5 + <view class="row"><text class="label">生产厂</text><text class="value">{{ form.workshop ? form.workshop.name :
  6 + '' }}</text>
45 7 </view>
46   - </scroll-view>
47   -
  8 + <view class="row"><text class="label">科办</text><text class="value">{{ form.office ? form.office.name : ''
  9 + }}</text>
  10 + </view>
  11 + <view class="row"><text class="label">客户类型</text><text class="value">{{ getDicName('ENTERPRISE_TYPE',
  12 + form.customerType, customerTypeOptions) }}</text>
  13 + </view>
  14 + <view class="row"><text class="label">产品品种</text><text class="value">{{ form.productVariety.name }}</text>
  15 + </view>
  16 + <view class="row"><text class="label">月用量</text><text class="value">{{ form.monthlyUsage }}</text>
  17 + </view>
  18 + <view class="row"><text class="label">目标量</text><text class="value">{{ form.targetQuantity }}</text>
  19 + </view>
  20 + <view class="row"><text class="label">行业</text><text class="value">{{ form.industry }}</text></view>
  21 + <view class="row"><text class="label">创建日期</text><text class="value">{{ form.createTime }}</text>
  22 + </view>
  23 + </view>
  24 + <view class="section">
  25 + <view class="row"><text class="label">牌号</text><text class="value">{{ form.mark }}</text></view>
  26 + <view class="row"><text class="label">厚度</text><text class="value">{{ form.thickness }}</text>
  27 + </view>
  28 + <view class="row"><text class="label">宽度</text><text class="value">{{ form.width }}</text></view>
  29 + <view class="row"><text class="label">材质要求</text><text class="value">{{ form.materialRequire }}</text>
  30 + </view>
  31 + <view class="row"><text class="label">品质要求</text><text class="value">{{ form.qualityRequire }}</text></view>
  32 + <view class="row"><text class="label">同行</text><text class="value">{{ form.peer }}</text></view>
  33 + </view>
  34 + <view class="section">
  35 + <view class="row"><text class="label">核价模式</text><text class="value">{{ form.pricingMode }}</text>
  36 + </view>
  37 + <view class="row"><text class="label">结算天数</text><text class="value">{{ form.settleDays }}</text>
  38 + </view>
  39 + </view>
  40 + <view class="section">
  41 + <view class="row"><text class="label">责任人</text><text class="value">{{ form.chargeUserName }}</text>
  42 + </view>
  43 + </view>
48 44 </view>
49 45 </template>
50 46
51 47 <script>
52   - import {
53   - getDetailApi
54   - } from '@/api/devManage.js'
55   - import {
56   - getDicName
57   - } from '@/utils/dic.js'
58   - import {
59   - getDicByCodeApi
60   - } from '@/api/base.js'
61   -
  48 +import {
  49 + getDetailApi
  50 +} from '@/api/devManage.js'
  51 +import {
  52 + getDicName
  53 +} from '@/utils/dic.js'
  54 +import {
  55 + getDicByCodeApi
  56 +} from '@/api/base.js'
  57 +
62 58
63   - export default {
64   - name: 'CustomerDevelopViewer',
65   - props: { id: { type: [String, Number], default: '' } },
66   - components: {
67   - },
68   - data() {
69   - return {
70   - form: {
71   - workshop: {},
72   - office: {},
73   - customer: {},
74   - customerType: '',
75   - chargeUserId: '',
76   - chargeUserIdName: '',
77   - productVariety: {},
78   - monthlyUsage: '',
79   - targetQuantity: '',
80   - industry: '',
81   - mark: '',
82   - thickness: '',
83   - width: '',
84   - materialRequire: '',
85   - qualityRequire: '',
86   - peer: '',
87   - pricingMode: '',
88   - settleDays: '',
89   - createTime: '',
90   - status: ''
91   - },
92   - customerTypeOptions: []
93   - }
94   - },
95   - computed: {
96   - },
97   - created() {
98   - this.loadCustomerTypeOptions()
  59 +export default {
  60 + name: 'CustomerDevelopViewer',
  61 + props: { id: { type: [String, Number], default: '' } },
  62 + components: {
  63 + },
  64 + data() {
  65 + return {
  66 + form: {
  67 + workshop: {},
  68 + office: {},
  69 + customer: {},
  70 + customerType: '',
  71 + chargeUserId: '',
  72 + chargeUserIdName: '',
  73 + productVariety: {},
  74 + monthlyUsage: '',
  75 + targetQuantity: '',
  76 + industry: '',
  77 + mark: '',
  78 + thickness: '',
  79 + width: '',
  80 + materialRequire: '',
  81 + qualityRequire: '',
  82 + peer: '',
  83 + pricingMode: '',
  84 + settleDays: '',
  85 + createTime: '',
  86 + status: ''
  87 + },
  88 + customerTypeOptions: []
  89 + }
  90 + },
  91 + computed: {
  92 + },
  93 + created() {
  94 + this.loadCustomerTypeOptions()
  95 + },
  96 + watch: {
  97 + id: {
  98 + immediate: true,
  99 + handler(val) {
  100 + const v = (val !== undefined && val !== null) ? String(val) : ''
  101 + if (v) this.loadDetail(v)
  102 + }
  103 + }
  104 + },
  105 + onShow() {
  106 + uni.$on('dev_manage_detail_reload', this.onReload)
  107 + },
  108 + onUnload() {
  109 + uni.$off('dev_manage_detail_reload', this.onReload)
  110 + },
  111 +
  112 + methods: {
  113 + onReload(payload) {
  114 + const id = (payload && (payload.id || payload.code)) || this.form.id || this.form.code || ''
  115 + if (id) this.loadDetail(id)
99 116 },
100   - watch: {
101   - id: {
102   - immediate: true,
103   - handler(val) {
104   - const v = (val !== undefined && val !== null) ? String(val) : ''
105   - if (v) this.loadDetail(v)
  117 + async loadDetail(id) {
  118 + try {
  119 + const res = await getDetailApi(id)
  120 + console.log('getDetailApi res', res)
  121 + const data = res.data || {};
  122 + this.form = {
  123 + ...data
106 124 }
  125 + } catch (e) {
  126 + console.error('loadDetail error', e)
107 127 }
108 128 },
109   - onShow() {
110   - uni.$on('dev_manage_detail_reload', this.onReload)
111   - },
112   - onUnload() {
113   - uni.$off('dev_manage_detail_reload', this.onReload)
  129 + async loadCustomerTypeOptions() {
  130 + try {
  131 + const res = await getDicByCodeApi('ENTERPRISE_TYPE')
  132 + const list = res.data || []
  133 + this.customerTypeOptions = Array.isArray(list) ? list : []
  134 + } catch (e) {
  135 + this.customerTypeOptions = []
  136 + }
114 137 },
115   -
116   - methods: {
117   - onReload(payload) {
118   - const id = (payload && (payload.id || payload.code)) || this.form.id || this.form.code || ''
119   - if (id) this.loadDetail(id)
120   - },
121   - async loadDetail(id) {
122   - try {
123   - const res = await getDetailApi(id)
124   - console.log('getDetailApi res', res)
125   - const data = res.data || {};
126   - this.form = {
127   - ...data
128   - }
129   - } catch (e) {
130   - console.error('loadDetail error', e)
131   - }
132   - },
133   - async loadCustomerTypeOptions() {
134   - try {
135   - const res = await getDicByCodeApi('ENTERPRISE_TYPE')
136   - const list = res.data || []
137   - this.customerTypeOptions = Array.isArray(list) ? list : []
138   - } catch (e) {
139   - this.customerTypeOptions = []
140   - }
141   - },
142   - getDicName: getDicName
143   - ,
144   - getFormValues() {
145   - const m = this.form || {}
146   - return JSON.parse(JSON.stringify(m))
147   - }
148   - }
149   - }
  138 + getDicName: getDicName
  139 + ,
  140 + getFormValues() {
  141 + const m = this.form || {}
  142 + return JSON.parse(JSON.stringify(m))
  143 + }
  144 + }
  145 +}
150 146 </script>
151 147
152 148 <style lang="scss" scoped>
153   - .page {
154   - display: flex;
155   - flex-direction: column;
156   - height: 100%;
157   - }
158   -
159   - .scroll {
160   - flex: 1;
161   - }
162   -
163   - .detail-page {
164   - background: #f3f3f3;
165   - }
  149 +.detail-page {
  150 + background: #f3f3f3;
  151 +}
166 152
167   - .section {
168   - padding: 32rpx;
169   - background: #fff;
170   - margin-bottom: 20rpx;
171   - position: relative;
  153 +.section {
  154 + padding: 32rpx;
  155 + background: #fff;
  156 + margin-bottom: 20rpx;
  157 + position: relative;
172 158
173   - .row {
174   - display: flex;
175   - margin-bottom: 28rpx;
  159 + .row {
  160 + display: flex;
  161 + margin-bottom: 28rpx;
176 162
177   - &:last-child {
178   - margin-bottom: 0;
179   - }
  163 + &:last-child {
  164 + margin-bottom: 0;
  165 + }
180 166
181   - &.customer {
182   - font-size: 36rpx;
183   - font-weight: 600;
184   - color: rgba(0, 0, 0, 0.9);
185   - }
  167 + &.customer {
  168 + font-size: 36rpx;
  169 + font-weight: 600;
  170 + color: rgba(0, 0, 0, 0.9);
  171 + }
186 172
187   - .label {
188   - width: 120rpx;
189   - line-height: 32rpx;
190   - font-size: 28rpx;
191   - color: rgba(0, 0, 0, 0.6);
192   - }
  173 + .label {
  174 + width: 120rpx;
  175 + line-height: 32rpx;
  176 + font-size: 28rpx;
  177 + color: rgba(0, 0, 0, 0.6);
  178 + }
193 179
194   - .value {
195   - flex: 1;
196   - line-height: 32rpx;
197   - font-size: 28rpx;
198   - color: rgba(0, 0, 0, 0.9);
199   - text-align: right;
200   - }
  180 + .value {
  181 + flex: 1;
  182 + line-height: 32rpx;
  183 + font-size: 28rpx;
  184 + color: rgba(0, 0, 0, 0.9);
  185 + text-align: right;
201 186 }
202 187 }
  188 +}
203 189 </style>
\ No newline at end of file
... ...
... ... @@ -247,7 +247,7 @@ export default {
247 247 .body {
248 248 flex: 1;
249 249 padding-top: 104rpx;
250   - padding-bottom: 150rpx
  250 + padding-bottom: 150rpx;
251 251 }
252 252
253 253 .footer {
... ...
1 1 import CustomerDevelopViewer from '@/pages/dev_manage/viewer.vue'
2   -import CustomerCreditApprove from '@/pages/credit_manage/approve.vue'
  2 +import CustomerCreditViewer from '@/pages/credit_manage/viewer.vue'
3 3
4 4 export default function registerComponents(Vue) {
5 5 Vue.component('CustomerDevelopViewer', CustomerDevelopViewer)
6   - Vue.component('CustomerCreditApprove', CustomerCreditApprove)
  6 + Vue.component('CustomerCreditViewer', CustomerCreditViewer)
7 7 }
\ No newline at end of file
... ...
... ... @@ -9,10 +9,10 @@ export const getSysFlowComponentPath = (bizFlag) => {
9 9 componentPath = 'CustomerDevelopViewer'; // 客户开发-审批
10 10 break;
11 11 case 'CUSTOMER_CREDIT': // 客户资信
12   - componentPath = 'CustomerCreditApprove'; // 客户资信-审批详情
  12 + componentPath = 'CustomerCreditViewer'; // 客户资信-审批详情
13 13 break;
14 14 case 'CUSTOMER_CREDIT_EDIT': // 客户资信
15   - componentPath = 'CustomerCreditApprove'; // 客户资信-审批
  15 + componentPath = 'CustomerCreditViewer'; // 客户资信-审批
16 16 break;
17 17 case 'STANDARD_CONTRACT': // 标准合同
18 18 componentPath = 'StandardContractViewer'; // 标准合同-审批详情
... ...