doctor-admin-components 1.0.14-beta.5 → 1.0.14-beta.7

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.5",
4
+ "version": "1.0.14-beta.7",
5
5
  "private": false,
6
6
  "main1": "lib/index.umd.min.js",
7
7
  "main": "packages/index.js",
package/packages/index.js CHANGED
@@ -21,7 +21,6 @@ import plugins from "./src/plugins";
21
21
  // import VueI18n from 'vue-i18n'
22
22
  // Vue.use(plugins)
23
23
  // Vue.use(VueI18n)
24
-
25
24
  import {
26
25
  parseTime,
27
26
  resetForm,
@@ -1,7 +1,7 @@
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="" class="checkbox-position" @change="handleCheck" v-model="checkFlag">
4
+ <el-checkbox v-if="!this.hiddenOperation && !hiddenSelect" label="" class="checkbox-position" @change="handleCheck" v-model="checkFlag">
5
5
  </el-checkbox>
6
6
  <div class="area">
7
7
  <div class="area-info">
@@ -109,6 +109,10 @@ export default {
109
109
  type: Boolean,
110
110
  default: false,
111
111
  },
112
+ hiddenSelect: {
113
+ type: Boolean,
114
+ default: false,
115
+ },
112
116
  type: {
113
117
  type: String,
114
118
  default: '',
@@ -3,6 +3,7 @@
3
3
  <!-- 添加或修改装运对话框 -->
4
4
  <el-dialog :visible.sync="open" z-index="1000" width="80%" :before-close="handleClose" :title="title">
5
5
  <slot name="">
6
+ <span v-if="isDraft" style="color: red">提示: 当前打开了【{{ form.lastUpdateUserName }}】在【{{ form.updateTime }}】保存的装运草稿</span>
6
7
  <span v-if="voidInvoiceList" style="color: red">【快捷转卖】:系统检测到此销售合同关联的采购合同存在【已作废】的装运,</span>
7
8
  <el-button v-if="voidInvoiceList" @click="handleReference" size="mini" type="text">点击这里直接复制并引用</el-button>
8
9
  </slot>
@@ -244,7 +245,13 @@
244
245
  :rules="rules.packageNetWeight"
245
246
  :prop="'containerList.' + index + '.containerDetailList.' + scope1.$index + '.packageList.' + scope2.$index + '.packageNetWeight'"
246
247
  >
247
- <el-input v-model="scope2.row.packageNetWeight" placeholder="请输入净重" size="mini" type="number" @input="limitDecimalPlaces(index, scope1.$index, scope2.$index, scope2.row,'packageNetWeight')"></el-input>
248
+ <el-input
249
+ v-model="scope2.row.packageNetWeight"
250
+ placeholder="请输入净重"
251
+ size="mini"
252
+ type="number"
253
+ @input="limitDecimalPlaces(index, scope1.$index, scope2.$index, scope2.row, 'packageNetWeight')"
254
+ ></el-input>
248
255
  </el-form-item>
249
256
  </template>
250
257
  </el-table-column>
@@ -384,7 +391,7 @@
384
391
  </el-row>
385
392
  </el-form>
386
393
  <div slot="footer" class="dialog-footer">
387
- <el-button type="warning" @click="onSaveDraft" style="margin-right: 10px">保存草稿</el-button>
394
+ <el-button type="warning" @click="onSaveDraft" style="margin-right: 10px" v-if="title === '生成装运'">保存草稿</el-button>
388
395
  <el-button type="primary" @click="submitShipment" style="margin-right: 10px">{{ title == '生成装运' ? '仅生成装运' : '保存草稿' }}</el-button>
389
396
  <el-dropdown @command="(command) => handleTemplate(command)" trigger="click" v-if="title == '生成装运'" style="margin-right: 10px">
390
397
  <el-button type="primary">{{ '装运并下载' }}</el-button>
@@ -547,7 +554,8 @@ export default {
547
554
  //编辑开关
548
555
  editSwitch: false,
549
556
  //
550
- currentRow: null
557
+ currentRow: null,
558
+ isDraft: false
551
559
  }
552
560
  },
553
561
  props: {
@@ -674,15 +682,15 @@ export default {
674
682
  },
675
683
 
676
684
  limitDecimalPlaces(index, scope1Index, scope2Index, data, type) {
677
- let value = data[type];
678
- const decimalPlaces = 3;
685
+ let value = data[type]
686
+ const decimalPlaces = 3
679
687
  if (!isNaN(value)) {
680
- value = parseFloat(value).toFixed(decimalPlaces);
681
- value = parseFloat(value).toString();
682
- data[type] = value;
688
+ value = parseFloat(value).toFixed(decimalPlaces)
689
+ value = parseFloat(value).toString()
690
+ data[type] = value
683
691
  }
684
692
  if (type == 'packageGrossWeight') {
685
- this.changePackageGrossWeight(index, scope1Index, scope2Index);
693
+ this.changePackageGrossWeight(index, scope1Index, scope2Index)
686
694
  } else if (type == 'packageTareWeight') {
687
695
  this.changePackageTareWeight(index, scope1Index, scope2Index)
688
696
  } else if (type == 'packageNetWeight') {
@@ -1299,11 +1307,14 @@ export default {
1299
1307
  }
1300
1308
  },
1301
1309
  async onGetDraft() {
1302
- if(this.form.contractIds) {
1310
+ if (this.form.contractIds) {
1303
1311
  const contractId = this.form.contractIds[0]
1304
1312
  const res = await getDraft(contractId)
1305
1313
  if (res.data) {
1314
+ this.isDraft = true
1306
1315
  this.form = res.data
1316
+ } else {
1317
+ this.isDraft = false
1307
1318
  }
1308
1319
  }
1309
1320
  }