doctor-admin-components 1.0.13-beta.8 → 1.0.13-pro.0
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/README.md +18 -7
- package/package.json +1 -1
- package/packages/src/api/biz/bizContract.js +0 -1
- package/packages/src/api/biz/bizContractCompany.js +1 -1
- package/packages/src/utils/request.js +120 -146
- package/packages/src/views/biz/bizShipment/add.vue +101 -50
- package/packages/src/views/biz/contractTracing/addSubCompany.vue +106 -169
- package/packages/src/views/biz/contractTracing/billInfo.vue +150 -315
- package/packages/src/views/biz/contractTracing/contractSummary.vue +11 -6
- package/packages/src/views/biz/contractTracing/editBill.vue +219 -359
- package/packages/src/views/biz/contractTracing/shipmentPurchaseAmount.vue +0 -8
- package/packages/src/views/biz/contractTracing/subCompanyDialog.vue +196 -176
- package/packages/src/views/biz/contractTracing/association.vue +0 -189
- package/packages/src/views/biz/contractTracing/chargingDialog.vue +0 -84
- package/packages/src/views/biz/contractTracing/contract.vue +0 -1276
- package/packages/src/views/biz/contractTracing/disputeRecord.vue +0 -311
- package/packages/src/views/biz/contractTracing/edit.vue +0 -205
- package/packages/src/views/biz/contractTracing/sendDrafEmail.vue +0 -120
- package/packages/src/views/biz/contractTracing/shipment.vue +0 -601
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="app-container">
|
|
3
3
|
<!-- 添加或修改装运对话框 -->
|
|
4
|
-
<el-dialog :title="title" :visible.sync="open" width="80%"
|
|
4
|
+
<el-dialog :title="title" :visible.sync="open" width="80%" :before-close="handleClose">
|
|
5
5
|
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
|
|
6
6
|
<el-row>
|
|
7
7
|
<el-col :span="6">
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
v-model="scope2.row.packageGrossWeight"
|
|
203
203
|
placeholder="请输入毛重"
|
|
204
204
|
size="mini"
|
|
205
|
-
@
|
|
205
|
+
@input="changePackageGrossWeight(index, scope1.$index, scope2.$index)"
|
|
206
206
|
></el-input>
|
|
207
207
|
</el-form-item>
|
|
208
208
|
</template>
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
v-model="scope2.row.packageTareWeight"
|
|
221
221
|
placeholder="请输入皮重"
|
|
222
222
|
size="mini"
|
|
223
|
-
@
|
|
223
|
+
@input="changePackageTareWeight(index, scope1.$index, scope2.$index)"
|
|
224
224
|
></el-input>
|
|
225
225
|
</el-form-item>
|
|
226
226
|
</template>
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
<el-button @click="cancel">取 消</el-button>
|
|
389
389
|
</div>
|
|
390
390
|
|
|
391
|
-
<div style="display: flex; justify-content: center; align-items: center">
|
|
391
|
+
<div style="display: flex; justify-content: center; align-items: center" v-if="title == '修改装运'">
|
|
392
392
|
<ul>
|
|
393
393
|
按钮说明
|
|
394
394
|
<ul>
|
|
@@ -627,6 +627,21 @@ export default {
|
|
|
627
627
|
this.form.containerList[index].totalGoodsGrossWeight = this.form.containerList[index].containerDetailList.reduce((total, item) => {
|
|
628
628
|
return total + Number(item.goodsGrossWeight)
|
|
629
629
|
}, 0)
|
|
630
|
+
//计算净重
|
|
631
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageNetWeight = (
|
|
632
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageGrossWeight -
|
|
633
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageTareWeight
|
|
634
|
+
).toFixed(3)
|
|
635
|
+
|
|
636
|
+
this.form.containerList[index].containerDetailList[k].goodsNetWeight = this.form.containerList[index].containerDetailList[k].packageList.reduce((total, item) => {
|
|
637
|
+
return total + Number(item.packageNetWeight)
|
|
638
|
+
}, 0)
|
|
639
|
+
|
|
640
|
+
this.form.containerList[index].totalGoodsNetWeight = this.form.containerList[index].containerDetailList
|
|
641
|
+
.reduce((total, item) => {
|
|
642
|
+
return total + Number(item.goodsNetWeight)
|
|
643
|
+
}, 0)
|
|
644
|
+
.toFixed(3)
|
|
630
645
|
},
|
|
631
646
|
changePackageTareWeight(index, k, yindex) {
|
|
632
647
|
//计算皮重
|
|
@@ -981,28 +996,33 @@ export default {
|
|
|
981
996
|
submitShipment() {
|
|
982
997
|
this.$refs['form'].validate((valid) => {
|
|
983
998
|
if (valid) {
|
|
984
|
-
this.open = false
|
|
985
999
|
if (this.form.shipmentId == null) {
|
|
986
1000
|
let loadingInstance = Loading.service({
|
|
987
1001
|
text: '请稍候',
|
|
988
1002
|
spinner: 'el-icon-loading',
|
|
989
|
-
background: 'rgba(0, 0, 0, 0.7)'
|
|
1003
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1004
|
+
customClass: 'custom-loading-class'
|
|
990
1005
|
})
|
|
991
1006
|
addWithContainer(this.form).then((response) => {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
.catch(() => {
|
|
1000
|
-
this.$router.push({
|
|
1001
|
-
name: 'BizShipment',
|
|
1002
|
-
params: { viewDetailFlag: true }
|
|
1003
|
-
})
|
|
1007
|
+
if (response.code == 200) {
|
|
1008
|
+
this.open = false
|
|
1009
|
+
loadingInstance.close()
|
|
1010
|
+
this.$confirm('装运已生成!您可以点击“确认”按钮留在当前页面,或点击“去看看”按钮查看详细信息。', {
|
|
1011
|
+
confirmButtonText: '确定',
|
|
1012
|
+
cancelButtonText: '去看看',
|
|
1013
|
+
type: 'warning'
|
|
1004
1014
|
})
|
|
1005
|
-
|
|
1015
|
+
.then(() => {})
|
|
1016
|
+
.catch(() => {
|
|
1017
|
+
this.$router.push({
|
|
1018
|
+
name: 'BizShipment',
|
|
1019
|
+
params: { viewDetailFlag: true }
|
|
1020
|
+
})
|
|
1021
|
+
})
|
|
1022
|
+
this.$emit('refresh')
|
|
1023
|
+
} else {
|
|
1024
|
+
loadingInstance.close()
|
|
1025
|
+
}
|
|
1006
1026
|
})
|
|
1007
1027
|
} else {
|
|
1008
1028
|
updateWithContainer(this.form).then((res) => {
|
|
@@ -1021,25 +1041,34 @@ export default {
|
|
|
1021
1041
|
submitAndDownload(templateType) {
|
|
1022
1042
|
this.$refs['form'].validate((valid) => {
|
|
1023
1043
|
if (valid) {
|
|
1024
|
-
this.open = false
|
|
1025
1044
|
let loadingInstance = Loading.service({
|
|
1026
1045
|
text: '请稍候',
|
|
1027
1046
|
spinner: 'el-icon-loading',
|
|
1028
|
-
background: 'rgba(0, 0, 0, 0.7)'
|
|
1047
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1048
|
+
customClass: 'custom-loading-class'
|
|
1029
1049
|
})
|
|
1030
|
-
addWithContainer(this.form)
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1050
|
+
addWithContainer(this.form)
|
|
1051
|
+
.then((res) => {
|
|
1052
|
+
if (res.code == 200) {
|
|
1053
|
+
var query = {}
|
|
1054
|
+
query.orderByColumn = 'shipmentId'
|
|
1055
|
+
query.isAsc = 'desc'
|
|
1056
|
+
query.pageNum = 1
|
|
1057
|
+
query.pageSize = 1
|
|
1058
|
+
listBizShipment(query).then((res) => {
|
|
1059
|
+
var shipment = res.rows[0]
|
|
1060
|
+
this.handleDownloadShipment(shipment, templateType)
|
|
1061
|
+
})
|
|
1062
|
+
this.$emit('refresh')
|
|
1063
|
+
this.open = false
|
|
1064
|
+
loadingInstance.close()
|
|
1065
|
+
} else {
|
|
1066
|
+
loadingInstance.close()
|
|
1067
|
+
}
|
|
1068
|
+
})
|
|
1069
|
+
.finally(() => {
|
|
1070
|
+
loadingInstance.close()
|
|
1040
1071
|
})
|
|
1041
|
-
this.$emit('refresh')
|
|
1042
|
-
})
|
|
1043
1072
|
}
|
|
1044
1073
|
})
|
|
1045
1074
|
},
|
|
@@ -1065,25 +1094,39 @@ export default {
|
|
|
1065
1094
|
submitForm() {
|
|
1066
1095
|
this.$refs['form'].validate((valid) => {
|
|
1067
1096
|
if (valid) {
|
|
1068
|
-
|
|
1097
|
+
let loadingInstance = Loading.service({
|
|
1098
|
+
text: '请稍候',
|
|
1099
|
+
spinner: 'el-icon-loading',
|
|
1100
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1101
|
+
customClass: 'custom-loading-class'
|
|
1102
|
+
})
|
|
1069
1103
|
if (this.form.shipmentId == null) {
|
|
1070
|
-
addWithContainer(this.form)
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1104
|
+
addWithContainer(this.form)
|
|
1105
|
+
.then((response) => {
|
|
1106
|
+
if (response.code == 200) {
|
|
1107
|
+
this.open = false
|
|
1108
|
+
this.$modal.msgSuccess('生成成功')
|
|
1109
|
+
var query = {}
|
|
1110
|
+
query.orderByColumn = 'shipmentId'
|
|
1111
|
+
query.isAsc = 'desc'
|
|
1112
|
+
query.pageNum = 1
|
|
1113
|
+
query.pageSize = 10
|
|
1114
|
+
if (this.contract.contractType == 'sale') {
|
|
1115
|
+
query.saleContractId = this.contract.contractId
|
|
1116
|
+
} else {
|
|
1117
|
+
query.purchaseContractId = this.contract.contractId
|
|
1118
|
+
}
|
|
1119
|
+
listBizShipment(query).then((res) => {
|
|
1120
|
+
var shipment = res.rows[0]
|
|
1121
|
+
this.handleGenerateFinalInvoice(shipment)
|
|
1122
|
+
})
|
|
1123
|
+
} else {
|
|
1124
|
+
loadingInstance.close()
|
|
1125
|
+
}
|
|
1126
|
+
})
|
|
1127
|
+
.finally(() => {
|
|
1128
|
+
loadingInstance.close()
|
|
1085
1129
|
})
|
|
1086
|
-
})
|
|
1087
1130
|
} else {
|
|
1088
1131
|
this.$emit('openGenerateLive', { ...this.form, quoteType: this.contract.quoteType })
|
|
1089
1132
|
}
|
|
@@ -1139,3 +1182,11 @@ export default {
|
|
|
1139
1182
|
border-radius: 4px;
|
|
1140
1183
|
}
|
|
1141
1184
|
</style>
|
|
1185
|
+
<style lang="scss">
|
|
1186
|
+
.el-loading-mask.custom-loading-class.is-fullscreen {
|
|
1187
|
+
z-index: 3000 !important;
|
|
1188
|
+
}
|
|
1189
|
+
.el-message.el-message--error {
|
|
1190
|
+
z-index: 3001 !important;
|
|
1191
|
+
}
|
|
1192
|
+
</style>
|
|
@@ -6,35 +6,23 @@
|
|
|
6
6
|
<el-row>
|
|
7
7
|
<el-col :span="12">
|
|
8
8
|
<el-form-item :label="$t('contract.companyName')" prop="companyEnglishName">
|
|
9
|
-
<el-input
|
|
10
|
-
v-model="form.companyEnglishName"
|
|
11
|
-
:placeholder="
|
|
12
|
-
$t('placeholder.enter') + $t('contract.companyName')
|
|
13
|
-
"
|
|
14
|
-
/>
|
|
9
|
+
<el-input v-model="form.companyEnglishName" :placeholder="$t('placeholder.enter') + $t('contract.companyName')" />
|
|
15
10
|
</el-form-item>
|
|
16
11
|
</el-col>
|
|
17
12
|
<el-col :span="12">
|
|
18
|
-
<el-form-item
|
|
19
|
-
:
|
|
20
|
-
prop="taxNumber"
|
|
21
|
-
v-if="this.companyType !== 'contract'"
|
|
22
|
-
>
|
|
23
|
-
<el-input
|
|
24
|
-
v-model="form.taxNumber"
|
|
25
|
-
:placeholder="$t('placeholder.enter') + $t('contract.taxId')"
|
|
26
|
-
/>
|
|
13
|
+
<el-form-item :label="$t('contract.taxId')" prop="taxNumber" v-if="this.companyType !== 'contract'">
|
|
14
|
+
<el-input v-model="form.taxNumber" :placeholder="$t('placeholder.enter') + $t('contract.taxId')" />
|
|
27
15
|
</el-form-item>
|
|
28
16
|
</el-col>
|
|
29
17
|
</el-row>
|
|
30
18
|
<el-row>
|
|
31
|
-
<el-col :span="
|
|
19
|
+
<el-col :span="24">
|
|
32
20
|
<el-form-item :label="$t('contract.companyAddress')" prop="address">
|
|
33
21
|
<el-input
|
|
22
|
+
type="textarea"
|
|
23
|
+
:autosize="{ minRows: 1, maxRows: 4 }"
|
|
34
24
|
v-model="form.address"
|
|
35
|
-
:placeholder="
|
|
36
|
-
$t('placeholder.enter') + $t('contract.companyAddress')
|
|
37
|
-
"
|
|
25
|
+
:placeholder="$t('placeholder.enter') + $t('contract.companyAddress')"
|
|
38
26
|
/>
|
|
39
27
|
</el-form-item>
|
|
40
28
|
</el-col>
|
|
@@ -43,46 +31,31 @@
|
|
|
43
31
|
<el-row>
|
|
44
32
|
<el-col :span="12">
|
|
45
33
|
<el-form-item label="PAN NO." prop="panNo">
|
|
46
|
-
<el-input
|
|
47
|
-
v-model="form.panNo"
|
|
48
|
-
:placeholder="
|
|
49
|
-
$t('placeholder.enter') + 'PAN NO.'
|
|
50
|
-
"
|
|
51
|
-
/>
|
|
34
|
+
<el-input v-model="form.panNo" :placeholder="$t('placeholder.enter') + 'PAN NO.'" />
|
|
52
35
|
</el-form-item>
|
|
53
36
|
</el-col>
|
|
54
37
|
<el-col :span="12">
|
|
55
38
|
<el-form-item label="IEC CODE" prop="iecCode">
|
|
56
|
-
<el-input
|
|
57
|
-
v-model="form.iecCode"
|
|
58
|
-
:placeholder="
|
|
59
|
-
$t('placeholder.enter') + 'IEC CODE'
|
|
60
|
-
"
|
|
61
|
-
/>
|
|
39
|
+
<el-input v-model="form.iecCode" :placeholder="$t('placeholder.enter') + 'IEC CODE'" />
|
|
62
40
|
</el-form-item>
|
|
63
41
|
</el-col>
|
|
64
42
|
</el-row>
|
|
65
43
|
<el-row>
|
|
66
44
|
<el-col :span="12">
|
|
67
45
|
<el-form-item label="GST NUMBER" prop="gstNumber">
|
|
68
|
-
<el-input
|
|
69
|
-
v-model="form.gstNumber"
|
|
70
|
-
:placeholder="
|
|
71
|
-
$t('placeholder.enter') + 'GST NUMBER'
|
|
72
|
-
"
|
|
73
|
-
/>
|
|
46
|
+
<el-input v-model="form.gstNumber" :placeholder="$t('placeholder.enter') + 'GST NUMBER'" />
|
|
74
47
|
</el-form-item>
|
|
75
48
|
</el-col>
|
|
76
49
|
<el-col :span="12"></el-col>
|
|
77
50
|
</el-row>
|
|
78
51
|
<el-row v-if="companyType == 'delivery' && channel !== 'official-website'">
|
|
79
|
-
<el-col :span="
|
|
52
|
+
<el-col :span="24">
|
|
80
53
|
<el-form-item :label="$t('contract.bliRemark')" prop="bliRemark">
|
|
81
54
|
<el-input
|
|
55
|
+
type="textarea"
|
|
56
|
+
:autosize="{ minRows: 3, maxRows: 4 }"
|
|
82
57
|
v-model="form.bliRemark"
|
|
83
|
-
:placeholder="
|
|
84
|
-
$t('placeholder.enter') + $t('contract.bliRemark')
|
|
85
|
-
"
|
|
58
|
+
:placeholder="$t('placeholder.enter') + $t('contract.bliRemark')"
|
|
86
59
|
/>
|
|
87
60
|
</el-form-item>
|
|
88
61
|
</el-col>
|
|
@@ -90,30 +63,18 @@
|
|
|
90
63
|
|
|
91
64
|
<el-divider></el-divider>
|
|
92
65
|
<el-row type="flex" justify="space-between">
|
|
93
|
-
<h4>{{ $t(
|
|
66
|
+
<h4>{{ $t('contract.contactInfo') }}</h4>
|
|
94
67
|
</el-row>
|
|
95
68
|
|
|
96
69
|
<el-row>
|
|
97
70
|
<el-col :span="12">
|
|
98
71
|
<el-form-item :label="$t('contract.contact')" prop="contact">
|
|
99
|
-
<el-input
|
|
100
|
-
v-model="form.contact"
|
|
101
|
-
:placeholder="$t('placeholder.enter') + $t('contract.contact')"
|
|
102
|
-
style="width: 75%"
|
|
103
|
-
/>
|
|
72
|
+
<el-input v-model="form.contact" :placeholder="$t('placeholder.enter') + $t('contract.contact')" style="width: 75%" />
|
|
104
73
|
</el-form-item>
|
|
105
74
|
</el-col>
|
|
106
75
|
<el-col :span="12">
|
|
107
|
-
<el-form-item
|
|
108
|
-
:
|
|
109
|
-
prop="landline"
|
|
110
|
-
v-if="this.companyType == 'contract'"
|
|
111
|
-
>
|
|
112
|
-
<el-input
|
|
113
|
-
v-model="form.landline"
|
|
114
|
-
:placeholder="$t('placeholder.enter') + $t('contract.landline')"
|
|
115
|
-
style="width: 75%"
|
|
116
|
-
/>
|
|
76
|
+
<el-form-item :label="$t('contract.landline')" prop="landline" v-if="this.companyType == 'contract'">
|
|
77
|
+
<el-input v-model="form.landline" :placeholder="$t('placeholder.enter') + $t('contract.landline')" style="width: 75%" />
|
|
117
78
|
</el-form-item>
|
|
118
79
|
</el-col>
|
|
119
80
|
</el-row>
|
|
@@ -123,37 +84,14 @@
|
|
|
123
84
|
<el-row v-for="(item, index) in form.phoneNumber" :key="index">
|
|
124
85
|
<el-col :span="20">
|
|
125
86
|
<el-form-item :label="$t('contract.phoneNumber')" prop="phoneNumber">
|
|
126
|
-
<el-input
|
|
127
|
-
v-model="form.phoneNumber[index]"
|
|
128
|
-
:placeholder="
|
|
129
|
-
$t('placeholder.enter') + $t('contract.phoneNumber')
|
|
130
|
-
"
|
|
131
|
-
></el-input>
|
|
87
|
+
<el-input v-model="form.phoneNumber[index]" :placeholder="$t('placeholder.enter') + $t('contract.phoneNumber')"></el-input>
|
|
132
88
|
</el-form-item>
|
|
133
89
|
</el-col>
|
|
134
90
|
<el-col :span="2" style="padding-top: 5px" v-if="companyType !== 'contract'">
|
|
135
|
-
<el-button
|
|
136
|
-
icon="el-icon-plus"
|
|
137
|
-
size="mini"
|
|
138
|
-
circle
|
|
139
|
-
class="ml5"
|
|
140
|
-
v-if="index === form.phoneNumber.length - 1"
|
|
141
|
-
@click="addArr('phoneNumber')"
|
|
142
|
-
></el-button>
|
|
91
|
+
<el-button icon="el-icon-plus" size="mini" circle class="ml5" v-if="index === form.phoneNumber.length - 1" @click="addArr('phoneNumber')"></el-button>
|
|
143
92
|
</el-col>
|
|
144
|
-
<el-col
|
|
145
|
-
|
|
146
|
-
style="padding-top: 5px"
|
|
147
|
-
:push="1"
|
|
148
|
-
v-if="companyType !== 'contract'"
|
|
149
|
-
>
|
|
150
|
-
<el-button
|
|
151
|
-
v-if="index > 0"
|
|
152
|
-
size="mini"
|
|
153
|
-
icon="el-icon-minus"
|
|
154
|
-
circle
|
|
155
|
-
@click="deleteArr('phoneNumber', index)"
|
|
156
|
-
></el-button>
|
|
93
|
+
<el-col :span="2" style="padding-top: 5px" :push="1" v-if="companyType !== 'contract'">
|
|
94
|
+
<el-button v-if="index > 0" size="mini" icon="el-icon-minus" circle @click="deleteArr('phoneNumber', index)"></el-button>
|
|
157
95
|
</el-col>
|
|
158
96
|
</el-row>
|
|
159
97
|
</el-col>
|
|
@@ -161,37 +99,15 @@
|
|
|
161
99
|
<!-- 循环 -->
|
|
162
100
|
<el-row v-for="(item, index) in form.email" :key="index">
|
|
163
101
|
<el-col :span="20">
|
|
164
|
-
<el-form-item
|
|
165
|
-
:
|
|
166
|
-
:prop="'email.' + index"
|
|
167
|
-
:rules="rules.email"
|
|
168
|
-
>
|
|
169
|
-
<el-input
|
|
170
|
-
v-model="form.email[index]"
|
|
171
|
-
:placeholder="
|
|
172
|
-
$t('placeholder.enter') + $t('contract.email')
|
|
173
|
-
"
|
|
174
|
-
/>
|
|
102
|
+
<el-form-item :label="$t('contract.email')" :prop="'email.' + index" :rules="rules.email">
|
|
103
|
+
<el-input v-model="form.email[index]" :placeholder="$t('placeholder.enter') + $t('contract.email')" />
|
|
175
104
|
</el-form-item>
|
|
176
105
|
</el-col>
|
|
177
106
|
<el-col :span="2" style="padding-top: 5px">
|
|
178
|
-
<el-button
|
|
179
|
-
icon="el-icon-plus"
|
|
180
|
-
size="mini"
|
|
181
|
-
circle
|
|
182
|
-
class="ml5"
|
|
183
|
-
v-if="index === form.email.length - 1"
|
|
184
|
-
@click="addArr('email')"
|
|
185
|
-
></el-button>
|
|
107
|
+
<el-button icon="el-icon-plus" size="mini" circle class="ml5" v-if="index === form.email.length - 1" @click="addArr('email')"></el-button>
|
|
186
108
|
</el-col>
|
|
187
109
|
<el-col :span="2" style="padding-top: 5px" :push="1">
|
|
188
|
-
<el-button
|
|
189
|
-
v-if="index > 0"
|
|
190
|
-
size="mini"
|
|
191
|
-
icon="el-icon-minus"
|
|
192
|
-
circle
|
|
193
|
-
@click="deleteArr('email', index)"
|
|
194
|
-
></el-button>
|
|
110
|
+
<el-button v-if="index > 0" size="mini" icon="el-icon-minus" circle @click="deleteArr('email', index)"></el-button>
|
|
195
111
|
</el-col>
|
|
196
112
|
</el-row>
|
|
197
113
|
</el-col>
|
|
@@ -202,19 +118,18 @@
|
|
|
202
118
|
</el-form-item>
|
|
203
119
|
</el-form>
|
|
204
120
|
<div slot="footer" class="dialog-footer">
|
|
205
|
-
<el-button type="primary" @click="
|
|
206
|
-
|
|
121
|
+
<el-button v-if="(companyType == 'delivery' || companyType == 'notifier') && form.contractCompanyId == null" type="primary" @click="submitAndGenerate">
|
|
122
|
+
{{ '确认并生成' + (companyType == 'delivery' ? '通知人' : companyType == 'notifier' ? '收货人' : '') }}
|
|
123
|
+
</el-button>
|
|
124
|
+
<el-button type="primary" @click="submitForm">{{ $t('button.confirm') }}</el-button>
|
|
125
|
+
<el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
|
|
207
126
|
</div>
|
|
208
127
|
</el-dialog>
|
|
209
128
|
</div>
|
|
210
129
|
</template>
|
|
211
130
|
|
|
212
131
|
<script>
|
|
213
|
-
import {
|
|
214
|
-
getBizContractCompany,
|
|
215
|
-
addBizContractCompany,
|
|
216
|
-
updateBizContractCompany,
|
|
217
|
-
} from '../../../api/biz/bizContractCompany';
|
|
132
|
+
import { getBizContractCompany, addBizContractCompany, updateBizContractCompany } from '../../../api/biz/bizContractCompany'
|
|
218
133
|
|
|
219
134
|
export default {
|
|
220
135
|
name: 'AddSubCompanyDialog',
|
|
@@ -238,50 +153,50 @@ export default {
|
|
|
238
153
|
{
|
|
239
154
|
required: true,
|
|
240
155
|
message: this.$t('contract.tip7'),
|
|
241
|
-
trigger: 'blur'
|
|
242
|
-
}
|
|
156
|
+
trigger: 'blur'
|
|
157
|
+
}
|
|
243
158
|
],
|
|
244
159
|
address: [
|
|
245
160
|
{
|
|
246
161
|
required: true,
|
|
247
162
|
message: this.$t('contract.tip8'),
|
|
248
|
-
trigger: 'blur'
|
|
249
|
-
}
|
|
163
|
+
trigger: 'blur'
|
|
164
|
+
}
|
|
250
165
|
],
|
|
251
166
|
email: [
|
|
252
167
|
{
|
|
253
168
|
required: true,
|
|
254
169
|
message: this.$t('contract.tip9'),
|
|
255
|
-
trigger: 'blur'
|
|
256
|
-
}
|
|
170
|
+
trigger: 'blur'
|
|
171
|
+
}
|
|
257
172
|
],
|
|
258
173
|
taxNumber: [
|
|
259
174
|
{
|
|
260
175
|
required: true,
|
|
261
176
|
message: this.$t('contract.tip10'),
|
|
262
|
-
trigger: 'blur'
|
|
263
|
-
}
|
|
264
|
-
]
|
|
265
|
-
}
|
|
266
|
-
}
|
|
177
|
+
trigger: 'blur'
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
}
|
|
267
182
|
},
|
|
268
183
|
props: {
|
|
269
|
-
channel: ''
|
|
184
|
+
channel: ''
|
|
270
185
|
},
|
|
271
186
|
created() {},
|
|
272
187
|
methods: {
|
|
273
188
|
//增加手机号
|
|
274
189
|
addArr(type) {
|
|
275
|
-
this.form[type].push('')
|
|
190
|
+
this.form[type].push('')
|
|
276
191
|
},
|
|
277
192
|
//增加邮箱
|
|
278
193
|
deleteArr(type, index) {
|
|
279
|
-
this.form[type].splice(index, 1)
|
|
194
|
+
this.form[type].splice(index, 1)
|
|
280
195
|
},
|
|
281
196
|
// 取消按钮
|
|
282
197
|
cancel() {
|
|
283
|
-
this.open = false
|
|
284
|
-
this.reset()
|
|
198
|
+
this.open = false
|
|
199
|
+
this.reset()
|
|
285
200
|
},
|
|
286
201
|
// 表单重置
|
|
287
202
|
reset() {
|
|
@@ -299,23 +214,23 @@ export default {
|
|
|
299
214
|
companyType: null,
|
|
300
215
|
defaultFlag: false,
|
|
301
216
|
landline: null,
|
|
302
|
-
taxNumber: null
|
|
303
|
-
}
|
|
304
|
-
this.resetForm('form')
|
|
217
|
+
taxNumber: null
|
|
218
|
+
}
|
|
219
|
+
this.resetForm('form')
|
|
305
220
|
},
|
|
306
221
|
/** 修改按钮操作 */
|
|
307
222
|
handleUpdate(row) {
|
|
308
|
-
this.reset()
|
|
309
|
-
const contractCompanyId = row.contractCompanyId
|
|
223
|
+
this.reset()
|
|
224
|
+
const contractCompanyId = row.contractCompanyId
|
|
310
225
|
getBizContractCompany(contractCompanyId).then((response) => {
|
|
311
|
-
this.form = response.data
|
|
312
|
-
this.companyId = row.companyId
|
|
313
|
-
this.companyType = response.data.companyType
|
|
226
|
+
this.form = response.data
|
|
227
|
+
this.companyId = row.companyId
|
|
228
|
+
this.companyType = response.data.companyType
|
|
314
229
|
if (this.form.phoneNumber.length <= 0) {
|
|
315
|
-
this.addArr('phoneNumber')
|
|
230
|
+
this.addArr('phoneNumber')
|
|
316
231
|
}
|
|
317
232
|
|
|
318
|
-
console.log(this.companyType)
|
|
233
|
+
console.log(this.companyType)
|
|
319
234
|
const title =
|
|
320
235
|
this.companyType == 'contract'
|
|
321
236
|
? this.$t('button.edit') + this.$t('contract.contract')
|
|
@@ -323,17 +238,17 @@ export default {
|
|
|
323
238
|
? this.$t('button.edit') + this.$t('contract.consignee')
|
|
324
239
|
: this.companyType == 'notifier'
|
|
325
240
|
? this.$t('button.edit') + this.$t('contract.notifier')
|
|
326
|
-
: this.$t('button.edit')
|
|
327
|
-
this.title = title
|
|
328
|
-
this.open = true
|
|
329
|
-
})
|
|
241
|
+
: this.$t('button.edit')
|
|
242
|
+
this.title = title
|
|
243
|
+
this.open = true
|
|
244
|
+
})
|
|
330
245
|
},
|
|
331
246
|
/** 新增按钮操作 */
|
|
332
247
|
handleAdd(companyId, companyType) {
|
|
333
|
-
this.reset()
|
|
334
|
-
this.open = true
|
|
335
|
-
this.companyType = companyType
|
|
336
|
-
this.companyId = companyId
|
|
248
|
+
this.reset()
|
|
249
|
+
this.open = true
|
|
250
|
+
this.companyType = companyType
|
|
251
|
+
this.companyId = companyId
|
|
337
252
|
const title =
|
|
338
253
|
companyType == 'contract'
|
|
339
254
|
? this.$t('button.add') + this.$t('contract.contract')
|
|
@@ -341,33 +256,55 @@ export default {
|
|
|
341
256
|
? this.$t('button.add') + this.$t('contract.consignee')
|
|
342
257
|
: companyType == 'notifier'
|
|
343
258
|
? this.$t('button.add') + this.$t('contract.notifier')
|
|
344
|
-
: this.$t('button.add')
|
|
345
|
-
this.addArr('phoneNumber')
|
|
346
|
-
this.addArr('email')
|
|
347
|
-
this.title = title
|
|
259
|
+
: this.$t('button.add')
|
|
260
|
+
this.addArr('phoneNumber')
|
|
261
|
+
this.addArr('email')
|
|
262
|
+
this.title = title
|
|
263
|
+
},
|
|
264
|
+
//提交并生成
|
|
265
|
+
submitAndGenerate() {
|
|
266
|
+
this.$refs['form'].validate((valid) => {
|
|
267
|
+
if (valid) {
|
|
268
|
+
this.form.companyType = this.companyType
|
|
269
|
+
this.form.companyId = this.companyId
|
|
270
|
+
addBizContractCompany(this.form).then((response) => {
|
|
271
|
+
if (this.companyType == 'delivery') {
|
|
272
|
+
this.form.companyType = 'notifier'
|
|
273
|
+
}
|
|
274
|
+
if (this.companyType == 'notifier') {
|
|
275
|
+
this.form.companyType = 'delivery'
|
|
276
|
+
}
|
|
277
|
+
addBizContractCompany(this.form).then((response) => {
|
|
278
|
+
this.$modal.msgSuccess('新增成功')
|
|
279
|
+
this.open = false
|
|
280
|
+
this.$emit('submit')
|
|
281
|
+
})
|
|
282
|
+
})
|
|
283
|
+
}
|
|
284
|
+
})
|
|
348
285
|
},
|
|
349
286
|
/** 提交按钮 */
|
|
350
287
|
submitForm() {
|
|
351
288
|
this.$refs['form'].validate((valid) => {
|
|
352
289
|
if (valid) {
|
|
353
|
-
this.form.companyType = this.companyType
|
|
354
|
-
this.form.companyId = this.companyId
|
|
290
|
+
this.form.companyType = this.companyType
|
|
291
|
+
this.form.companyId = this.companyId
|
|
355
292
|
if (this.form.contractCompanyId != null) {
|
|
356
293
|
updateBizContractCompany(this.form).then((response) => {
|
|
357
|
-
this.$modal.msgSuccess(this.$t('button.editTip'))
|
|
358
|
-
this.open = false
|
|
359
|
-
this.$emit('submit')
|
|
360
|
-
})
|
|
294
|
+
this.$modal.msgSuccess(this.$t('button.editTip'))
|
|
295
|
+
this.open = false
|
|
296
|
+
this.$emit('submit')
|
|
297
|
+
})
|
|
361
298
|
} else {
|
|
362
299
|
addBizContractCompany(this.form).then((response) => {
|
|
363
|
-
this.$modal.msgSuccess(this.$t('button.addTip'))
|
|
364
|
-
this.open = false
|
|
365
|
-
this.$emit('submit')
|
|
366
|
-
})
|
|
300
|
+
this.$modal.msgSuccess(this.$t('button.addTip'))
|
|
301
|
+
this.open = false
|
|
302
|
+
this.$emit('submit')
|
|
303
|
+
})
|
|
367
304
|
}
|
|
368
305
|
}
|
|
369
|
-
})
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
306
|
+
})
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
373
310
|
</script>
|