doctor-admin-components 1.0.13-beta.3 → 1.0.13-beta.5

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.3",
4
+ "version": "1.0.13-beta.5",
5
5
  "private": false,
6
6
  "main1": "lib/index.umd.min.js",
7
7
  "main": "packages/index.js",
@@ -1,28 +1,15 @@
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">
5
- </el-checkbox>
4
+ <el-checkbox v-if="!this.hiddenOperation" label="" @change="handleCheck"> </el-checkbox>
6
5
  <div class="area">
7
6
  <div class="area-info">
8
7
  <div class="area-pdf" v-if="fileInfo.ext == '.pdf'"></div>
9
- <el-image
10
- style="width: 54px; height: 54px"
11
- :src="fileInfo.url"
12
- fit="contain"
13
- :preview-src-list="[fileInfo.url]"
14
- v-else-if="isImage(fileInfo.ext)"
15
- ></el-image>
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>
16
9
  <div class="area-file" v-else></div>
17
- <el-button
18
- type="text"
19
- size="mini"
20
- class="ml5"
21
- @click="openFile(fileInfo.url)"
22
- >{{ $t("contractDetail.preview") }}</el-button
23
- >
10
+ <el-button type="text" size="mini" class="ml5" @click="openFile(fileInfo.url)">{{ $t('contractDetail.preview') }}</el-button>
24
11
  <el-button type="text" size="mini" @click="handleDownload">
25
- {{ $t("contractDetail.download") }}
12
+ {{ $t('contractDetail.download') }}
26
13
  </el-button>
27
14
  </div>
28
15
  <div v-if="!this.hiddenOperation">
@@ -32,17 +19,15 @@
32
19
  <i class="el-icon-arrow-down el-icon--right"></i>
33
20
  </span>
34
21
  <el-dropdown-menu slot="dropdown">
35
- <el-dropdown-item command="delete">{{
36
- $t("contractDetail.delete")
37
- }}</el-dropdown-item>
22
+ <el-dropdown-item command="delete">{{ $t('contractDetail.delete') }}</el-dropdown-item>
38
23
  <el-dropdown-item command="rename">重命名</el-dropdown-item>
39
24
  <el-dropdown-item command="deleteAndUpload">
40
- {{ $t("contractDetail.deleteAndUpload") }}
25
+ {{ $t('contractDetail.deleteAndUpload') }}
41
26
  </el-dropdown-item>
42
27
  </el-dropdown-menu>
43
28
  </el-dropdown>
44
29
  </div>
45
- <div v-else style="width:120px;word-break:break-all">
30
+ <div v-else style="width: 120px; word-break: break-all">
46
31
  {{ fileInfo.fileName }}
47
32
  </div>
48
33
  </div>
@@ -56,59 +41,45 @@
56
41
  </el-form-item>
57
42
  </el-form>
58
43
  <div slot="footer" class="dialog-footer">
59
- <el-button type="primary" @click="submitForm">{{
60
- $t("button.confirm")
61
- }}</el-button>
62
- <el-button @click="cancel">{{ $t("button.cancel") }}</el-button>
44
+ <el-button type="primary" @click="submitForm">{{ $t('button.confirm') }}</el-button>
45
+ <el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
63
46
  </div>
64
47
  </el-dialog>
65
48
 
66
49
  <!-- 上传文件信息对话框 -->
67
- <el-dialog
68
- :title="title"
69
- :visible.sync="uploadOpen"
70
- width="550px"
71
- append-to-body
72
- >
50
+ <el-dialog :title="title" :visible.sync="uploadOpen" width="550px" append-to-body>
73
51
  <el-form ref="form" :model="uploadForm" label-width="100px">
74
52
  <file-upload v-model="uploadForm.fileInfoList"> </file-upload>
75
53
  </el-form>
76
54
  <div slot="footer" class="dialog-footer">
77
- <el-button type="primary" @click="submitUploadForm">{{
78
- $t("button.confirm")
79
- }}</el-button>
80
- <el-button @click="cancel">{{ $t("button.cancel") }}</el-button>
55
+ <el-button type="primary" @click="submitUploadForm">{{ $t('button.confirm') }}</el-button>
56
+ <el-button @click="cancel">{{ $t('button.cancel') }}</el-button>
81
57
  </div>
82
58
  </el-dialog>
83
59
  </div>
84
60
  </template>
85
61
  <script>
