doctor-admin-components 1.0.13-beta.6 → 1.0.13-beta.60

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.
Files changed (49) hide show
  1. package/README.md +18 -7
  2. package/package.json +1 -1
  3. package/packages/index.js +7 -0
  4. package/packages/src/api/biz/bizContract.js +980 -1
  5. package/packages/src/api/biz/bizContractCompany.js +1 -1
  6. package/packages/src/api/biz/bizFileInfo.js +16 -0
  7. package/packages/src/api/biz/bizInvoice.js +1 -1
  8. package/packages/src/assets/images/click-show-table.png +0 -0
  9. package/packages/src/assets/images/more.png +0 -0
  10. package/packages/src/assets/images/pdf-new.png +0 -0
  11. package/packages/src/components/FileUpload/contract-drag-new.vue +99 -10
  12. package/packages/src/i18n/en/message.json +296 -0
  13. package/packages/src/i18n/index.js +38 -0
  14. package/packages/src/i18n/zh-CN/message.json +296 -0
  15. package/packages/src/index.js +6 -0
  16. package/packages/src/utils/index.js +35 -0
  17. package/packages/src/utils/request.js +120 -146
  18. 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
  19. package/packages/src/views/biz/bizFileInfo/contract copy.vue +1711 -0
  20. package/packages/src/views/biz/bizFileInfo/contract.vue +1678 -1003
  21. package/packages/src/views/biz/bizFileInfo/contractFile/BillOfLadingNoTab.vue +114 -0
  22. package/packages/src/views/biz/bizFileInfo/contractFile/ContentTitle.vue +102 -0
  23. package/packages/src/views/biz/bizFileInfo/contractFile/IMGPreviewCheckBox.vue +280 -0
  24. package/packages/src/views/biz/bizFileInfo/contractFile/Progress.vue +85 -0
  25. package/packages/src/views/biz/bizFileInfo/contractFile/ProgressDetail.vue +122 -0
  26. package/packages/src/views/biz/bizFileInfo/contractFile/SectionSlot.vue +83 -0
  27. package/packages/src/views/biz/bizFileInfo/contractFile/ShowAndHide.vue +178 -0
  28. package/packages/src/views/biz/bizFileInfo/fileShow copy.vue +321 -0
  29. package/packages/src/views/biz/bizFileInfo/fileShow.vue +131 -46
  30. package/packages/src/views/biz/bizFileInfo/fileShowClaim.vue +1 -1
  31. package/packages/src/views/biz/bizShipment/add.vue +119 -69
  32. package/packages/src/views/biz/contractTracing/addSubCompany.vue +106 -169
  33. package/packages/src/views/biz/contractTracing/billInfo.vue +150 -315
  34. package/packages/src/views/biz/contractTracing/companyBanks.vue +224 -0
  35. package/packages/src/views/biz/contractTracing/contractSummary.vue +286 -629
  36. package/packages/src/views/biz/contractTracing/contractTracingDetail copy.vue +107 -0
  37. package/packages/src/views/biz/contractTracing/contractTracingDetail.vue +200 -7
  38. package/packages/src/views/biz/contractTracing/editBill.vue +219 -359
  39. package/packages/src/views/biz/contractTracing/purchaseInvoiceUpload.vue +157 -7
  40. package/packages/src/views/biz/contractTracing/shipmentPurchaseAmount.vue +8 -2
  41. package/packages/src/views/biz/contractTracing/subCompanyDialog.vue +196 -176
  42. package/packages/src/views/test.vue +3 -3
  43. package/packages/src/views/biz/contractTracing/association.vue +0 -189
  44. package/packages/src/views/biz/contractTracing/chargingDialog.vue +0 -84
  45. package/packages/src/views/biz/contractTracing/contract.vue +0 -1276
  46. package/packages/src/views/biz/contractTracing/disputeRecord.vue +0 -311
  47. package/packages/src/views/biz/contractTracing/edit.vue +0 -205
  48. package/packages/src/views/biz/contractTracing/sendDrafEmail.vue +0 -120
  49. package/packages/src/views/biz/contractTracing/shipment.vue +0 -601
@@ -1,34 +1,54 @@
1
1
  <template>
