doctor-admin-components 1.0.13-beta.47 → 1.0.13-beta.49

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.47",
4
+ "version": "1.0.13-beta.49",
5
5
  "private": false,
6
6
  "main1": "lib/index.umd.min.js",
7
7
  "main": "packages/index.js",
@@ -183,7 +183,7 @@
183
183
  @checked="handleChecked" @uncheck="handleUncheck" :selectFileListProp="selectFileList" :file-info="item" v-for="(
184
184
  item, i
185
185
  ) in contractFileInfo.personalProformaInvoiceFileInfo" :key="i" />
186
- <contract-file-drag-upload v-show="(!contractFileInfo.personalProformaInvoiceFileInfo || contractFileInfo.personalProformaInvoiceFileInfo.length == 0) && contract.contractType == 'sale'" @upload="
186
+ <contract-file-drag-upload v-show="contract.contractType == 'sale' && ((!contractFileInfo.personalProformaInvoiceFileInfo || contractFileInfo.personalProformaInvoiceFileInfo.length == 0) && (!contractFileInfo.proformaInvoiceFileInfo || contractFileInfo.proformaInvoiceFileInfo.length == 0))" @upload="
187
187
  handleUpload(
188
188
  $event,
189
189
  contractFileInfo.proformaInvoice.id,
@@ -782,11 +782,11 @@
782
782
  <i class="el-icon-question" slot="reference" style="color:#c2c4c5;"/>
783
783
  </el-popover>
784
784
  </div>
785
- <el-col :span="12">
785
+ <el-col :span="12" :getNewInfo="getNewInfo">
786
786
  <div style="display:flex;align-items:center">
787
787
  <ContentTitle :contentTitleProp="{
788
788
  bgButton: $t('contractDetail.finallyInvoice'),
789
- bgTime: contract.contractType == 'sale' ? shipmentFileInfo.saleFinallyInvoice && timeFormate(shipmentFileInfo.saleFinallyInvoice) : shipmentFileInfo.purchaseFinallyInvoice && timeFormate(shipmentFileInfo.purchaseFinallyInvoice),
789
+ bgTime: contract.contractType == 'sale' ? getNewInfo && timeFormate(getNewInfo) : shipmentFileInfo.purchaseFinallyInvoice && timeFormate(shipmentFileInfo.purchaseFinallyInvoice),
790
790
  bgcolor: shipProgressInfo.bgcolor
791
791
  }"></ContentTitle>
792
792
  <span
@@ -837,6 +837,7 @@
837
837
  </div>
838
838
  </div>
839
839
  </el-col> -->
840
+ <!-- 尾款发票 -->
840
841
  <el-col :span="12">
841
842
  <div>
842
843
  <div class="file-list">
@@ -849,17 +850,17 @@
849
850
  :file-info="item"
850
851
  v-for="(
851
852
  item, i
852
- ) in shipmentFileInfo.saleFinallyInvoice"
853
+ ) in getNewInfo"
853
854
  :key="i"
854
855
  />
855
856
  <contract-file-drag-upload
856
- v-show="(!shipmentFileInfo.saleFinallyInvoice || shipmentFileInfo.saleFinallyInvoice.length == 0) && channel !== 'official-website'"
857
+ v-show="(!getNewInfo) && channel !== 'official-website'"
857
858
  @upload="
858
859
  handleUpload(
859
860
  $event,
860
861
  shipmentFileInfo.shipmentId,
861
862
  'shipment',
862
- 'sale_finally_invoice'
863
+ 'sale_personal_finally_invoice'
863
864
  )
864
865
  "
865
866
  :isShowTip="false"
