imeik-bizui 0.3.7 → 0.3.8
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 +1 -1
- package/dist/bizui/src/FieldApplyTypeView/data.js +6 -7
- package/dist/bizui/src/FieldApplyTypeView/index.vue +2 -6
- package/dist/bizui/src/FieldCustomSelect/components/CustomSelect.vue +4 -10
- package/dist/bizui/src/FieldCustomSelect/components/CustomShow.vue +8 -8
- package/dist/bizui/src/FieldCustomSelect/index.vue +2 -7
- package/dist/bizui/src/FieldDepartmentSelect/index.vue +19 -20
- package/dist/bizui/src/FieldMaterialSelect/components/AddressSelect.vue +84 -43
- package/dist/bizui/src/FieldMaterialSelect/components/ProductList.vue +63 -42
- package/dist/bizui/src/FieldMaterialSelect/components/SelectProductDialog.vue +24 -2
- package/dist/bizui/src/FieldMaterialSelect/index.vue +5 -10
- package/dist/bizui/src/FieldSeleceDoctor/index.vue +20 -8
- package/dist/bizui/utils/requestTemplate.js +1 -1
- package/dist/imeik-bizui.common.js +1430 -835
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.css +2 -2
- package/dist/imeik-bizui.css.gz +0 -0
- package/dist/imeik-bizui.umd.js +1430 -835
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +5 -5
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -90,7 +90,7 @@ export function getMaterialList(data) {
|
|
|
90
90
|
*/
|
|
91
91
|
export function getMaterialReceivingAddressList(data) {
|
|
92
92
|
return request({
|
|
93
|
-
url: '/application-center-admin/data/exchange/
|
|
93
|
+
url: '/application-center-admin/data/exchange/getCustomerProductAddress',
|
|
94
94
|
method: 'post',
|
|
95
95
|
data
|
|
96
96
|
})
|
|
@@ -20,7 +20,7 @@ const typeItems = {
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
type: 'ImInput',
|
|
23
|
-
prop: '
|
|
23
|
+
prop: 'budgetSubjectName',
|
|
24
24
|
label: '预算科目',
|
|
25
25
|
attrs: {
|
|
26
26
|
disabled: true
|
|
@@ -28,7 +28,7 @@ const typeItems = {
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
type: 'ImInput',
|
|
31
|
-
prop: '
|
|
31
|
+
prop: 'erpBillName',
|
|
32
32
|
label: 'ERP出库类型',
|
|
33
33
|
attrs: {
|
|
34
34
|
disabled: true
|
|
@@ -63,7 +63,6 @@ const typeItems = {
|
|
|
63
63
|
prop: 'applicationApplyDoctor',
|
|
64
64
|
span: 24,
|
|
65
65
|
label: '医生姓名和职务',
|
|
66
|
-
rules: [{ required: true, message: '请选择医生' }],
|
|
67
66
|
slots: {
|
|
68
67
|
slot: 'selectDoctor'
|
|
69
68
|
}
|
|
@@ -155,7 +154,7 @@ const typeItems = {
|
|
|
155
154
|
},
|
|
156
155
|
{
|
|
157
156
|
type: 'ImInput',
|
|
158
|
-
prop: '
|
|
157
|
+
prop: 'budgetSubjectName',
|
|
159
158
|
label: '预算科目',
|
|
160
159
|
attrs: {
|
|
161
160
|
disabled: true
|
|
@@ -163,7 +162,7 @@ const typeItems = {
|
|
|
163
162
|
},
|
|
164
163
|
{
|
|
165
164
|
type: 'ImInput',
|
|
166
|
-
prop: '
|
|
165
|
+
prop: 'erpBillName',
|
|
167
166
|
label: 'ERP出库类型',
|
|
168
167
|
attrs: {
|
|
169
168
|
disabled: true
|
|
@@ -325,7 +324,7 @@ const typeItems = {
|
|
|
325
324
|
},
|
|
326
325
|
{
|
|
327
326
|
type: 'ImInput',
|
|
328
|
-
prop: '
|
|
327
|
+
prop: 'budgetSubjectName',
|
|
329
328
|
label: '预算科目',
|
|
330
329
|
attrs: {
|
|
331
330
|
disabled: true
|
|
@@ -333,7 +332,7 @@ const typeItems = {
|
|
|
333
332
|
},
|
|
334
333
|
{
|
|
335
334
|
type: 'ImInput',
|
|
336
|
-
prop: '
|
|
335
|
+
prop: 'erpBillName',
|
|
337
336
|
label: 'ERP出库类型',
|
|
338
337
|
attrs: {
|
|
339
338
|
disabled: true
|
|
@@ -17,11 +17,6 @@ export default {
|
|
|
17
17
|
components: {
|
|
18
18
|
FieldSeleceDoctor
|
|
19
19
|
},
|
|
20
|
-
inject: {
|
|
21
|
-
getFormProps: {
|
|
22
|
-
default: () => {}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
20
|
props: {
|
|
26
21
|
value: {
|
|
27
22
|
type: Object,
|
|
@@ -67,7 +62,7 @@ export default {
|
|
|
67
62
|
prop: 'applyType',
|
|
68
63
|
span: 12,
|
|
69
64
|
label: '申请类型',
|
|
70
|
-
rules: [{ required: !this.isView, message: '请选择申请类型' }],
|
|
65
|
+
rules: [{ required: !this.isView, message: '请选择申请类型', trigger: 'blur' }],
|
|
71
66
|
attrs: {
|
|
72
67
|
options: [],
|
|
73
68
|
style: {
|
|
@@ -136,6 +131,7 @@ export default {
|
|
|
136
131
|
// 校验提交的数据
|
|
137
132
|
handleValidate() {
|
|
138
133
|
this.$refs.ImForm?.validate((valid) => {
|
|
134
|
+
console.log(valid, '检查时间');
|
|
139
135
|
this.formConfig.props.valid = valid
|
|
140
136
|
this.setPropsData()
|
|
141
137
|
})
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@change="onUpdate"
|
|
15
15
|
@visible-change="visibleChange"
|
|
16
16
|
>
|
|
17
|
-
<el-option v-for="item in filteredOptions" :key="item.
|
|
17
|
+
<el-option v-for="item in filteredOptions" :key="item.accountUid" :disabled="!!item.qcExpireList.length" class="customOption" :value="item.accountUid">
|
|
18
18
|
<CustomShow :custom-data="item" :show-list="showList"></CustomShow>
|
|
19
19
|
</el-option>
|
|
20
20
|
</el-select>
|
|
@@ -38,12 +38,6 @@ export default {
|
|
|
38
38
|
type: [Number, String, Array],
|
|
39
39
|
default: undefined
|
|
40
40
|
},
|
|
41
|
-
disabledCode: {
|
|
42
|
-
type: Array,
|
|
43
|
-
default() {
|
|
44
|
-
return []
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
41
|
selectedText: {
|
|
48
42
|
type: String,
|
|
49
43
|
default: undefined
|
|
@@ -75,7 +69,7 @@ export default {
|
|
|
75
69
|
return
|
|
76
70
|
}
|
|
77
71
|
|
|
78
|
-
return this.options.find((item) => item.
|
|
72
|
+
return this.options.find((item) => item.accountUid === this.myValue)
|
|
79
73
|
},
|
|
80
74
|
|
|
81
75
|
filteredOptions() {
|
|
@@ -123,8 +117,8 @@ export default {
|
|
|
123
117
|
page: 1,
|
|
124
118
|
limit: 10,
|
|
125
119
|
belongCompany: this.formProps.belongCompany,
|
|
126
|
-
rcoiCode: this.ruleInfo.rcoiCode
|
|
127
|
-
rcoiNumber: this.ruleInfo.rcoiNumber
|
|
120
|
+
rcoiCode: this.ruleInfo.rcoiCode,
|
|
121
|
+
rcoiNumber: this.ruleInfo.rcoiNumber
|
|
128
122
|
}
|
|
129
123
|
this.loading = true
|
|
130
124
|
getCustomerList(params)
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="item-view">
|
|
3
3
|
<div>
|
|
4
|
-
<el-tag>{{ customData.
|
|
5
|
-
<el-tag effect="plain" style="margin-left: 12px;"
|
|
4
|
+
<el-tag>{{ customData.belongCompanyName }}</el-tag>
|
|
5
|
+
<el-tag effect="plain" style="margin-left: 12px;">{{ customData.deliveryType }}</el-tag>
|
|
6
6
|
</div>
|
|
7
7
|
<div class="name">
|
|
8
|
-
<span class="mr-2">{{ customData.
|
|
8
|
+
<span class="mr-2">{{ customData.customName }}</span>
|
|
9
9
|
</div>
|
|
10
|
-
<div class="addr">开票单位:{{ customData.
|
|
10
|
+
<div class="addr">开票单位:{{ customData.billCustomName }}</div>
|
|
11
11
|
<div class="addr">
|
|
12
12
|
<span v-if="checkIsShow('type')">客户类型:{{ formatData(customData.customerType, 'customType') }}</span>
|
|
13
13
|
<span style="margin-right: 32px;">
|
|
14
|
-
客户星级:<span v-if="checkIsShow('start')">{{ formatData(customData.
|
|
15
|
-
<span v-if="checkIsShow('level')">{{ formatData(customData.
|
|
14
|
+
客户星级:<span v-if="checkIsShow('start')">{{ formatData(customData.customStar1, 'start') }}</span>
|
|
15
|
+
<span v-if="checkIsShow('level')">{{ formatData(customData.customStar2, 'level') }}</span>
|
|
16
16
|
</span>
|
|
17
17
|
<span v-if="checkIsShow('groupName')">集团名称:{{ customData.groupName }}</span>
|
|
18
18
|
</div>
|
|
19
19
|
<div v-if="detailShow">
|
|
20
20
|
<div class="addr">
|
|
21
|
-
<span>客户唯一编码:{{ customData.
|
|
21
|
+
<span>客户唯一编码:{{ customData.accountUid }}</span>
|
|
22
22
|
<span class="addr-inline">关系编码:898907866</span>
|
|
23
23
|
<span>集团编码:{{ customData.groupCode }}</span>
|
|
24
24
|
</div>
|
|
25
|
-
<div class="addr">客户余额:893479327.00元</div>
|
|
25
|
+
<!-- <div class="addr">客户余额:893479327.00元</div> -->
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:show-list="showList"
|
|
8
8
|
:selected-text="value && value.customerName"
|
|
9
9
|
class="w-full"
|
|
10
|
-
:
|
|
10
|
+
:rule-info="ruleInfo"
|
|
11
11
|
@change="onSelectChanged"
|
|
12
12
|
></CustomerSelect>
|
|
13
13
|
<div v-if="!showSelect" class="customerDetails">
|
|
@@ -30,11 +30,6 @@ export default {
|
|
|
30
30
|
CustomerSelect,
|
|
31
31
|
CustomShow
|
|
32
32
|
},
|
|
33
|
-
inject: {
|
|
34
|
-
formProps: {
|
|
35
|
-
default: () => {}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
33
|
props: {
|
|
39
34
|
value: {
|
|
40
35
|
type: Object,
|
|
@@ -95,7 +90,7 @@ export default {
|
|
|
95
90
|
},
|
|
96
91
|
setMyValue() {
|
|
97
92
|
try {
|
|
98
|
-
this.myValue = this.value.
|
|
93
|
+
this.myValue = this.value.accountUid
|
|
99
94
|
this.selectedItem = JSON.parse(JSON.stringify(this.value))
|
|
100
95
|
} catch (error) {
|
|
101
96
|
this.selectedItem = {}
|
|
@@ -82,7 +82,6 @@ export default {
|
|
|
82
82
|
: ''
|
|
83
83
|
} else {
|
|
84
84
|
// 如果是单选 就获取全部路径的值
|
|
85
|
-
console.log(this.myValue, 'this.myValuethis.myValuethis.myValue');
|
|
86
85
|
return this.myValue ? this.getAllLabel(this.options, this.myValue) : ''
|
|
87
86
|
}
|
|
88
87
|
},
|
|
@@ -132,21 +131,21 @@ export default {
|
|
|
132
131
|
this.getOptions()
|
|
133
132
|
}
|
|
134
133
|
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
134
|
+
'attrs.default': {
|
|
135
|
+
immediate: true,
|
|
136
|
+
handler(newVal, oldVal) {
|
|
137
|
+
if (newVal) {
|
|
138
|
+
if ((newVal !== oldVal && newVal === '2' && !this.value)) {
|
|
139
|
+
this.myValue = this.dicValue
|
|
140
|
+
} else {
|
|
141
|
+
this.myValue = undefined
|
|
142
|
+
}
|
|
143
|
+
this.getOptions(() => {
|
|
144
|
+
this.onChange()
|
|
145
|
+
})
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
150
149
|
'attrs.defaultValue': {
|
|
151
150
|
immediate: true,
|
|
152
151
|
handler(newVal, oldVal) {
|
|
@@ -245,14 +244,14 @@ export default {
|
|
|
245
244
|
const params = { tagModel: 'APPLY', tagName: '申请用户部门' }
|
|
246
245
|
getTagManageList(params).then((res) => {
|
|
247
246
|
if (res.code === 200) {
|
|
248
|
-
getTagModelUrl(res
|
|
247
|
+
getTagModelUrl(res?.data[0]?.tagValueUrl).then((valData) => {
|
|
249
248
|
if (valData.code === 200) {
|
|
250
249
|
this.options = valData?.data || []
|
|
250
|
+
this.$nextTick(() => {
|
|
251
|
+
callback && callback()
|
|
252
|
+
})
|
|
251
253
|
}
|
|
252
254
|
})
|
|
253
|
-
this.$nextTick(() => {
|
|
254
|
-
callback && callback()
|
|
255
|
-
})
|
|
256
255
|
} else {
|
|
257
256
|
this.$message.error(res.message)
|
|
258
257
|
}
|
|
@@ -53,7 +53,7 @@ export default {
|
|
|
53
53
|
column: 3,
|
|
54
54
|
gutter: 24,
|
|
55
55
|
props: {
|
|
56
|
-
deliveryMode:
|
|
56
|
+
deliveryMode: '2',
|
|
57
57
|
materialReceivingAddressSource: undefined,
|
|
58
58
|
materialReceivingAddressType: undefined,
|
|
59
59
|
materialReceivingSource: undefined,
|
|
@@ -73,11 +73,15 @@ export default {
|
|
|
73
73
|
computed: {
|
|
74
74
|
// 是否选择了客户
|
|
75
75
|
hasCustom() {
|
|
76
|
-
return this.formProps.applicationApplyCustomer?.
|
|
76
|
+
return this.formProps.applicationApplyCustomer?.accountUid
|
|
77
77
|
},
|
|
78
78
|
// 是不是械类产品,是什么械类
|
|
79
79
|
isEquipment() {
|
|
80
|
-
return
|
|
80
|
+
return !!this.dataSource.materialSaleType
|
|
81
|
+
},
|
|
82
|
+
// 是什么械类
|
|
83
|
+
equipmentType() {
|
|
84
|
+
return this.dataSource.materialReceivingAddressType ? this.dataSource.materialReceivingAddressType : '1'
|
|
81
85
|
},
|
|
82
86
|
// 是不是股份的客户
|
|
83
87
|
isGufen() {
|
|
@@ -100,6 +104,11 @@ export default {
|
|
|
100
104
|
const deliveryMode = this.formConfig.props.deliveryMode === '1'
|
|
101
105
|
return source || deliveryMode
|
|
102
106
|
},
|
|
107
|
+
// 隐藏选择省市区
|
|
108
|
+
hiddenSelectCity() {
|
|
109
|
+
const source = this.formConfig.props.materialReceivingAddressSource
|
|
110
|
+
return source && source !== '3'
|
|
111
|
+
},
|
|
103
112
|
formItems() {
|
|
104
113
|
return [
|
|
105
114
|
{
|
|
@@ -144,9 +153,9 @@ export default {
|
|
|
144
153
|
rules: [{ required: true, message: '请选择收货人' }],
|
|
145
154
|
attrs: {
|
|
146
155
|
options: [
|
|
147
|
-
{ label: '-', value: '1', disabled: this.
|
|
148
|
-
{ label: '二类械收货地址', value: '2', disabled:
|
|
149
|
-
{ label: '其他收货地址', value: '3', disabled: this.
|
|
156
|
+
{ label: '-', value: '1', disabled: this.equipmentType === '2' },
|
|
157
|
+
{ label: '二类械收货地址', value: '2', disabled: this.equipmentType !== '1' },
|
|
158
|
+
{ label: '其他收货地址', value: '3', disabled: this.equipmentType !== '3' }
|
|
150
159
|
],
|
|
151
160
|
class: 'w-full'
|
|
152
161
|
}
|
|
@@ -187,7 +196,8 @@ export default {
|
|
|
187
196
|
type: 'FieldCitySelect',
|
|
188
197
|
prop: 'materialReceivingCity',
|
|
189
198
|
label: '省市区',
|
|
190
|
-
|
|
199
|
+
hidden: this.hiddenSelectCity,
|
|
200
|
+
rules: [{ required: !this.hiddenSelectCity, message: '请选择省市区' }],
|
|
191
201
|
attrs: {
|
|
192
202
|
disabled: this.disabledEditCityOrAddressInfo
|
|
193
203
|
}
|
|
@@ -224,21 +234,31 @@ export default {
|
|
|
224
234
|
for (const key in this.formConfig.props) {
|
|
225
235
|
this.formConfig.props[key] = this.dataSource[key]
|
|
226
236
|
}
|
|
237
|
+
// 如果没有提货方式,默认为发货
|
|
238
|
+
if (!this.formConfig.props.deliveryMode) {
|
|
239
|
+
this.formConfig.props.deliveryMode = '2'
|
|
240
|
+
this.onAddressDeliveryModeChange('2')
|
|
241
|
+
}
|
|
242
|
+
// 如果有客户,默认为客户档案
|
|
243
|
+
if (this.hasCustom) {
|
|
244
|
+
this.formConfig.props.materialReceivingAddressSource = '1'
|
|
245
|
+
this.formConfig.props.materialReceivingAddressType = this.equipmentType
|
|
246
|
+
this.onAddressSourceChange('1')
|
|
247
|
+
}
|
|
248
|
+
// 如果没有客户,且是械类产品,默认收货地址为:建国路甲92号世茂大厦C座21层爱美客
|
|
227
249
|
if (!this.hasCustom && this.isEquipment) {
|
|
228
250
|
this.formConfig.props.materialReceivingAddress = '建国路甲92号世茂大厦C座21层爱美客'
|
|
229
|
-
this.formConfig.props.
|
|
251
|
+
this.formConfig.props.materialReceivingProvince = '北京市'
|
|
252
|
+
this.formConfig.props.materialReceivingCity = '北京市'
|
|
253
|
+
this.formConfig.props.materialReceivingArea = '朝阳区'
|
|
254
|
+
}
|
|
255
|
+
// 如果没有客户,且不是械类产品,默认收货地址为:北京平谷库房
|
|
256
|
+
if (!this.hasCustom && !this.isEquipment) {
|
|
257
|
+
this.formConfig.props.materialReceivingAddress = '北京平谷库房'
|
|
258
|
+
this.formConfig.props.materialReceivingProvince = '北京市'
|
|
259
|
+
this.formConfig.props.materialReceivingCity = '北京市'
|
|
260
|
+
this.formConfig.props.materialReceivingArea = '平谷区'
|
|
230
261
|
}
|
|
231
|
-
},
|
|
232
|
-
dialogBeforeClose() {
|
|
233
|
-
this.$emit('update:show', false)
|
|
234
|
-
},
|
|
235
|
-
onConfirm() {
|
|
236
|
-
this.$refs.ImForm.validate((valid) => {
|
|
237
|
-
if (valid) {
|
|
238
|
-
this.$emit('confirm', { ...this.dataSource, ...this.formConfig.props })
|
|
239
|
-
this.$emit('update:show', false)
|
|
240
|
-
}
|
|
241
|
-
})
|
|
242
262
|
},
|
|
243
263
|
// 发货方式发生变化
|
|
244
264
|
onAddressDeliveryModeChange(val) {
|
|
@@ -264,8 +284,7 @@ export default {
|
|
|
264
284
|
this.formConfig.props.materialReceivingSource = undefined
|
|
265
285
|
}
|
|
266
286
|
if (val === '2') {
|
|
267
|
-
getEmployeeAddress().then((res) => {
|
|
268
|
-
})
|
|
287
|
+
getEmployeeAddress().then((res) => {})
|
|
269
288
|
// 从ehr获取地址
|
|
270
289
|
}
|
|
271
290
|
this.showPasteInfo = val === '3'
|
|
@@ -273,33 +292,55 @@ export default {
|
|
|
273
292
|
// 获取收货人列表
|
|
274
293
|
getReceivingOptions() {
|
|
275
294
|
if (this.formConfig.props.materialReceivingAddressSource === '1') {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
return {
|
|
290
|
-
value: res.materialReceivingContactNumber,
|
|
291
|
-
label: res.materialReceivingContact
|
|
292
|
-
}
|
|
293
|
-
})
|
|
294
|
-
}
|
|
295
|
+
const userList = this.formProps.applicationApplyCustomer?.userList || []
|
|
296
|
+
const addressList = this.formProps.applicationApplyCustomer?.addressList || []
|
|
297
|
+
// 是股份 且是三类械产品 就是默认和其他两个选择
|
|
298
|
+
if (this.isGufen && this.isEquipment) {
|
|
299
|
+
this.receivingOptions = [
|
|
300
|
+
{ label: '默认收货人', value: '1' },
|
|
301
|
+
{ label: '其他收货人', value: '2' }
|
|
302
|
+
]
|
|
303
|
+
// 设置默认选择的联系人
|
|
304
|
+
if (userList && userList.length) {
|
|
305
|
+
this.formConfig.props.materialReceivingSource = '1'
|
|
306
|
+
this.formConfig.props.materialReceivingContact = userList[0].userName
|
|
307
|
+
this.formConfig.props.materialReceivingContactNumber = userList[0].phone
|
|
295
308
|
}
|
|
296
|
-
|
|
309
|
+
// 设置默认选择的地址
|
|
310
|
+
if (addressList && addressList.length) {
|
|
311
|
+
this.formConfig.props.materialReceivingAddress = addressList[0].address
|
|
312
|
+
this.formConfig.props.materialReceivingCity = addressList[0].city
|
|
313
|
+
}
|
|
314
|
+
} else {
|
|
315
|
+
this.receivingOptions = userList.map((res) => {
|
|
316
|
+
return {
|
|
317
|
+
value: res.phone,
|
|
318
|
+
label: res.userName
|
|
319
|
+
}
|
|
320
|
+
})
|
|
321
|
+
}
|
|
297
322
|
}
|
|
298
323
|
},
|
|
299
324
|
// 收货人发生变化
|
|
300
325
|
onMaterialReceivingSourceChange(val) {
|
|
301
|
-
|
|
302
|
-
|
|
326
|
+
const userList = this.formProps.applicationApplyCustomer?.userList || []
|
|
327
|
+
userList.forEach((item) => {
|
|
328
|
+
if (item.value === val) {
|
|
329
|
+
this.formConfig.props.materialReceivingContact = item.label
|
|
330
|
+
this.formConfig.props.materialReceivingContactNumber = item.value
|
|
331
|
+
}
|
|
332
|
+
})
|
|
333
|
+
},
|
|
334
|
+
dialogBeforeClose() {
|
|
335
|
+
this.$emit('update:show', false)
|
|
336
|
+
},
|
|
337
|
+
onConfirm() {
|
|
338
|
+
this.$refs.ImForm.validate((valid) => {
|
|
339
|
+
if (valid) {
|
|
340
|
+
this.$emit('confirm', { ...this.dataSource, ...this.formConfig.props })
|
|
341
|
+
this.$emit('update:show', false)
|
|
342
|
+
}
|
|
343
|
+
})
|
|
303
344
|
},
|
|
304
345
|
// 获取item的下标
|
|
305
346
|
getDataIndexByProp(prop) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<ImTable :table="tableConfig">
|
|
4
4
|
<template slot="materialBasicsInfo" slot-scope="{ row }">
|
|
5
|
-
<el-tag type="danger">未签约</el-tag>
|
|
5
|
+
<!-- <el-tag type="danger">未签约</el-tag>
|
|
6
6
|
<el-tag effect="plain" class="ml-1">返货</el-tag>
|
|
7
|
-
<el-tag effect="plain" class="ml-1">赠品</el-tag>
|
|
7
|
+
<el-tag effect="plain" class="ml-1">赠品</el-tag> -->
|
|
8
8
|
<p class="materialName">{{ row.materialAbbreviation }}</p>
|
|
9
9
|
<p class="materialSubName">{{ row.materialName }}</p>
|
|
10
10
|
<p class="materialSubName">编码:{{ row.materialCode }}</p>
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
<div v-else>{{ row.materialRemark || '-' }}</div>
|
|
76
76
|
</template>
|
|
77
77
|
<template slot="addressInfo" slot-scope="{ row, $index }">
|
|
78
|
-
<p class="address-info">地址来源:{{ formatData(row.materialReceivingAddressSource, 'materialReceivingAddressSource') }}</p>
|
|
78
|
+
<!-- <p class="address-info">地址来源:{{ formatData(row.materialReceivingAddressSource, 'materialReceivingAddressSource') }}</p> -->
|
|
79
79
|
<p v-if="row.materialReceivingAddressType" class="address-info">收货类型:{{ formatData(row.materialReceivingAddressType, 'materialReceivingAddressType') }}</p>
|
|
80
|
-
<p class="address-info"
|
|
80
|
+
<p class="address-info">收货人:{{ row.materialReceivingContact }} {{ row.materialReceivingContactNumber }}</p>
|
|
81
81
|
<p class="address-info">收货地址:{{ row.materialReceivingAddress }}</p>
|
|
82
82
|
<p v-if="!isView" class="address" @click="changeAddressInfo(row, $index)">修改收货地址</p>
|
|
83
83
|
</template>
|
|
@@ -276,57 +276,78 @@ export default {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
},
|
|
279
|
-
mounted() {
|
|
280
|
-
},
|
|
279
|
+
mounted() {},
|
|
281
280
|
methods: {
|
|
282
281
|
getMaterialOtherData() {
|
|
283
|
-
this.tableConfig.data
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
this.handleGetMotherSchemeList(item, index)
|
|
289
|
-
}
|
|
290
|
-
})
|
|
282
|
+
const materialCodeList = this.tableConfig.data?.map((item) => item.materialCode)
|
|
283
|
+
if (materialCodeList.length) {
|
|
284
|
+
this.handleGetMaterialReceivingAddressList(materialCodeList)
|
|
285
|
+
this.handleGetMotherSchemeList(materialCodeList)
|
|
286
|
+
}
|
|
291
287
|
},
|
|
292
288
|
// 获取地址列表
|
|
293
|
-
handleGetMaterialReceivingAddressList(
|
|
289
|
+
handleGetMaterialReceivingAddressList(materialCodeList) {
|
|
290
|
+
const userList = this.formProps?.applicationApplyCustomer?.userList || [{}]
|
|
294
291
|
getMaterialReceivingAddressList({
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
materialSaleType: data.materialSaleType
|
|
292
|
+
productCodeList: materialCodeList,
|
|
293
|
+
customerRelationCode: this.formProps.applicationApplyCustomer?.accountUid
|
|
298
294
|
}).then((res) => {
|
|
299
295
|
if (res.code === 200 && res.data.length) {
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
296
|
+
const responseData = res.data
|
|
297
|
+
if (!Array.isArray(responseData) || responseData.length === 0) {
|
|
298
|
+
return
|
|
299
|
+
}
|
|
300
|
+
console.log(responseData, 'responseData');
|
|
301
|
+
|
|
302
|
+
const materialMap = new Map(this.tableConfig.data.map((material) => [material.materialCode, material]))
|
|
303
|
+
// 遍历响应数据并更新 tableConfig.data
|
|
304
|
+
responseData.forEach((item) => {
|
|
305
|
+
if (item.materialCode && item.address) {
|
|
306
|
+
const material = materialMap.get(item.materialCode)
|
|
307
|
+
if (material) {
|
|
308
|
+
// 更新对应的 motherSchemeList
|
|
309
|
+
const { country, addrType, address, city, prov } = item || {}
|
|
310
|
+
material.materialReceivingAddress = address
|
|
311
|
+
material.materialReceivingAddressType = addrType
|
|
312
|
+
material.materialReceivingArea = country
|
|
313
|
+
material.materialReceivingCity = city
|
|
314
|
+
material.materialReceivingContact = userList[0].userName
|
|
315
|
+
material.materialReceivingContactNumber = userList[0].phone
|
|
316
|
+
material.materialReceivingProvince = prov
|
|
317
|
+
material.hasAddress = true
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
})
|
|
317
321
|
}
|
|
318
322
|
})
|
|
319
323
|
},
|
|
320
324
|
// 获取母方案列表
|
|
321
|
-
handleGetMotherSchemeList(
|
|
325
|
+
handleGetMotherSchemeList(materialCodeList) {
|
|
322
326
|
getMotherSchemeList({
|
|
323
|
-
|
|
324
|
-
customerUniqueCode: this.formProps.applicationApplyCustomer?.customerUniqueCode
|
|
325
|
-
}).then((res) => {
|
|
326
|
-
if (res.code === 200) {
|
|
327
|
-
this.$set(this.tableConfig.data[index], 'motherSchemeList', res.data)
|
|
328
|
-
}
|
|
327
|
+
materialCodeList: materialCodeList
|
|
329
328
|
})
|
|
329
|
+
.then((res) => {
|
|
330
|
+
if (res.code === 200) {
|
|
331
|
+
const responseData = res.data
|
|
332
|
+
if (!Array.isArray(responseData) || responseData.length === 0) {
|
|
333
|
+
return
|
|
334
|
+
}
|
|
335
|
+
const materialMap = new Map(this.tableConfig.data.map((material) => [material.materialCode, material]))
|
|
336
|
+
// 遍历响应数据并更新 tableConfig.data
|
|
337
|
+
responseData.forEach((item) => {
|
|
338
|
+
if (item.materialCode && item.planInfoList) {
|
|
339
|
+
const material = materialMap.get(item.materialCode)
|
|
340
|
+
if (material) {
|
|
341
|
+
// 更新对应的 motherSchemeList
|
|
342
|
+
this.$set(material, 'motherSchemeList', item.planInfoList)
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
})
|
|
346
|
+
}
|
|
347
|
+
})
|
|
348
|
+
.catch((error) => {
|
|
349
|
+
console.error('Failed to fetch mother scheme list:', error)
|
|
350
|
+
})
|
|
330
351
|
},
|
|
331
352
|
changeAddressInfo(row, index) {
|
|
332
353
|
this.show = true
|
|
@@ -49,6 +49,14 @@ export default {
|
|
|
49
49
|
default: () => {}
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
+
props: {
|
|
53
|
+
rcoiInfo: {
|
|
54
|
+
type: Object,
|
|
55
|
+
default() {
|
|
56
|
+
return {}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
52
60
|
data() {
|
|
53
61
|
return {
|
|
54
62
|
formConfig: {
|
|
@@ -117,7 +125,7 @@ export default {
|
|
|
117
125
|
}
|
|
118
126
|
},
|
|
119
127
|
{
|
|
120
|
-
prop: '
|
|
128
|
+
prop: 'materialCode',
|
|
121
129
|
label: '编码',
|
|
122
130
|
attrs: {
|
|
123
131
|
'show-overflow-tooltip': true,
|
|
@@ -190,8 +198,22 @@ export default {
|
|
|
190
198
|
* 请求数据
|
|
191
199
|
*/
|
|
192
200
|
getList() {
|
|
201
|
+
// const data = {
|
|
202
|
+
// accountUid: this.formProps.applicationApplyCustomer?.accountUid,
|
|
203
|
+
// applyType: this.formProps.applyTypeInfo?.applyType,
|
|
204
|
+
// belongCompany: this.formConfig.belongCompany,
|
|
205
|
+
// formConfigSubCategory: this.formConfig.formConfigSubCategory,
|
|
206
|
+
// rcoiCode: this.rcoiInfo.rcoiCode,
|
|
207
|
+
// rcoiNumber: this.rcoiInfo.rcoiNumber
|
|
208
|
+
// }
|
|
193
209
|
const data = {
|
|
194
|
-
|
|
210
|
+
accountUid: 'jzx_2673',
|
|
211
|
+
applyType: '1896397578544173059',
|
|
212
|
+
belongCompany: '201',
|
|
213
|
+
formConfigSubCategory: '2',
|
|
214
|
+
rcoiCode: this.rcoiInfo.rcoiCode,
|
|
215
|
+
rcoiNumber: this.rcoiInfo.rcoiNumber
|
|
216
|
+
|
|
195
217
|
}
|
|
196
218
|
getMaterialList(data).then((res) => {
|
|
197
219
|
if (res.code === 200) {
|