2
2
  <div class="file-info" v-if="fileInfo.url">
3
3
  <div class="main">
4
- <el-checkbox v-if="!this.hiddenOperation" label="" @change="handleCheck"> </el-checkbox>
4
+ <el-checkbox v-if="!this.hiddenOperation" label="" class="checkbox-position" @change="handleCheck" v-model="checkFlag">
5
+ </el-checkbox>
5
6
  <div class="area">
6
7
  <div class="area-info">
7
- <div class="area-pdf" v-if="fileInfo.ext == '.pdf'"></div>
8
- <el-image style="width: 54px; height: 54px" :src="fileInfo.url" fit="contain" :preview-src-list="[fileInfo.url]" v-else-if="isImage(fileInfo.ext)"></el-image>
8
+ <div class="area-pdf" v-if="isPdf(fileInfo.url)"></div>
9
+ <el-image style="width: 38px; height: 46px" :src="fileInfo.url" fit="contain" :preview-src-list="[fileInfo.url]" v-else-if="isImage(fileInfo.url)"></el-image>
9
10
  <div class="area-file" v-else></div>
10
- <el-button type="text" size="mini" class="ml5" @click="openFile(fileInfo.url)">{{ $t('contractDetail.preview') }}</el-button>
11
- <el-button type="text" size="mini" @click="handleDownload">
12
- {{ $t('contractDetail.download') }}
13
- </el-button>
14
- </div>
15
- <div v-if="!this.hiddenOperation">
16
- <el-dropdown trigger="click" @command="handleCommand">
17
- <span class="el-dropdown-link">
11
+ <div>
12
+ <div> {{ fileInfo.fileName }}</div>
13
+ <div class="preview-download-root">
14
+ <div
15
+ type="text"
16
+ size="mini"
17
+ class="preview-download"
18
+ @click="openFile(fileInfo.url)"
19
+ >{{ $t("contractDetail.preview") }}</div
20
+ >
21
+ <div class="preview-download" type="text" size="mini" @click="handleDownload">
22
+ {{ $t("contractDetail.download") }}
23
+ </div>
24
+ <div v-if="!this.hiddenOperation">
25
+ <el-dropdown trigger="click" @command="handleCommand">
26
+ <span class="el-dropdown-link">
27
+ <div class="more-icon"></div>
28
+ </span>
29
+
30
+ <el-dropdown-menu slot="dropdown" v-if="type == 'signContract'" >
31
+ <el-dropdown-item command="signContract">
32
+ {{ $t('contractDetail.withdraw_sign') }}
33
+ </el-dropdown-item>
34
+ <el-dropdown-item command="rename">{{$t('contractDetail.rename')}}</el-dropdown-item>
35
+ </el-dropdown-menu>
36
+ <el-dropdown-menu slot="dropdown" v-else >
37
+ <el-dropdown-item command="delete">{{
38
+ $t("contractDetail.delete")
39
+ }}</el-dropdown-item>
40
+ <el-dropdown-item command="rename">{{$t('contractDetail.rename')}}</el-dropdown-item>
41
+ <!-- <el-dropdown-item command="deleteAndUpload">
42
+ {{ $t("contractDetail.deleteAndUpload") }}
43
+ </el-dropdown-item> -->
44
+ </el-dropdown-menu>
45
+ </el-dropdown>
46
+ </div>
47
+ <!-- <div v-else style="width:120px;word-break:break-all">
18
48
  {{ fileInfo.fileName }}
19
- <i class="el-icon-arrow-down el-icon--right"></i>
20
- </span>
21
- <el-dropdown-menu slot="dropdown">
22
- <el-dropdown-item command="delete">{{ $t('contractDetail.delete') }}</el-dropdown-item>
23
- <el-dropdown-item command="rename">重命名</el-dropdown-item>
24
- <el-dropdown-item command="deleteAndUpload">
25
- {{ $t('contractDetail.deleteAndUpload') }}
26
- </el-dropdown-item>
27
- </el-dropdown-menu>
28
- </el-dropdown>
29
- </div>
30
- <div v-else style="width: 120px; word-break: break-all">
31
- {{ fileInfo.fileName }}
49
+ </div> -->
50
+ </div>
51
+ </div>
32
52
  </div>
