doctor-admin-components 1.0.14-beta.82 → 1.0.14-beta.86
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/package.json +1 -1
- package/packages/src/i18n/en/message.json +2 -1
- package/packages/src/i18n/zh-CN/message.json +2 -1
- package/packages/src/views/biz/bizFileInfo/contract.vue +101 -11
- package/packages/src/views/biz/bizFileInfo/contractFile/BillOfLadingNoTab.vue +3 -0
- package/packages/src/views/biz/bizShipment/add.vue +16 -3
package/package.json
CHANGED
|
@@ -295,7 +295,8 @@
|
|
|
295
295
|
"voucherOrReceipt": "Voucher/Receipt",
|
|
296
296
|
"weight": "weight(MT)",
|
|
297
297
|
"yes": "Yes",
|
|
298
|
-
"cndn": "Debit note & Credit note"
|
|
298
|
+
"cndn": "Debit note & Credit note",
|
|
299
|
+
"addShipment": "Add Shipment"
|
|
299
300
|
},
|
|
300
301
|
"distpicker":{
|
|
301
302
|
"province": "Province",
|
|
@@ -364,7 +364,11 @@
|
|
|
364
364
|
@changeShipBillNo="changeShipBillNo"
|
|
365
365
|
:progressInfo="shipProgressInfo"
|
|
366
366
|
:shipBillNoProp="shipBillNo"
|
|
367
|
-
|
|
367
|
+
>
|
|
368
|
+
<template slot="action" v-if="contract.contractType == 'purchase'">
|
|
369
|
+
<el-button class="mt5" type="success" size="mini" icon="el-icon-plus" @click.stop="clickAddShipment" circle></el-button>
|
|
370
|
+
</template>
|
|
371
|
+
</BillOfLadingNoTab>
|
|
368
372
|
<!-- 装运 -->
|
|
369
373
|
<div id="contract_shipping_id">
|
|
370
374
|
<!-- 生成装运 -->
|
|
@@ -722,10 +726,10 @@
|
|
|
722
726
|
</el-col>
|
|
723
727
|
</el-col>
|
|
724
728
|
<!-- 临时尾款发票 -->
|
|
725
|
-
<el-col :span="24"
|
|
729
|
+
<el-col :span="24">
|
|
726
730
|
<div class="hr-class"></div>
|
|
727
731
|
</el-col>
|
|
728
|
-
<el-col :span="24"
|
|
732
|
+
<el-col :span="24">
|
|
729
733
|
<div class="content-root-row" style="display: flex;">
|
|
730
734
|
<ContentTitle :contentTitleProp="{
|
|
731
735
|
bgButton: $t('contractDetail.saleTemporaryFinallyInvoice'),
|
|
@@ -1521,7 +1525,9 @@ export default {
|
|
|
1521
1525
|
//参考采购价
|
|
1522
1526
|
shipmentPurchaseAmountMessage: '',
|
|
1523
1527
|
loadingInstance: null,
|
|
1524
|
-
purchaseBalanceMoney: null
|
|
1528
|
+
purchaseBalanceMoney: null,
|
|
1529
|
+
// 新增:选择关联合同
|
|
1530
|
+
selectSaleContractId: null,
|
|
1525
1531
|
};
|
|
1526
1532
|
},
|
|
1527
1533
|
created() {
|
|
@@ -1547,6 +1553,90 @@ export default {
|
|
|
1547
1553
|
},
|
|
1548
1554
|
mounted() { },
|
|
1549
1555
|
methods: {
|
|
1556
|
+
async clickAddShipment() {
|
|
1557
|
+
//弹出选择框,选择关联的销售合同,点击确定后,执行新增
|
|
1558
|
+
const list = this.contract.associationContractList || []
|
|
1559
|
+
if (!list.length) {
|
|
1560
|
+
this.$message.warning('暂无可关联的销售合同')
|
|
1561
|
+
return
|
|
1562
|
+
}
|
|
1563
|
+
// 单个直接确认
|
|
1564
|
+
if (list.length === 1) {
|
|
1565
|
+
this.selectSaleContractId = list[0].contractId
|
|
1566
|
+
this.handleAddShipment(true)
|
|
1567
|
+
return
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
// 多个:用 render 函数渲染 el-select 弹窗
|
|
1571
|
+
let selectedId = list[0].contractId // 默认选中第一个
|
|
1572
|
+
|
|
1573
|
+
try {
|
|
1574
|
+
await this.$msgbox({
|
|
1575
|
+
title: '请选择关联的销售合同',
|
|
1576
|
+
message: this.$createElement('div', [
|
|
1577
|
+
this.$createElement('el-select', {
|
|
1578
|
+
props: { value: selectedId, placeholder: '请选择', style: 'width: 100%;', popperAppendToBody: false },
|
|
1579
|
+
on: { input: val => selectedId = val } // 闭包更新值
|
|
1580
|
+
},
|
|
1581
|
+
list.map(item =>
|
|
1582
|
+
this.$createElement('el-option', {
|
|
1583
|
+
props: { label: item.contractNo, value: item.contractId }
|
|
1584
|
+
})
|
|
1585
|
+
)),
|
|
1586
|
+
// 间隔占位
|
|
1587
|
+
this.$createElement('div', { style: 'height: 80px;' })
|
|
1588
|
+
]),
|
|
1589
|
+
showCancelButton: true,
|
|
1590
|
+
confirmButtonText: '确定',
|
|
1591
|
+
cancelButtonText: '取消',
|
|
1592
|
+
beforeClose: (action, instance, done) => {
|
|
1593
|
+
if (action === 'confirm' && !selectedId) {
|
|
1594
|
+
this.$message.warning('请选择关联的销售合同')
|
|
1595
|
+
return
|
|
1596
|
+
}
|
|
1597
|
+
done()
|
|
1598
|
+
}
|
|
1599
|
+
})
|
|
1600
|
+
|
|
1601
|
+
// 用户确认后执行
|
|
1602
|
+
this.selectSaleContractId = selectedId
|
|
1603
|
+
this.handleAddShipment(false)
|
|
1604
|
+
|
|
1605
|
+
} catch (e) {
|
|
1606
|
+
// 取消
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
},
|
|
1610
|
+
addBizShipmentRequest() {
|
|
1611
|
+
// 添加装运接口
|
|
1612
|
+
addBizShipment({
|
|
1613
|
+
purchaseContractId: this.contract.contractId,
|
|
1614
|
+
saleContractId: this.selectSaleContractId,
|
|
1615
|
+
}).then(() => {
|
|
1616
|
+
this.$message.success('添加成功')
|
|
1617
|
+
this.handleRefresh()
|
|
1618
|
+
})
|
|
1619
|
+
},
|
|
1620
|
+
handleAddShipment(showAlert = true) {
|
|
1621
|
+
console.log('==handleAddShipment==', this.selectSaleContractId)
|
|
1622
|
+
|
|
1623
|
+
// 弹框二次确认
|
|
1624
|
+
if (!showAlert) {
|
|
1625
|
+
return this.addBizShipmentRequest()
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
this.$confirm('是否添加空白装运', '提示', {
|
|
1629
|
+
confirmButtonText: '确定',
|
|
1630
|
+
cancelButtonText: '取消',
|
|
1631
|
+
type: 'warning'
|
|
1632
|
+
})
|
|
1633
|
+
.then(() => {
|
|
1634
|
+
this.addBizShipmentRequest()
|
|
1635
|
+
})
|
|
1636
|
+
.catch((e) => {
|
|
1637
|
+
console.log(e)
|
|
1638
|
+
})
|
|
1639
|
+
},
|
|
1550
1640
|
// 装运模块状态变化,需要同步关联模块
|
|
1551
1641
|
handleShippingUpdateOpen(isOpen) {
|
|
1552
1642
|
this.$refs.SectionReceiving && this.$refs.SectionReceiving[0]?.setOpen(isOpen)
|
|
@@ -2389,13 +2479,13 @@ export default {
|
|
|
2389
2479
|
},
|
|
2390
2480
|
},
|
|
2391
2481
|
watch: {
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2482
|
+
contract: {
|
|
2483
|
+
handler(val) {
|
|
2484
|
+
this.selectSaleContractId = val.associationContractList[0].contractId
|
|
2485
|
+
},
|
|
2486
|
+
immediate: true,
|
|
2487
|
+
deep: true
|
|
2488
|
+
},
|
|
2399
2489
|
},
|
|
2400
2490
|
destroyed() {
|
|
2401
2491
|
clearTimeout(this.timer);
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
<div class="app-container">
|
|
3
3
|
<!-- 添加或修改装运对话框 -->
|
|
4
4
|
<el-dialog :visible.sync="open" z-index="1000" width="80%" :before-close="handleClose" :title="title">
|
|
5
|
+
<template slot="title">
|
|
6
|
+
<strong style="font-size: 18px;">{{ form.shipmentId ? '修改装运' : title }}</strong>
|
|
7
|
+
<span style="color: red">(注意“目的港”、“起运港”两个字段,如果为空,可参考后面括号内的值进行选择)</span>
|
|
8
|
+
</template>
|
|
5
9
|
<slot name="billOfLadingUpload"></slot>
|
|
6
10
|
<slot name="">
|
|
7
11
|
<span v-if="isDraft" style="color: red">提示: 当前打开了【{{ form.lastUpdateUserName }}】在【{{ form.updateTime }}】保存的装运草稿</span>
|
|
@@ -24,7 +28,6 @@
|
|
|
24
28
|
<el-form-item label="提单号" prop="billOfLadingNo">
|
|
25
29
|
<el-input v-model="form.billOfLadingNo" placeholder="请输入提单号" size="small" />
|
|
26
30
|
</el-form-item>
|
|
27
|
-
|
|
28
31
|
<el-form-item label="目的港" prop="destinationPort">
|
|
29
32
|
<!-- <el-select v-model="form.destinationPort" style="width: 100%" placeholder="请选择目的港" clearable filterable size="small">
|
|
30
33
|
<el-option v-for="(item, i) in destinationPortList" :key="i" :value="item.dictValue" :label="item.dictValue" />
|
|
@@ -40,9 +43,11 @@
|
|
|
40
43
|
}"
|
|
41
44
|
placeholder="请选择目的港"
|
|
42
45
|
:show-all-levels="false"
|
|
46
|
+
:filter-method="filterPortMethod"
|
|
43
47
|
clearable
|
|
44
48
|
filterable
|
|
45
49
|
></el-cascader>
|
|
50
|
+
<span>({{ form.destinationPort }})</span>
|
|
46
51
|
</el-form-item>
|
|
47
52
|
|
|
48
53
|
<el-form-item label="起运港" prop="originPort">
|
|
@@ -60,9 +65,11 @@
|
|
|
60
65
|
}"
|
|
61
66
|
placeholder="请选择起运港"
|
|
62
67
|
:show-all-levels="false"
|
|
68
|
+
:filter-method="filterPortMethod"
|
|
63
69
|
clearable
|
|
64
70
|
filterable
|
|
65
71
|
></el-cascader>
|
|
72
|
+
<span>({{ form.originPort }})</span>
|
|
66
73
|
</el-form-item>
|
|
67
74
|
|
|
68
75
|
<el-form-item label="海运距离(KM)" prop="portDistance">
|
|
@@ -152,7 +159,8 @@
|
|
|
152
159
|
</div>
|
|
153
160
|
</el-row>
|
|
154
161
|
<el-divider></el-divider>
|
|
155
|
-
<el-
|
|
162
|
+
<el-button v-if="!form.containerList || form.containerList.length==0" icon="el-icon-plus" size="mini" type="warning" circle @click="addContainerRow"></el-button>
|
|
163
|
+
<el-row v-else v-for="(dt, index) in form.containerList" :key="'dt' + index">
|
|
156
164
|
<el-row>
|
|
157
165
|
<el-col :span="2">
|
|
158
166
|
<div style="font-weight: bolder; margin-top: 10px">
|
|
@@ -654,6 +662,10 @@ export default {
|
|
|
654
662
|
}
|
|
655
663
|
},
|
|
656
664
|
methods: {
|
|
665
|
+
filterPortMethod(node, keyword) {
|
|
666
|
+
// console.log('node:', node, "keyword:", keyword)
|
|
667
|
+
return node.data.dictValue.toLowerCase().indexOf(keyword.toLowerCase()) !== -1 || node.data.dictLabel.indexOf(keyword) !== -1
|
|
668
|
+
},
|
|
657
669
|
getPortDatas() {
|
|
658
670
|
if (this.destinationPortList.length == 0) {
|
|
659
671
|
getPortTree({
|
|
@@ -1056,7 +1068,9 @@ export default {
|
|
|
1056
1068
|
},
|
|
1057
1069
|
/** 修改按钮操作 */
|
|
1058
1070
|
handleUpdate(row) {
|
|
1071
|
+
console.log("shipment handleUpdate:", row)
|
|
1059
1072
|
this.reset()
|
|
1073
|
+
this.getPortDatas()
|
|
1060
1074
|
const shipmentId = row.shipmentId
|
|
1061
1075
|
this.$emit('openFullscreenLoading')
|
|
1062
1076
|
getBizShipment(shipmentId).then((response) => {
|
|
@@ -1066,7 +1080,6 @@ export default {
|
|
|
1066
1080
|
this.contractDetailList = contract.contractDetailList.map((v) => {
|
|
1067
1081
|
return { ...v, selected: false }
|
|
1068
1082
|
})
|
|
1069
|
-
|
|
1070
1083
|
var purchaseContractNos = contract?.purchaseContractNos
|
|
1071
1084
|
if (typeof purchaseContractNos == 'string') {
|
|
1072
1085
|
purchaseContractNos = purchaseContractNos?.split(',')
|