86
- import { downloadFile } from "../../../utils/request";
87
- import {
88
- getBizFileInfo,
89
- delBizFileInfo,
90
- addBizFileInfo,
91
- updateBizFileInfo,
92
- } from "../../../api/biz/bizFileInfo";
62
+ import { downloadFile } from '../../../utils/request'
63
+ import { getBizFileInfo, delBizFileInfo, addBizFileInfo, updateBizFileInfo } from '../../../api/biz/bizFileInfo'
93
64
  export default {
94
- name: "FileShow",
65
+ name: 'FileShow',
95
66
  props: {
96
67
  // 文件信息
97
68
  fileInfo: {
98
69
  type: Object,
99
70
  default: () => {
100
71
  return {
101
- url: "",
102
- fileName: "",
103
- ext: "",
104
- };
105
- },
72
+ url: '',
73
+ fileName: '',
74
+ ext: ''
75
+ }
76
+ }
106
77
  },
107
78
  //是否隐藏操作
108
79
  hiddenOperation: {
109
80
  type: Boolean,
110
- default: false,
111
- },
81
+ default: false
82
+ }
112
83
  },
113
84
  data() {
114
85
  return {
@@ -118,24 +89,24 @@ export default {
118
89
  // 是否显示弹出层
119
90
  open: false,
120
91
  // 弹出层标题
121
- title: "",
92
+ title: '',
122
93
  // 表单参数
123
94
  form: {},
124
95
  //上传表单
125
- uploadForm: {},
126
- };
96
+ uploadForm: {}
97
+ }
127
98
  },
128
99
  computed: {
129
100
  fileId() {
130
- return this.fileInfo.fileId;
131
- },
101
+ return this.fileInfo.fileId
102
+ }
132
103
  },
133
104
  methods: {
134
105
  // 取消按钮
135
106
  cancel() {
136
- this.open = false;
137
- this.uploadOpen = false;
138
- this.reset();
107
+ this.open = false
108
+ this.uploadOpen = false
109
+ this.reset()
139
110
  },
140
111
  // 表单重置
141
112
  reset() {
@@ -147,8 +118,8 @@ export default {
147
118
  fileType: null,
148
119
  url: null,
149
120
  createTime: null,
150
- ext: null,
151
- };
121
+ ext: null
122
+ }
152
123
  this.uploadForm = {
153
124
  fileId: null,
154
125
  linkId: null,
@@ -158,117 +129,117 @@ export default {
158
129
  url: null,
159
130
  createTime: null,
160
131
  ext: null,
161
- fileInfoList: [],
162
- };
163
- this.resetForm("form");
132
+ fileInfoList: []
133
+ }
134
+ this.resetForm('form')
164
135
  },
165
136
  /** 提交按钮 */
166
137
  submitForm() {
167
- this.$refs["form"].validate((valid) => {
138
+ this.$refs['form'].validate((valid) => {
168
139
  if (valid) {
169
140
  if (this.form.fileId != null) {
170
141
  updateBizFileInfo(this.form).then((response) => {
171
- this.$modal.msgSuccess("修改成功");
172
- this.open = false;
173
- this.$emit("refresh");
174
- });
142
+ this.$modal.msgSuccess('修改成功')
143
+ this.open = false
144
+ this.$emit('refresh')
145
+ })
175
146
  } else {
176
147
  addBizFileInfo(this.form).then((response) => {
177
- this.$modal.msgSuccess("新增成功");
178
- this.open = false;
179
- this.$emit("refresh");
180
- });
148
+ this.$modal.msgSuccess('新增成功')
149
+ this.open = false
150
+ this.$emit('refresh')
151
+ })
181
152
  }
182
153
  }
183
- });
154
+ })
184
155
  },
185
156
  /** 修改按钮操作 */
186
157
  handleUpdate(row) {
187
- this.reset();
188
- const fileId = row.fileId || this.ids;
158
+ this.reset()
159
+ const fileId = row.fileId || this.ids
189
160
  getBizFileInfo(fileId).then((response) => {
190
- this.form = response.data;
191
- this.open = true;
192
- this.title = "修改文件信息";
193
- });
161
+ this.form = response.data
162
+ this.open = true
163
+ this.title = '修改文件信息'
164
+ })
194
165
  },
195
166
  /** 删除按钮操作 */
196
167
  handleDelete(row) {
197
- const fileIds = row.fileId || this.ids;
168
+ const fileIds = row.fileId || this.ids
198
169
  this.$modal
199
- .confirm("是否确认删除该文件?")
170
+ .confirm('是否确认删除该文件?')
200
171
  .then(function () {
201
- return delBizFileInfo(fileIds);
172
+ return delBizFileInfo(fileIds)
202
173
  })
203
174
  .then(() => {
204
- this.$emit("refresh");
205
- this.$modal.msgSuccess("删除成功");
175
+ this.$emit('refresh')
176
+ this.$modal.msgSuccess('删除成功')
206
177
  })
207
- .catch(() => {});
178
+ .catch(() => {})
208
179
  },
