imeik-bizui 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bizui/api/applycenter.js +117 -0
- package/dist/bizui/src/FieldAgreementUpload/index.vue +1 -1
- package/dist/bizui/src/FieldApplyTypeView/data.js +3 -3
- package/dist/bizui/src/FieldApplyTypeView/index.vue +64 -36
- package/dist/bizui/src/FieldBatchesDelivery/components/MaterialList.vue +10 -10
- package/dist/bizui/src/FieldBatchesDelivery/index.vue +1 -1
- package/dist/bizui/src/FieldContentDescription/index.vue +4 -4
- package/dist/bizui/src/FieldCustomSelect/components/CustomSelect.vue +28 -68
- package/dist/bizui/src/FieldCustomSelect/components/CustomShow.vue +53 -12
- package/dist/bizui/src/FieldCustomSelect/index.vue +16 -3
- package/dist/bizui/src/FieldMaterialSelect/components/AddressSelect.vue +243 -112
- package/dist/bizui/src/FieldMaterialSelect/components/ProductList.vue +130 -45
- package/dist/bizui/src/FieldMaterialSelect/components/SelectProductDialog.vue +40 -23
- package/dist/bizui/src/FieldMaterialSelect/index.vue +56 -8
- package/dist/bizui/src/FieldSeleceDoctor/index.vue +9 -6
- package/dist/bizui/src/FieldTagComponent/index.vue +9 -1
- package/dist/imeik-bizui.common.js +1355 -715
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.css +1 -1
- package/dist/imeik-bizui.css.gz +0 -0
- package/dist/imeik-bizui.umd.js +1355 -715
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +12 -12
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -17,3 +17,120 @@ export function getPermissionedTagData(data) {
|
|
|
17
17
|
data
|
|
18
18
|
})
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 获取标签管理列表
|
|
23
|
+
* @param {*} data
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export function getTagManageList(data) {
|
|
27
|
+
return request({
|
|
28
|
+
url: '/application-center-admin/data/exchange/getTagManageList',
|
|
29
|
+
method: 'get',
|
|
30
|
+
params: data
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 获取客户分页选择列表
|
|
36
|
+
* @param {*} data
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
export function getCustomerList(data) {
|
|
40
|
+
return request({
|
|
41
|
+
url: '/application-center-admin/data/exchange/getCustomerList',
|
|
42
|
+
method: 'post',
|
|
43
|
+
data
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 获取医生信息
|
|
49
|
+
* @param {*} data
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
export function getDoctorList(data) {
|
|
53
|
+
return request({
|
|
54
|
+
url: '/application-center-admin/data/exchange/getDoctorList',
|
|
55
|
+
method: 'post',
|
|
56
|
+
data
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 获取物料列表
|
|
62
|
+
* @param {*} data
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
export function getMaterialList(data) {
|
|
66
|
+
return request({
|
|
67
|
+
url: '/application-center-admin/data/exchange/getMaterialList',
|
|
68
|
+
method: 'post',
|
|
69
|
+
data
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 获取产品对应地址信息
|
|
75
|
+
* @param {*} data
|
|
76
|
+
* @returns
|
|
77
|
+
*/
|
|
78
|
+
export function getMaterialReceivingAddressList(data) {
|
|
79
|
+
return request({
|
|
80
|
+
url: '/application-center-admin/data/exchange/getMaterialReceivingAddressList',
|
|
81
|
+
method: 'post',
|
|
82
|
+
data
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 获取母方案数据
|
|
88
|
+
* @param {*} data
|
|
89
|
+
* @returns
|
|
90
|
+
*/
|
|
91
|
+
export function getMotherSchemeList(data) {
|
|
92
|
+
return request({
|
|
93
|
+
url: '/application-center-admin/data/exchange/getMotherSchemeList',
|
|
94
|
+
method: 'post',
|
|
95
|
+
data
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* 获取项目编号
|
|
101
|
+
* @param {*} data
|
|
102
|
+
* @returns
|
|
103
|
+
*/
|
|
104
|
+
export function getProjectNo(data) {
|
|
105
|
+
return request({
|
|
106
|
+
url: '/application-center-admin/data/exchange/getProjectNo',
|
|
107
|
+
method: 'post',
|
|
108
|
+
data
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 获取项目编号
|
|
114
|
+
* @param {*} data
|
|
115
|
+
* @returns
|
|
116
|
+
*/
|
|
117
|
+
export function getReceivingContact(data) {
|
|
118
|
+
return request({
|
|
119
|
+
url: '/application-center-admin/data/exchange/getReceivingContact',
|
|
120
|
+
method: 'post',
|
|
121
|
+
data
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 获取项目编号
|
|
127
|
+
* @param {*} data
|
|
128
|
+
* @returns
|
|
129
|
+
*/
|
|
130
|
+
export function getEmployeeAddress(data) {
|
|
131
|
+
return request({
|
|
132
|
+
url: '/application-center-admin/data/exchange/getEmployeeAddress',
|
|
133
|
+
method: 'get',
|
|
134
|
+
params: data
|
|
135
|
+
})
|
|
136
|
+
}
|
|
@@ -136,7 +136,7 @@ const typeItems = {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
],
|
|
139
|
-
|
|
139
|
+
'1896397579093626883': [
|
|
140
140
|
{
|
|
141
141
|
type: 'FieldEmpty',
|
|
142
142
|
span: 18,
|
|
@@ -300,7 +300,7 @@ const typeItems = {
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
],
|
|
303
|
-
|
|
303
|
+
'1896397579114598403': [
|
|
304
304
|
{
|
|
305
305
|
type: 'FieldEmpty',
|
|
306
306
|
span: 18,
|
|
@@ -464,7 +464,7 @@ const typeItems = {
|
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
],
|
|
467
|
-
|
|
467
|
+
'1896397579127181314': [
|
|
468
468
|
{
|
|
469
469
|
type: 'FieldEmpty',
|
|
470
470
|
span: 18,
|
|
@@ -9,18 +9,26 @@
|
|
|
9
9
|
<script>
|
|
10
10
|
import { getTypeItems } from './data'
|
|
11
11
|
import FieldSeleceDoctor from '../FieldSeleceDoctor/index.vue'
|
|
12
|
+
import { getTagManageList, getProjectNo } from '../../api/applycenter'
|
|
13
|
+
import Axios from 'axios'
|
|
12
14
|
export default {
|
|
13
15
|
name: 'applyTypeView',
|
|
14
16
|
components: {
|
|
15
17
|
FieldSeleceDoctor
|
|
16
18
|
},
|
|
17
19
|
props: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
value: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
attrs: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default() {
|
|
29
|
+
return {}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
24
32
|
},
|
|
25
33
|
data() {
|
|
26
34
|
return {
|
|
@@ -32,7 +40,7 @@ export default {
|
|
|
32
40
|
labelPosition: 'top'
|
|
33
41
|
},
|
|
34
42
|
props: {
|
|
35
|
-
applyType:
|
|
43
|
+
applyType: undefined
|
|
36
44
|
},
|
|
37
45
|
formItems: []
|
|
38
46
|
}
|
|
@@ -50,24 +58,7 @@ export default {
|
|
|
50
58
|
label: '申请类型',
|
|
51
59
|
rules: [{ required: !this.isView, message: '请选择申请类型' }],
|
|
52
60
|
attrs: {
|
|
53
|
-
options: [
|
|
54
|
-
{
|
|
55
|
-
label: '小样产品临床应用',
|
|
56
|
-
value: 1
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
label: '产品临床应用方案研究',
|
|
60
|
-
value: 2
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
label: '临床科研合作研究',
|
|
64
|
-
value: 3
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: '上市后大样本临床研究',
|
|
68
|
-
value: 4
|
|
69
|
-
}
|
|
70
|
-
],
|
|
61
|
+
options: [],
|
|
71
62
|
style: {
|
|
72
63
|
width: '100%'
|
|
73
64
|
},
|
|
@@ -97,20 +88,48 @@ export default {
|
|
|
97
88
|
handler(val) {
|
|
98
89
|
this.setPropsData()
|
|
99
90
|
},
|
|
100
|
-
immediate: true,
|
|
101
91
|
deep: true
|
|
102
92
|
}
|
|
103
93
|
},
|
|
104
94
|
mounted() {
|
|
105
|
-
|
|
106
|
-
// applyType: 1,
|
|
107
|
-
// doctor: [],
|
|
108
|
-
// motexinxi: '123123123123',
|
|
109
|
-
// zhusheshijian: '2023-10-09',
|
|
110
|
-
// kaishishijian: ['2023-10-09', '2023-10-11']
|
|
111
|
-
// }
|
|
95
|
+
this.getApplyList()
|
|
112
96
|
},
|
|
113
97
|
methods: {
|
|
98
|
+
getApplyList() {
|
|
99
|
+
getTagManageList({ tagModel: 'APPLY', tagName: '申请出库类型' }).then((res) => {
|
|
100
|
+
if (res.code === 200) {
|
|
101
|
+
Axios.get(res.data[0].tagValueUrl).then((valData) => {
|
|
102
|
+
console.log('请求', valData)
|
|
103
|
+
if (valData.data.code === 200) {
|
|
104
|
+
this.handleOptions(valData.data.data)
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
} else {
|
|
108
|
+
this.$message.error(res.msg)
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
},
|
|
112
|
+
handleOptions(data) {
|
|
113
|
+
const allData =
|
|
114
|
+
data?.flatMap((item) => {
|
|
115
|
+
return (
|
|
116
|
+
item?.subRegin?.map((sub) => ({
|
|
117
|
+
label: sub.dicName || '',
|
|
118
|
+
value: sub.dicValue || ''
|
|
119
|
+
})) || []
|
|
120
|
+
)
|
|
121
|
+
}) || []
|
|
122
|
+
const resData = []
|
|
123
|
+
allData?.forEach((element) => {
|
|
124
|
+
if (this.attrs.applyTypeOptions?.options.includes(element.value)) {
|
|
125
|
+
resData.push(element)
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
this.formConfig.formItems[0].attrs.options = resData
|
|
129
|
+
if (this.attrs.applyTypeOptions.default) {
|
|
130
|
+
this.formConfig.props.applyType = this.attrs.applyTypeOptions.default
|
|
131
|
+
}
|
|
132
|
+
},
|
|
114
133
|
changeShowItems() {
|
|
115
134
|
const items = getTypeItems(this.formConfig.props.applyType, this.isView)
|
|
116
135
|
this.formConfig.formItems = [this.formConfig.formItems[0], ...items]
|
|
@@ -118,16 +137,25 @@ export default {
|
|
|
118
137
|
onApplyTypechange() {
|
|
119
138
|
// 清楚数据
|
|
120
139
|
this.formConfig.props = { applyType: this.formConfig.props.applyType }
|
|
140
|
+
this.setTypeDataOnChange()
|
|
121
141
|
},
|
|
122
142
|
// 与大表单同步数据,更新数据
|
|
123
143
|
setPropsData() {
|
|
144
|
+
console.log('触发更新')
|
|
124
145
|
this.$emit('input', this.formConfig.props)
|
|
125
146
|
this.$emit('change', this.formConfig.props)
|
|
126
147
|
},
|
|
127
148
|
setTypeDataOnChange() {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
149
|
+
getProjectNo().then(res => {
|
|
150
|
+
if (res.code === 200) {
|
|
151
|
+
this.formConfig.props.yanjiubianhao = res.data.projectNo
|
|
152
|
+
} else {
|
|
153
|
+
this.$message.error(res.msg)
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
// this.formConfig.props.yusuankemu = '预算科目'
|
|
157
|
+
// this.formConfig.props.chukuleixing = '预算科目2'
|
|
158
|
+
// this.formConfig.props.yanjiubianhao = '预算科目3'
|
|
131
159
|
}
|
|
132
160
|
}
|
|
133
161
|
}
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
<el-tag type="danger">未签约</el-tag>
|
|
6
6
|
<el-tag effect="plain" class="ml-1">返货</el-tag>
|
|
7
7
|
<el-tag effect="plain" class="ml-1">赠品</el-tag>
|
|
8
|
-
<p class="materialName"
|
|
9
|
-
<p class="materialSubName"
|
|
10
|
-
<p class="materialSubName">编码:
|
|
11
|
-
<p class="materialSubName"
|
|
8
|
+
<p class="materialName">{{ row.materialAbbreviation }}</p>
|
|
9
|
+
<p class="materialSubName">{{ row.materialName }}</p>
|
|
10
|
+
<p class="materialSubName">编码:{{ row.materialCode }}</p>
|
|
11
|
+
<p class="materialSubName">商标:{{ row.materialTrademark }}</p>
|
|
12
12
|
</template>
|
|
13
13
|
<template slot="materialCountInfo" slot-scope="{ row }">
|
|
14
|
-
<p class="materialSubName">申请数量:{{ row.
|
|
15
|
-
<p class="materialSubName">规格型号:
|
|
16
|
-
<p class="materialSubName">包装规格:
|
|
17
|
-
<p class="materialSubName"
|
|
14
|
+
<p class="materialSubName">申请数量:{{ row.materialQuantity || '-' }}</p>
|
|
15
|
+
<p class="materialSubName">规格型号:{{ row.materialModel }}</p>
|
|
16
|
+
<p class="materialSubName">包装规格:{{ row.materialSpecification }}</p>
|
|
17
|
+
<p class="materialSubName">计量单位:{{ row.materialUnit }}</p>
|
|
18
18
|
</template>
|
|
19
19
|
<template slot="useCount" slot-scope="{ row }">
|
|
20
20
|
<p v-if="isView">{{ row.useCount }}</p>
|
|
@@ -136,11 +136,11 @@ export default {
|
|
|
136
136
|
const data = JSON.parse(JSON.stringify(this.formProps.applicationApplyMaterial))
|
|
137
137
|
const allSelectData = this.getAllSelectData() || []
|
|
138
138
|
data.forEach((item) => {
|
|
139
|
-
item.currentQuantityCount = Number(item.
|
|
139
|
+
item.currentQuantityCount = Number(item.materialQuantity)
|
|
140
140
|
item.currentSurplusQuantity = Number(item.currentQuantityCount)
|
|
141
141
|
allSelectData.forEach((item2) => {
|
|
142
142
|
if (item.productCode === item2.productCode) {
|
|
143
|
-
item.currentQuantityCount = (item.currentQuantityCount || Number(item.
|
|
143
|
+
item.currentQuantityCount = (item.currentQuantityCount || Number(item.materialQuantity)) - Number(item2.useCount)
|
|
144
144
|
item.currentSurplusQuantity = Number(item.currentQuantityCount)
|
|
145
145
|
}
|
|
146
146
|
})
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
showButotn() {
|
|
37
37
|
const hasMaterial = this.formProps.applicationApplyMaterial?.length
|
|
38
38
|
const hasMaterialQuantity = this.formProps.applicationApplyMaterial?.every(
|
|
39
|
-
item => item.
|
|
39
|
+
item => item.materialQuantity
|
|
40
40
|
)
|
|
41
41
|
return this.radio === '2' && hasMaterial && hasMaterialQuantity
|
|
42
42
|
},
|
|
@@ -38,16 +38,16 @@ export default {
|
|
|
38
38
|
methods: {
|
|
39
39
|
setBottomText() {
|
|
40
40
|
console.log(this.formProps, 'this.formProps')
|
|
41
|
-
if (this.formProps?.applyType
|
|
41
|
+
if (this.formProps?.applyType?.applyType === 1) {
|
|
42
42
|
this.attrs.bottomText = '①术前照片要求与此申请一起提交,术后照片及反馈资料要求注射后一周内发给商务助理;②提供医生签字或者机构盖章的上市后临床研究协议的电子版照片;③纸质版协议寄回给商务助理。'
|
|
43
43
|
}
|
|
44
|
-
if (this.formProps?.applyType
|
|
44
|
+
if (this.formProps?.applyType?.applyType === 2) {
|
|
45
45
|
this.attrs.bottomText = '①提供医生签字或者机构盖章的合作意向书/技术服务合同,需总经理签字;②若需要机构伦理委员会审批提供审批结果;③研究周期及预期成果需注明资料反馈时间。'
|
|
46
46
|
}
|
|
47
|
-
if (this.formProps?.applyType
|
|
47
|
+
if (this.formProps?.applyType?.applyType === 3) {
|
|
48
48
|
this.attrs.bottomText = '①提供机构盖章的合作协议或技术服务合同;②若需要机构伦理委员会审批提供审批结果。'
|
|
49
49
|
}
|
|
50
|
-
if (this.formProps?.applyType
|
|
50
|
+
if (this.formProps?.applyType?.applyType === 4) {
|
|
51
51
|
this.attrs.bottomText = '①提供医生签字或者机构盖章的合作意向书或技术服务合同;②若需要机构伦理委员会审批提供审批结果。'
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -14,23 +14,15 @@
|
|
|
14
14
|
@change="onUpdate"
|
|
15
15
|
@visible-change="visibleChange"
|
|
16
16
|
>
|
|
17
|
-
<el-option v-for="item in filteredOptions" :key="item.
|
|
18
|
-
<CustomShow :custom-data="item"></CustomShow>
|
|
17
|
+
<el-option v-for="item in filteredOptions" :key="item.customerUniqueCode" class="customOption" :value="item.customerUniqueCode">
|
|
18
|
+
<CustomShow :custom-data="item" :show-list="showList"></CustomShow>
|
|
19
19
|
</el-option>
|
|
20
|
-
<template slot="empty">
|
|
21
|
-
<div class="empty-view">
|
|
22
|
-
<img class="empty-img" src="https://udstatic.imeik.com/pcUploads/1740367022886/empty.png" alt="" />
|
|
23
|
-
<p class="empty-text">当前客户不存在 <span @click="toCreateCustom">去新建客户</span></p>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
20
|
</el-select>
|
|
27
21
|
</template>
|
|
28
22
|
|
|
29
23
|
<script>
|
|
30
|
-
// import { searchCustomerInfo } from '@/api/supplyRequest'
|
|
31
|
-
// import { debounce } from '@/utils/debounce'
|
|
32
24
|
import CustomShow from './CustomShow.vue'
|
|
33
|
-
|
|
25
|
+
import { getCustomerList } from '../../../api/applycenter'
|
|
34
26
|
export default {
|
|
35
27
|
name: 'CustomerSelect',
|
|
36
28
|
components: {
|
|
@@ -56,10 +48,15 @@ export default {
|
|
|
56
48
|
selectedText: {
|
|
57
49
|
type: String,
|
|
58
50
|
default: undefined
|
|
51
|
+
},
|
|
52
|
+
showList: {
|
|
53
|
+
type: Array,
|
|
54
|
+
default() {
|
|
55
|
+
return []
|
|
56
|
+
}
|
|
59
57
|
}
|
|
60
58
|
},
|
|
61
59
|
data() {
|
|
62
|
-
// this.getOptions = debounce(this.getOptions, 300)
|
|
63
60
|
return {
|
|
64
61
|
myValue: undefined,
|
|
65
62
|
loading: true,
|
|
@@ -73,13 +70,10 @@ export default {
|
|
|
73
70
|
return
|
|
74
71
|
}
|
|
75
72
|
|
|
76
|
-
return this.options.find((item) =>
|
|
73
|
+
return this.options.find((item) => item.customerUniqueCode === this.myValue)
|
|
77
74
|
},
|
|
78
75
|
|
|
79
76
|
filteredOptions() {
|
|
80
|
-
// 测试环境UAT限制展示这几个公司
|
|
81
|
-
// const allowNames = ['北京唯康生物科技有限公司', '西安沙田医学美容信息咨询有限公司', '安徽中生安兰生物技术有限公司', '沈阳佳润医疗器械有限公司', '北京博雅丽人商贸有限公司']
|
|
82
|
-
// const result = this.options.filter((item) => allowNames.includes(item.CustomerName))
|
|
83
77
|
const result = this.options || []
|
|
84
78
|
return result || []
|
|
85
79
|
}
|
|
@@ -118,62 +112,28 @@ export default {
|
|
|
118
112
|
getOptions() {
|
|
119
113
|
this.loading = false
|
|
120
114
|
this.options = [
|
|
121
|
-
{
|
|
122
|
-
CustomerName: '北京华夏医美科技发展有限公司中医门诊',
|
|
123
|
-
BelongCompany: '股份',
|
|
124
|
-
BillCustomerName: '北京华夏医美科技发展有限公司中',
|
|
125
|
-
Account_Id: '11122222',
|
|
126
|
-
customTType: '经销商',
|
|
127
|
-
startAndLenve: '三星五级',
|
|
128
|
-
groupName: '华夏医美华夏医美华夏医美华夏医'
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
CustomerName: '北京华夏医美科技发展有限公司中医门诊',
|
|
132
|
-
BelongCompany: '股份',
|
|
133
|
-
BillCustomerName: '北京华夏医美科技发展有限公司中',
|
|
134
|
-
Account_Id: '111222223',
|
|
135
|
-
customTType: '经销商',
|
|
136
|
-
startAndLenve: '三星五级',
|
|
137
|
-
groupName: '华夏医美华夏医美华夏医美华夏医'
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
CustomerName: '北京华夏医美科技发展有限公司中医门诊',
|
|
141
|
-
BelongCompany: '股份',
|
|
142
|
-
BillCustomerName: '北京华夏医美科技发展有限公司中',
|
|
143
|
-
Account_Id: '111222222',
|
|
144
|
-
customTType: '经销商',
|
|
145
|
-
startAndLenve: '三星五级',
|
|
146
|
-
groupName: '华夏医美华夏医美华夏医美华夏医'
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
CustomerName: '北京华夏医美科技发展有限公司中医门诊',
|
|
150
|
-
BelongCompany: '股份',
|
|
151
|
-
BillCustomerName: '北京华夏医美科技发展有限公司中',
|
|
152
|
-
Account_Id: '111422222',
|
|
153
|
-
customTType: '经销商',
|
|
154
|
-
startAndLenve: '三星五级',
|
|
155
|
-
groupName: '华夏医美华夏医美华夏医美华夏医'
|
|
156
|
-
}
|
|
157
115
|
]
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
116
|
+
const params = {
|
|
117
|
+
customerName: this.selectName || '',
|
|
118
|
+
page: 1,
|
|
119
|
+
limit: 10,
|
|
120
|
+
...this.extra
|
|
121
|
+
}
|
|
122
|
+
this.loading = true
|
|
123
|
+
getCustomerList(params)
|
|
124
|
+
.then((res) => {
|
|
125
|
+
if (res.code === 200) {
|
|
126
|
+
this.options = res.data.list || []
|
|
127
|
+
// this.onUpdate() // 不用一上来就回填 会导致有些人拿不到信息的时候回填内容为空
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
.finally(() => {
|
|
131
|
+
this.loading = false
|
|
132
|
+
})
|
|
173
133
|
},
|
|
174
134
|
|
|
175
135
|
onUpdate() {
|
|
176
|
-
this.$emit('input', this.myValue
|
|
136
|
+
this.$emit('input', this.myValue)
|
|
177
137
|
this.$emit('change', this.myValue, this.myItem)
|
|
178
138
|
},
|
|
179
139
|
toCreateCustom() {}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="item-view">
|
|
3
3
|
<div>
|
|
4
|
-
<el-tag>
|
|
5
|
-
{{ customData.BelongCompany }}
|
|
6
|
-
</el-tag>
|
|
4
|
+
<el-tag>股份</el-tag>
|
|
7
5
|
<el-tag effect="plain" class="ml-2">特殊</el-tag>
|
|
8
6
|
</div>
|
|
9
7
|
<div class="name">
|
|
10
|
-
<span class="mr-2">{{ customData.
|
|
8
|
+
<span class="mr-2">{{ customData.customerName }}</span>
|
|
11
9
|
</div>
|
|
12
|
-
<div class="addr">开票单位:{{ customData.
|
|
10
|
+
<div class="addr">开票单位:{{ customData.invoiceCompanyName }}</div>
|
|
13
11
|
<div class="addr">
|
|
14
|
-
<span
|
|
15
|
-
<span class="addr-inline"
|
|
16
|
-
|
|
12
|
+
<span v-if="checkIsShow('type')">客户类型:{{ formatData(customData.customerType, 'customType') }}</span>
|
|
13
|
+
<span class="addr-inline">
|
|
14
|
+
客户星级:<span v-if="checkIsShow('start')">{{ formatData(customData.customerStar, 'start') }}</span>
|
|
15
|
+
<span v-if="checkIsShow('level')">{{ formatData(customData.customerLevel, 'level') }}</span>
|
|
16
|
+
</span>
|
|
17
|
+
<span v-if="checkIsShow('groupName')">集团名称:{{ customData.groupName }}</span>
|
|
17
18
|
</div>
|
|
18
19
|
<div v-if="detailShow">
|
|
19
20
|
<div class="addr">
|
|
20
|
-
<span>客户唯一编码:
|
|
21
|
+
<span>客户唯一编码:{{ customData.customerUniqueCode }}</span>
|
|
21
22
|
<span class="addr-inline">关系编码:898907866</span>
|
|
22
|
-
<span>集团编码:
|
|
23
|
+
<span>集团编码:{{ customData.groupCode }}</span>
|
|
23
24
|
</div>
|
|
24
25
|
<div class="addr">客户余额:893479327.00元</div>
|
|
25
26
|
</div>
|
|
@@ -27,6 +28,29 @@
|
|
|
27
28
|
</template>
|
|
28
29
|
|
|
29
30
|
<script>
|
|
31
|
+
// 定义类型映射关系
|
|
32
|
+
const typeMap = {
|
|
33
|
+
customType: {
|
|
34
|
+
1: '经销商',
|
|
35
|
+
2: '医疗机构',
|
|
36
|
+
3: '公立医院',
|
|
37
|
+
10: '其他'
|
|
38
|
+
},
|
|
39
|
+
start: {
|
|
40
|
+
1: '一星',
|
|
41
|
+
2: '两星',
|
|
42
|
+
3: '三星',
|
|
43
|
+
4: '四星',
|
|
44
|
+
5: '五星'
|
|
45
|
+
},
|
|
46
|
+
level: {
|
|
47
|
+
1: '一级',
|
|
48
|
+
2: '二级',
|
|
49
|
+
3: '三级',
|
|
50
|
+
4: '四级',
|
|
51
|
+
5: '五级'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
30
54
|
export default {
|
|
31
55
|
name: 'CustomShow',
|
|
32
56
|
props: {
|
|
@@ -39,13 +63,30 @@ export default {
|
|
|
39
63
|
detailShow: {
|
|
40
64
|
type: Boolean,
|
|
41
65
|
default: false
|
|
66
|
+
},
|
|
67
|
+
showList: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default() {
|
|
70
|
+
return []
|
|
71
|
+
}
|
|
42
72
|
}
|
|
43
73
|
},
|
|
44
74
|
data() {
|
|
45
75
|
return {}
|
|
46
76
|
},
|
|
47
|
-
|
|
48
|
-
|
|
77
|
+
methods: {
|
|
78
|
+
checkIsShow(type) {
|
|
79
|
+
return this.showList.includes(type)
|
|
80
|
+
},
|
|
81
|
+
formatData(data, type) {
|
|
82
|
+
// 输入验证
|
|
83
|
+
if (typeof data !== 'string' || !data) {
|
|
84
|
+
return ''
|
|
85
|
+
}
|
|
86
|
+
// 返回映射结果,默认返回空字符串
|
|
87
|
+
return typeMap[type][data] || ''
|
|
88
|
+
}
|
|
89
|
+
}
|
|
49
90
|
}
|
|
50
91
|
</script>
|
|
51
92
|
<style lang="scss" scoped>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<CustomerSelect v-show="showSelect" ref="CustomerSelect" v-model="myValue" :selected-text="value && value.
|
|
3
|
+
<CustomerSelect v-show="showSelect" ref="CustomerSelect" v-model="myValue" :show-list="showList" :selected-text="value && value.customerName" class="w-full" @change="onSelectChanged"></CustomerSelect>
|
|
4
4
|
<div v-if="!showSelect" class="customerDetails">
|
|
5
|
-
<CustomShow :custom-data="selectedItem" :detail-show="true"></CustomShow>
|
|
5
|
+
<CustomShow :custom-data="selectedItem" :detail-show="true" :show-list="showList"></CustomShow>
|
|
6
6
|
<div v-if="!isView" class="button">
|
|
7
7
|
<el-button type="text" @click="clearInfo">
|
|
8
8
|
<img src="https://udstatic.imeik.com/pcUploads/1738999803093/delete%402x.png" class="delect-img" @click="clearInfo" />
|
|
@@ -31,6 +31,12 @@ export default {
|
|
|
31
31
|
isView: {
|
|
32
32
|
type: Boolean,
|
|
33
33
|
default: false
|
|
34
|
+
},
|
|
35
|
+
attrs: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default() {
|
|
38
|
+
return {}
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
},
|
|
36
42
|
data() {
|
|
@@ -42,6 +48,13 @@ export default {
|
|
|
42
48
|
computed: {
|
|
43
49
|
showSelect() {
|
|
44
50
|
return !this.myValue && !this.isView
|
|
51
|
+
},
|
|
52
|
+
showList() {
|
|
53
|
+
if (!this.attrs.customShowList) {
|
|
54
|
+
return []
|
|
55
|
+
} else {
|
|
56
|
+
return this.attrs.customShowList.flat()
|
|
57
|
+
}
|
|
45
58
|
}
|
|
46
59
|
},
|
|
47
60
|
watch: {
|
|
@@ -55,7 +68,7 @@ export default {
|
|
|
55
68
|
methods: {
|
|
56
69
|
setMyValue() {
|
|
57
70
|
try {
|
|
58
|
-
this.myValue = this.value.
|
|
71
|
+
this.myValue = this.value.customerUniqueCode
|
|
59
72
|
this.selectedItem = JSON.parse(JSON.stringify(this.value))
|
|
60
73
|
} catch (error) {
|
|
61
74
|
this.selectedItem = {}
|