doctor-admin-components 1.0.14-beta.44 → 1.0.14-beta.45

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.14-beta.44",
4
+ "version": "1.0.14-beta.45",
5
5
  "private": false,
6
6
  "main1": "lib/index.umd.min.js",
7
7
  "main": "packages/index.js",
@@ -20,11 +20,28 @@ export function queryPurchaseContracts(saleContractId) {
20
20
  // 查询合同的提单指令列表
21
21
  export function getContractBlList(contractId) {
22
22
  return request({
23
- url: "/biz/contract/blList/" + contractId,
23
+ url: "/biz/contract/bli/list/" + contractId,
24
24
  method: "get",
25
25
  });
26
26
  }
27
27
 
28
+ // 查询合同的提单详情
29
+ export function getContractBliDetail(contractId) {
30
+ return request({
31
+ url: "/biz/contract/bli/" + contractId,
32
+ method: "get",
33
+ });
34
+ }
35
+
36
+ // 修改合同bli
37
+ export function updateContractBli(data) {
38
+ return request({
39
+ url: "/biz/contract/bli/addOrEdit",
40
+ method: "put",
41
+ data: data,
42
+ });
43
+ }
44
+
28
45
  // 合同追踪列表
29
46
  export function listContractTrace(query) {
30
47
  return request({
@@ -618,7 +618,7 @@ export default {
618
618
  handleTemplate(command) {
619
619
  if (command == 'EXCEL') {
620
620
  this.download(
621
- 'biz/contract/downBill',
621
+ 'biz/contract/bli/downBill',
622
622
  {
623
623
  contractId: this.billData.contractId,
624
624
  templateType: command
@@ -628,7 +628,7 @@ export default {
628
628
  }
629
629
  if (command == 'PDF') {
630
630
  this.download(
631
- 'biz/contract/downBill',
631
+ 'biz/contract/bli/downBill',
632
632
  {
633
633
  contractId: this.billData.contractId,
634
634
  templateType: command
@@ -283,12 +283,11 @@
283
283
  </template>
284
284
 
285
285
  <script>
286
- import { getBizDealRecord, updateBizDealRecord } from '../../../api/biz/bizDealRecord'
287
286
  import { listBizContractCompany } from '../../../api/biz/bizContractCompany'
288
287
  import SubCompanyDialog from './subCompanyDialog.vue'
289
288
  import BillGoods from './billGoods.vue'
290
289
  import { listCompanyBillGoods } from '../../../api/biz/bizCompanyBillGoods'
291
- import { getBizContract, changeBizStatus, getSecondNotifyInfo } from '../../../api/biz/bizContract'
290
+ import { getBizContract, getContractBliDetail, updateContractBli, getSecondNotifyInfo } from '../../../api/biz/bizContract'
292
291
  import FileUpload from '../../../components/FileUpload/s3.vue'
293
292
 
294
293
  export default {
@@ -372,11 +371,12 @@ export default {
372
371
  this.getSecondNotifyInfo();
373
372
  },
374
373
  methods: {
375
- async handleEdit(contractId, dealId) {
374
+ async handleEdit(contractId, buyerCompanyId) {
375
+ this.form.buyerCompanyId = buyerCompanyId
376
376
  const loading = this.openLoading()
377
377
  try {
378
378
  // 等待异步方法完成
379
- await this.getDealRecord(dealId)
379
+ await this.getBliDetail(contractId)
380
380
  await this.getContract(contractId)
381
381
  // 异步操作完成后设置open为true
382
382
  this.open = true
@@ -547,13 +547,15 @@ export default {
547
547
  }
548
548
  this.resetForm('form')
549
549
  },
550
- getDealRecord(dealId) {
550
+ getBliDetail(contractId) {
551
551
  // 将整个方法体封装在返回的Promise中
552
+ const buyerCompanyId = this.form.buyerCompanyId
552
553
  return new Promise((resolve, reject) => {
553
554
  this.reset()
554
- getBizDealRecord(dealId)
555
+ getContractBliDetail(contractId)
555
556
  .then((response) => {
556
- this.form = response.data
557
+ this.form = {...this.form, ...response.data, buyerCompanyId, contractId}
558
+ console.log("getContractBliDetail -- this.form:", this.form)
557
559
  if (this.form.buyerCompanyBillGoods) {
558
560
  this.form.buyerCompanyBillGoods = JSON.parse(this.form.buyerCompanyBillGoods)
559
561
  } else {
@@ -566,7 +568,7 @@ export default {
566
568
  this.getContractCompanyList(this.form.buyerCompanyId)
567
569
  this.getCompanyBillGoods(this.form.buyerCompanyId)
568
570
 
569
- this.form.dealRecordDetailList.map((item) => {
571
+ this.form?.dealRecordDetailList?.map((item) => {
570
572
  if (item.imageList) {
571
573
  item.askCover = item.imageList.toString()
572
574
  }
@@ -588,16 +590,14 @@ export default {
588
590
  submitForm() {
589
591
  this.$refs['form'].validate((valid) => {
590
592
  if (valid) {
591
- if (this.form.dealId != null) {
592
- var deal = JSON.parse(JSON.stringify(this.form))
593
- deal.buyerCompanyBillGoods = JSON.stringify(deal.buyerCompanyBillGoods)
594
- deal.blConfirmFlag = this.confirmFlag
595
- updateBizDealRecord(deal).then((response) => {
596
- this.open = false
597
- this.$modal.msgSuccess('Save Success')
598
- this.$emit('edit')
599
- })
600
- }
593
+ var deal = JSON.parse(JSON.stringify(this.form))
594
+ deal.buyerCompanyBillGoods = JSON.stringify(deal.buyerCompanyBillGoods)
595
+ deal.blConfirmFlag = this.confirmFlag
596
+ updateContractBli(deal).then((response) => {
597
+ this.open = false
598
+ this.$modal.msgSuccess('Save Success')
599
+ this.$emit('edit')
600
+ })
601
601
  }
602
602
  })
603
603
  },