doctor-admin-components 1.0.13-beta.9 → 1.0.13-beta.91
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 +28 -9
- package/package.json +1 -1
- package/packages/index.js +10 -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 +305 -0
- package/packages/src/i18n/index.js +38 -0
- package/packages/src/i18n/zh-CN/message.json +305 -0
- package/packages/src/index.js +13 -1
- 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 +1783 -986
- 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 +123 -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 +143 -47
- package/packages/src/views/biz/bizFileInfo/fileShowClaim.vue +1 -1
- package/packages/src/views/biz/bizShipment/add.vue +223 -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 +191 -332
- 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 +7 -4
- package/packages/src/views/biz/contractTracing/contractSummary.vue +20 -7
- 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 +236 -363
- 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/components/RegionPicker/Distpicker.vue +459 -0
- package/packages/src/views/components/RegionPicker/districts.js +4641 -0
- 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,13 @@
|
|
|
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>
|
|
10
|
+
<div v-if="reason" style="color:#f00;padding-left:60px;margin-bottom:10px;">{{ reason }}</div>
|
|
5
11
|
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
|
|
6
12
|
<el-row>
|
|
7
13
|
<el-col :span="6">
|
|
@@ -93,6 +99,11 @@
|
|
|
93
99
|
</el-select>
|
|
94
100
|
</el-form-item>
|
|
95
101
|
</el-col>
|
|
102
|
+
<el-col :span="8">
|
|
103
|
+
<el-form-item label="ETA更新" prop="etaUpdateOn" label-width="100">
|
|
104
|
+
<el-switch v-model="form.etaUpdateOn" active-text="自动" inactive-text="手动"> </el-switch>
|
|
105
|
+
</el-form-item>
|
|
106
|
+
</el-col>
|
|
96
107
|
</el-row>
|
|
97
108
|
<el-table stripe :data="contractDetailList" border>
|
|
98
109
|
<el-table-column label="序号" type="index" align="center"></el-table-column>
|
|
@@ -147,14 +158,14 @@
|
|
|
147
158
|
</el-col>
|
|
148
159
|
<el-col :span="8">
|
|
149
160
|
<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>
|
|
161
|
+
<el-input v-model="dt.containerTareWeight" placeholder="请输入" size="mini" type="number"></el-input>
|
|
151
162
|
</el-form-item>
|
|
152
163
|
</el-col>
|
|
153
164
|
</el-row>
|
|
154
165
|
<el-row>
|
|
155
166
|
<el-col :span="6">
|
|
156
167
|
<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>
|
|
168
|
+
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsGrossWeight" type="number"></el-input>
|
|
158
169
|
<div v-else>
|
|
159
170
|
{{ dt.totalGoodsGrossWeight ? dt.totalGoodsGrossWeight : '自动计算' }}
|
|
160
171
|
</div>
|
|
@@ -162,7 +173,7 @@
|
|
|
162
173
|
</el-col>
|
|
163
174
|
<el-col :span="6">
|
|
164
175
|
<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>
|
|
176
|
+
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsTareWeight" type="number"></el-input>
|
|
166
177
|
<div v-else>
|
|
167
178
|
{{ dt.totalGoodsTareWeight ? dt.totalGoodsTareWeight : '自动计算' }}
|
|
168
179
|
</div>
|
|
@@ -170,7 +181,7 @@
|
|
|
170
181
|
</el-col>
|
|
171
182
|
<el-col :span="6">
|
|
172
183
|
<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>
|
|
184
|
+
<el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsNetWeight" type="number"></el-input>
|
|
174
185
|
<div v-else>
|
|
175
186
|
{{ dt.totalGoodsNetWeight ? dt.totalGoodsNetWeight : '自动计算' }}
|
|
176
187
|
</div>
|
|
@@ -202,7 +213,8 @@
|
|
|
202
213
|
v-model="scope2.row.packageGrossWeight"
|
|
203
214
|
placeholder="请输入毛重"
|
|
204
215
|
size="mini"
|
|
205
|
-
|
|
216
|
+
type="number"
|
|
217
|
+
@input="changePackageGrossWeight(index, scope1.$index, scope2.$index)"
|
|
206
218
|
></el-input>
|
|
207
219
|
</el-form-item>
|
|
208
220
|
</template>
|
|
@@ -220,7 +232,8 @@
|
|
|
220
232
|
v-model="scope2.row.packageTareWeight"
|
|
221
233
|
placeholder="请输入皮重"
|
|
222
234
|
size="mini"
|
|
223
|
-
|
|
235
|
+
type="number"
|
|
236
|
+
@input="changePackageTareWeight(index, scope1.$index, scope2.$index)"
|
|
224
237
|
></el-input>
|
|
225
238
|
</el-form-item>
|
|
226
239
|
</template>
|
|
@@ -234,7 +247,7 @@
|
|
|
234
247
|
:rules="rules.packageNetWeight"
|
|
235
248
|
:prop="'containerList.' + index + '.containerDetailList.' + scope1.$index + '.packageList.' + scope2.$index + '.packageNetWeight'"
|
|
236
249
|
>
|
|
237
|
-
<el-input v-model="scope2.row.packageNetWeight" placeholder="请输入净重" size="mini"></el-input>
|
|
250
|
+
<el-input v-model="scope2.row.packageNetWeight" placeholder="请输入净重" size="mini" type="number"></el-input>
|
|
238
251
|
</el-form-item>
|
|
239
252
|
</template>
|
|
240
253
|
</el-table-column>
|
|
@@ -348,7 +361,7 @@
|
|
|
348
361
|
:prop="'containerList.' + index + '.containerDetailList.' + scope.$index + '.goodsNumber'"
|
|
349
362
|
:rules="subrules.goodsNumber"
|
|
350
363
|
>
|
|
351
|
-
<el-input v-model="scope.row.goodsNumber" size="small" @change="changeTotalGoodsNumber(index)"></el-input>
|
|
364
|
+
<el-input v-model="scope.row.goodsNumber" size="small" @change="changeTotalGoodsNumber(index)" type="number"></el-input>
|
|
352
365
|
</el-form-item>
|
|
353
366
|
</template>
|
|
354
367
|
</el-table-column>
|
|
@@ -388,7 +401,7 @@
|
|
|
388
401
|
<el-button @click="cancel">取 消</el-button>
|
|
389
402
|
</div>
|
|
390
403
|
|
|
391
|
-
<div style="display: flex; justify-content: center; align-items: center">
|
|
404
|
+
<div style="display: flex; justify-content: center; align-items: center" v-if="title == '修改装运'">
|
|
392
405
|
<ul>
|
|
393
406
|
按钮说明
|
|
394
407
|
<ul>
|
|
@@ -421,26 +434,35 @@
|
|
|
421
434
|
</el-dialog>
|
|
422
435
|
|
|
423
436
|
<select-booking ref="selectBooking" @submit="setBooking" @unSubmit="unSetBooking" />
|
|
437
|
+
<!-- 引用装运 -->
|
|
438
|
+
<reference-alert @referenced="handleReferenced" ref="referenceAlert" />
|
|
424
439
|
</div>
|
|
425
440
|
</template>
|
|
426
441
|
|
|
427
442
|
<script>
|
|
428
|
-
import { listBizShipment, getBizShipment, delBizShipment, addWithContainer, updateWithContainer, updateWithContainerAndInvoice } from '../../../api/biz/bizShipment'
|
|
443
|
+
import { haveVoidShipment, listBizShipment, getBizShipment, delBizShipment, addWithContainer, addContainerCheck, updateWithContainer, updateWithContainerAndInvoice } from '../../../api/biz/bizShipment'
|
|
429
444
|
import { generateFinalInvoiceByShipmentId } from '../../../api/biz/bizInvoice'
|
|
430
445
|
import { updateBizContractDetail } from '../../../api/biz/bizContractDetail'
|
|
446
|
+
import { queryPurchaseContracts } from '../../../api/biz/bizContract'
|
|
447
|
+
|
|
431
448
|
import { Loading } from 'element-ui'
|
|
432
449
|
import { listDictData } from '../../../api/biz/dictData'
|
|
433
450
|
import selectBooking from './selectBooking.vue'
|
|
434
451
|
import { listBizBooking } from '../../../api/biz/bizBooking'
|
|
452
|
+
import ReferenceAlert from './referenceAlert.vue'
|
|
453
|
+
import { MessageBox } from 'element-ui'
|
|
435
454
|
|
|
436
455
|
export default {
|
|
437
456
|
name: 'AddShipment',
|
|
438
457
|
dicts: ['shipping_company'],
|
|
439
458
|
components: {
|
|
440
|
-
selectBooking
|
|
459
|
+
selectBooking,
|
|
460
|
+
ReferenceAlert,
|
|
441
461
|
},
|
|
442
462
|
data() {
|
|
443
463
|
return {
|
|
464
|
+
// 已作废的装运合同
|
|
465
|
+
voidInvoiceList: null,
|
|
444
466
|
//目的地港口列表
|
|
445
467
|
destinationPortList: [],
|
|
446
468
|
//折叠面板
|
|
@@ -488,7 +510,9 @@ export default {
|
|
|
488
510
|
actualArrivalDate: null
|
|
489
511
|
},
|
|
490
512
|
// 表单参数
|
|
491
|
-
form: {
|
|
513
|
+
form: {
|
|
514
|
+
etaUpdateOn: true
|
|
515
|
+
},
|
|
492
516
|
// 表单校验
|
|
493
517
|
rules: {
|
|
494
518
|
billOfLadingNo: [{ required: true, message: '提单号不能为空', trigger: 'blur' }],
|
|
@@ -523,6 +547,10 @@ export default {
|
|
|
523
547
|
default: () => {
|
|
524
548
|
return null
|
|
525
549
|
}
|
|
550
|
+
},
|
|
551
|
+
reason: {
|
|
552
|
+
type: String,
|
|
553
|
+
default: ''
|
|
526
554
|
}
|
|
527
555
|
},
|
|
528
556
|
created() {
|
|
@@ -563,6 +591,21 @@ export default {
|
|
|
563
591
|
}
|
|
564
592
|
},
|
|
565
593
|
methods: {
|
|
594
|
+
// 已用的数据,赋值给form
|
|
595
|
+
handleReferenced(data) {
|
|
596
|
+
//shipment, copyFileTypeList
|
|
597
|
+
let contractIds = this.form.contractIds // 保持不变
|
|
598
|
+
this.form = {...this.form, ...data.shipment, 'contractIds':contractIds}
|
|
599
|
+
// 需要去掉shipmentId
|
|
600
|
+
this.form.shipmentId = null
|
|
601
|
+
this.form.citeShipmentId = data.shipment.shipmentId
|
|
602
|
+
this.form.copyFileTypeList = data.copyFileTypeList
|
|
603
|
+
console.log('form:', this.form)
|
|
604
|
+
},
|
|
605
|
+
//引用已作废的装运
|
|
606
|
+
handleReference() {
|
|
607
|
+
this.$refs.referenceAlert.handleOpen(this.voidInvoiceList)
|
|
608
|
+
},
|
|
566
609
|
//编辑开关
|
|
567
610
|
openEditSwitch() {
|
|
568
611
|
this.editSwitch = this.editSwitch = true
|
|
@@ -627,6 +670,21 @@ export default {
|
|
|
627
670
|
this.form.containerList[index].totalGoodsGrossWeight = this.form.containerList[index].containerDetailList.reduce((total, item) => {
|
|
628
671
|
return total + Number(item.goodsGrossWeight)
|
|
629
672
|
}, 0)
|
|
673
|
+
//计算净重
|
|
674
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageNetWeight = (
|
|
675
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageGrossWeight -
|
|
676
|
+
this.form.containerList[index].containerDetailList[k].packageList[yindex].packageTareWeight
|
|
677
|
+
).toFixed(3)
|
|
678
|
+
|
|
679
|
+
this.form.containerList[index].containerDetailList[k].goodsNetWeight = this.form.containerList[index].containerDetailList[k].packageList.reduce((total, item) => {
|
|
680
|
+
return total + Number(item.packageNetWeight)
|
|
681
|
+
}, 0)
|
|
682
|
+
|
|
683
|
+
this.form.containerList[index].totalGoodsNetWeight = this.form.containerList[index].containerDetailList
|
|
684
|
+
.reduce((total, item) => {
|
|
685
|
+
return total + Number(item.goodsNetWeight)
|
|
686
|
+
}, 0)
|
|
687
|
+
.toFixed(3)
|
|
630
688
|
},
|
|
631
689
|
changePackageTareWeight(index, k, yindex) {
|
|
632
690
|
//计算皮重
|
|
@@ -766,6 +824,7 @@ export default {
|
|
|
766
824
|
createTime: null,
|
|
767
825
|
updateTime: null,
|
|
768
826
|
containerList: [],
|
|
827
|
+
etaUpdateOn: true,
|
|
769
828
|
loadingTime: this.utc2local(new Date(), 'yyyy-MM-DD HH:mm:ss')
|
|
770
829
|
}
|
|
771
830
|
this.contract = {
|
|
@@ -834,19 +893,29 @@ export default {
|
|
|
834
893
|
this.contractDetailList = contractDetailList.map((v) => {
|
|
835
894
|
return { ...v, selected: false }
|
|
836
895
|
})
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
if (purchaseContractNos && purchaseContractNos.length == 1) {
|
|
842
|
-
this.form.purchaseContractNo = purchaseContractNos[0]
|
|
843
|
-
}
|
|
844
|
-
} else {
|
|
896
|
+
// 过滤作废的采购合同
|
|
897
|
+
queryPurchaseContracts(contract.contractId)
|
|
898
|
+
.then((res) => {
|
|
899
|
+
let purchaseContractNos = res.rows
|
|
845
900
|
this.contract.purchaseContractNos = purchaseContractNos
|
|
846
901
|
if (purchaseContractNos && purchaseContractNos.length == 1) {
|
|
847
902
|
this.form.purchaseContractNo = purchaseContractNos[0]
|
|
848
903
|
}
|
|
849
|
-
}
|
|
904
|
+
})
|
|
905
|
+
// var purchaseContractNos = contract?.purchaseContractNos
|
|
906
|
+
// if (typeof purchaseContractNos == 'string') {
|
|
907
|
+
// purchaseContractNos = purchaseContractNos?.split(',')
|
|
908
|
+
// this.contract.purchaseContractNos = purchaseContractNos
|
|
909
|
+
// if (purchaseContractNos && purchaseContractNos.length == 1) {
|
|
910
|
+
// this.form.purchaseContractNo = purchaseContractNos[0]
|
|
911
|
+
// }
|
|
912
|
+
// } else {
|
|
913
|
+
// this.contract.purchaseContractNos = purchaseContractNos
|
|
914
|
+
// if (purchaseContractNos && purchaseContractNos.length == 1) {
|
|
915
|
+
// this.form.purchaseContractNo = purchaseContractNos[0]
|
|
916
|
+
// }
|
|
917
|
+
// }
|
|
918
|
+
|
|
850
919
|
let containerNum = 1
|
|
851
920
|
this.form.destinationPort = destinationPort
|
|
852
921
|
this.form.contractIds = Array.from(new Set(contractDetailList.map((i) => i.contractId)))
|
|
@@ -864,6 +933,13 @@ export default {
|
|
|
864
933
|
.catch((error) => {
|
|
865
934
|
console.error(error)
|
|
866
935
|
})
|
|
936
|
+
// 查询是否有可引用的
|
|
937
|
+
haveVoidShipment(contract.contractId)
|
|
938
|
+
.then((res) => {
|
|
939
|
+
this.voidInvoiceList = res.rows && res.rows.length > 0 ? res.rows : null
|
|
940
|
+
})
|
|
941
|
+
// 测试数据
|
|
942
|
+
// this.voidInvoiceList = [{'contractId': '1', 'contractNo':'合同号1'}]
|
|
867
943
|
},
|
|
868
944
|
/** 修改按钮操作 */
|
|
869
945
|
handleUpdate(row) {
|
|
@@ -978,34 +1054,46 @@ export default {
|
|
|
978
1054
|
})
|
|
979
1055
|
},
|
|
980
1056
|
//仅生成装运
|
|
981
|
-
submitShipment() {
|
|
1057
|
+
async submitShipment() {
|
|
1058
|
+
// 装运前校验
|
|
1059
|
+
let resOK = await this.checkPreShipment()
|
|
1060
|
+
if (!resOK) {
|
|
1061
|
+
return
|
|
1062
|
+
}
|
|
982
1063
|
this.$refs['form'].validate((valid) => {
|
|
983
1064
|
if (valid) {
|
|
984
|
-
|
|
1065
|
+
let loadingInstance = Loading.service({
|
|
1066
|
+
text: '请稍候',
|
|
1067
|
+
spinner: 'el-icon-loading',
|
|
1068
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1069
|
+
customClass: 'custom-loading-class'
|
|
1070
|
+
})
|
|
985
1071
|
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
1072
|
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
|
-
})
|
|
1073
|
+
if (response.code == 200) {
|
|
1074
|
+
this.open = false
|
|
1075
|
+
loadingInstance.close()
|
|
1076
|
+
this.$confirm('装运已生成!您可以点击“确认”按钮留在当前页面,或点击“去看看”按钮查看详细信息。', {
|
|
1077
|
+
confirmButtonText: '确定',
|
|
1078
|
+
cancelButtonText: '去看看',
|
|
1079
|
+
type: 'warning'
|
|
1004
1080
|
})
|
|
1005
|
-
|
|
1081
|
+
.then(() => {})
|
|
1082
|
+
.catch(() => {
|
|
1083
|
+
this.$router.push({
|
|
1084
|
+
name: 'BizShipment',
|
|
1085
|
+
params: { viewDetailFlag: true }
|
|
1086
|
+
})
|
|
1087
|
+
})
|
|
1088
|
+
this.$emit('refresh')
|
|
1089
|
+
} else {
|
|
1090
|
+
loadingInstance.close()
|
|
1091
|
+
}
|
|
1006
1092
|
})
|
|
1007
1093
|
} else {
|
|
1008
1094
|
updateWithContainer(this.form).then((res) => {
|
|
1095
|
+
loadingInstance.close()
|
|
1096
|
+
this.open = false
|
|
1009
1097
|
this.$modal.msgSuccess('修改成功')
|
|
1010
1098
|
this.$emit('refresh')
|
|
1011
1099
|
})
|
|
@@ -1014,32 +1102,46 @@ export default {
|
|
|
1014
1102
|
})
|
|
1015
1103
|
},
|
|
1016
1104
|
//装运并下载
|
|
1017
|
-
handleTemplate(
|
|
1105
|
+
async handleTemplate() {
|
|
1106
|
+
// 装运前校验
|
|
1107
|
+
let resOK = await this.checkPreShipment()
|
|
1108
|
+
if (!resOK) {
|
|
1109
|
+
return
|
|
1110
|
+
}
|
|
1018
1111
|
this.submitAndDownload(command)
|
|
1019
1112
|
},
|
|
1020
1113
|
//提交并下载
|
|
1021
1114
|
submitAndDownload(templateType) {
|
|
1022
1115
|
this.$refs['form'].validate((valid) => {
|
|
1023
1116
|
if (valid) {
|
|
1024
|
-
this.open = false
|
|
1025
1117
|
let loadingInstance = Loading.service({
|
|
1026
1118
|
text: '请稍候',
|
|
1027
1119
|
spinner: 'el-icon-loading',
|
|
1028
|
-
background: 'rgba(0, 0, 0, 0.7)'
|
|
1120
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1121
|
+
customClass: 'custom-loading-class'
|
|
1029
1122
|
})
|
|
1030
|
-
addWithContainer(this.form)
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1123
|
+
addWithContainer(this.form)
|
|
1124
|
+
.then((res) => {
|
|
1125
|
+
if (res.code == 200) {
|
|
1126
|
+
var query = {}
|
|
1127
|
+
query.orderByColumn = 'shipmentId'
|
|
1128
|
+
query.isAsc = 'desc'
|
|
1129
|
+
query.pageNum = 1
|
|
1130
|
+
query.pageSize = 1
|
|
1131
|
+
listBizShipment(query).then((res) => {
|
|
1132
|
+
var shipment = res.rows[0]
|
|
1133
|
+
this.handleDownloadShipment(shipment, templateType)
|
|
1134
|
+
})
|
|
1135
|
+
this.$emit('refresh')
|
|
1136
|
+
this.open = false
|
|
1137
|
+
loadingInstance.close()
|
|
1138
|
+
} else {
|
|
1139
|
+
loadingInstance.close()
|
|
1140
|
+
}
|
|
1141
|
+
})
|
|
1142
|
+
.finally(() => {
|
|
1143
|
+
loadingInstance.close()
|
|
1040
1144
|
})
|
|
1041
|
-
this.$emit('refresh')
|
|
1042
|
-
})
|
|
1043
1145
|
}
|
|
1044
1146
|
})
|
|
1045
1147
|
},
|
|
@@ -1061,30 +1163,68 @@ export default {
|
|
|
1061
1163
|
fileName
|
|
1062
1164
|
)
|
|
1063
1165
|
},
|
|
1166
|
+
// 装运前校验
|
|
1167
|
+
async checkPreShipment() {
|
|
1168
|
+
let res = await addContainerCheck({
|
|
1169
|
+
'billOfLadingNo': this.form.billOfLadingNo,
|
|
1170
|
+
'bookingNo': this.form.bookingNo,
|
|
1171
|
+
'shipmentId': this.form.shipmentId
|
|
1172
|
+
})
|
|
1173
|
+
if (!res.data.checkShipmentTip) {
|
|
1174
|
+
return true
|
|
1175
|
+
}
|
|
1176
|
+
let result = await MessageBox.confirm(res.data.checkShipmentTip, '提示', {
|
|
1177
|
+
confirmButtonText: '确定',
|
|
1178
|
+
cancelButtonText: '取消',
|
|
1179
|
+
type: 'warning'
|
|
1180
|
+
}).catch(err => err)
|
|
1181
|
+
return result === 'confirm'
|
|
1182
|
+
},
|
|
1064
1183
|
/** 提交按钮 */
|
|
1065
|
-
submitForm() {
|
|
1184
|
+
async submitForm() {
|
|
1185
|
+
// 装运前校验
|
|
1186
|
+
let resOK = await this.checkPreShipment()
|
|
1187
|
+
if (!resOK) {
|
|
1188
|
+
return
|
|
1189
|
+
}
|
|
1066
1190
|
this.$refs['form'].validate((valid) => {
|
|
1067
1191
|
if (valid) {
|
|
1068
|
-
|
|
1192
|
+
let loadingInstance = Loading.service({
|
|
1193
|
+
text: '请稍候',
|
|
1194
|
+
spinner: 'el-icon-loading',
|
|
1195
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
1196
|
+
customClass: 'custom-loading-class'
|
|
1197
|
+
})
|
|
1069
1198
|
if (this.form.shipmentId == null) {
|
|
1070
|
-
addWithContainer(this.form)
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1199
|
+
addWithContainer(this.form)
|
|
1200
|
+
.then((response) => {
|
|
1201
|
+
if (response.code == 200) {
|
|
1202
|
+
this.open = false
|
|
1203
|
+
this.$modal.msgSuccess('生成成功')
|
|
1204
|
+
var query = {}
|
|
1205
|
+
query.orderByColumn = 'shipmentId'
|
|
1206
|
+
query.isAsc = 'desc'
|
|
1207
|
+
query.pageNum = 1
|
|
1208
|
+
query.pageSize = 10
|
|
1209
|
+
if (this.contract.contractType == 'sale') {
|
|
1210
|
+
query.saleContractId = this.contract.contractId
|
|
1211
|
+
} else {
|
|
1212
|
+
query.purchaseContractId = this.contract.contractId
|
|
1213
|
+
}
|
|
1214
|
+
listBizShipment(query).then((res) => {
|
|
1215
|
+
var shipment = res.rows[0]
|
|
1216
|
+
this.handleGenerateFinalInvoice(shipment)
|
|
1217
|
+
})
|
|
1218
|
+
} else {
|
|
1219
|
+
loadingInstance.close()
|
|
1220
|
+
}
|
|
1221
|
+
})
|
|
1222
|
+
.finally(() => {
|
|
1223
|
+
loadingInstance.close()
|
|
1085
1224
|
})
|
|
1086
|
-
})
|
|
1087
1225
|
} else {
|
|
1226
|
+
loadingInstance.close()
|
|
1227
|
+
this.open = false
|
|
1088
1228
|
this.$emit('openGenerateLive', { ...this.form, quoteType: this.contract.quoteType })
|
|
1089
1229
|
}
|
|
1090
1230
|
}
|
|
@@ -1139,3 +1279,11 @@ export default {
|
|
|
1139
1279
|
border-radius: 4px;
|
|
1140
1280
|
}
|
|
1141
1281
|
</style>
|
|
1282
|
+
<style lang="scss">
|
|
1283
|
+
.el-loading-mask.custom-loading-class.is-fullscreen {
|
|
1284
|
+
z-index: 3000 !important;
|
|
1285
|
+
}
|
|
1286
|
+
.el-message.el-message--error {
|
|
1287
|
+
z-index: 3001 !important;
|
|
1288
|
+
}
|
|
1289
|
+
</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>
|