Commit e29d11bbd648e5077352347f8b444829664e2338
1 parent
c715e03d
最新
Showing
16 changed files
with
828 additions
and
69 deletions
antis-ncc-admin/.env.development
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | |
| 3 | 3 | VUE_CLI_BABEL_TRANSPILE_MODULES = true |
| 4 | 4 | # VUE_APP_BASE_API = 'https://erp.lvqianmeiye.com' |
| 5 | -# VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com' | |
| 6 | -VUE_APP_BASE_API = 'http://localhost:2011' | |
| 5 | +VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com' | |
| 6 | +# VUE_APP_BASE_API = 'http://localhost:2011' | |
| 7 | 7 | # VUE_APP_BASE_API = 'http://localhost:2011' |
| 8 | 8 | VUE_APP_IMG_API = '' |
| 9 | 9 | VUE_APP_BASE_WSS = 'ws://192.168.110.45:2011/websocket' | ... | ... |
antis-ncc-admin/src/views/LqLaundryFlow/cancel-dialog.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="作废记录" :visible.sync="visible" width="500px" :close-on-click-modal="false"> | |
| 3 | + <el-form ref="form" :model="form" :rules="rules" label-width="100px"> | |
| 4 | + <el-form-item label="作废原因" prop="remark"> | |
| 5 | + <el-input v-model="form.remark" type="textarea" :rows="4" placeholder="请输入作废原因" maxlength="500" show-word-limit /> | |
| 6 | + </el-form-item> | |
| 7 | + </el-form> | |
| 8 | + <div slot="footer" class="dialog-footer"> | |
| 9 | + <el-button @click="visible = false">取消</el-button> | |
| 10 | + <el-button type="danger" @click="submit" :loading="loading">确定作废</el-button> | |
| 11 | + </div> | |
| 12 | + </el-dialog> | |
| 13 | +</template> | |
| 14 | + | |
| 15 | +<script> | |
| 16 | +import request from '@/utils/request' | |
| 17 | + | |
| 18 | +export default { | |
| 19 | + name: 'CancelDialog', | |
| 20 | + data() { | |
| 21 | + return { | |
| 22 | + visible: false, | |
| 23 | + loading: false, | |
| 24 | + form: { | |
| 25 | + id: '', | |
| 26 | + remark: '' | |
| 27 | + }, | |
| 28 | + rules: { | |
| 29 | + remark: [{ required: true, message: '请输入作废原因', trigger: 'blur' }] | |
| 30 | + } | |
| 31 | + } | |
| 32 | + }, | |
| 33 | + methods: { | |
| 34 | + // 初始化 | |
| 35 | + init(row) { | |
| 36 | + this.visible = true | |
| 37 | + this.form = { | |
| 38 | + id: row.id, | |
| 39 | + remark: '' | |
| 40 | + } | |
| 41 | + this.$nextTick(() => { | |
| 42 | + if (this.$refs.form) { | |
| 43 | + this.$refs.form.clearValidate() | |
| 44 | + } | |
| 45 | + }) | |
| 46 | + }, | |
| 47 | + // 提交 | |
| 48 | + submit() { | |
| 49 | + this.$refs.form.validate(valid => { | |
| 50 | + if (!valid) return | |
| 51 | + | |
| 52 | + this.loading = true | |
| 53 | + request({ | |
| 54 | + url: '/api/Extend/LqLaundryFlow/Cancel', | |
| 55 | + method: 'POST', | |
| 56 | + data: { | |
| 57 | + id: this.form.id, | |
| 58 | + remark: this.form.remark | |
| 59 | + } | |
| 60 | + }).then(res => { | |
| 61 | + this.loading = false | |
| 62 | + if (res.code == 200) { | |
| 63 | + this.$message.success(res.msg || '作废成功') | |
| 64 | + this.visible = false | |
| 65 | + this.$emit('refresh') | |
| 66 | + } else { | |
| 67 | + this.$message.error(res.msg || '作废失败') | |
| 68 | + } | |
| 69 | + }).catch(() => { | |
| 70 | + this.loading = false | |
| 71 | + }) | |
| 72 | + }) | |
| 73 | + } | |
| 74 | + }, | |
| 75 | + watch: { | |
| 76 | + visible(val) { | |
| 77 | + if (!val) { | |
| 78 | + this.$refs.form && this.$refs.form.resetFields() | |
| 79 | + } | |
| 80 | + } | |
| 81 | + } | |
| 82 | +} | |
| 83 | +</script> | |
| 84 | + | |
| 85 | +<style lang="scss" scoped> | |
| 86 | +.dialog-footer { | |
| 87 | + text-align: right; | |
| 88 | +} | |
| 89 | +</style> | |
| 90 | + | ... | ... |
antis-ncc-admin/src/views/LqLaundryFlow/index.vue
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | <el-col :span="6"> |
| 33 | 33 | <el-form-item label="清洗商"> |
| 34 | 34 | <el-select v-model="query.laundrySupplierId" placeholder="请选择清洗商" clearable filterable> |
| 35 | - <el-option v-for="item in supplierList" :key="item.id" :label="item.supplierName" :value="item.id" /> | |
| 35 | + <el-option v-for="item in supplierList" :key="item.id" :label="item.supplierName+'('+item.productType+')'" :value="item.id" /> | |
| 36 | 36 | </el-select> |
| 37 | 37 | </el-form-item> |
| 38 | 38 | </el-col> |
| ... | ... | @@ -69,6 +69,10 @@ |
| 69 | 69 | <el-button type="primary" icon="el-icon-plus" @click="addSend()">创建送出记录</el-button> |
| 70 | 70 | <el-button type="success" icon="el-icon-refresh" @click="addReturn()">创建送回记录</el-button> |
| 71 | 71 | <el-button type="warning" icon="el-icon-warning" @click="viewDifference()">查看差异记录</el-button> |
| 72 | + <span class="total-price-sum"> | |
| 73 | + <i class="el-icon-money"></i> | |
| 74 | + 总费用合计:<strong>{{ totalPriceSum }}</strong> | |
| 75 | + </span> | |
| 72 | 76 | </div> |
| 73 | 77 | <div class="NCC-common-head-right"> |
| 74 | 78 | <el-tooltip effect="dark" content="刷新" placement="top"> |
| ... | ... | @@ -96,7 +100,7 @@ |
| 96 | 100 | </div> |
| 97 | 101 | </template> |
| 98 | 102 | </el-table-column> |
| 99 | - <el-table-column label="门店名称" align="center"> | |
| 103 | + <el-table-column label="门店名称" align="center" width="180"> | |
| 100 | 104 | <template slot-scope="scope"> |
| 101 | 105 | <div class="store-info"> |
| 102 | 106 | <i class="el-icon-office-building store-icon"></i> |
| ... | ... | @@ -104,7 +108,7 @@ |
| 104 | 108 | </div> |
| 105 | 109 | </template> |
| 106 | 110 | </el-table-column> |
| 107 | - <el-table-column label="产品类型" align="center"> | |
| 111 | + <el-table-column label="产品类型" align="center" width="100"> | |
| 108 | 112 | <template slot-scope="scope"> |
| 109 | 113 | <div class="product-type-info"> |
| 110 | 114 | <i class="el-icon-goods product-type-icon"></i> |
| ... | ... | @@ -138,10 +142,11 @@ |
| 138 | 142 | </el-table-column> |
| 139 | 143 | <el-table-column label="总费用" align="center" width="120"> |
| 140 | 144 | <template slot-scope="scope"> |
| 141 | - <div class="total-price-info"> | |
| 145 | + <div class="total-price-info" v-if="scope.row.flowType === 0"> | |
| 142 | 146 | <i class="el-icon-money total-price-icon"></i> |
| 143 | 147 | <span>{{ scope.row.totalPrice || 0 }}</span> |
| 144 | 148 | </div> |
| 149 | + <span v-else>无</span> | |
| 145 | 150 | </template> |
| 146 | 151 | </el-table-column> |
| 147 | 152 | <el-table-column label="备注" align="center" min-width="150"> |
| ... | ... | @@ -188,7 +193,7 @@ |
| 188 | 193 | </div> |
| 189 | 194 | </template> |
| 190 | 195 | </el-table-column> |
| 191 | - <el-table-column label="操作" width="150" align="left" fixed="right"> | |
| 196 | + <el-table-column label="操作" width="200" align="left" fixed="right"> | |
| 192 | 197 | <template slot-scope="scope"> |
| 193 | 198 | <div class="action-buttons"> |
| 194 | 199 | <el-button type="text" icon="el-icon-view" @click="viewDetail(scope.row)" class="view-btn"> |
| ... | ... | @@ -197,6 +202,9 @@ |
| 197 | 202 | <el-button type="text" icon="el-icon-edit" @click="editRecord(scope.row)" class="edit-btn"> |
| 198 | 203 | 编辑 |
| 199 | 204 | </el-button> |
| 205 | + <el-button type="text" icon="el-icon-close" @click="cancelRecord(scope.row)" class="cancel-btn"> | |
| 206 | + 作废 | |
| 207 | + </el-button> | |
| 200 | 208 | </div> |
| 201 | 209 | </template> |
| 202 | 210 | </el-table-column> |
| ... | ... | @@ -215,6 +223,8 @@ |
| 215 | 223 | <DifferenceDialog v-if="differenceDialogVisible" ref="DifferenceDialog" /> |
| 216 | 224 | <!-- 编辑弹窗 --> |
| 217 | 225 | <EditDialog v-if="editDialogVisible" ref="EditDialog" @refresh="refresh" /> |
| 226 | + <!-- 作废弹窗 --> | |
| 227 | + <CancelDialog v-if="cancelDialogVisible" ref="CancelDialog" @refresh="refresh" /> | |
| 218 | 228 | </div> |
| 219 | 229 | </template> |
| 220 | 230 | |
| ... | ... | @@ -226,9 +236,10 @@ import ReturnDialog from './return-dialog.vue' |
| 226 | 236 | import DetailDialog from './detail-dialog.vue' |
| 227 | 237 | import DifferenceDialog from './difference-dialog.vue' |
| 228 | 238 | import EditDialog from './edit-dialog.vue' |
| 239 | +import CancelDialog from './cancel-dialog.vue' | |
| 229 | 240 | |
| 230 | 241 | export default { |
| 231 | - components: { SendDialog, ReturnDialog, DetailDialog, DifferenceDialog, EditDialog }, | |
| 242 | + components: { SendDialog, ReturnDialog, DetailDialog, DifferenceDialog, EditDialog, CancelDialog }, | |
| 232 | 243 | data() { |
| 233 | 244 | return { |
| 234 | 245 | list: [], |
| ... | ... | @@ -252,7 +263,20 @@ export default { |
| 252 | 263 | returnDialogVisible: false, |
| 253 | 264 | detailDialogVisible: false, |
| 254 | 265 | differenceDialogVisible: false, |
| 255 | - editDialogVisible: false | |
| 266 | + editDialogVisible: false, | |
| 267 | + cancelDialogVisible: false | |
| 268 | + } | |
| 269 | + }, | |
| 270 | + computed: { | |
| 271 | + // 计算总费用合计(只计算送出类型的记录) | |
| 272 | + totalPriceSum() { | |
| 273 | + return this.list | |
| 274 | + .filter(item => item.flowType === 0) // 只计算送出类型 | |
| 275 | + .reduce((sum, item) => { | |
| 276 | + const price = parseFloat(item.totalPrice) || 0 | |
| 277 | + return sum + price | |
| 278 | + }, 0) | |
| 279 | + .toFixed(2) | |
| 256 | 280 | } |
| 257 | 281 | }, |
| 258 | 282 | created() { |
| ... | ... | @@ -370,11 +394,19 @@ export default { |
| 370 | 394 | this.$refs.EditDialog.init(row) |
| 371 | 395 | }) |
| 372 | 396 | }, |
| 397 | + // 作废记录 | |
| 398 | + cancelRecord(row) { | |
| 399 | + this.cancelDialogVisible = true | |
| 400 | + this.$nextTick(() => { | |
| 401 | + this.$refs.CancelDialog.init(row) | |
| 402 | + }) | |
| 403 | + }, | |
| 373 | 404 | // 刷新 |
| 374 | 405 | refresh() { |
| 375 | 406 | this.sendDialogVisible = false |
| 376 | 407 | this.returnDialogVisible = false |
| 377 | 408 | this.editDialogVisible = false |
| 409 | + this.cancelDialogVisible = false | |
| 378 | 410 | this.initData() |
| 379 | 411 | }, |
| 380 | 412 | // 格式化日期时间 |
| ... | ... | @@ -469,6 +501,30 @@ export default { |
| 469 | 501 | font-size: 16px; |
| 470 | 502 | } |
| 471 | 503 | |
| 504 | +// 总费用合计样式 | |
| 505 | +.total-price-sum { | |
| 506 | + margin-left: 20px; | |
| 507 | + padding: 8px 16px; | |
| 508 | + background-color: #f0f9ff; | |
| 509 | + border: 1px solid #409EFF; | |
| 510 | + border-radius: 4px; | |
| 511 | + color: #409EFF; | |
| 512 | + font-size: 14px; | |
| 513 | + display: inline-flex; | |
| 514 | + align-items: center; | |
| 515 | + gap: 6px; | |
| 516 | + | |
| 517 | + i { | |
| 518 | + font-size: 16px; | |
| 519 | + } | |
| 520 | + | |
| 521 | + strong { | |
| 522 | + color: #F56C6C; | |
| 523 | + font-size: 16px; | |
| 524 | + font-weight: 600; | |
| 525 | + } | |
| 526 | +} | |
| 527 | + | |
| 472 | 528 | // 操作按钮样式 |
| 473 | 529 | .action-buttons { |
| 474 | 530 | display: flex; |
| ... | ... | @@ -484,6 +540,22 @@ export default { |
| 484 | 540 | } |
| 485 | 541 | } |
| 486 | 542 | |
| 543 | +.edit-btn { | |
| 544 | + color: #409EFF; | |
| 545 | + | |
| 546 | + &:hover { | |
| 547 | + color: #66b1ff; | |
| 548 | + } | |
| 549 | +} | |
| 550 | + | |
| 551 | +.cancel-btn { | |
| 552 | + color: #F56C6C; | |
| 553 | + | |
| 554 | + &:hover { | |
| 555 | + color: #f78989; | |
| 556 | + } | |
| 557 | +} | |
| 558 | + | |
| 487 | 559 | // 表格行悬停效果 |
| 488 | 560 | ::v-deep .el-table__row:hover { |
| 489 | 561 | background-color: #f5f7fa; | ... | ... |
antis-ncc-admin/src/views/lqKdKdjlb/hedge-dialog.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog | |
| 3 | + title="对冲开单" | |
| 4 | + :visible.sync="visible" | |
| 5 | + :close-on-click-modal="false" | |
| 6 | + class="NCC-dialog NCC-dialog_center" | |
| 7 | + lock-scroll | |
| 8 | + width="1400px" | |
| 9 | + @close="handleClose" | |
| 10 | + > | |
| 11 | + <div v-loading="loading"> | |
| 12 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="120px" label-position="right"> | |
| 13 | + <!-- 基本信息 --> | |
| 14 | + <el-row :gutter="20"> | |
| 15 | + <el-col :span="8"> | |
| 16 | + <el-form-item label="单据门店"> | |
| 17 | + <el-input v-model="dataForm.djmdName" disabled /> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="8"> | |
| 21 | + <el-form-item label="开单会员"> | |
| 22 | + <el-input v-model="dataForm.kdhyc" disabled /> | |
| 23 | + </el-form-item> | |
| 24 | + </el-col> | |
| 25 | + <el-col :span="8"> | |
| 26 | + <el-form-item label="开单日期"> | |
| 27 | + <el-date-picker | |
| 28 | + v-model="dataForm.kdrq" | |
| 29 | + type="date" | |
| 30 | + format="yyyy-MM-dd" | |
| 31 | + value-format="timestamp" | |
| 32 | + placeholder="请选择开单日期" | |
| 33 | + style="width: 100%" | |
| 34 | + /> | |
| 35 | + </el-form-item> | |
| 36 | + </el-col> | |
| 37 | + </el-row> | |
| 38 | + | |
| 39 | + <!-- 费用信息 --> | |
| 40 | + <el-row :gutter="20"> | |
| 41 | + <el-col :span="8"> | |
| 42 | + <el-form-item label="整单业绩"> | |
| 43 | + <el-input v-model="dataForm.zdyj" disabled> | |
| 44 | + <template slot="append">元</template> | |
| 45 | + </el-input> | |
| 46 | + </el-form-item> | |
| 47 | + </el-col> | |
| 48 | + <el-col :span="8"> | |
| 49 | + <el-form-item label="实付业绩"> | |
| 50 | + <el-input v-model="dataForm.sfyj" disabled> | |
| 51 | + <template slot="append">元</template> | |
| 52 | + </el-input> | |
| 53 | + </el-form-item> | |
| 54 | + </el-col> | |
| 55 | + </el-row> | |
| 56 | + | |
| 57 | + <!-- 品项明细 --> | |
| 58 | + <el-form-item label="品项明细"> | |
| 59 | + <el-table :data="dataForm.lqKdPxmxList" border size="small" style="width: 100%"> | |
| 60 | + <el-table-column prop="pxmc" label="品项名称" align="left"> | |
| 61 | + <template slot-scope="scope"> | |
| 62 | + <span>{{ scope.row.pxmc || '无' }}</span> | |
| 63 | + </template> | |
| 64 | + </el-table-column> | |
| 65 | + <el-table-column prop="pxjg" label="单价" align="right"> | |
| 66 | + <template slot-scope="scope"> | |
| 67 | + <el-input-number | |
| 68 | + v-model="scope.row.pxjg" | |
| 69 | + :precision="2" | |
| 70 | + :step="0.01" | |
| 71 | + :min="-999999" | |
| 72 | + :max="999999" | |
| 73 | + size="small" | |
| 74 | + style="width: 100%" | |
| 75 | + @change="calculatePxTotal(scope.$index)" | |
| 76 | + /> | |
| 77 | + </template> | |
| 78 | + </el-table-column> | |
| 79 | + <el-table-column prop="projectNumber" label="次数" align="right"> | |
| 80 | + <template slot-scope="scope"> | |
| 81 | + <el-input-number | |
| 82 | + v-model="scope.row.projectNumber" | |
| 83 | + :precision="2" | |
| 84 | + :step="0.01" | |
| 85 | + :min="-999999" | |
| 86 | + :max="999999" | |
| 87 | + size="small" | |
| 88 | + style="width: 100%" | |
| 89 | + @change="calculatePxTotal(scope.$index)" | |
| 90 | + /> | |
| 91 | + </template> | |
| 92 | + </el-table-column> | |
| 93 | + <el-table-column prop="totalPrice" label="总价" align="right"> | |
| 94 | + <template slot-scope="scope"> | |
| 95 | + <span>{{ formatMoney(scope.row.totalPrice) }}</span> | |
| 96 | + </template> | |
| 97 | + </el-table-column> | |
| 98 | + <el-table-column prop="sourceType" label="来源类型" align="center"> | |
| 99 | + <template slot-scope="scope"> | |
| 100 | + <el-tag size="small">{{ scope.row.sourceType || '无' }}</el-tag> | |
| 101 | + </template> | |
| 102 | + </el-table-column> | |
| 103 | + <el-table-column label="操作" width="100" align="center" fixed="right"> | |
| 104 | + <template slot-scope="scope"> | |
| 105 | + <el-button | |
| 106 | + type="text" | |
| 107 | + size="small" | |
| 108 | + icon="el-icon-delete" | |
| 109 | + @click="deletePxRow(scope.$index)" | |
| 110 | + > | |
| 111 | + 删除 | |
| 112 | + </el-button> | |
| 113 | + </template> | |
| 114 | + </el-table-column> | |
| 115 | + </el-table> | |
| 116 | + </el-form-item> | |
| 117 | + | |
| 118 | + <!-- 健康师和科技部老师业绩 --> | |
| 119 | + <el-form-item | |
| 120 | + v-for="(px, pxIndex) in dataForm.lqKdPxmxList" | |
| 121 | + :key="pxIndex" | |
| 122 | + :label="`品项${pxIndex + 1} - ${px.pxmc || '无'}`" | |
| 123 | + > | |
| 124 | + <el-card shadow="never" style="margin-bottom: 20px"> | |
| 125 | + <!-- 健康师业绩 --> | |
| 126 | + <div style="margin-bottom: 20px"> | |
| 127 | + <div style="margin-bottom: 10px; font-weight: 600; color: #409EFF"> | |
| 128 | + <i class="el-icon-user"></i> 健康师业绩 | |
| 129 | + </div> | |
| 130 | + <el-table | |
| 131 | + :data="px.lqKdJksyjList" | |
| 132 | + border | |
| 133 | + size="mini" | |
| 134 | + style="width: 100%" | |
| 135 | + v-if="px.lqKdJksyjList && px.lqKdJksyjList.length > 0" | |
| 136 | + > | |
| 137 | + <el-table-column prop="jksxm" label="健康师" align="left"> | |
| 138 | + <template slot-scope="scope"> | |
| 139 | + <span>{{ scope.row.jksxm || '无' }}</span> | |
| 140 | + </template> | |
| 141 | + </el-table-column> | |
| 142 | + <el-table-column prop="jksyj" label="业绩" align="right"> | |
| 143 | + <template slot-scope="scope"> | |
| 144 | + <el-input-number | |
| 145 | + v-model="scope.row.jksyj" | |
| 146 | + :precision="2" | |
| 147 | + :step="0.01" | |
| 148 | + :min="-999999" | |
| 149 | + :max="999999" | |
| 150 | + size="mini" | |
| 151 | + style="width: 100%" | |
| 152 | + /> | |
| 153 | + </template> | |
| 154 | + </el-table-column> | |
| 155 | + <el-table-column label="操作" width="100" align="center"> | |
| 156 | + <template slot-scope="scope"> | |
| 157 | + <el-button | |
| 158 | + type="text" | |
| 159 | + size="mini" | |
| 160 | + icon="el-icon-delete" | |
| 161 | + @click="deleteJks(pxIndex, scope.$index)" | |
| 162 | + > | |
| 163 | + 删除 | |
| 164 | + </el-button> | |
| 165 | + </template> | |
| 166 | + </el-table-column> | |
| 167 | + </el-table> | |
| 168 | + <div v-else style="padding: 10px; color: #909399; text-align: center"> | |
| 169 | + 暂无健康师 | |
| 170 | + </div> | |
| 171 | + </div> | |
| 172 | + | |
| 173 | + <!-- 科技部老师业绩 --> | |
| 174 | + <div v-if="px.lqKdKjbsyjList && px.lqKdKjbsyjList.length > 0"> | |
| 175 | + <div style="margin-bottom: 10px; font-weight: 600; color: #67C23A"> | |
| 176 | + <i class="el-icon-user-solid"></i> 科技部老师业绩 | |
| 177 | + </div> | |
| 178 | + <el-table | |
| 179 | + :data="px.lqKdKjbsyjList" | |
| 180 | + border | |
| 181 | + size="mini" | |
| 182 | + style="width: 100%" | |
| 183 | + > | |
| 184 | + <el-table-column prop="kjblsxm" label="科技部老师" align="left"> | |
| 185 | + <template slot-scope="scope"> | |
| 186 | + <span>{{ scope.row.kjblsxm || '无' }}</span> | |
| 187 | + </template> | |
| 188 | + </el-table-column> | |
| 189 | + <el-table-column prop="kjblsyj" label="业绩" align="right"> | |
| 190 | + <template slot-scope="scope"> | |
| 191 | + <el-input-number | |
| 192 | + v-model="scope.row.kjblsyj" | |
| 193 | + :precision="2" | |
| 194 | + :step="0.01" | |
| 195 | + :min="-999999" | |
| 196 | + :max="999999" | |
| 197 | + size="mini" | |
| 198 | + style="width: 100%" | |
| 199 | + /> | |
| 200 | + </template> | |
| 201 | + </el-table-column> | |
| 202 | + <el-table-column label="操作" width="100" align="center"> | |
| 203 | + <template slot-scope="scope"> | |
| 204 | + <el-button | |
| 205 | + type="text" | |
| 206 | + size="mini" | |
| 207 | + icon="el-icon-delete" | |
| 208 | + @click="deleteKjb(pxIndex, scope.$index)" | |
| 209 | + > | |
| 210 | + 删除 | |
| 211 | + </el-button> | |
| 212 | + </template> | |
| 213 | + </el-table-column> | |
| 214 | + </el-table> | |
| 215 | + </div> | |
| 216 | + </el-card> | |
| 217 | + </el-form-item> | |
| 218 | + </el-form> | |
| 219 | + </div> | |
| 220 | + | |
| 221 | + <div slot="footer" class="dialog-footer"> | |
| 222 | + <el-button @click="handleClose">取消</el-button> | |
| 223 | + <el-button type="primary" :loading="submitLoading" @click="submitHedge">提交对冲</el-button> | |
| 224 | + </div> | |
| 225 | + </el-dialog> | |
| 226 | +</template> | |
| 227 | + | |
| 228 | +<script> | |
| 229 | +import request from '@/utils/request' | |
| 230 | +import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 231 | + | |
| 232 | +export default { | |
| 233 | + name: 'HedgeDialog', | |
| 234 | + data() { | |
| 235 | + return { | |
| 236 | + visible: false, | |
| 237 | + loading: false, | |
| 238 | + submitLoading: false, | |
| 239 | + billingId: null, | |
| 240 | + dataForm: { | |
| 241 | + id: '', | |
| 242 | + djmd: '', | |
| 243 | + djmdName: '', | |
| 244 | + kdhy: '', | |
| 245 | + kdhyc: '', | |
| 246 | + kdhysjh: '', | |
| 247 | + kdrq: '', | |
| 248 | + gjlx: '', | |
| 249 | + jsj: '', | |
| 250 | + hgjg: '', | |
| 251 | + fkyy: '', | |
| 252 | + zdyj: '', | |
| 253 | + sfyj: '', | |
| 254 | + jj: '', | |
| 255 | + bz: '', | |
| 256 | + activityId: '', | |
| 257 | + appointmentId: '', | |
| 258 | + lqKdPxmxList: [] | |
| 259 | + }, | |
| 260 | + djmdOptions: [] | |
| 261 | + } | |
| 262 | + }, | |
| 263 | + created() { | |
| 264 | + this.loadOptions() | |
| 265 | + }, | |
| 266 | + methods: { | |
| 267 | + // 初始化弹窗 | |
| 268 | + init(billingId) { | |
| 269 | + this.billingId = billingId | |
| 270 | + this.visible = true | |
| 271 | + this.$nextTick(() => { | |
| 272 | + if (this.billingId) { | |
| 273 | + this.getBillingDetail(this.billingId) | |
| 274 | + } else { | |
| 275 | + // 新建对冲时,开单日期默认取当前时间(时间戳,配合 value-format="timestamp") | |
| 276 | + this.dataForm.kdrq = new Date().getTime() | |
| 277 | + } | |
| 278 | + }) | |
| 279 | + }, | |
| 280 | + // 获取开单详情 | |
| 281 | + async getBillingDetail(id) { | |
| 282 | + this.loading = true | |
| 283 | + try { | |
| 284 | + const res = await request({ | |
| 285 | + url: `/api/Extend/LqKdKdjlb/${id}`, | |
| 286 | + method: 'GET' | |
| 287 | + }) | |
| 288 | + if (res.code === 200) { | |
| 289 | + // 深拷贝数据,避免修改原数据 | |
| 290 | + const billingData = JSON.parse(JSON.stringify(res.data)) | |
| 291 | + | |
| 292 | + // 处理品项明细数据 | |
| 293 | + if (billingData.lqKdPxmxList && billingData.lqKdPxmxList.length > 0) { | |
| 294 | + billingData.lqKdPxmxList = billingData.lqKdPxmxList.map(px => { | |
| 295 | + // 保存原始项目次数 | |
| 296 | + const originalProjectNumber = parseFloat(px.projectNumber) || 0 | |
| 297 | + | |
| 298 | + // 确保所有数值字段都存在,并保留所有原始字段 | |
| 299 | + const pxItem = { | |
| 300 | + ...px, | |
| 301 | + pxjg: parseFloat(px.pxjg) || 0, | |
| 302 | + projectNumber: originalProjectNumber, | |
| 303 | + originalProjectNumber: originalProjectNumber, // 保存原始次数 | |
| 304 | + totalPrice: (parseFloat(px.pxjg) || 0) * originalProjectNumber, | |
| 305 | + // 保留品项的关键字段 | |
| 306 | + BillingItemId: px.BillingItemId || px.billingItemId || px.px, | |
| 307 | + memberId: px.memberId || billingData.kdhy, | |
| 308 | + sourceType: px.sourceType || '购买', | |
| 309 | + // 处理健康师业绩 | |
| 310 | + lqKdJksyjList: (px.lqKdJksyjList || []).map(jks => { | |
| 311 | + const originalJksyj = parseFloat(jks.jksyj) || 0 | |
| 312 | + | |
| 313 | + return { | |
| 314 | + ...jks, | |
| 315 | + jksyj: originalJksyj, | |
| 316 | + originalJksyj: originalJksyj // 保存原始业绩 | |
| 317 | + } | |
| 318 | + }), | |
| 319 | + // 处理科技部老师业绩 | |
| 320 | + lqKdKjbsyjList: (px.lqKdKjbsyjList || []).map(kjb => { | |
| 321 | + const originalKjblsyj = parseFloat(kjb.kjblsyj) || 0 | |
| 322 | + | |
| 323 | + return { | |
| 324 | + ...kjb, | |
| 325 | + kjblsyj: originalKjblsyj, | |
| 326 | + originalKjblsyj: originalKjblsyj // 保存原始业绩 | |
| 327 | + } | |
| 328 | + }) | |
| 329 | + } | |
| 330 | + return pxItem | |
| 331 | + }) | |
| 332 | + } | |
| 333 | + | |
| 334 | + // 处理开单日期 | |
| 335 | + billingData.kdrq = new Date().getTime() | |
| 336 | + | |
| 337 | + // 获取门店名称 | |
| 338 | + const djmdName = this.getStoreName(billingData.djmd) | |
| 339 | + | |
| 340 | + this.dataForm = { | |
| 341 | + id: '', | |
| 342 | + djmd: billingData.djmd || '', | |
| 343 | + djmdName: djmdName || '', | |
| 344 | + kdhy: billingData.kdhy || '', | |
| 345 | + kdhyc: billingData.kdhyc || '', | |
| 346 | + kdhysjh: billingData.kdhysjh || '', | |
| 347 | + kdrq: billingData.kdrq, | |
| 348 | + gjlx: billingData.gjlx || '', | |
| 349 | + jsj: billingData.jsj || '', | |
| 350 | + hgjg: billingData.hgjg || '', | |
| 351 | + fkyy: billingData.fkyy || '', | |
| 352 | + zdyj: '0.00', | |
| 353 | + sfyj: '0.00', | |
| 354 | + jj: billingData.jj || '', | |
| 355 | + bz: billingData.bz || '', | |
| 356 | + activityId: billingData.activityId || '', | |
| 357 | + appointmentId: billingData.appointmentId || '', | |
| 358 | + lqKdPxmxList: billingData.lqKdPxmxList || [] | |
| 359 | + } | |
| 360 | + | |
| 361 | + // 计算总金额 | |
| 362 | + this.calculateTotalAmounts() | |
| 363 | + } else { | |
| 364 | + this.$message.error(res.msg || '获取开单详情失败') | |
| 365 | + } | |
| 366 | + } catch (error) { | |
| 367 | + console.error('获取开单详情失败:', error) | |
| 368 | + this.$message.error('获取开单详情失败') | |
| 369 | + } finally { | |
| 370 | + this.loading = false | |
| 371 | + } | |
| 372 | + }, | |
| 373 | + // 加载选项数据 | |
| 374 | + loadOptions() { | |
| 375 | + previewDataInterface('730960205902251269').then(res => { | |
| 376 | + this.djmdOptions = res.data || [] | |
| 377 | + }) | |
| 378 | + }, | |
| 379 | + // 获取门店名称 | |
| 380 | + getStoreName(storeId) { | |
| 381 | + const store = this.djmdOptions.find(item => item.id === storeId) | |
| 382 | + return store ? store.fullName : '' | |
| 383 | + }, | |
| 384 | + // 计算品项总价 | |
| 385 | + calculatePxTotal(pxIndex) { | |
| 386 | + const px = this.dataForm.lqKdPxmxList[pxIndex] | |
| 387 | + if (px) { | |
| 388 | + const newProjectNumber = parseFloat(px.projectNumber) || 0 | |
| 389 | + const originalProjectNumber = parseFloat(px.originalProjectNumber) || 1 // 避免除0 | |
| 390 | + | |
| 391 | + // 计算比例 | |
| 392 | + const ratio = originalProjectNumber !== 0 ? newProjectNumber / originalProjectNumber : 0 | |
| 393 | + | |
| 394 | + px.totalPrice = (parseFloat(px.pxjg) || 0) * newProjectNumber | |
| 395 | + | |
| 396 | + // 按比例重新计算健康师的业绩 | |
| 397 | + if (px.lqKdJksyjList && px.lqKdJksyjList.length > 0) { | |
| 398 | + px.lqKdJksyjList.forEach(jks => { | |
| 399 | + // 按比例计算 | |
| 400 | + if (jks.originalJksyj !== undefined) { | |
| 401 | + jks.jksyj = parseFloat((jks.originalJksyj * ratio).toFixed(2)) | |
| 402 | + } | |
| 403 | + }) | |
| 404 | + } | |
| 405 | + | |
| 406 | + // 按比例重新计算科技部老师的业绩 | |
| 407 | + if (px.lqKdKjbsyjList && px.lqKdKjbsyjList.length > 0) { | |
| 408 | + px.lqKdKjbsyjList.forEach(kjb => { | |
| 409 | + // 按比例计算 | |
| 410 | + if (kjb.originalKjblsyj !== undefined) { | |
| 411 | + kjb.kjblsyj = parseFloat((kjb.originalKjblsyj * ratio).toFixed(2)) | |
| 412 | + } | |
| 413 | + }) | |
| 414 | + } | |
| 415 | + | |
| 416 | + this.calculateTotalAmounts() | |
| 417 | + } | |
| 418 | + }, | |
| 419 | + // 计算总金额 | |
| 420 | + calculateTotalAmounts() { | |
| 421 | + let totalZdyj = 0 | |
| 422 | + let totalSfyj = 0 | |
| 423 | + | |
| 424 | + this.dataForm.lqKdPxmxList.forEach(px => { | |
| 425 | + if (px.pxjg && px.projectNumber) { | |
| 426 | + totalZdyj += parseFloat(px.pxjg) * parseFloat(px.projectNumber) | |
| 427 | + } | |
| 428 | + | |
| 429 | + // 计算实付业绩:健康师业绩 + 科技部老师业绩 | |
| 430 | + if (px.lqKdJksyjList && px.lqKdJksyjList.length > 0) { | |
| 431 | + px.lqKdJksyjList.forEach(jks => { | |
| 432 | + totalSfyj += parseFloat(jks.jksyj) || 0 | |
| 433 | + }) | |
| 434 | + } | |
| 435 | + if (px.lqKdKjbsyjList && px.lqKdKjbsyjList.length > 0) { | |
| 436 | + px.lqKdKjbsyjList.forEach(kjb => { | |
| 437 | + totalSfyj += parseFloat(kjb.kjblsyj) || 0 | |
| 438 | + }) | |
| 439 | + } | |
| 440 | + }) | |
| 441 | + | |
| 442 | + this.dataForm.zdyj = totalZdyj.toFixed(2) | |
| 443 | + this.dataForm.sfyj = totalSfyj.toFixed(2) | |
| 444 | + }, | |
| 445 | + // 删除品项 | |
| 446 | + deletePxRow(pxIndex) { | |
| 447 | + if (this.dataForm.lqKdPxmxList.length <= 1) { | |
| 448 | + this.$message.warning('至少需要保留一个品项') | |
| 449 | + return | |
| 450 | + } | |
| 451 | + this.$confirm('确定要删除该品项吗?', '提示', { | |
| 452 | + type: 'warning' | |
| 453 | + }) | |
| 454 | + .then(() => { | |
| 455 | + this.dataForm.lqKdPxmxList.splice(pxIndex, 1) | |
| 456 | + this.calculateTotalAmounts() | |
| 457 | + }) | |
| 458 | + .catch(() => {}) | |
| 459 | + }, | |
| 460 | + // 删除健康师 | |
| 461 | + deleteJks(pxIndex, jksIndex) { | |
| 462 | + const px = this.dataForm.lqKdPxmxList[pxIndex] | |
| 463 | + if (px && px.lqKdJksyjList) { | |
| 464 | + px.lqKdJksyjList.splice(jksIndex, 1) | |
| 465 | + this.calculateTotalAmounts() | |
| 466 | + } | |
| 467 | + }, | |
| 468 | + // 删除科技部老师 | |
| 469 | + deleteKjb(pxIndex, kjbIndex) { | |
| 470 | + const px = this.dataForm.lqKdPxmxList[pxIndex] | |
| 471 | + if (px && px.lqKdKjbsyjList) { | |
| 472 | + px.lqKdKjbsyjList.splice(kjbIndex, 1) | |
| 473 | + this.calculateTotalAmounts() | |
| 474 | + } | |
| 475 | + }, | |
| 476 | + // 格式化金额 | |
| 477 | + formatMoney(amount) { | |
| 478 | + if (!amount && amount !== 0) return '0.00' | |
| 479 | + return Number(amount).toFixed(2) | |
| 480 | + }, | |
| 481 | + // 提交对冲 | |
| 482 | + async submitHedge() { | |
| 483 | + // 验证表单 | |
| 484 | + if (!this.dataForm.lqKdPxmxList || this.dataForm.lqKdPxmxList.length === 0) { | |
| 485 | + this.$message.warning('至少需要保留一个品项') | |
| 486 | + return | |
| 487 | + } | |
| 488 | + | |
| 489 | + if (!this.dataForm.kdrq) { | |
| 490 | + this.$message.warning('请选择开单日期') | |
| 491 | + return | |
| 492 | + } | |
| 493 | + | |
| 494 | + // 过滤掉空的品项 | |
| 495 | + const filteredPxList = this.dataForm.lqKdPxmxList | |
| 496 | + .filter(px => px.px && px.pxmc) | |
| 497 | + .map(px => ({ | |
| 498 | + billingItemId: px.BillingItemId || px.billingItemId || px.px, | |
| 499 | + px: px.px, | |
| 500 | + memberId: px.memberId || this.dataForm.kdhy, | |
| 501 | + pxmc: px.pxmc, | |
| 502 | + pxjg: parseFloat(px.pxjg) || 0, | |
| 503 | + projectNumber: parseFloat(px.projectNumber) || 0, | |
| 504 | + sourceType: px.sourceType || '购买', | |
| 505 | + totalPrice: (parseFloat(px.pxjg) || 0) * (parseFloat(px.projectNumber) || 0), | |
| 506 | + actualPrice: (parseFloat(px.pxjg) || 0) * (parseFloat(px.projectNumber) || 0), | |
| 507 | + lqKdJksyjList: (px.lqKdJksyjList || []).map(jks => ({ | |
| 508 | + jks: jks.jks, | |
| 509 | + jksxm: jks.jksxm, | |
| 510 | + jkszh: jks.jkszh || jks.jks, | |
| 511 | + jksyj: parseFloat(jks.jksyj) || 0, | |
| 512 | + jsjId: jks.jsjId || '', | |
| 513 | + kdpxid: px.BillingItemId || px.billingItemId || px.px | |
| 514 | + })), | |
| 515 | + lqKdKjbsyjList: (px.lqKdKjbsyjList || []).map(kjb => ({ | |
| 516 | + kjbls: kjb.kjbls, | |
| 517 | + kjblsxm: kjb.kjblsxm, | |
| 518 | + kjblszh: kjb.kjblszh || kjb.kjbls, | |
| 519 | + kjblsyj: parseFloat(kjb.kjblsyj) || 0, | |
| 520 | + kdpxid: px.BillingItemId || px.billingItemId || px.px | |
| 521 | + })) | |
| 522 | + })) | |
| 523 | + | |
| 524 | + // 处理开单日期 | |
| 525 | + let kdrqValue = new Date().toISOString() | |
| 526 | + if (this.dataForm.kdrq) { | |
| 527 | + const date = new Date(this.dataForm.kdrq) | |
| 528 | + kdrqValue = date.toISOString() | |
| 529 | + } | |
| 530 | + | |
| 531 | + const formData = { | |
| 532 | + activityId: this.dataForm.activityId || '', | |
| 533 | + djmd: this.dataForm.djmd, | |
| 534 | + jsj: this.dataForm.jsj, | |
| 535 | + kdrq: kdrqValue, | |
| 536 | + gjlx: this.dataForm.gjlx, | |
| 537 | + kdhysjh: this.dataForm.kdhysjh, | |
| 538 | + kdhyc: this.dataForm.kdhyc, | |
| 539 | + kdhy: this.dataForm.kdhy, | |
| 540 | + zdyj: this.dataForm.zdyj, | |
| 541 | + sfyj: this.dataForm.sfyj, | |
| 542 | + qk: 0, // 对冲开单欠款为0 | |
| 543 | + fkfs: '对冲', // 付款方式为对冲 | |
| 544 | + hgjg: this.dataForm.hgjg || '', | |
| 545 | + fkyy: this.dataForm.fkyy || '', | |
| 546 | + sfskdd: '否', // 对冲开单不是首开订单 | |
| 547 | + jj: this.dataForm.jj || '', | |
| 548 | + bz: this.dataForm.bz || '', | |
| 549 | + lqKdPxmxList: filteredPxList, | |
| 550 | + scwj: [], // 对冲开单不需要收据文件 | |
| 551 | + f_FileUrl: '[]', // 对冲开单不需要方案其他文件 | |
| 552 | + lqKdKdjlbDeductList: [], // 对冲开单不需要储扣明细 | |
| 553 | + hyqz: [] // 对冲开单不需要会员签字 | |
| 554 | + } | |
| 555 | + | |
| 556 | + // 如果有预约ID,则添加 | |
| 557 | + if (this.dataForm.appointmentId) { | |
| 558 | + formData.appointmentId = this.dataForm.appointmentId | |
| 559 | + } | |
| 560 | + | |
| 561 | + console.log('对冲数据:', formData) | |
| 562 | + | |
| 563 | + this.submitLoading = true | |
| 564 | + try { | |
| 565 | + const result = await request({ | |
| 566 | + url: '/api/Extend/LqKdKdjlb', | |
| 567 | + method: 'POST', | |
| 568 | + data: formData | |
| 569 | + }) | |
| 570 | + | |
| 571 | + if (result.code === 200) { | |
| 572 | + this.$message.success('对冲成功!') | |
| 573 | + this.handleClose() | |
| 574 | + this.$emit('refresh') | |
| 575 | + } else { | |
| 576 | + this.$message.error(result.msg || '对冲失败,请重试') | |
| 577 | + } | |
| 578 | + } catch (error) { | |
| 579 | + console.error('对冲失败:', error) | |
| 580 | + this.$message.error('网络错误,请稍后重试') | |
| 581 | + } finally { | |
| 582 | + this.submitLoading = false | |
| 583 | + } | |
| 584 | + }, | |
| 585 | + // 关闭弹窗 | |
| 586 | + handleClose() { | |
| 587 | + this.visible = false | |
| 588 | + this.dataForm = { | |
| 589 | + id: '', | |
| 590 | + djmd: '', | |
| 591 | + djmdName: '', | |
| 592 | + kdhy: '', | |
| 593 | + kdhyc: '', | |
| 594 | + kdhysjh: '', | |
| 595 | + kdrq: '', | |
| 596 | + gjlx: '', | |
| 597 | + jsj: '', | |
| 598 | + hgjg: '', | |
| 599 | + fkyy: '', | |
| 600 | + zdyj: '', | |
| 601 | + sfyj: '', | |
| 602 | + jj: '', | |
| 603 | + bz: '', | |
| 604 | + activityId: '', | |
| 605 | + appointmentId: '', | |
| 606 | + lqKdPxmxList: [] | |
| 607 | + } | |
| 608 | + this.billingId = null | |
| 609 | + } | |
| 610 | + } | |
| 611 | +} | |
| 612 | +</script> | |
| 613 | + | |
| 614 | +<style lang="scss" scoped> | |
| 615 | +.dialog-footer { | |
| 616 | + text-align: right; | |
| 617 | + padding: 20px 0; | |
| 618 | +} | |
| 619 | + | |
| 620 | +.dialog-footer .el-button { | |
| 621 | + margin-left: 10px; | |
| 622 | +} | |
| 623 | +</style> | |
| 624 | + | ... | ... |
antis-ncc-admin/src/views/lqKdKdjlb/index.vue
| ... | ... | @@ -506,7 +506,7 @@ |
| 506 | 506 | </el-table-column> |
| 507 | 507 | |
| 508 | 508 | <!-- 操作 --> |
| 509 | - <el-table-column label="操作" width="180" align="left" fixed="right"> | |
| 509 | + <el-table-column label="操作" width="240" align="left" fixed="right"> | |
| 510 | 510 | <template slot-scope="scope"> |
| 511 | 511 | <div class="action-buttons"> |
| 512 | 512 | <el-button |
| ... | ... | @@ -530,6 +530,7 @@ |
| 530 | 530 | > |
| 531 | 531 | 删除 |
| 532 | 532 | </el-button> |
| 533 | + <!-- <el-button v-if="scope.row.sfyj >= 0" type="text" @click="handleHedge(scope.row.id)">对冲</el-button> --> | |
| 533 | 534 | </div> |
| 534 | 535 | </template> |
| 535 | 536 | </el-table-column> |
| ... | ... | @@ -542,6 +543,7 @@ |
| 542 | 543 | <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> |
| 543 | 544 | <LqKdKdjlbDetail ref="detailDialog" /> |
| 544 | 545 | <MemberCreateDialog :visible.sync="memberCreateVisible" @success="handleMemberCreateSuccess" /> |
| 546 | + <HedgeDialog ref="hedgeDialog" @refresh="refresh" /> | |
| 545 | 547 | </div> |
| 546 | 548 | </template> |
| 547 | 549 | <script> |
| ... | ... | @@ -551,10 +553,11 @@ import NCCForm from './Form' |
| 551 | 553 | import ExportBox from './ExportBox' |
| 552 | 554 | import LqKdKdjlbDetail from './detail' |
| 553 | 555 | import MemberCreateDialog from './MemberCreateDialog' |
| 556 | +import HedgeDialog from './hedge-dialog' | |
| 554 | 557 | import { previewDataInterface } from '@/api/systemData/dataInterface' |
| 555 | 558 | import { number } from 'echarts/lib/export' |
| 556 | 559 | export default { |
| 557 | - components: { NCCForm, ExportBox, MemberCreateDialog, LqKdKdjlbDetail }, | |
| 560 | + components: { NCCForm, ExportBox, MemberCreateDialog, LqKdKdjlbDetail, HedgeDialog }, | |
| 558 | 561 | data() { |
| 559 | 562 | return { |
| 560 | 563 | kdhyLoading: false, |
| ... | ... | @@ -885,7 +888,9 @@ export default { |
| 885 | 888 | }, |
| 886 | 889 | refresh(isrRefresh) { |
| 887 | 890 | this.formVisible = false |
| 888 | - if (isrRefresh) this.initData() | |
| 891 | + if (isrRefresh) { | |
| 892 | + this.initData() | |
| 893 | + } | |
| 889 | 894 | }, |
| 890 | 895 | reset() { |
| 891 | 896 | for (let key in this.query) { |
| ... | ... | @@ -934,6 +939,10 @@ export default { |
| 934 | 939 | handleDjmdChange() { |
| 935 | 940 | this.query.jksId = undefined; // 清空健康师选择 |
| 936 | 941 | this.getjksOptions(); |
| 942 | + }, | |
| 943 | + // 处理对冲 | |
| 944 | + handleHedge(billingId) { | |
| 945 | + this.$refs.hedgeDialog.init(billingId) | |
| 937 | 946 | } |
| 938 | 947 | } |
| 939 | 948 | } | ... | ... |
antis-ncc-admin/src/views/lqKhxx/index.vue
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <div class="NCC-common-layout-center"> |
| 4 | 4 | <!-- 现代化筛选卡片 --> |
| 5 | 5 | <el-card class="search-card" :class="{ 'search-card-animated': searchCardMounted }" shadow="never"> |
| 6 | - <el-form @submit.native.prevent label-width="80px" size="small"> | |
| 6 | + <el-form @submit.native.prevent size="small"> | |
| 7 | 7 | <!-- 第一行:基础筛选 --> |
| 8 | 8 | <el-row :gutter="16" class="search-row search-row-1"> |
| 9 | 9 | <el-col :span="5"> | ... | ... |
antis-ncc-admin/src/views/statisticsList/form2.vue
| ... | ... | @@ -119,7 +119,7 @@ |
| 119 | 119 | {{ scope.row.createUserName || '无' }} |
| 120 | 120 | </template> |
| 121 | 121 | </el-table-column> |
| 122 | - <!-- <el-table-column label="操作" width="120" fixed="right"> | |
| 122 | + <el-table-column label="操作" width="120" fixed="right"> | |
| 123 | 123 | <template slot-scope="scope"> |
| 124 | 124 | <el-button |
| 125 | 125 | type="danger" |
| ... | ... | @@ -131,7 +131,7 @@ |
| 131 | 131 | 清空欠款 |
| 132 | 132 | </el-button> |
| 133 | 133 | </template> |
| 134 | - </el-table-column> --> | |
| 134 | + </el-table-column> | |
| 135 | 135 | </NCC-table> |
| 136 | 136 | |
| 137 | 137 | <!-- 分页组件 --> | ... | ... |
antis-ncc-admin/src/views/wageManagement/assistants.vue
| ... | ... | @@ -872,15 +872,11 @@ export default { |
| 872 | 872 | const response = await importAssistantSalaryFromExcel(this.importFile) |
| 873 | 873 | if (response.code === 200) { |
| 874 | 874 | const result = response.data || response |
| 875 | - let message = '导入成功' | |
| 876 | - if (result.successCount !== undefined) { | |
| 877 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 878 | - } | |
| 879 | - this.$message.success(message) | |
| 875 | + this.$message.success( result.message || '导入成功') | |
| 880 | 876 | this.handleImportDialogClose() |
| 881 | 877 | this.getList() |
| 882 | 878 | } else { |
| 883 | - this.$message.error(response.msg || '导入失败') | |
| 879 | + this.$message.error(response.message || '导入失败') | |
| 884 | 880 | } |
| 885 | 881 | } catch (error) { |
| 886 | 882 | console.error('导入失败:', error) | ... | ... |
antis-ncc-admin/src/views/wageManagement/business-unit-managers.vue
| ... | ... | @@ -780,15 +780,11 @@ export default { |
| 780 | 780 | const response = await importBusinessUnitManagerSalaryFromExcel(this.importFile) |
| 781 | 781 | if (response.code === 200) { |
| 782 | 782 | const result = response.data || response |
| 783 | - let message = '导入成功' | |
| 784 | - if (result.successCount !== undefined) { | |
| 785 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 786 | - } | |
| 787 | - this.$message.success(message) | |
| 783 | + this.$message.success( result.message || '导入成功') | |
| 788 | 784 | this.handleImportDialogClose() |
| 789 | 785 | this.getList() |
| 790 | 786 | } else { |
| 791 | - this.$message.error(response.msg || '导入失败') | |
| 787 | + this.$message.error(response.message || '导入失败') | |
| 792 | 788 | } |
| 793 | 789 | } catch (error) { |
| 794 | 790 | console.error('导入失败:', error) | ... | ... |
antis-ncc-admin/src/views/wageManagement/cienceTeacher.vue
| ... | ... | @@ -991,15 +991,11 @@ export default { |
| 991 | 991 | const response = await importTechTeacherSalaryFromExcel(this.importFile) |
| 992 | 992 | if (response.code === 200) { |
| 993 | 993 | const result = response.data || response |
| 994 | - let message = '导入成功' | |
| 995 | - if (result.successCount !== undefined) { | |
| 996 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 997 | - } | |
| 998 | - this.$message.success(message) | |
| 994 | + this.$message.success( result.message || '导入成功') | |
| 999 | 995 | this.handleImportDialogClose() |
| 1000 | 996 | this.getList() |
| 1001 | 997 | } else { |
| 1002 | - this.$message.error(response.msg || '导入失败') | |
| 998 | + this.$message.error(response.message || '导入失败') | |
| 1003 | 999 | } |
| 1004 | 1000 | } catch (error) { |
| 1005 | 1001 | console.error('导入失败:', error) | ... | ... |
antis-ncc-admin/src/views/wageManagement/director.vue
| ... | ... | @@ -837,15 +837,11 @@ export default { |
| 837 | 837 | const response = await importDirectorSalaryFromExcel(this.importFile) |
| 838 | 838 | if (response.code === 200) { |
| 839 | 839 | const result = response.data || response |
| 840 | - let message = '导入成功' | |
| 841 | - if (result.successCount !== undefined) { | |
| 842 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 843 | - } | |
| 844 | - this.$message.success(message) | |
| 840 | + this.$message.success( result.message || '导入成功') | |
| 845 | 841 | this.handleImportDialogClose() |
| 846 | 842 | this.getList() |
| 847 | 843 | } else { |
| 848 | - this.$message.error(response.msg || '导入失败') | |
| 844 | + this.$message.error(response.message || '导入失败') | |
| 849 | 845 | } |
| 850 | 846 | } catch (error) { |
| 851 | 847 | console.error('导入失败:', error) | ... | ... |
antis-ncc-admin/src/views/wageManagement/healthCoach.vue
| ... | ... | @@ -1186,15 +1186,11 @@ export default { |
| 1186 | 1186 | const response = await importHealthCoachSalaryFromExcel(this.importFile) |
| 1187 | 1187 | if (response.code === 200) { |
| 1188 | 1188 | const result = response.data || response |
| 1189 | - let message = '导入成功' | |
| 1190 | - if (result.successCount !== undefined) { | |
| 1191 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 1192 | - } | |
| 1193 | - this.$message.success(message) | |
| 1189 | + this.$message.success( result.message || '导入成功') | |
| 1194 | 1190 | this.handleImportDialogClose() |
| 1195 | 1191 | this.getList() |
| 1196 | 1192 | } else { |
| 1197 | - this.$message.error(response.msg || '导入失败') | |
| 1193 | + this.$message.error(response.message || '导入失败') | |
| 1198 | 1194 | } |
| 1199 | 1195 | } catch (error) { |
| 1200 | 1196 | console.error('导入失败:', error) | ... | ... |
antis-ncc-admin/src/views/wageManagement/major-project-directors.vue
| ... | ... | @@ -771,15 +771,11 @@ export default { |
| 771 | 771 | const response = await importMajorProjectDirectorSalaryFromExcel(this.importFile) |
| 772 | 772 | if (response.code === 200) { |
| 773 | 773 | const result = response.data || response |
| 774 | - let message = '导入成功' | |
| 775 | - if (result.successCount !== undefined) { | |
| 776 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 777 | - } | |
| 778 | - this.$message.success(message) | |
| 774 | + this.$message.success( result.message || '导入成功') | |
| 779 | 775 | this.handleImportDialogClose() |
| 780 | 776 | this.getList() |
| 781 | 777 | } else { |
| 782 | - this.$message.error(response.msg || '导入失败') | |
| 778 | + this.$message.error(response.message || '导入失败') | |
| 783 | 779 | } |
| 784 | 780 | } catch (error) { |
| 785 | 781 | console.error('导入失败:', error) | ... | ... |
antis-ncc-admin/src/views/wageManagement/major-project-teachers.vue
| ... | ... | @@ -814,15 +814,11 @@ export default { |
| 814 | 814 | const response = await importMajorProjectTeacherSalaryFromExcel(this.importFile) |
| 815 | 815 | if (response.code === 200) { |
| 816 | 816 | const result = response.data || response |
| 817 | - let message = '导入成功' | |
| 818 | - if (result.successCount !== undefined) { | |
| 819 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 820 | - } | |
| 821 | - this.$message.success(message) | |
| 817 | + this.$message.success( result.message || '导入成功') | |
| 822 | 818 | this.handleImportDialogClose() |
| 823 | 819 | this.getList() |
| 824 | 820 | } else { |
| 825 | - this.$message.error(response.msg || '导入失败') | |
| 821 | + this.$message.error(response.message || '导入失败') | |
| 826 | 822 | } |
| 827 | 823 | } catch (error) { |
| 828 | 824 | console.error('导入失败:', error) | ... | ... |
antis-ncc-admin/src/views/wageManagement/shop.vue
| ... | ... | @@ -1016,15 +1016,11 @@ export default { |
| 1016 | 1016 | const response = await importStoreManagerSalaryFromExcel(this.importFile) |
| 1017 | 1017 | if (response.code === 200) { |
| 1018 | 1018 | const result = response.data || response |
| 1019 | - let message = '导入成功' | |
| 1020 | - if (result.successCount !== undefined) { | |
| 1021 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 1022 | - } | |
| 1023 | - this.$message.success(message) | |
| 1019 | + this.$message.success( result.message || '导入成功') | |
| 1024 | 1020 | this.handleImportDialogClose() |
| 1025 | 1021 | this.getList() |
| 1026 | 1022 | } else { |
| 1027 | - this.$message.error(response.msg || '导入失败') | |
| 1023 | + this.$message.error(response.message || '导入失败') | |
| 1028 | 1024 | } |
| 1029 | 1025 | } catch (error) { |
| 1030 | 1026 | console.error('导入失败:', error) | ... | ... |
antis-ncc-admin/src/views/wageManagement/tech-general-managers.vue
| ... | ... | @@ -800,15 +800,11 @@ export default { |
| 800 | 800 | const response = await importTechGeneralManagerSalaryFromExcel(this.importFile) |
| 801 | 801 | if (response.code === 200) { |
| 802 | 802 | const result = response.data || response |
| 803 | - let message = '导入成功' | |
| 804 | - if (result.successCount !== undefined) { | |
| 805 | - message = `导入成功:新增${result.insertCount || 0}条,更新${result.updateCount || 0}条,跳过${result.skippedCount || 0}条` | |
| 806 | - } | |
| 807 | - this.$message.success(message) | |
| 803 | + this.$message.success( result.message || '导入成功') | |
| 808 | 804 | this.handleImportDialogClose() |
| 809 | 805 | this.getList() |
| 810 | 806 | } else { |
| 811 | - this.$message.error(response.msg || '导入失败') | |
| 807 | + this.$message.error(response.message || '导入失败') | |
| 812 | 808 | } |
| 813 | 809 | } catch (error) { |
| 814 | 810 | console.error('导入失败:', error) | ... | ... |