33
53
  </div>
34
54
  </div>
@@ -37,7 +57,7 @@
37
57
  <el-dialog :title="title" :visible.sync="open" width="550px" append-to-body>
38
58
  <el-form ref="form" :model="form" label-width="100px">
39
59
  <el-form-item :label="$t('contractDetail.fileNmae')" prop="fileName">
40
- <el-input v-model="form.fileName" placeholder="请输入文件名" />
60
+ <el-input v-model="form.fileName" :placeholder="$t('contractDetail.Please_enter_a_file_name')" />
41
61
  </el-form-item>
42
62
  </el-form>
43
63
  <div slot="footer" class="dialog-footer">
@@ -60,7 +80,9 @@
60
80
  </template>
61
81
  <script>
62
82
  import { downloadFile } from '../../../utils/request'
63
- import { getBizFileInfo, delBizFileInfo, addBizFileInfo, updateBizFileInfo } from '../../../api/biz/bizFileInfo'
83
+ import { getBizFileInfo, delBizFileInfo, addBizFileInfo, updateBizFileInfo, shipmentWithDrawDraftBill } from '../../../api/biz/bizFileInfo'
84
+ import { isImage, isPdf } from '../../../utils/index';
85
+
64
86
  export default {
65
87
  name: 'FileShow',
66
88
  props: {
@@ -75,14 +97,26 @@ export default {
75
97
  }
76
98
  }
77
99
  },
100
+ selectFileListProp: {
101
+ type: Array,
102
+ default: () => {
103
+ return []
104
+ }
105
+ },
78
106
  //是否隐藏操作
79
107
  hiddenOperation: {
80
108
  type: Boolean,
81
- default: false
82
- }
109
+ default: false,
110
+ },
111
+ type: {
112
+ type: String,
113
+ default: '',
114
+ },
83
115
  },
84
116
  data() {
85
117
  return {
118
+ isImage,
119
+ isPdf,
86
120
  checkedIds: [],
87
121
  //是否显示上传弹出层
88
122
  uploadOpen: false,
@@ -93,9 +127,10 @@ export default {
93
127
  // 表单参数
94
128
  form: {},
95
129
  //上传表单
96
- uploadForm: {}
130
+ uploadForm: {},
131
+ checkFlag: false
97
132
  }
98
- },
133
+ },
99
134
  computed: {
100
135
  fileId() {
101
136
  return this.fileInfo.fileId
@@ -172,8 +207,15 @@ export default {
172
207
  return delBizFileInfo(fileIds)
173
208
  })
174
209
  .then(() => {
175
- this.$emit('refresh')
176
- this.$modal.msgSuccess('删除成功')
210
+ if(row.fileType == "draft_bill_of_lading") {
211
+ shipmentWithDrawDraftBill({shipmentId:row.linkId}).then(() => {
212
+ this.$emit('refresh')
213
+ this.$modal.msgSuccess('删除成功')
214
+ })
215
+ } else {
216
+ this.$emit('refresh')
217
+ this.$modal.msgSuccess('删除成功')
218
+ }
177
219
  })
178
220
  .catch(() => {})
179
221
  },
@@ -207,22 +249,22 @@ export default {
207
249
  },
208
250
  handleCommand(command) {
209
251
  switch (command) {
210
- case 'delete':
211
- this.handleDelete(this.fileInfo)
212
- break
213
- case 'rename':
214
- this.handleUpdate(this.fileInfo)
215
- break
216
- case 'deleteAndUpload':
217
- this.handleDeleteAndUpload(this.fileInfo)
218
- break
252
+ case "delete":
253
+ this.handleDelete(this.fileInfo);
254
+ break;
255
+ case "rename":
256
+ this.handleUpdate(this.fileInfo);
257
+ break;
258
+ case "signContract":
259
+ this.$emit("signContract", this.fileInfo);
260
+ break;
261
+ case "deleteAndUpload":
262
+ this.handleDeleteAndUpload(this.fileInfo);
263
+ break;
219
264
  default:
220
265
  break
221
266
  }
222
267
  },
223
- isImage(ext) {
224
- return ['.jpg', '.jpeg', '.png', '.gif'].includes(ext)
225
- },
226
268
  /** 下载文件 */
