doctor-admin-components 1.0.13-beta.8 → 1.0.13-beta.81
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/index.js +7 -0
- package/packages/src/api/biz/bizContract.js +996 -1
- package/packages/src/api/biz/bizContractCompany.js +1 -1
- package/packages/src/api/biz/bizFileInfo.js +16 -0
- package/packages/src/api/biz/bizInvoice.js +1 -1
- package/packages/src/api/biz/bizShipment.js +18 -0
- package/packages/src/assets/images/click-show-table.png +0 -0
- package/packages/src/assets/images/more.png +0 -0
- package/packages/src/assets/images/pdf-new.png +0 -0
- package/packages/src/components/DictTag/index.vue +12 -2
- package/packages/src/components/FileUpload/contract-drag-new.vue +99 -10
- package/packages/src/i18n/en/message.json +298 -0
- package/packages/src/i18n/index.js +38 -0
- package/packages/src/i18n/zh-CN/message.json +298 -0
- package/packages/src/index.js +6 -0
- package/packages/src/utils/index.js +35 -0
- package/packages/src/utils/request.js +120 -146
- package/packages/src/views/biz/bizFileInfo/PAYMENT_VOUCHER(/"payment_voucher/", /"/344/273/230/346/254/276/345/207/255/350/257/201.ini" +222 -0
- package/packages/src/views/biz/bizFileInfo/contract copy.vue +1711 -0
- package/packages/src/views/biz/bizFileInfo/contract.vue +1677 -999
- package/packages/src/views/biz/bizFileInfo/contractFile/BillOfLadingNoTab.vue +114 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/ContentTitle.vue +102 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/IMGPreviewCheckBox.vue +308 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/Progress.vue +85 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/ProgressDetail.vue +122 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/SectionSlot.vue +83 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/ShowAndHide.vue +178 -0
- package/packages/src/views/biz/bizFileInfo/fileShow copy.vue +321 -0
- package/packages/src/views/biz/bizFileInfo/fileShow.vue +131 -46
- package/packages/src/views/biz/bizFileInfo/fileShowClaim.vue +1 -1
- package/packages/src/views/biz/bizShipment/add.vue +218 -75
- package/packages/src/views/biz/bizShipment/referenceAlert.vue +168 -0
- package/packages/src/views/biz/contractTracing/addSubCompany.vue +106 -169
- package/packages/src/views/biz/contractTracing/billInfo.vue +181 -329
- package/packages/src/views/biz/contractTracing/companyBanks.vue +228 -0
- package/packages/src/views/biz/contractTracing/contractInfo.vue +1 -1
- package/packages/src/views/biz/contractTracing/contractPdf.vue +5 -3
- package/packages/src/views/biz/contractTracing/contractSummary.vue +17 -9
- package/packages/src/views/biz/contractTracing/contractTracingDetail copy.vue +107 -0
- package/packages/src/views/biz/contractTracing/contractTracingDetail.vue +229 -9
- package/packages/src/views/biz/contractTracing/editBill.vue +231 -361
- package/packages/src/views/biz/contractTracing/purchaseInvoiceUpload.vue +153 -7
- package/packages/src/views/biz/contractTracing/shipmentPurchaseAmount.vue +8 -2
- package/packages/src/views/biz/contractTracing/subCompanyDialog.vue +202 -176
- package/packages/src/views/test.vue +3 -3
- 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,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="app-container">
|
|
3
3
|
<!-- 添加或修改装运对话框 -->
|
|
4
|
-
<el-dialog :
|
|
4
|
+
<el-dialog :visible.sync="open" z-index="1000" width="80%" :before-close="handleClose">
|
|
5
|
+
<slot name="">
|
|
6
|
+
<span>{{ title }}</span>
|
|
7
|
+
<span v-if="voidInvoiceList" style="color: red">【快捷转卖】:系统检测到此销售合同关联的采购合同存在【已作废】的装运,</span>
|
|
8
|
+
<el-button v-if="voidInvoiceList" @click="handleReference" size="mini" type="text">点击这里直接复制并引用</el-button>
|
|
9
|
+
</slot>
|
|
5
10
|
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
|
|
6
11
|
<el-row>
|
|
7
12
|
<el-col :span="6">
|
|
@@ -93,6 +98,11 @@
|
|
|
93
98
|
</el-select>
|
|
94
99
|
</el-form-item>
|
|
95
100
|
</el-col>
|
|
101
|
+
<el-col :span="8">
|
|
102
|
+
<el-form-item label="ETA更新" prop="etaUpdateOn" label-width="100">
|
|
103
|
+
<el-switch v-model="form.etaUpdateOn" active-text="自动" inactive-text="手动"> </el-switch>
|
|
104
|
+
</el-form-item>
|
|
105
|
+
</el-col>
|
|
96
106
|
</el-row>
|
|
97
107
|
<el-table stripe :data="contractDetailList" border>
|
|
98
108
|
<el-table-column label="序号" type="index" align="center"></el-table-column>
|
|
@@ -147,14 +157,14 @@
|
|
|
147
157
|
</el-col>
|
|
148
158
|
<el-col :span="8">
|
|
149
159
|
<el-form-item label="集装箱皮重(kg)" :prop="'containerList.' + index + '.containerTareWeight'" :rules="subrules.containerTareWeight" label-width="120px">
|
|
150
|
-
<el-input v-model="dt.containerTareWeight" placeholder="请输入" size="mini"></el-input>
|
|
160
|
+
<el-input v-model="dt.containerTareWeight" placeholder="请输入" size="mini" type="number"></el-input>
|
|
151
161
|
</el-form-item>
|
|
152
162
|
</el-col>
|
|
153
163
|
</el-row>
|
|
154
164
|
<el-row>
|
|
155
165
|
<el-col :span="6">
|
|
156
166
|
<el-form-item label="总货物毛重(t)" :prop="'containerList.' + index + '.totalGoodsGrossWeight'" :rules="subrules.totalGoodsGrossWeight" label-width="105px">
|
|
157
|
-
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsGrossWeight"></el-input>
|
|
167
|
+
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsGrossWeight" type="number"></el-input>
|
|
158
168
|
<div v-else>
|
|
159
169
|
{{ dt.totalGoodsGrossWeight ? dt.totalGoodsGrossWeight : '自动计算' }}
|
|
160
170
|
</div>
|
|
@@ -162,7 +172,7 @@
|
|
|
162
172
|
</el-col>
|
|
163
173
|
<el-col :span="6">
|
|
164
174
|
<el-form-item label="总货物皮重(t)" :prop="'containerList.' + index + '.totalGoodsTareWeight'" :rules="subrules.totalGoodsTareWeight" label-width="105px">
|
|
165
|
-
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsTareWeight"></el-input>
|
|
175
|
+
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsTareWeight" type="number"></el-input>
|
|
166
176
|
<div v-else>
|
|
167
177
|
{{ dt.totalGoodsTareWeight ? dt.totalGoodsTareWeight : '自动计算' }}
|
|
168
178
|
</div>
|
|
@@ -170,7 +180,7 @@
|
|
|
170
180
|
</el-col>
|
|
171
181
|
<el-col :span="6">
|
|
172
182
|
<el-form-item label="总货物净重(t)" :prop="'containerList.' + index + '.totalGoodsNetWeight'" :rules="subrules.totalGoodsNetWeight" label-width="105px">
|
|
173
|
-
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsNetWeight"></el-input>
|
|
183
|
+
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsNetWeight" type="number"></el-input>
|
|
174
184
|
<div v-else>
|
|
175
185
|
{{ dt.totalGoodsNetWeight ? dt.totalGoodsNetWeight : '自动计算' }}
|
|
176
186
|
</div>
|
|
@@ -202,7 +212,8 @@
|
|
|
202
212
|
v-model="scope2.row.packageGrossWeight"
|
|
203
213
|
placeholder="请输入毛重"
|
|
204
214
|
size="mini"
|
|
205
|
-
|
|
215
|
+
type="number"
|
|
216
|
+
@input="changePackageGrossWeight(index, scope1.$index, scope2.$index)"
|
|
206
217
|
></el-input>
|
|
207
218
|
</el-form-item>
|
|
208
219
|
</template>
|
|
@@ -220,7 +231,8 @@
|
|
|
220
231
|
v-model="scope2.row.packageTareWeight"
|
|
221
232
|
placeholder="请输入皮重"
|
|
222
233
|
size="mini"
|
|
223
|
-
|
|
234
|
+
type="number"
|
|
235
|
+
@input="changePackageTareWeight(index, scope1.$index, scope2.$index)"
|
|
224
236
|
></el-input>
|
|
225
237
|
</el-form-item>
|
|
226
238
|
</template>
|
|
@@ -234,7 +246,7 @@
|
|
|
234
246
|
:rules="rules.packageNetWeight"
|
|
235
247
|
:prop="'containerList.' + index + '.containerDetailList.' + scope1.$index + '.packageList.' + scope2.$index + '.packageNetWeight'"
|
|
236
248
|
>
|
|
237
|
-
<el-input v-model="scope2.row.packageNetWeight" placeholder="请输入净重" size="mini"></el-input>
|
|
249
|
+
<el-input v-model="scope2.row.packageNetWeight" placeholder="请输入净重" size="mini" type="number"></el-input>
|
|
238
250
|
</el-form-item>
|
|
239
251
|
</template>
|
|
240
252
|
</el-table-column>
|
|
@@ -348,7 +360,7 @@
|
|
|
348
360
|
:prop="'containerList.' + index + '.containerDetailList.' + scope.$index + '.goodsNumber'"
|
|
349
361
|
:rules="subrules.goodsNumber"
|
|
350
362
|
>
|
|
351
|
-
<el-input v-model="scope.row.goodsNumber" size="small" @change="changeTotalGoodsNumber(index)"></el-input>
|
|
363
|
+
<el-input v-model="scope.row.goodsNumber" size="small" @change="changeTotalGoodsNumber(index)" type="number"></el-input>
|
|
352
364
|
</el-form-item>
|
|
353
365
|
</template>
|
|
354
366
|
</el-table-column>
|
|
@@ -388,7 +400,7 @@
|
|
|
388
400
|
<el-button @click="cancel">取 消</el-button>
|
|
389
401
|
</div>
|
|
390
402
|
|
|
391
|
-
<div style="display: flex; justify-content: center; align-items: center">
|
|
403
|
+
<div style="display: flex; justify-content: center; align-items: center" v-if="title == '修改装运'">
|
|
392
404
|
<ul>
|
|
393
405
|
按钮说明
|
|
394
406
|
<ul>
|
|
@@ -421,26 +433,35 @@
|
|
|
421
433
|
</el-dialog>
|
|
422
434
|
|
|
423
435
|
<select-booking ref="selectBooking" @submit="setBooking" @unSubmit="unSetBooking" />
|
|
436
|
+
<!-- 引用装运 -->
|
|
437
|
+
<reference-alert @referenced="handleReferenced" ref="referenceAlert" />
|
|
424
438
|
</div>
|
|
425
439
|
</template>
|
|
426
440
|
|
|
427
441
|
<script>
|
|
428
|
-
import { listBizShipment, getBizShipment, delBizShipment, addWithContainer, updateWithContainer, updateWithContainerAndInvoice } from '../../../api/biz/bizShipment'
|
|
442
|
+
import { haveVoidShipment, listBizShipment, getBizShipment, delBizShipment, addWithContainer, addContainerCheck, updateWithContainer, updateWithContainerAndInvoice } from '../../../api/biz/bizShipment'
|
|
429
443
|
import { generateFinalInvoiceByShipmentId } from '../../../api/biz/bizInvoice'
|
|
430
444
|
import { updateBizContractDetail } from '../../../api/biz/bizContractDetail'
|
|
445
|
+
import { queryPurchaseContracts } from '../../../api/biz/bizContract'
|
|
446
|
+
|
|
431
447
|
import { Loading } from 'element-ui'
|
|
432
448
|
import { listDictData } from '../../../api/biz/dictData'
|
|
433
449
|
import selectBooking from './selectBooking.vue'
|
|
434
450
|
import { listBizBooking } from '../../../api/biz/bizBooking'
|
|
451
|
+
import ReferenceAlert from './referenceAlert.vue'
|
|
452
|
+
import { MessageBox } from 'element-ui'
|
|
435
453
|
|
|
436
454
|
export default {
|
|
437
455
|
name: 'AddShipment',
|
|
438
456
|
dicts: ['shipping_company'],
|
|
439
457
|
components: {
|
|
440
|
-
selectBooking
|
|
458
|
+
selectBooking,
|
|
459
|
+
ReferenceAlert,
|
|
441
460
|
},
|
|
442
461
|
data() {
|
|
443
462
|
return {
|
|
463
|
+
// 已作废的装运合同
|
|
464
|
+
voidInvoiceList: null,
|
|
444
465
|
//目的地港口列表
|
|
445
466
|
destinationPortList: [],
|
|
446
467
|
//折叠面板
|
|
@@ -488,7 +509,9 @@ export default {
|
|
|
488
509
|
actualArrivalDate: null
|
|
489
510
|
},
|
|
490
511
|
// 表单参数
|
|
491
|
-
form: {
|
|
512
|
+
form: {
|
|
513
|
+
etaUpdateOn: true
|
|
514
|
+
},
|
|
492
515
|
// 表单校验
|
|
493
516
|
rules: {
|
|
494
517
|
billOfLadingNo: [{ required: true, message: '提单号不能为空', trigger: 'blur' }],
|
|
@@ -563,6 +586,21 @@ export default {
|
|
|
563
586
|
}
|
|
564
587
|
},
|
|
565
588
|
methods: {
|
|
589
|
+
// 已用的数据,赋值给form
|
|
590
|
+
handleReferenced(data) {
|
|
591
|
+
//shipment, copyFileTypeList
|
|
592
|
+
let contractIds = this.form.contractIds // 保持不变
|
|
593
|
+
this.form = {...this.form, ...data.shipment, 'contractIds':contractIds}
|
|
594
|
+
// 需要去掉shipmentId
|
|
595
|
+
this.form.shipmentId = null
|
|
596
|
+
this.form.citeShipmentId = data.shipment.shipmentId
|
|
597
|
+
this.form.copyFileTypeList = data.copyFileTypeList
|
|
598
|
+
console.log('form:', this.form)
|
|
599
|
+
},
|
|
600
|
+
//引用已作废的装运
|
|
601
|
+
handleReference() {
|
|
602
|
+
this.$refs.referenceAlert.handleOpen(this.voidInvoiceList)
|
|
603
|
+
},
|
|
566
604
|
//编辑开关
|
|
567
605
|
openEditSwitch() {
|
|
568
606
|
this.editSwitch = this.editSwitch = true
|
|
@@ -627,6 +665,21 @@ export default {
|
|
|
627
665
|
this.form.containerList[index].totalGoodsGrossWeight = this.form.containerList[index].containerDetailList.reduce((total, item) => {
|
|
628
666
|
return total + Number(item.goodsGrossWeight)
|
|
629
667
|
}, 0)
|
|
668
|
+
//计算净重
|
|
669
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageNetWeight = (
|
|
670
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageGrossWeight -
|
|
671
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageTareWeight
|
|
672
|
+
).toFixed(3)
|
|
673
|
+
|
|
674
|
+
this.form.containerList[index].containerDetailList[k].goodsNetWeight = this.form.containerList[index].containerDetailList[k].packageList.reduce((total, item) => {
|
|
675
|
+
return total + Number(item.packageNetWeight)
|
|
676
|
+
}, 0)
|
|
677
|
+
|
|
678
|
+
this.form.containerList[index].totalGoodsNetWeight = this.form.containerList[index].containerDetailList
|
|
679
|
+
.reduce((total, item) => {
|
|
680
|
+
return total + Number(item.goodsNetWeight)
|
|
681
|
+
}, 0)
|
|
682
|
+
.toFixed(3)
|
|
630
683
|
},
|
|
631
684
|
changePackageTareWeight(index, k, yindex) {
|
|
632
685
|
//计算皮重
|
|
@@ -766,6 +819,7 @@ export default {
|
|
|
766
819
|
createTime: null,
|
|
767
820
|
updateTime: null,
|
|
768
821
|
containerList: [],
|
|
822
|
+
etaUpdateOn: true,
|
|
769
823
|
loadingTime: this.utc2local(new Date(), 'yyyy-MM-DD HH:mm:ss')
|
|
770
824
|
}
|
|
771
825
|
this.contract = {
|
|
@@ -834,19 +888,29 @@ export default {
|
|
|
834
888
|
this.contractDetailList = contractDetailList.map((v) => {
|
|
835
889
|
return { ...v, selected: false }
|
|
836
890
|
})
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
891
|
+
// 过滤作废的采购合同
|
|
892
|
+
queryPurchaseContracts(contract.contractId)
|
|
893
|
+
.then((res) => {
|
|
894
|
+
let purchaseContractNos = res.rows
|
|
840
895
|
this.contract.purchaseContractNos = purchaseContractNos
|
|
841
896
|
if (purchaseContractNos && purchaseContractNos.length == 1) {
|
|
842
897
|
this.form.purchaseContractNo = purchaseContractNos[0]
|
|
843
898
|
}
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
899
|
+
})
|
|
900
|
+
// var purchaseContractNos = contract?.purchaseContractNos
|
|
901
|
+
// if (typeof purchaseContractNos == 'string') {
|
|
902
|
+
// purchaseContractNos = purchaseContractNos?.split(',')
|
|
903
|
+
// this.contract.purchaseContractNos = purchaseContractNos
|
|
904
|
+
// if (purchaseContractNos && purchaseContractNos.length == 1) {
|
|
905
|
+
// this.form.purchaseContractNo = purchaseContractNos[0]
|
|
906
|
+
// }
|
|
907
|
+
// } else {
|
|
908
|
+
// this.contract.purchaseContractNos = purchaseContractNos
|
|
909
|
+
// if (purchaseContractNos && purchaseContractNos.length == 1) {
|
|
910
|
+
// this.form.purchaseContractNo = purchaseContractNos[0]
|
|
911
|
+
// }
|
|
912
|
+
// }
|
|
913
|
+
|
|
850
914
|
let containerNum = 1
|
|
851
915
|
this.form.destinationPort = destinationPort
|
|
852
916
|
this.form.contractIds = Array.from(new Set(contractDetailList.map((i) => i.contractId)))
|
|
@@ -864,6 +928,13 @@ export default {
|
|
|
864
928
|
.catch((error) => {
|
|
865
929
|
console.error(error)
|
|
866
930
|
})
|
|
931
|
+
// 查询是否有可引用的
|
|
932
|
+
haveVoidShipment(contract.contractId)
|
|
933
|
+
.then((res) => {
|
|
934
|
+
this.voidInvoiceList = res.rows && res.rows.length > 0 ? res.rows : null
|
|
935
|
+
})
|
|
936
|
+
// 测试数据
|
|
937
|
+
// this.voidInvoiceList = [{'contractId': '1', 'contractNo':'合同号1'}]
|
|
867
938
|
},
|
|
868
939
|
/** 修改按钮操作 */
|
|
869
940
|
handleUpdate(row) {
|
|
@@ -978,34 +1049,46 @@ export default {
|
|
|
978
1049
|
})
|
|
979
1050
|
},
|
|
980
1051
|
//仅生成装运
|
|
981
|
-
submitShipment() {
|
|
1052
|
+
async submitShipment() {
|
|
1053
|
+
// 装运前校验
|
|
1054
|
+
let resOK = await this.checkPreShipment()
|
|
1055
|
+
if (!resOK) {
|
|
1056
|
+
return
|
|
1057
|
+
}
|
|
982
1058
|
this.$refs['form'].validate((valid) => {
|
|
983
1059
|
if (valid) {
|
|
984
|
-
|
|
1060
|
+
let loadingInstance = Loading.service({
|
|
1061
|
+
text: '请稍候',
|
|
1062
|
+
spinner: 'el-icon-loading',
|
|
1063
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1064
|
+
customClass: 'custom-loading-class'
|
|
1065
|
+
})
|
|
985
1066
|
if (this.form.shipmentId == null) {
|
|
986
|
-
let loadingInstance = Loading.service({
|
|
987
|
-
text: '请稍候',
|
|
988
|
-
spinner: 'el-icon-loading',
|
|
989
|
-
background: 'rgba(0, 0, 0, 0.7)'
|
|
990
|
-
})
|
|
991
1067
|
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
|
-
})
|
|
1068
|
+
if (response.code == 200) {
|
|
1069
|
+
this.open = false
|
|
1070
|
+
loadingInstance.close()
|
|
1071
|
+
this.$confirm('装运已生成!您可以点击“确认”按钮留在当前页面,或点击“去看看”按钮查看详细信息。', {
|
|
1072
|
+
confirmButtonText: '确定',
|
|
1073
|
+
cancelButtonText: '去看看',
|
|
1074
|
+
type: 'warning'
|
|
1004
1075
|
})
|
|
1005
|
-
|
|
1076
|
+
.then(() => {})
|
|
1077
|
+
.catch(() => {
|
|
1078
|
+
this.$router.push({
|
|
1079
|
+
name: 'BizShipment',
|
|
1080
|
+
params: { viewDetailFlag: true }
|
|
1081
|
+
})
|
|
1082
|
+
})
|
|
1083
|
+
this.$emit('refresh')
|
|
1084
|
+
} else {
|
|
1085
|
+
loadingInstance.close()
|
|
1086
|
+
}
|
|
1006
1087
|
})
|
|
1007
1088
|
} else {
|
|
1008
1089
|
updateWithContainer(this.form).then((res) => {
|
|
1090
|
+
loadingInstance.close()
|
|
1091
|
+
this.open = false
|
|
1009
1092
|
this.$modal.msgSuccess('修改成功')
|
|
1010
1093
|
this.$emit('refresh')
|
|
1011
1094
|
})
|
|
@@ -1014,32 +1097,46 @@ export default {
|
|
|
1014
1097
|
})
|
|
1015
1098
|
},
|
|
1016
1099
|
//装运并下载
|
|
1017
|
-
handleTemplate(
|
|
1100
|
+
async handleTemplate() {
|
|
1101
|
+
// 装运前校验
|
|
1102
|
+
let resOK = await this.checkPreShipment()
|
|
1103
|
+
if (!resOK) {
|
|
1104
|
+
return
|
|
1105
|
+
}
|
|
1018
1106
|
this.submitAndDownload(command)
|
|
1019
1107
|
},
|
|
1020
1108
|
//提交并下载
|
|
1021
1109
|
submitAndDownload(templateType) {
|
|
1022
1110
|
this.$refs['form'].validate((valid) => {
|
|
1023
1111
|
if (valid) {
|
|
1024
|
-
this.open = false
|
|
1025
1112
|
let loadingInstance = Loading.service({
|
|
1026
1113
|
text: '请稍候',
|
|
1027
1114
|
spinner: 'el-icon-loading',
|
|
1028
|
-
background: 'rgba(0, 0, 0, 0.7)'
|
|
1115
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1116
|
+
customClass: 'custom-loading-class'
|
|
1029
1117
|
})
|
|
1030
|
-
addWithContainer(this.form)
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1118
|
+
addWithContainer(this.form)
|
|
1119
|
+
.then((res) => {
|
|
1120
|
+
if (res.code == 200) {
|
|
1121
|
+
var query = {}
|
|
1122
|
+
query.orderByColumn = 'shipmentId'
|
|
1123
|
+
query.isAsc = 'desc'
|
|
1124
|
+
query.pageNum = 1
|
|
1125
|
+
query.pageSize = 1
|
|
1126
|
+
listBizShipment(query).then((res) => {
|
|
1127
|
+
var shipment = res.rows[0]
|
|
1128
|
+
this.handleDownloadShipment(shipment, templateType)
|
|
1129
|
+
})
|
|
1130
|
+
this.$emit('refresh')
|
|
1131
|
+
this.open = false
|
|
1132
|
+
loadingInstance.close()
|
|
1133
|
+
} else {
|
|
1134
|
+
loadingInstance.close()
|
|
1135
|
+
}
|
|
1136
|
+
})
|
|
1137
|
+
.finally(() => {
|
|
1138
|
+
loadingInstance.close()
|
|
1040
1139
|
})
|
|
1041
|
-
this.$emit('refresh')
|
|
1042
|
-
})
|
|
1043
1140
|
}
|
|
1044
1141
|
})
|
|
1045
1142
|
},
|
|
@@ -1061,30 +1158,68 @@ export default {
|
|
|
1061
1158
|
fileName
|
|
1062
1159
|
)
|
|
1063
1160
|
},
|
|
1161
|
+
// 装运前校验
|
|
1162
|
+
async checkPreShipment() {
|
|
1163
|
+
let res = await addContainerCheck({
|
|
1164
|
+
'billOfLadingNo': this.form.billOfLadingNo,
|
|
1165
|
+
'bookingNo': this.form.bookingNo,
|
|
1166
|
+
'shipmentId': this.form.shipmentId
|
|
1167
|
+
})
|
|
1168
|
+
if (!res.data.checkShipmentTip) {
|
|
1169
|
+
return true
|
|
1170
|
+
}
|
|
1171
|
+
let result = await MessageBox.confirm(res.data.checkShipmentTip, '提示', {
|
|
1172
|
+
confirmButtonText: '确定',
|
|
1173
|
+
cancelButtonText: '取消',
|
|
1174
|
+
type: 'warning'
|
|
1175
|
+
}).catch(err => err)
|
|
1176
|
+
return result === 'confirm'
|
|
1177
|
+
},
|
|
1064
1178
|
/** 提交按钮 */
|
|
1065
|
-
submitForm() {
|
|
1179
|
+
async submitForm() {
|
|
1180
|
+
// 装运前校验
|
|
1181
|
+
let resOK = await this.checkPreShipment()
|
|
1182
|
+
if (!resOK) {
|
|
1183
|
+
return
|
|
1184
|
+
}
|
|
1066
1185
|
this.$refs['form'].validate((valid) => {
|
|
1067
1186
|
if (valid) {
|
|
1068
|
-
|
|
1187
|
+
let loadingInstance = Loading.service({
|
|
1188
|
+
text: '请稍候',
|
|
1189
|
+
spinner: 'el-icon-loading',
|
|
1190
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1191
|
+
customClass: 'custom-loading-class'
|
|
1192
|
+
})
|
|
1069
1193
|
if (this.form.shipmentId == null) {
|
|
1070
|
-
addWithContainer(this.form)
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1194
|
+
addWithContainer(this.form)
|
|
1195
|
+
.then((response) => {
|
|
1196
|
+
if (response.code == 200) {
|
|
1197
|
+
this.open = false
|
|
1198
|
+
this.$modal.msgSuccess('生成成功')
|
|
1199
|
+
var query = {}
|
|
1200
|
+
query.orderByColumn = 'shipmentId'
|
|
1201
|
+
query.isAsc = 'desc'
|
|
1202
|
+
query.pageNum = 1
|
|
1203
|
+
query.pageSize = 10
|
|
1204
|
+
if (this.contract.contractType == 'sale') {
|
|
1205
|
+
query.saleContractId = this.contract.contractId
|
|
1206
|
+
} else {
|
|
1207
|
+
query.purchaseContractId = this.contract.contractId
|
|
1208
|
+
}
|
|
1209
|
+
listBizShipment(query).then((res) => {
|
|
1210
|
+
var shipment = res.rows[0]
|
|
1211
|
+
this.handleGenerateFinalInvoice(shipment)
|
|
1212
|
+
})
|
|
1213
|
+
} else {
|
|
1214
|
+
loadingInstance.close()
|
|
1215
|
+
}
|
|
1216
|
+
})
|
|
1217
|
+
.finally(() => {
|
|
1218
|
+
loadingInstance.close()
|
|
1085
1219
|
})
|
|
1086
|
-
})
|
|
1087
1220
|
} else {
|
|
1221
|
+
loadingInstance.close()
|
|
1222
|
+
this.open = false
|
|
1088
1223
|
this.$emit('openGenerateLive', { ...this.form, quoteType: this.contract.quoteType })
|
|
1089
1224
|
}
|
|
1090
1225
|
}
|
|
@@ -1139,3 +1274,11 @@ export default {
|
|
|
1139
1274
|
border-radius: 4px;
|
|
1140
1275
|
}
|
|
1141
1276
|
</style>
|
|
1277
|
+
<style lang="scss">
|
|
1278
|
+
.el-loading-mask.custom-loading-class.is-fullscreen {
|
|
1279
|
+
z-index: 3000 !important;
|
|
1280
|
+
}
|
|
1281
|
+
.el-message.el-message--error {
|
|
1282
|
+
z-index: 3001 !important;
|
|
1283
|
+
}
|
|
1284
|
+
</style>
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class>
|
|
3
|
+
<el-dialog :title="title" :visible.sync="open" width="75%" append-to-body>
|
|
4
|
+
<el-form ref="form" :model="form" label-width="100%">
|
|
5
|
+
<el-form-item class="vertical-form-item" :required="true" label="请选择您需要复制的装运:">
|
|
6
|
+
<el-row> 合同号 </el-row>
|
|
7
|
+
<el-row>
|
|
8
|
+
<el-select @change="selectContract" v-model="contractId" placeholder="请选择合同号">
|
|
9
|
+
<el-option v-for="(item, i) in shipmentList" :key="i" :label="item.contractNo" :value="item.contractId"></el-option>
|
|
10
|
+
</el-select>
|
|
11
|
+
</el-row>
|
|
12
|
+
<el-row v-if="contractId" style="padding-top: 15px"> 提单号 </el-row>
|
|
13
|
+
<el-row v-if="contractId">
|
|
14
|
+
<el-radio-group v-model="form.citeShipmentId">
|
|
15
|
+
<div v-for="(item, i) in blList" :key="i">
|
|
16
|
+
<el-radio :label="item.shipmentId">
|
|
17
|
+
<span>{{ item.billOfLadingNo }}</span>
|
|
18
|
+
<span v-if="item.citeNumber">(</span>
|
|
19
|
+
<span v-if="item.citeNumber" style="color: red">已被引用过{{ item.citeNumber }}次</span>
|
|
20
|
+
<span v-if="item.citeNumber">)</span>
|
|
21
|
+
</el-radio>
|
|
22
|
+
</div>
|
|
23
|
+
</el-radio-group>
|
|
24
|
+
</el-row>
|
|
25
|
+
</el-form-item>
|
|
26
|
+
|
|
27
|
+
<el-form-item v-if="contractId" class="vertical-form-item" :required="true" label="请选择您需要复制的数据或文件:">
|
|
28
|
+
<el-row> 可复用的文件如下: </el-row>
|
|
29
|
+
<el-row>
|
|
30
|
+
<el-checkbox v-model="isSelectAll" @change="selectAll" label="0">选择全部</el-checkbox>
|
|
31
|
+
</el-row>
|
|
32
|
+
<el-row>
|
|
33
|
+
<el-checkbox-group @change="selectChange" v-model="form.copyFileTypeList">
|
|
34
|
+
<el-checkbox v-for="(item, i) in fileList" :key="i" :label="item.key">{{ item.value }}</el-checkbox>
|
|
35
|
+
</el-checkbox-group>
|
|
36
|
+
</el-row>
|
|
37
|
+
</el-form-item>
|
|
38
|
+
</el-form>
|
|
39
|
+
<div slot="footer" class="dialog-footer">
|
|
40
|
+
<el-button @click="cancel">取 消</el-button>
|
|
41
|
+
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
42
|
+
</div>
|
|
43
|
+
</el-dialog>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
import { listBizShipment, getBizShipment } from '../../../api/biz/bizShipment'
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
name: 'ReferenceAlert',
|
|
52
|
+
props: {},
|
|
53
|
+
components: {},
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
// 弹出层标题
|
|
57
|
+
title: '请确认:',
|
|
58
|
+
// 是否显示弹出层
|
|
59
|
+
open: false,
|
|
60
|
+
// 表单参数
|
|
61
|
+
form: {
|
|
62
|
+
citeShipmentId: null,
|
|
63
|
+
copyFileTypeList: [] // 可复用的文件
|
|
64
|
+
},
|
|
65
|
+
// 选择的合同
|
|
66
|
+
contractId: null,
|
|
67
|
+
// 可引用的数据(销售合同列表)
|
|
68
|
+
shipmentList: null,
|
|
69
|
+
// 合同对应的提单列表
|
|
70
|
+
blList: null,
|
|
71
|
+
isSelectAll: false,
|
|
72
|
+
fileList: [
|
|
73
|
+
{ key: 'booking_data', value: '订舱资料' },
|
|
74
|
+
{ key: 'packingPhoto', value: '装箱照片' },
|
|
75
|
+
{ key: 'draft_bill_of_lading', value: '草稿提单' },
|
|
76
|
+
{ key: 'shipment_delivery_receipt', value: '正式提单' }
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
computed: {},
|
|
81
|
+
watch: {},
|
|
82
|
+
methods: {
|
|
83
|
+
selectAll(val) {
|
|
84
|
+
if (val) {
|
|
85
|
+
this.form.copyFileTypeList = this.fileList.map((res) => res.key)
|
|
86
|
+
} else {
|
|
87
|
+
this.form.copyFileTypeList = []
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
selectChange(val) {
|
|
91
|
+
this.isSelectAll = this.form.copyFileTypeList.length == 4
|
|
92
|
+
},
|
|
93
|
+
selectContract(val) {
|
|
94
|
+
this.blList = null
|
|
95
|
+
// 获取提单
|
|
96
|
+
listBizShipment({ 'saleContractId': val, 'voidStatus': 1 }).then((res) => {
|
|
97
|
+
this.blList = res.rows
|
|
98
|
+
})
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
/** 提交按钮 */
|
|
102
|
+
submitForm() {
|
|
103
|
+
// 数据校验
|
|
104
|
+
if (!this.contractId) {
|
|
105
|
+
return this.$modal.msgError('请选择合同号')
|
|
106
|
+
}
|
|
107
|
+
if (!this.form.citeShipmentId) {
|
|
108
|
+
return this.$modal.msgError('请选择提单号')
|
|
109
|
+
}
|
|
110
|
+
if (this.form.copyFileTypeList.length == 0) {
|
|
111
|
+
return this.$modal.msgError('请选择您需要复制的数据或文件')
|
|
112
|
+
}
|
|
113
|
+
console.log('form', this.form)
|
|
114
|
+
// 获取详情数据
|
|
115
|
+
const loading = this.openLoading()
|
|
116
|
+
getBizShipment(this.form.citeShipmentId).then((res) => {
|
|
117
|
+
loading.close()
|
|
118
|
+
if (res.code == 200) {
|
|
119
|
+
// 回传数据
|
|
120
|
+
let shipment = res.data
|
|
121
|
+
this.$emit('referenced', { shipment: shipment, copyFileTypeList: this.form.copyFileTypeList })
|
|
122
|
+
this.open = false
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
},
|
|
126
|
+
/** 展示按钮操作 */
|
|
127
|
+
handleOpen(shipmentList) {
|
|
128
|
+
this.reset()
|
|
129
|
+
this.shipmentList = shipmentList
|
|
130
|
+
this.open = true
|
|
131
|
+
console.log('shipmentList', shipmentList)
|
|
132
|
+
},
|
|
133
|
+
// 取消按钮
|
|
134
|
+
cancel() {
|
|
135
|
+
this.open = false
|
|
136
|
+
this.reset()
|
|
137
|
+
},
|
|
138
|
+
// 表单重置
|
|
139
|
+
reset() {
|
|
140
|
+
this.shipmentList = null
|
|
141
|
+
this.form = {
|
|
142
|
+
citeShipmentId: null,
|
|
143
|
+
copyFileTypeList: this.fileList.map((res) => res.key) // 可复用的文件
|
|
144
|
+
}
|
|
145
|
+
this.contractId = null
|
|
146
|
+
this.isSelectAll = true
|
|
147
|
+
this.blList = null
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
computed: {}
|
|
151
|
+
}
|
|
152
|
+
</script>
|
|
153
|
+
<style lang="scss" scoped>
|
|
154
|
+
// 修改为上下布局
|
|
155
|
+
.vertical-form-item {
|
|
156
|
+
display: block;
|
|
157
|
+
}
|
|
158
|
+
::v-deep .vertical-form-item .el-form-item__label {
|
|
159
|
+
text-align: left;
|
|
160
|
+
display: block;
|
|
161
|
+
margin-bottom: 5px !important; /* 根据需要调整间距 */
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
::v-deep .vertical-form-item .el-form-item__content {
|
|
165
|
+
display: block;
|
|
166
|
+
margin-left: 5px !important; /* 重置默认的margin-left,因为标签和输入控件不再水平排列 */
|
|
167
|
+
}
|
|
168
|
+
</style>
|