doctor-admin-components 1.0.13-beta.57 → 1.0.13-beta.59

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "doctor-admin-components",
3
3
  "version1": "1.0.11",
4
- "version": "1.0.13-beta.57",
4
+ "version": "1.0.13-beta.59",
5
5
  "private": false,
6
6
  "main1": "lib/index.umd.min.js",
7
7
  "main": "packages/index.js",
package/packages/index.js CHANGED
@@ -52,7 +52,6 @@ import {
52
52
  BizShipmentAdd,
53
53
  ContractChangeLog,
54
54
  EditBill,
55
- CompanyBanks,
56
55
  } from "./src";
57
56
  // 组件列表
58
57
  const components = [
@@ -63,7 +62,6 @@ const components = [
63
62
  BizShipmentAdd,
64
63
  ContractChangeLog,
65
64
  EditBill,
66
- CompanyBanks,
67
65
  ];
68
66
 
69
67
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
@@ -132,6 +130,5 @@ export default {
132
130
  ContractChangeLog,
133
131
  EditBill,
134
132
  en_JSON,
135
- zh_JSON,
136
- CompanyBanks,
133
+ zh_JSON
137
134
  };
@@ -1088,20 +1088,3 @@ export function shipmentConfirmDraftBl({shipmentId}) {
1088
1088
  });
1089
1089
  }
1090
1090
 
1091
- // 根据合同号,添加收款账号
1092
- export function insertCompanyBank(data) {
1093
- return request({
1094
- url: "biz/contract/company/savePaymentByContract",
1095
- method: "post",
1096
- data: data,
1097
- });
1098
- }
1099
-
1100
- // 根据合同号,获取收款账号
1101
- export function getCompanyBanks(contractId) {
1102
- return request({
1103
- url: `biz/contract/company/paymentAccount/${contractId}`,
1104
- method: "get",
1105
- params: {},
1106
- });
1107
- }
@@ -156,7 +156,7 @@ export function uploadByShipmentId(data) {
156
156
  });
157
157
  }
158
158
 