209
180
  submitUploadForm() {
210
- console.log(this.uploadForm);
181
+ console.log(this.uploadForm)
211
182
  addBizFileInfo(this.uploadForm).then((response) => {
212
- this.$modal.msgSuccess("上传成功");
213
- this.uploadOpen = false;
214
- this.$emit("refresh");
215
- });
183
+ this.$modal.msgSuccess('上传成功')
184
+ this.uploadOpen = false
185
+ this.$emit('refresh')
186
+ })
216
187
  },
217
188
  handleDeleteAndUpload(row) {
218
- const fileId = row.fileId;
189
+ const fileId = row.fileId
219
190
  this.$modal
220
- .confirm("是否确认删除该文件并重新上传?")
191
+ .confirm('是否确认删除该文件并重新上传?')
221
192
  .then(function () {
222
- return delBizFileInfo(fileId);
193
+ return delBizFileInfo(fileId)
223
194
  })
224
195
  .then(() => {
225
- this.$modal.msgSuccess("删除成功");
226
- this.reset();
227
- this.uploadOpen = true;
196
+ this.$modal.msgSuccess('删除成功')
197
+ this.reset()
198
+ this.uploadOpen = true
228
199
  this.uploadForm = {
229
200
  linkId: row.linkId,
230
201
  linkType: row.linkType,
231
- fileType: row.fileType,
232
- };
233
- this.title = "上传文件";
202
+ fileType: row.fileType
203
+ }
204
+ this.title = '上传文件'
234
205
  })
235
- .catch(() => {});
206
+ .catch(() => {})
236
207
  },
237
208
  handleCommand(command) {
238
209
  switch (command) {
239
- case "delete":
240
- this.handleDelete(this.fileInfo);
241
- break;
242
- case "rename":
243
- this.handleUpdate(this.fileInfo);
244
- break;
245
- case "deleteAndUpload":
246
- this.handleDeleteAndUpload(this.fileInfo);
247
- break;
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
248
219
  default:
249
- break;
220
+ break
250
221
  }
251
222
  },
252
223
  isImage(ext) {
253
- return [".jpg", ".jpeg", ".png", ".gif"].includes(ext);
224
+ return ['.jpg', '.jpeg', '.png', '.gif'].includes(ext)
254
225
  },
255
226
  /** 下载文件 */
256
227
  handleDownload() {
257
228
  // this.download(this.fileInfo.url, {}, this.fileInfo.fileName);
258
- downloadFile(this.fileInfo.url, this.fileInfo.fileName);
229
+ downloadFile(this.fileInfo.url, this.fileInfo.fileName)
259
230
  },
260
231
  openFile(url) {
261
- window.open(url);
232
+ window.open(url)
262
233
  },
263
234
  handleCheck(val) {
264
235
  if (val) {
265
- this.$emit("checked", this.fileInfo);
236
+ this.$emit('checked', this.fileInfo)
266
237
  } else {
267
- this.$emit("uncheck", this.fileInfo.fileId);
238
+ this.$emit('uncheck', this.fileInfo.fileId)
268
239
  }
269
- },
270
- },
271
- };
240
+ }
241
+ }
242
+ }
272
243
  </script>
273
244
  <style lang="scss" scoped>
274
245
  .file-info {
@@ -287,13 +258,13 @@ export default {
287
258
  .area-pdf {
288
259
  width: 38px;
289
260
  height: 46px;
290
- background: url("../../../assets/images/pdf.png") no-repeat center;
261
+ background: url('../../../assets/images/pdf.png') no-repeat center;
291
262
  background-size: contain;
292
263
  }
293
264
  .area-file {
294
265
  width: 38px;
295
266
  height: 46px;
296
- background: url("../../../assets/images/file.png") no-repeat center;
267
+ background: url('../../../assets/images/file.png') no-repeat center;
297
268
  background-size: contain;
298
269
  }
299
270
  }
@@ -307,8 +278,7 @@ export default {
307
278
  word-wrap: break-word;
308
279
  }
309
280
  }