227
269
  handleDownload() {
228
270
  // this.download(this.fileInfo.url, {}, this.fileInfo.fileName);
@@ -234,20 +276,36 @@ export default {
234
276
  handleCheck(val) {
235
277
  if (val) {
236
278
  this.$emit('checked', this.fileInfo)
279
+ this.checkFlag = true
237
280
  } else {
238
281
  this.$emit('uncheck', this.fileInfo.fileId)
282
+ this.checkFlag = false
239
283
  }
240
284
  }
285
+ },
286
+ watch: {
287
+ selectFileListProp: {
288
+ handler(val) {
289
+ if(val == 0) {
290
+ this.checkFlag = false
291
+ }
292
+ },
293
+ immediate: true,
294
+ deep: true
295
+ }
241
296
  }
242
297
  }
243
298
  </script>
244
299
  <style lang="scss" scoped>
245
300
  .file-info {
246
- width: 160px;
301
+ min-width: 450px;
247
302
  display: flex;
248
303
  // border: 1px solid red;
249
304
  .main {
250
305
  display: flex;
306
+ .checkbox-position {
307
+ margin-top: 10px;
308
+ }
251
309
  .area {
252
310
  margin-left: 5px;
253
311
  width: 100%;
@@ -258,7 +316,7 @@ export default {
258
316
  .area-pdf {
259
317
  width: 38px;
260
318
  height: 46px;
261
- background: url('../../../assets/images/pdf.png') no-repeat center;
319
+ background: url("../../../assets/images/pdf-new.png") no-repeat center;
262
320
  background-size: contain;
263
321
  }
264
322
  .area-file {
@@ -267,6 +325,33 @@ export default {
267
325
  background: url('../../../assets/images/file.png') no-repeat center;
268
326
  background-size: contain;
269
327
  }
328
+ .more-icon {
329
+ margin-left:10px;
330
+ cursor: pointer;
331
+ width: 20px;
332
+ height: 20px;
333
+ background: url("../../../assets/images/more.png") no-repeat center;
334
+ background-size: contain;
335
+ }
336
+ .preview-download-root {
337
+ display:flex;
338
+ margin-top:5px;
339
+
340
+ .preview-download {
341
+ cursor: pointer;
342
+ margin-left:8px;
343
+ min-width: 45px;
344
+ width:max-content;
345
+ padding: 0 10px;
346
+ height: 21px;
347
+ text-align: center;
348
+ line-height: 17px;
349
+ background: #FFFFFF;
350
+ border-radius: 11px;
351
+ font-size:12px;
352
+ border: 2px solid #D1D3D4;
353
+ }
354
+ }
270
355
  }
271
356
  }
272
357
  .filename {
@@ -269,7 +269,7 @@ export default {
269
269
  .area-pdf {
270
270
  width: 38px;
271
271
  height: 46px;
272
- background-image: url("../../../assets/images/pdf.png") no-repeat
272
+ background-image: url("../../../assets/images/pdf-new.png") no-repeat
273
273
  center;
274
274
  background-size: contain;
275
275
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="app-container">
3
3
  <!-- 添加或修改装运对话框 -->
4
- <el-dialog :title="title" :visible.sync="open" width="80%" append-to-body :before-close="handleClose">
4
+ <el-dialog :title="title" :visible.sync="open" width="80%" :before-close="handleClose">
5
5
  <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
6
6
  <el-row>
7
7
  <el-col :span="6">
@@ -147,14 +147,14 @@
147
147
  </el-col>
148
148
  <el-col :span="8">
149
149
  <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>
150
+ <el-input v-model="dt.containerTareWeight" placeholder="请输入" size="mini" type="number"></el-input>
151
151
  </el-form-item>
152
152
  </el-col>
153
153
  </el-row>
154
154
  <el-row>
155
155
  <el-col :span="6">
156
156
  <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>
157
+ <el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsGrossWeight" type="number"></el-input>
158
158
  <div v-else>
159
159
  {{ dt.totalGoodsGrossWeight ? dt.totalGoodsGrossWeight : '自动计算' }}
160
160
  </div>
@@ -162,7 +162,7 @@
162
162
  </el-col>
163
163
  <el-col :span="6">
164
164
  <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>
165
+ <el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsTareWeight" type="number"></el-input>
166
166
  <div v-else>
167
167
  {{ dt.totalGoodsTareWeight ? dt.totalGoodsTareWeight : '自动计算' }}
168
168
  </div>
@@ -170,7 +170,7 @@
170
170
  </el-col>
171
171
  <el-col :span="6">
172
172
  <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>
173
+ <el-input v-if="editSwitch" size="mini" v-model="dt.totalGoodsNetWeight" type="number"></el-input>
174
174
  <div v-else>
175
175
  {{ dt.totalGoodsNetWeight ? dt.totalGoodsNetWeight : '自动计算' }}
176
176
  </div>
@@ -202,7 +202,8 @@
202
202
  v-model="scope2.row.packageGrossWeight"
203
203
  placeholder="请输入毛重"
204
204
  size="mini"
205
- @change="changePackageGrossWeight(index, scope1.$index, scope2.$index)"
205
+ type="number"
206
+ @input="changePackageGrossWeight(index, scope1.$index, scope2.$index)"
206
207
  ></el-input>
207
208
  </el-form-item>
208
209
  </template>
@@ -220,7 +221,8 @@
220
221
  v-model="scope2.row.packageTareWeight"
221
222
  placeholder="请输入皮重"
222
223
  size="mini"
223
- @change="changePackageTareWeight(index, scope1.$index, scope2.$index)"
224
+ type="number"
225
+ @input="changePackageTareWeight(index, scope1.$index, scope2.$index)"
224
226
  ></el-input>
225
227
  </el-form-item>
226
228
  </template>
@@ -234,7 +236,7 @@
234
236
  :rules="rules.packageNetWeight"
235
237
  :prop="'containerList.' + index + '.containerDetailList.' + scope1.$index + '.packageList.' + scope2.$index + '.packageNetWeight'"
236
238
  >
237
- <el-input v-model="scope2.row.packageNetWeight" placeholder="请输入净重" size="mini"></el-input>
239
+ <el-input v-model="scope2.row.packageNetWeight" placeholder="请输入净重" size="mini" type="number"></el-input>
238
240
  </el-form-item>
239
241
  </template>
240
242
  </el-table-column>
@@ -348,7 +350,7 @@
348
350
  :prop="'containerList.' + index + '.containerDetailList.' + scope.$index + '.goodsNumber'"
349
351
  :rules="subrules.goodsNumber"
350
352
  >
351
- <el-input v-model="scope.row.goodsNumber" size="small" @change="changeTotalGoodsNumber(index)"></el-input>
353
+ <el-input v-model="scope.row.goodsNumber" size="small" @change="changeTotalGoodsNumber(index)" type="number"></el-input>
352
354
  </el-form-item>
353
355
  </template>
354
356
  </el-table-column>
@@ -388,7 +390,7 @@
388
390
  <el-button @click="cancel">取 消</el-button>
389
391
  </div>
390
392
 
391
- <div style="display: flex; justify-content: center; align-items: center">
393
+ <div style="display: flex; justify-content: center; align-items: center" v-if="title == '修改装运'">
392
394
  <ul>
393
395
  按钮说明
394
396
  <ul>
@@ -627,6 +629,21 @@ export default {
627
629
  this.form.containerList[index].totalGoodsGrossWeight = this.form.containerList[index].containerDetailList.reduce((total, item) => {
628
630
  return total + Number(item.goodsGrossWeight)
629
631
  }, 0)
632
+ //计算净重
633
+ this.form.containerList[index].containerDetailList[k].packageList[yindex].packageNetWeight = (
634
+ this.form.containerList[index].containerDetailList[k].packageList[yindex].packageGrossWeight -
635
+ this.form.containerList[index].containerDetailList[k].packageList[yindex].packageTareWeight
636
+ ).toFixed(3)
637
+
638
+ this.form.containerList[index].containerDetailList[k].goodsNetWeight = this.form.containerList[index].containerDetailList[k].packageList.reduce((total, item) => {
639
+ return total + Number(item.packageNetWeight)
640
+ }, 0)
641
+
642
+ this.form.containerList[index].totalGoodsNetWeight = this.form.containerList[index].containerDetailList
643
+ .reduce((total, item) => {
644
+ return total + Number(item.goodsNetWeight)
645
+ }, 0)
646
+ .toFixed(3)
630
647
  },
631
648
  changePackageTareWeight(index, k, yindex) {
632
649
  //计算皮重
@@ -981,31 +998,38 @@ export default {
981
998
  submitShipment() {
982
999
  this.$refs['form'].validate((valid) => {
983
1000
  if (valid) {
984
- this.open = false
1001
+ let loadingInstance = Loading.service({
1002
+ text: '请稍候',
1003
+ spinner: 'el-icon-loading',
1004
+ background: 'rgba(0, 0, 0, 0.7)',
1005
+ customClass: 'custom-loading-class'
1006
+ })
985
1007
  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
1008
  addWithContainer(this.form).then((response) => {
992
- loadingInstance.close()
993
- this.$confirm('装运已生成!您可以点击“确认”按钮留在当前页面,或点击“去看看”按钮查看详细信息。', {
994
- confirmButtonText: '确定',
995
- cancelButtonText: '去看看',
996
- type: 'warning'
997
- })
998
- .then(() => {})
999
- .catch(() => {
1000
- this.$router.push({
1001
- name: 'BizShipment',
1002
- params: { viewDetailFlag: true }
1003
- })
1009
+ if (response.code == 200) {
1010
+ this.open = false
1011
+ loadingInstance.close()
1012
+ this.$confirm('装运已生成!您可以点击“确认”按钮留在当前页面,或点击“去看看”按钮查看详细信息。', {
1013
+ confirmButtonText: '确定',
1014
+ cancelButtonText: '去看看',
1015
+ type: 'warning'
1004
1016
  })
1005
- this.$emit('refresh')
1017
+ .then(() => {})
1018
+ .catch(() => {
1019
+ this.$router.push({
1020
+ name: 'BizShipment',
1021
+ params: { viewDetailFlag: true }
1022
+ })
1023
+ })
1024
+ this.$emit('refresh')
1025
+ } else {
1026
+ loadingInstance.close()
1027
+ }
1006
1028
  })
1007
1029
  } else {
1008
1030
  updateWithContainer(this.form).then((res) => {
1031
+ loadingInstance.close()
1032
+ this.open = false
1009
1033
  this.$modal.msgSuccess('修改成功')
1010
1034
  this.$emit('refresh')
1011
1035
  })
@@ -1021,25 +1045,34 @@ export default {
1021
1045
  submitAndDownload(templateType) {
1022
1046
  this.$refs['form'].validate((valid) => {
1023
1047
  if (valid) {
1024
- this.open = false
1025
1048
  let loadingInstance = Loading.service({
1026
1049
  text: '请稍候',
1027
1050
  spinner: 'el-icon-loading',
1028
- background: 'rgba(0, 0, 0, 0.7)'
1051
+ background: 'rgba(0, 0, 0, 0.7)',
1052
+ customClass: 'custom-loading-class'
1029
1053
  })
1030
- addWithContainer(this.form).then((res) => {
1031
- loadingInstance.close()
1032
- var query = {}
1033
- query.orderByColumn = 'shipmentId'
1034
- query.isAsc = 'desc'
1035
- query.pageNum = 1
1036
- query.pageSize = 1
1037
- listBizShipment(query).then((res) => {
1038
- var shipment = res.rows[0]
1039
- this.handleDownloadShipment(shipment, templateType)
1054
+ addWithContainer(this.form)
1055
+ .then((res) => {
1056
+ if (res.code == 200) {
1057
+ var query = {}
1058
+ query.orderByColumn = 'shipmentId'
1059
+ query.isAsc = 'desc'
1060
+ query.pageNum = 1
1061
+ query.pageSize = 1
1062
+ listBizShipment(query).then((res) => {
1063
+ var shipment = res.rows[0]
1064
+ this.handleDownloadShipment(shipment, templateType)
1065
+ })
1066
+ this.$emit('refresh')
1067
+ this.open = false
1068
+ loadingInstance.close()
1069
+ } else {
1070
+ loadingInstance.close()
1071
+ }
1072
+ })
1073
+ .finally(() => {
1074
+ loadingInstance.close()
1040
1075
  })
1041
- this.$emit('refresh')
1042
- })
1043
1076
  }
1044
1077
  })
1045
1078
  },
@@ -1065,30 +1098,43 @@ export default {
1065
1098
  submitForm() {
1066
1099
  this.$refs['form'].validate((valid) => {
1067
1100
  if (valid) {
1068
- this.open = false
1101
+ let loadingInstance = Loading.service({
1102
+ text: '请稍候',
1103
+ spinner: 'el-icon-loading',
1104
+ background: 'rgba(0, 0, 0, 0.7)',
1105
+ customClass: 'custom-loading-class'
1106
+ })
1069
1107
  if (this.form.shipmentId == null) {
1070
- addWithContainer(this.form).then((response) => {
1071
- this.$modal.msgSuccess('生成成功')
1072
- var query = {}
1073
- query.orderByColumn = 'shipmentId'
1074
- query.isAsc = 'desc'
1075
- query.pageNum = 1
1076
- query.pageSize = 10
1077
- if (this.contract.contractType == 'sale') {
1078
- query.saleContractId = this.contract.contractId
1079
- } else {
1080
- query.purchaseContractId = this.contract.contractId
1081
- }
1082
- listBizShipment(query).then((res) => {
1083
- var shipment = res.rows[0]
1084
- this.handleGenerateFinalInvoice(shipment)
1108
+ addWithContainer(this.form)
1109
+ .then((response) => {
1110
+ if (response.code == 200) {
1111
+ this.open = false
1112
+ this.$modal.msgSuccess('生成成功')
1113
+ var query = {}
1114
+ query.orderByColumn = 'shipmentId'
1115
+ query.isAsc = 'desc'
1116
+ query.pageNum = 1
1117
+ query.pageSize = 10
1118
+ if (this.contract.contractType == 'sale') {
1119
+ query.saleContractId = this.contract.contractId
1120
+ } else {
1121
+ query.purchaseContractId = this.contract.contractId
1122
+ }
1123
+ listBizShipment(query).then((res) => {
1124
+ var shipment = res.rows[0]
1125
+ this.handleGenerateFinalInvoice(shipment)
1126
+ })
1127
+ } else {
1128
+ loadingInstance.close()
1129
+ }
1130
+ })
1131
+ .finally(() => {
1132
+ loadingInstance.close()
1085
1133
  })
1086
- })
1087
1134
  } else {
1088
- this.generateFinalInvoiceForm.shipmentId = this.form.shipmentId
1089
- this.generateFinalInvoiceForm.quoteType = this.contract.quoteType
1090
- this.generateFinalInvoiceOpen = true
1091
- this.generateFinalInvoiceTitle = '更新临时尾款发票'
1135
+ loadingInstance.close()
1136
+ this.open = false
1137
+ this.$emit('openGenerateLive', { ...this.form, quoteType: this.contract.quoteType })
1092
1138
  }
1093
1139
  }
1094
1140
  })
@@ -1098,11 +1144,7 @@ export default {
1098
1144
  this.reset()
1099
1145
  const shipmentId = row.shipmentId
1100
1146
  getBizShipment(shipmentId).then((response) => {
1101
- this.generateFinalInvoiceForm.shipmentId = shipmentId
1102
- this.generateFinalInvoiceForm.quoteType = response.data.quoteType
1103
- this.generateFinalInvoiceForm.saleFinalInvoice = response.data.saleInvoice
1104
- this.generateFinalInvoiceOpen = true
1105
- this.generateFinalInvoiceTitle = '生成临时尾款发票'
1147
+ this.$emit('openGenerateLive', response.data)
1106
1148
  })
1107
1149
  },
1108
1150
  /** 删除按钮操作 */
@@ -1146,3 +1188,11 @@ export default {
1146
1188
  border-radius: 4px;
1147
1189
  }
1148
1190
  </style>
1191
+ <style lang="scss">
1192
+ .el-loading-mask.custom-loading-class.is-fullscreen {
1193
+ z-index: 3000 !important;
1194
+ }
1195
+ .el-message.el-message--error {
1196
+ z-index: 3001 !important;
1197
+ }
1198
+ </style>