159
- // 上传尾款发票
159
+ // 上传发票
160
160
  export function uploadFinallyInvoice(data) {
161
161
  return request({
162
162
  url: "/biz/invoice/uploadFinallyInvoice",
@@ -19,7 +19,6 @@ import PurchaseInvoiceUpload from "./views/biz/contractTracing/purchaseInvoiceUp
19
19
  import BizShipmentAdd from "./views/biz/bizShipment/add.vue";
20
20
  import ContractChangeLog from "./views/biz/contractTracing/contractChangeLog.vue";
21
21
  import EditBill from "./views/biz/contractTracing/editBill.vue";
22
- import CompanyBanks from "./views/biz/contractTracing/companyBanks.vue";
23
22
 
24
23
  // 为组件提供 install 安装方法,供按需引入
25
24
 
@@ -47,10 +46,6 @@ EditBill.install = function (Vue) {
47
46
  Vue.component(EditBill.name, EditBill);
48
47
  };
49
48
 
50
- CompanyBanks.install = function (Vue) {
51
- Vue.component(CompanyBanks.name, CompanyBanks);
52
- };
53
-
54
49
  // 导出组件
55
50
  export {
56
51
  EditBill,
@@ -59,5 +54,4 @@ export {
59
54
  PurchaseInvoiceUpload,
60
55
  BizShipmentAdd,
61
56
  ContractChangeLog,
62
- CompanyBanks,
63
57
  };
@@ -173,9 +173,11 @@
173
173
  @checked="handleChecked"
174
174
  @uncheck="handleUncheck"
175
175
  :selectFileListProp="selectFileList"
176
- :fileInfo="
177
- getLastFileByList(contractFileInfo.proformaInvoiceFileInfo)
178
- "
176
+ v-for="(
177
+ item, i
178
+ ) in contractFileInfo.proformaInvoiceFileInfo"
179
+ :key="i"
180
+ :fileInfo="item"
179
181
  />
180
182
  </div>
181
183
  <!-- 手动上传定金发票 -->
@@ -762,7 +764,6 @@
762
764
  <el-col :span="24">
763
765
  <el-col :span="24">
764
766
  <div style="margin-bottom:-20px">
765
- {{ getShipmentPurchaseAmount(shipmentFileInfo,shipmentIndex) }}
766
767
  <span
767
768
  v-if="channel !== 'official-website' &&
768
769
  contract.contractType == 'purchase' "
@@ -1205,9 +1206,7 @@
1205
1206
 
1206
1207
  <gen-shipment ref="genShipment" @refresh="handleRefresh" />
1207
1208
 
1208
- <purchase-invoice-upload ref="purchaseInvoice"
1209
- :companyId="contract.contractId"
1210
- @refresh="handleRefresh"
1209
+ <purchase-invoice-upload ref="purchaseInvoice" @refresh="handleRefresh"
1211
1210
  :purchaseBalanceMoneyProp="purchaseBalanceMoney"
1212
1211
  :getShipmentPurchaseFun="getShipmentPurchase"
1213
1212
  ></purchase-invoice-upload>
@@ -1479,6 +1478,7 @@ export default {
1479
1478
 
1480
1479
  changeShipBillNo(index) {
1481
1480
  this.shipBillNo = index
1481
+ this.activeName = index
1482
1482
  this.setRate(index)
1483
1483
  },
1484
1484
  changeGoodsBillNo(index) {
@@ -1487,17 +1487,6 @@ export default {
1487
1487
  changeClaimBillNo(index) {
1488
1488
  this.claimBillNo = index
1489
1489
  },
1490
- getShipmentPurchaseAmount(shipmentFileInfo, shipmentIndex) {
1491
- if (shipmentIndex == this.activeName) {
1492
- getPurchaseAmount(shipmentFileInfo.shipmentId).then((res) => {
1493
- this.purchaseBalanceMoney = (res.data.totalPurchaseAmount - res.data.purchaseDepositAmount).toFixed(2)
1494
- this.shipmentPurchaseAmountMessage =
1495
- `${this.$t('contractDetail.reference_invince')}$` + this.purchaseBalanceMoney
1496
- ;
1497
- return this.shipmentPurchaseAmountMessage;
1498
- });
1499
- }
1500
- },
1501
1490
  getShipmentPurchase(shipmentFileInfo) {
1502
1491
  this.$refs.shipmentPurchaseAmount.handleShow(shipmentFileInfo.shipmentId);
1503
1492
  },
@@ -1775,23 +1764,17 @@ export default {
1775
1764
  },
1776
1765
  //定金发票
1777
1766
  getDepositInvoice() {
1778
- console.log('contract:', this.contract)
1779
1767
  if (this.contract.contractType == 'sale') {
1780
- // 生成定金发票(销售)
1781
- console.log('生成定金发票')
1782
1768
  getDepositInvoice(this.contract).then((response) => {
1783
1769
  const data = response.data;
1784
1770
  this.$refs.depositInvoice.handleShow(data);
1785
1771
  });
1786
1772
  } else {
1787
- // 上传定金发票(采购)
1788
- console.log('上传定金发票')
1789
1773
  this.$refs.purchaseInvoice.handleUpload(this.contract, 'deposit');
1790
1774
  }
1791
1775
  },
1792
1776
  //上传尾款发票
1793
1777
  uploadFinalInvoice(type, shipmentId) {
1794
- console.log('上传尾款发票')
1795
1778
  this.$refs.purchaseInvoice.handleUpload(this.contract, type, shipmentId);
1796
1779
  },
1797
1780
  //设置进度
@@ -2008,7 +1991,7 @@ export default {
2008
1991
  shipTextArr.push(this.$t('contractDetail.Waiting_for_the_seller_to_ship'))
2009
1992
  this.claimProgressInfo.textArr = shipTextArr
2010
1993
  }
2011
-
1994
+ this.getShipmentPurchaseAmount()
2012
1995
  this.loadingInstance.close();
2013
1996
  },
2014
1997
  //获取合同文件信息
@@ -2159,6 +2142,16 @@ export default {
2159
2142
  this.loading = false;
2160
2143
  });
2161
2144
  },
2145
+ getShipmentPurchaseAmount() {
2146
+ let shipmentFileInfo = this.shipmentItemData
2147
+ getPurchaseAmount(shipmentFileInfo.shipmentId).then((res) => {
2148
+ this.purchaseBalanceMoney = (res.data.totalPurchaseAmount - res.data.purchaseDepositAmount).toFixed(2)
2149
+ this.shipmentPurchaseAmountMessage =
2150
+ `${this.$t('contractDetail.reference_invince')}$` + this.purchaseBalanceMoney
2151
+ ;
2152
+ return this.shipmentPurchaseAmountMessage;
2153
+ });
2154
+ },
2162
2155
  },
2163
2156
  computed: {
2164
2157
  // 销售获取最新的尾款发票
@@ -65,24 +65,7 @@
65
65
  </el-date-picker>
66
66
  </el-form-item>
67
67
  <el-form-item
68
- label="发票金额($)"
69
- :prop="'proFormInvoiceList.' + index + '.invoiceAmount'"
70
- :rules="[
71
- { required: true, message: '不能为空' },
72
- { type: 'number', message: '必须为数字值' },
73
- ]"
74
- >
75
- <el-input
76
- v-model.number="dt.invoiceAmount"
77
- clearable
78
- size="small"
79
- placeholder="请输入票面金额"
80
- type="number"
81
- />
82
- </el-form-item>
83
- <el-form-item
84
- label="应付金额($)"
85
- label-width="140px"
68
+ label="金额($)"
86
69
  :prop="'proFormInvoiceList.' + index + '.amount'"
87
70
  :rules="[
88
71
  { required: true, message: '不能为空' },
@@ -112,7 +95,6 @@
112
95
  <upload-invoice v-model="dt.invoiceFileList" :limit="20" />
113
96
  </el-form-item>
114
97
  </el-row>
115
- <company-banks ref="companyBanks" :companyId="companyId" @selectBank="(data) => selectBank(index, 'ProForma', data)"></company-banks>
116
98
  </el-row>
117
99
  </el-card>
118
100
  <el-row />
@@ -186,24 +168,7 @@
186
168
  </el-form-item>
187
169
  <el-row>
188
170
  <el-form-item
189
- label="发票金额($)"
190
- :prop="'fixedInvoiceList.' + index + '.invoiceAmount'"
191
- :rules="[
192
- { required: true, message: '不能为空' },
193
- { type: 'number', message: '必须为数字值' },
194
- ]"
195
- >
196
- <el-input
197
- v-model.number="item.invoiceAmount"
198
- clearable
199
- size="small"
200
- placeholder="请填写票面金额"
201
- type="number"
202
- />
203
- </el-form-item>
204
- <el-form-item
205
- label="应付金额($)"
206
- label-width="140px"
171
+ label="金额($)"
207
172
  :prop="'fixedInvoiceList.' + index + '.amount'"
208
173
  :rules="[
209
174
  { required: true, message: '不能为空' },
@@ -242,7 +207,6 @@
242
207
  </el-form-item>
243
208
  </el-row>
244
209
  <el-divider></el-divider>
245
- <company-banks ref="companyBanks" :companyId="companyId" @selectBank="(data) => selectBank(index, 'Fixed', data)"></company-banks>
246
210
  </el-row>
247
211
  </el-card>
248
212
  </el-form>
@@ -288,20 +252,13 @@ import {
288
252
  getInvoiceListByShipmentId,
289
253
  } from "../../../api/biz/bizInvoice";
290
254
  import { getByContractId } from "../../../api/biz/bizShipment";
291
- import CompanyBanks from './companyBanks.vue';
292
255
 
293
256
  export default {
294
257
  name: "PurchaseInvoiceUpload",
295
258
  components: {
296
- UploadInvoice,
297
- CompanyBanks
259
+ UploadInvoice
298
260
  },
299
261
  props: {
300
- // 合同公司id
301
- companyId: {
302
- type: String | Number,
303
- default: null,
304
- },
305
262
  purchaseBalanceMoneyProp: {
306
263
  type: Number | String,
307
264
  default: '',
@@ -320,10 +277,7 @@ export default {
320
277
  // 是否显示弹出层
321
278
  open: false,
322
279
  // 表单参数
323
- form: {
324
- proFormInvoiceList: [],
325
- fixedInvoiceList: [],
326
- },
280
+ form: { proFormInvoiceList: [], fixedInvoiceList: [] },
327
281
  //销售合同选项表
328
282
  saleContractList: [],
329
283
  //采购合同选项表
@@ -334,9 +288,7 @@ export default {
334
288
  purchaseBalanceMoney: '',
335
289
  };
336
290
  },
337
- created() {
338
- console.log('companyId:', this.companyId)
339
- },
291
+ created() {},
340
292
  methods: {
341
293
  dialogVisibleCancel() {
342
294
  this.submitForm(false);
@@ -354,16 +306,6 @@ export default {
354
306
  handleClose() {
355
307
  this.dialogVisible = false;
356
308
  },
357
- // 选择收款账户
358
- selectBank(index, fixed, data) {
359
- console.log('proFormInvoiceList', this.form.proFormInvoiceList);
360
- console.log('fixedInvoiceList', this.form.fixedInvoiceList);
361
- if (fixed == 'ProForma') {
362
- this.form.proFormInvoiceList[index].accountId = data.accountId
363
- } else {
364
- this.form.fixedInvoiceList[index].accountId = data.accountId
365
- }
366
- },
367
309
  //上传并生成
368
310
  uploadAndGenerate() {
369
311
  this.$refs["form"].validate((valid) => {
@@ -1,224 +0,0 @@
1
- <template>
2
- <div class="bank-view-container">
3
- <!-- 收款账户信息-展示(业务场景:生成收付款、收付款票据) -->
4
- <el-row style="padding-top: 15px; padding-left: 10px">
5
- <div style="font-size: 16px; color: #222222">收款账号信息</div>
6
- <div style="padding-left: 30px; padding-top: 2px">
7
- <slot></slot>
8
- </div>
9
- </el-row>
10
- <!-- 列表数据 -->
11
- <div
12
- v-for="(bankData, i) in bankList"
13
- :key="i"
14
- class="bank-container"
15
- :class="{ 'bank-container-select': !disableSelect && sellectIndex == i, 'bank-container-unselect': disableSelect || sellectIndex != i }"
16
- @click="clickSelct(i)"
17
- >
18
- <el-row style="padding-bottom: 20px">
19
- <el-col :span="24">
20
- <div class="bank-item" style="padding-top: 5px">Swift Code:{{ bankData.swiftCode }}</div>
21
- </el-col>
22
- <el-col :span="24">
23
- <div class="bank-item">Bank Name:{{ bankData.bankName }}</div>
24
- </el-col>
25
- <el-col :span="24">
26
- <div class="bank-item" style="padding-bottom: 20px">Bank Address:{{ bankData.bankAddress }}</div>
27
- </el-col>
28
- <el-col :span="24">
29
- <div class="bank-item">Beneficiary Account:{{ bankData.beneficiaryAccount }}</div>
30
- </el-col>
31
- <el-col :span="24">
32
- <div class="bank-item">Beneficiary:{{ bankData.beneficiary }}</div>
33
- </el-col>
34
- <el-col :span="24">
35
- <div class="bank-item">Beneficiary Address{{ bankData.beneficiaryAddress }}</div>
36
- </el-col>
37
- </el-row>
38
- </div>
39
- <!-- 添加入口 -->
40
- <div v-if="!bankList || bankList.length == 0" style="padding-left: 30px; padding-top: 10px">
41
- <span>未添加收款账户信息,</span>
42
- <el-button type="text" size="mini" @click="clickAdd">去添加</el-button>
43
- </div>
44
- <div v-else-if="bankList && bankList.length < 3" style="padding-left: 30px; padding-top: 10px">
45
- <el-button type="text" size="mini" @click="clickAdd">去添加</el-button>
46
- <span>收款账户信息</span>
47
- </div>
48
- <!-- 添加收款账户弹框 -->
49
- <el-dialog title="添加收款账户" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false">
50
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
51
- <el-row>
52
- <el-col :span="18">
53
- <el-form-item label="Swift Code" label-width="150px">
54
- <el-input v-model="form.swiftCode" placeholder="请输入内容" />
55
- </el-form-item>
56
- </el-col>
57
- <el-col :span="18">
58
- <el-form-item label="Bank Name" label-width="150px">
59
- <el-input v-model="form.bankName" placeholder="请输入内容" />
60
- </el-form-item>
61
- </el-col>
62
- <el-col :span="18">
63
- <el-form-item label="Bank Address" label-width="150px">
64
- <el-input v-model="form.bankAddress" placeholder="请输入内容" />
65
- </el-form-item>
66
- </el-col>
67
- <el-col :span="18">
68
- <el-form-item label="Beneficiary Account" label-width="150px">
69
- <el-input v-model="form.beneficiaryAccount" placeholder="请输入内容" />
70
- </el-form-item>
71
- </el-col>
72
- <el-col :span="18">
73
- <el-form-item label="Beneficiary" label-width="150px">
74
- <el-input v-model="form.beneficiary" placeholder="请输入内容" />
75
- </el-form-item>
76
- </el-col>
77
- <el-col :span="18">
78
- <el-form-item label="Beneficiary Address" label-width="150px">
79
- <el-input v-model="form.beneficiaryAddress" placeholder="请输入内容" />
80
- </el-form-item>
81
- </el-col>
82
- </el-row>
83
- </el-form>
84
- <div slot="footer" class="dialog-footer">
85
- <el-button @click="clickCancel">取 消</el-button>
86
- <el-button type="primary" @click="clickConfirm">确 定</el-button>
87
- </div>
88
- </el-dialog>
89
- </div>
90
- </template>
91
-
92
- <script>
93
- import { insertCompanyBank, getCompanyBanks } from '../../../api/biz/bizContract'
94
-
95
- export default {
96
- name: 'CompanyBanks',
97
- props: {
98
- // 收款账户的公司id(目前是合同contractId)
99
- companyId: {
100
- type: String | Number,
101
- default: null
102
- },
103
- // 是否禁止选择功能
104
- disableSelect: {
105
- type: Boolean,
106
- default: false
107
- },
108
- // 之前选择的id
109
- accountId: {
110
- type: String | Number,
111
- default: null
112
- }
113
- },
114
- watch: {
115
- companyId: {
116
- handler(newVal, oldVal) {
117
- console.log('companyId changed:', newVal)
118
- this.sellectIndex = -1
119
- this.getBankList()
120
- }
121
- },
122
- accountId: {
123
- handler(newVal, oldVal) {
124
- console.log('accountId changed:', newVal)
125
- this.handleCaclSelectIndex()
126
- }
127
- }
128
- },
129
- data() {
130
- return {
131
- open: false,
132
- sellectIndex: -1,
133
- bankList: null,
134
- form: {
135
- swiftCode: null,
136
- bankName: null,
137
- bankAddress: null,
138
- beneficiaryAccount: null,
139
- beneficiary: null,
140
- beneficiaryAddress: null
141
- },
142
- rules: {}
143
- }
144
- },
145
- created() {
146
- // 获取收款账户信息
147
- this.getBankList()
148
- },
149
- methods: {
150
- restForm() {
151
- this.form = {
152
- swiftCode: null,
153
- bankName: null,
154
- bankAddress: null,
155
- beneficiaryAccount: null,
156
- beneficiary: null,
157
- beneficiaryAddress: null
158
- }
159
- },
160
- handleCaclSelectIndex() {
161
- if (!this.disableSelect && this.accountId) {
162
- this.sellectIndex = this.bankList.findIndex((item) => item.accountId == this.accountId)
163
- }
164
- },
165
- getBankList() {
166
- if (!this.companyId) {
167
- return
168
- }
169
- getCompanyBanks(this.companyId).then((res) => {
170
- this.bankList = res.data?.paymentAccountList
171
- this.handleCaclSelectIndex()
172
- })
173
- },
174
- clickAdd() {
175
- this.restForm()
176
- this.open = true
177
- },
178
- clickSelct(index) {
179
- if (this.disableSelect) {
180
- console.log('disableSelect')
181
- return
182
- }
183
- this.sellectIndex = index
184
- let data = this.bankList[index]
185
- console.log('select data', data)
186
- this.$emit('selectBank', data)
187
- },
188
- clickCancel() {
189
- this.open = false
190
- },
191
- clickConfirm() {
192
- let e = this.form
193
- if (!(e.swiftCode || e.bankName || e.bankAddress || e.beneficiaryAccount || e.beneficiary || e.beneficiaryAddress)) {
194
- this.$modal.msgError('请输入内容')
195
- return
196
- }
197
- insertCompanyBank({
198
- contractId: this.companyId,
199
- paymentAccountList: [e]
200
- }).then((res) => {
201
- this.getBankList()
202
- this.open = false
203
- })
204
- }
205
- }
206
- }
207
- </script>
208
-
209
- <style scoped lang="scss">
210
- .bank-container {
211
- background-color: rgb(240, 240, 240);
212
- padding: 20px 10px 5px;
213
- margin-top: 10px;
214
- }
215
- .bank-container-select {
216
- border: 1px solid blue;
217
- }
218
- .bank-container-unselect {
219
- border: 1px solid rgb(240, 240, 240);
220
- }
221
- .bank-item {
222
- padding: 2px 40px 2px;
223
- }
224
- </style>