310
- ::v-deep .el-dropdown {
311
- }
281
+
312
282
  .el-dropdown-link {
313
283
  cursor: pointer;
314
284
  color: #409eff;
@@ -44,32 +44,33 @@
44
44
  <el-table-column label="Quantity" align="center" prop="weight">
45
45
  <template slot-scope="scope">{{ scope.row.weight }}MT</template>
46
46
  </el-table-column>
47
- <el-table-column v-if="contract.quoteType == 'FIXED'" label="Unit Price/MT" align="center" width="200">
47
+ <el-table-column label="Unit Price/MT" align="center" width="200">
48
48
  <template slot-scope="{ row }">
49
- <span v-if="contract.contractType == 'sale'">${{ row.quotePrice }}</span>
50
- <span v-else>${{ row.sllerPrice }}</span>
49
+ <div v-if="contract.quoteType == 'FIXED'">
50
+ <span v-if="contract.contractType == 'sale'">${{ row.quotePrice }}</span>
51
+ <span v-else>${{ row.sllerPrice }}</span>
52
+ </div>
53
+ <div v-if="isCmx(contract.quoteType)">
54
+ <span v-if="contract.contractType == 'sale'">{{ `$(${contract.quoteType}-${row.quotePrice})*2204.62` }}</span>
55
+ <span v-else>{{ `$(${contract.quoteType}-${row.sllerPrice})*2204.62` }}</span>
56
+ </div>
57
+ <div v-if="isLme(contract.quoteType)">
58
+ <div v-if="checkElementItem(row.elementContent)">
59
+ {{ contract.contractType == 'sale' ? row.quotePriceFormula : row.sellerPriceFormula }}
60
+ </div>
61
+ <div v-else>
62
+ <span v-if="contract.contractType == 'sale'">{{ ` $(${contract.quoteType} *${row.quotePrice}%) ` }}</span>
63
+ <span v-else>{{ `$(${contract.quoteType} *${row.sllerPrice}%)` }}</span>
64
+ </div>
65
+ </div>
51
66
  </template>
52
67
  </el-table-column>
53
68
 
54
- <!-- CMX 都显示 -->
55
- <el-table-column v-if="isCmx(contract.quoteType)" label="Unit Price/MT" align="center" width="200">
56
- <template slot-scope="{ row }">
57
- <span v-if="contract.contractType == 'sale'">{{ `$(${contract.quoteType}-${row.quotePrice})*2204.62` }}</span>
58
- <span v-else>{{ `$(${contract.quoteType}-${row.sllerPrice})*2204.62` }}</span>
59
- </template>
60
- </el-table-column>
61
- <!-- LME -->
62
- <el-table-column v-if="isLme(contract.quoteType)" label="Unit Price/MT" align="center" width="200">
63
- <template slot-scope="{ row }">
64
- <span v-if="contract.contractType == 'sale'">{{ ` $(${contract.quoteType} *${row.quotePrice}%) ` }}</span>
65
- <span v-else>{{ `$(${contract.quoteType} *${row.sllerPrice}%)` }}</span>
66
- </template>
67
- </el-table-column>
68
69
  <el-table-column label="Service fee/MT" align="center">
69
70
  <template slot-scope="scope">${{ scope.row.serviceFee }}</template>
70
71
  </el-table-column>
71
72
 
72
- <!-- 采购合同 FIXED -->
73
+ <!--总价-->
73
74
  <el-table-column label="Net Unit Price/MT" align="center">
74
75
  <template slot-scope="scope">
75
76
  <span v-if="contract.quoteType == 'FIXED' && contract.contractType == 'purchase'">{{ '$' + (scope.row.sllerPrice - Number(scope.row.serviceFee)) }}</span>
@@ -77,10 +78,20 @@
77
78
  {{ '$' + (Number(scope.row.quotePrice) + Number(scope.row.serviceFee)) }}
78
79
  </span>
79
80
  <span v-else-if="isLme(contract.quoteType) && contract.contractType == 'purchase'">
80
- {{ '$(' + contract.quoteType + ' * ' + scope.row.sllerPrice + '%) - $' + Number(scope.row.serviceFee) }}
81
+ <div v-if="checkElementItem(scope.row.elementContent)">
82
+ {{ scope.row.sellerPriceFormula + '- $' + Number(scope.row.serviceFee) }}
83
+ </div>
84
+ <div v-else>
85
+ {{ '$(' + contract.quoteType + ' * ' + scope.row.sllerPrice + '%) - $' + Number(scope.row.serviceFee) }}
86
+ </div>
81
87
  </span>
82
88
  <span v-else-if="isLme(contract.quoteType) && contract.contractType == 'sale'">
83
- {{ '$(' + contract.quoteType + ' * ' + scope.row.quotePrice + '%) + $' + Number(scope.row.serviceFee) }}
89
+ <div v-if="checkElementItem(scope.row.elementContent)">
90
+ {{ scope.row.quotePriceFormula + '+ $' + Number(scope.row.serviceFee) }}
91
+ </div>
92
+ <div v-else>
93
+ {{ '$(' + contract.quoteType + ' * ' + scope.row.quotePrice + '%) + $' + Number(scope.row.serviceFee) }}
94
+ </div>
84
95
  </span>
85
96
  <span v-else-if="isCmx(contract.quoteType) && contract.contractType == 'purchase'">
86
97
  {{ '${(' + contract.quoteType + '-' + scope.row.sllerPrice + ')*2204.62} - $' + Number(scope.row.serviceFee) }}