@@ -1455,7 +1456,7 @@ export default {
1455
1456
  * @return {*}
1456
1457
  */
1457
1458
  timeFormate(info) {
1458
- if(info.length > 0 && info[0].createTime) {
1459
+ if(info.length > 0 && info && info[0].createTime) {
1459
1460
  return this.$moment.utc(info[0].createTime).local().format('YYYY-MM-DD HH:mm');
1460
1461
  } else {
1461
1462
  return '';
@@ -1496,7 +1497,7 @@ export default {
1496
1497
  identifyPageBoth(shipmentFileInfo, type) {
1497
1498
  // 正式 purchaseFinallyInvoice
1498
1499
  if (type == 2) {
1499
- if (shipmentFileInfo?.purchaseFinallyInvoice[0]?.url) {
1500
+ if (shipmentFileInfo?.purchaseFinallyInvoice && shipmentFileInfo?.purchaseFinallyInvoice[0]?.url) {
1500
1501
  this.identifyPage(
1501
1502
  shipmentFileInfo?.purchaseFinallyInvoice[0]?.url,
1502
1503
  shipmentFileInfo && shipmentFileInfo.shipmentId,
@@ -2147,6 +2148,31 @@ export default {
2147
2148
  },
2148
2149
  },
2149
2150
  computed: {
2151
+ // 销售获取最新的尾款发票
2152
+ getNewInfo() {
2153
+ // 时间比较
2154
+ let shipmentFileInfo = this.shipmentItemData && this.shipmentItemData
2155
+ if((shipmentFileInfo.saleFinallyInvoice && shipmentFileInfo.saleFinallyInvoice.length > 0) && (shipmentFileInfo.salePersonalFinallyInvoice && shipmentFileInfo.salePersonalFinallyInvoice.length > 0)) {
2156
+ if((shipmentFileInfo.saleFinallyInvoice && shipmentFileInfo.saleFinallyInvoice[0]?.createTime) > (shipmentFileInfo.salePersonalFinallyInvoice && shipmentFileInfo.salePersonalFinallyInvoice[0]?.createTime)) {
2157
+ return shipmentFileInfo.saleFinallyInvoice
2158
+ } else {
2159
+ return shipmentFileInfo.salePersonalFinallyInvoice
2160
+ }
2161
+ } else {
2162
+ // 展示存在的其中一个 saleFinallyInvoice
2163
+ if(shipmentFileInfo.saleFinallyInvoice && shipmentFileInfo.saleFinallyInvoice.length && (!shipmentFileInfo.salePersonalFinallyInvoice || shipmentFileInfo.salePersonalFinallyInvoice.length == 0)) {
2164
+ return shipmentFileInfo.saleFinallyInvoice
2165
+ }
2166
+
2167
+ // 展示存在的其中一个 salePersonalFinallyInvoice
2168
+ if((!shipmentFileInfo.saleFinallyInvoice || shipmentFileInfo.saleFinallyInvoice.length == 0) && (shipmentFileInfo.salePersonalFinallyInvoice && shipmentFileInfo.salePersonalFinallyInvoice.length)) {
2169
+ return shipmentFileInfo.salePersonalFinallyInvoice
2170
+ }
2171
+
2172
+ return ''
2173
+ }
2174
+
2175
+ },
2150
2176
  claimFileInfoCom() {
2151
2177
  if (
2152
2178
  (this.contractFileInfo &&
@@ -998,13 +998,13 @@ export default {
998
998
  submitShipment() {
999
999
  this.$refs['form'].validate((valid) => {
1000
1000
  if (valid) {
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
+ })
1001
1007
  if (this.form.shipmentId == null) {
1002
- let loadingInstance = Loading.service({
1003
- text: '请稍候',
1004
- spinner: 'el-icon-loading',
1005
- background: 'rgba(0, 0, 0, 0.7)',
1006
- customClass: 'custom-loading-class'
1007
- })
1008
1008
  addWithContainer(this.form).then((response) => {
1009
1009
  if (response.code == 200) {
1010
1010
  this.open = false
@@ -1028,6 +1028,8 @@ export default {
1028
1028
  })
1029
1029
  } else {
1030
1030
  updateWithContainer(this.form).then((res) => {
1031
+ loadingInstance.close()
1032
+ this.open = false
1031
1033
  this.$modal.msgSuccess('修改成功')
1032
1034
  this.$emit('refresh')
1033
1035
  })
@@ -1130,6 +1132,8 @@ export default {
1130
1132
  loadingInstance.close()
1131
1133
  })
1132
1134
  } else {
1135
+ loadingInstance.close()
1136
+ this.open = false
1133
1137
  this.$emit('openGenerateLive', { ...this.form, quoteType: this.contract.quoteType })
1134
1138
  }
1135
1139
  }
@@ -1,14 +1,14 @@
1
1
  <!--
2
2
  * @Author: zhangpengwei 15038779532@163.com
3
3
  * @Date: 2023-07-20 14:47:50
4
- * @LastEditors: zhangpengwei 15038779532@163.com
5
- * @LastEditTime: 2023-07-20 17:34:04
4
+ * @LastEditors: zhangpengwei@1338418459736990.onaliyun.com zhangpengwei@1338418459736990.onaliyun.com
5
+ * @LastEditTime: 2024-04-12 11:10:46
6
6
  * @FilePath: /zpw-com-test/src/doctorscrap-components/test.vue
7
7
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
8
  -->
9
9
  <template>
10
10
  <div>
11
- <button @click.stop="jump">click</button>
11
+ <button @click.stop="jump"> click</button>
12
12
  </div>
13
13
  </template>
14
14