doctor-admin-components 1.0.13-beta.53 → 1.0.13-beta.55

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.53",
4
+ "version": "1.0.13-beta.55",
5
5
  "private": false,
6
6
  "main1": "lib/index.umd.min.js",
7
7
  "main": "packages/index.js",
package/packages/index.js CHANGED
@@ -52,6 +52,7 @@ import {
52
52
  BizShipmentAdd,
53
53
  ContractChangeLog,
54
54
  EditBill,
55
+ CompanyBanks,
55
56
  } from "./src";
56
57
  // 组件列表
57
58
  const components = [
@@ -62,6 +63,7 @@ const components = [
62
63
  BizShipmentAdd,
63
64
  ContractChangeLog,
64
65
  EditBill,
66
+ CompanyBanks,
65
67
  ];
66
68
 
67
69
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
@@ -130,5 +132,6 @@ export default {
130
132
  ContractChangeLog,
131
133
  EditBill,
132
134
  en_JSON,
133
- zh_JSON
135
+ zh_JSON,
136
+ CompanyBanks,
134
137
  };
@@ -1088,3 +1088,20 @@ 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,6 +19,7 @@ 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";
22
23
 
23
24
  // 为组件提供 install 安装方法,供按需引入
24
25
 
@@ -46,6 +47,10 @@ EditBill.install = function (Vue) {
46
47
  Vue.component(EditBill.name, EditBill);
47
48
  };
48
49
 
50
+ CompanyBanks.install = function (Vue) {
51
+ Vue.component(CompanyBanks.name, CompanyBanks);
52
+ };
53
+
49
54
  // 导出组件
50
55
  export {
51
56
  EditBill,
@@ -54,4 +59,5 @@ export {
54
59
  PurchaseInvoiceUpload,
55
60
  BizShipmentAdd,
56
61
  ContractChangeLog,
62
+ CompanyBanks,
57
63
  };
@@ -1205,7 +1205,9 @@
1205
1205
 
1206
1206
  <gen-shipment ref="genShipment" @refresh="handleRefresh" />
1207
1207
 
1208
- <purchase-invoice-upload ref="purchaseInvoice" @refresh="handleRefresh"
1208
+ <purchase-invoice-upload ref="purchaseInvoice"
1209
+ :companyId="contract.contractId"
1210
+ @refresh="handleRefresh"
1209
1211
  :purchaseBalanceMoneyProp="purchaseBalanceMoney"
1210
1212
  :getShipmentPurchaseFun="getShipmentPurchase"
1211
1213
  ></purchase-invoice-upload>
@@ -1773,17 +1775,23 @@ export default {
1773
1775
  },
1774
1776
  //定金发票
1775
1777
  getDepositInvoice() {
1778
+ console.log('contract:', this.contract)
1776
1779
  if (this.contract.contractType == 'sale') {
1780
+ // 生成定金发票(销售)
1781
+ console.log('生成定金发票')
1777
1782
  getDepositInvoice(this.contract).then((response) => {
1778
1783
  const data = response.data;
1779
1784
  this.$refs.depositInvoice.handleShow(data);
1780
1785
  });
1781
1786
  } else {
1787
+ // 上传定金发票(采购)
1788
+ console.log('上传定金发票')
1782
1789
  this.$refs.purchaseInvoice.handleUpload(this.contract, 'deposit');
1783
1790
  }
1784
1791
  },
1785
1792
  //上传尾款发票
1786
1793
  uploadFinalInvoice(type, shipmentId) {
1794
+ console.log('上传尾款发票')
1787
1795
  this.$refs.purchaseInvoice.handleUpload(this.contract, type, shipmentId);
1788
1796
  },
1789
1797
  //设置进度
@@ -0,0 +1,190 @@
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': sellectIndex == i, 'bank-container-unselect': 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 < 3" style="padding-left: 30px; padding-top: 10px">
41
+ <span>未添加收款账户信息,</span>
42
+ <el-button type="text" size="mini" @click="clickAdd">去添加</el-button>
43
+ </div>
44
+ <!-- 添加收款账户弹框 -->
45
+ <el-dialog title="添加收款账户" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false">
46
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
47
+ <el-row>
48
+ <el-col :span="18">
49
+ <el-form-item label="Swift Code" label-width="150px">
50
+ <el-input v-model="form.swiftCode" placeholder="请输入内容" />
51
+ </el-form-item>
52
+ </el-col>
53
+ <el-col :span="18">
54
+ <el-form-item label="Bank Name" label-width="150px">
55
+ <el-input v-model="form.bankName" placeholder="请输入内容" />
56
+ </el-form-item>
57
+ </el-col>
58
+ <el-col :span="18">
59
+ <el-form-item label="Bank Address" label-width="150px">
60
+ <el-input v-model="form.bankAddress" placeholder="请输入内容" />
61
+ </el-form-item>
62
+ </el-col>
63
+ <el-col :span="18">
64
+ <el-form-item label="Beneficiary Account" label-width="150px">
65
+ <el-input v-model="form.beneficiaryAccount" placeholder="请输入内容" />
66
+ </el-form-item>
67
+ </el-col>
68
+ <el-col :span="18">
69
+ <el-form-item label="Beneficiary" label-width="150px">
70
+ <el-input v-model="form.beneficiary" placeholder="请输入内容" />
71
+ </el-form-item>
72
+ </el-col>
73
+ <el-col :span="18">
74
+ <el-form-item label="Beneficiary Address" label-width="150px">
75
+ <el-input v-model="form.beneficiaryAddress" placeholder="请输入内容" />
76
+ </el-form-item>
77
+ </el-col>
78
+ </el-row>
79
+ </el-form>
80
+ <div slot="footer" class="dialog-footer">
81
+ <el-button @click="clickCancel">取 消</el-button>
82
+ <el-button type="primary" @click="clickConfirm">确 定</el-button>
83
+ </div>
84
+ </el-dialog>
85
+ </div>
86
+ </template>
87
+
88
+ <script>
89
+ import { insertCompanyBank, getCompanyBanks } from '../../../api/biz/bizContract'
90
+
91
+ export default {
92
+ name: 'CompanyBanks',
93
+ props: {
94
+ // 收款账户的公司id(目前是合同contractId)
95
+ companyId: {
96
+ type: String | Number,
97
+ default: null
98
+ }
99
+ },
100
+ watch: {
101
+ companyId: {
102
+ handler(newVal, oldVal) {
103
+ console.log('companyId changed:', newVal)
104
+ this.getBankList()
105
+ }
106
+ }
107
+ },
108
+ data() {
109
+ return {
110
+ open: false,
111
+ sellectIndex: -1,
112
+ bankList: null,
113
+ form: {
114
+ swiftCode: null,
115
+ bankName: null,
116
+ bankAddress: null,
117
+ beneficiaryAccount: null,
118
+ beneficiary: null,
119
+ beneficiaryAddress: null
120
+ },
121
+ rules: {}
122
+ }
123
+ },
124
+ created() {
125
+ // 获取收款账户信息
126
+ this.getBankList()
127
+ },
128
+ methods: {
129
+ restForm() {
130
+ this.form = {
131
+ swiftCode: null,
132
+ bankName: null,
133
+ bankAddress: null,
134
+ beneficiaryAccount: null,
135
+ beneficiary: null,
136
+ beneficiaryAddress: null
137
+ }
138
+ },
139
+ getBankList() {
140
+ getCompanyBanks(this.companyId).then((res) => {
141
+ this.bankList = res.data?.paymentAccountList
142
+ })
143
+ },
144
+ clickAdd() {
145
+ this.restForm()
146
+ this.open = true
147
+ },
148
+ clickSelct(index) {
149
+ this.sellectIndex = index
150
+ let data = this.bankList[index]
151
+ console.log('select data', data)
152
+ this.$emit('selectBank', data)
153
+ },
154
+ clickCancel() {
155
+ this.open = false
156
+ },
157
+ clickConfirm() {
158
+ let e = this.form
159
+ if (!(e.swiftCode || e.bankName || e.bankAddress || e.beneficiaryAccount || e.beneficiary || e.beneficiaryAddress)) {
160
+ this.$modal.msgError('请输入内容');
161
+ return
162
+ }
163
+ insertCompanyBank({
164
+ contractId: this.companyId,
165
+ paymentAccountList: [e]
166
+ }).then((res) => {
167
+ this.getBankList()
168
+ this.open = false
169
+ })
170
+ }
171
+ }
172
+ }
173
+ </script>
174
+
175
+ <style scoped lang="scss">
176
+ .bank-container {
177
+ background-color: rgb(240, 240, 240);
178
+ padding: 20px 10px 5px;
179
+ margin-top: 10px;
180
+ }
181
+ .bank-container-select {
182
+ border: 1px solid blue;
183
+ }
184
+ .bank-container-unselect {
185
+ border: 1px solid rgb(240, 240, 240);
186
+ }
187
+ .bank-item {
188
+ padding: 2px 40px 2px;
189
+ }
190
+ </style>
@@ -65,7 +65,24 @@
65
65
  </el-date-picker>
66
66
  </el-form-item>
67
67
  <el-form-item
68
- label="金额($)"
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"
69
86
  :prop="'proFormInvoiceList.' + index + '.amount'"
70
87
  :rules="[
71
88
  { required: true, message: '不能为空' },
@@ -95,6 +112,7 @@
95
112
  <upload-invoice v-model="dt.invoiceFileList" :limit="20" />
96
113
  </el-form-item>
97
114
  </el-row>
115
+ <company-banks ref="companyBanks" :companyId="companyId" @selectBank="(data) => selectBank(index, 'ProForma', data)"></company-banks>
98
116
  </el-row>
99
117
  </el-card>
100
118
  <el-row />
@@ -207,6 +225,7 @@
207
225
  </el-form-item>
208
226
  </el-row>
209
227
  <el-divider></el-divider>
228
+ <company-banks ref="companyBanks" :companyId="companyId" @selectBank="(data) => selectBank(index, 'Fixed', data)"></company-banks>
210
229
  </el-row>
211
230
  </el-card>
212
231
  </el-form>
@@ -252,13 +271,20 @@ import {
252
271
  getInvoiceListByShipmentId,
253
272
  } from "../../../api/biz/bizInvoice";
254
273
  import { getByContractId } from "../../../api/biz/bizShipment";
274
+ import CompanyBanks from './companyBanks.vue';
255
275
 
256
276
  export default {
257
277
  name: "PurchaseInvoiceUpload",
258
278
  components: {
259
- UploadInvoice
279
+ UploadInvoice,
280
+ CompanyBanks
260
281
  },
261
282
  props: {
283
+ // 合同公司id
284
+ companyId: {
285
+ type: String | Number,
286
+ default: null,
287
+ },
262
288
  purchaseBalanceMoneyProp: {
263
289
  type: Number | String,
264
290
  default: '',
@@ -277,7 +303,10 @@ export default {
277
303
  // 是否显示弹出层
278
304
  open: false,
279
305
  // 表单参数
280
- form: { proFormInvoiceList: [], fixedInvoiceList: [] },
306
+ form: {
307
+ proFormInvoiceList: [],
308
+ fixedInvoiceList: [],
309
+ },
281
310
  //销售合同选项表
282
311
  saleContractList: [],
283
312
  //采购合同选项表
@@ -288,7 +317,9 @@ export default {
288
317
  purchaseBalanceMoney: '',
289
318
  };
290
319
  },
291
- created() {},
320
+ created() {
321
+ console.log('companyId:', this.companyId)
322
+ },
292
323
  methods: {
293
324
  dialogVisibleCancel() {
294
325
  this.submitForm(false);
@@ -306,6 +337,16 @@ export default {
306
337
  handleClose() {
307
338
  this.dialogVisible = false;
308
339
  },
340
+ // 选择收款账户
341
+ selectBank(index, fixed, data) {
342
+ console.log('proFormInvoiceList', this.form.proFormInvoiceList);
343
+ console.log('fixedInvoiceList', this.form.fixedInvoiceList);
344
+ if (fixed == 'ProForma') {
345
+ this.form.proFormInvoiceList[index].accountId = data.accountId
346
+ } else {
347
+ this.form.fixedInvoiceList[index].accountId = data.accountId
348
+ }
349
+ },
309
350
  //上传并生成
310
351
  uploadAndGenerate() {
311
352
  this.$refs["form"].validate((valid) => {