|
|
@@ -50,7 +50,7 @@
|
|
|
>
|
|
|
{{ code }}
|
|
|
</el-tag>
|
|
|
-
|
|
|
+
|
|
|
<!-- 输入框 -->
|
|
|
<el-input
|
|
|
ref="tagInput"
|
|
|
@@ -65,7 +65,7 @@
|
|
|
@focus="inputVisible = true"
|
|
|
clearable
|
|
|
/>
|
|
|
-
|
|
|
+
|
|
|
<!-- 添加按钮(当没有输入时显示) -->
|
|
|
<el-button
|
|
|
v-if="!inputVisible && queryParams.orderCodes.length > 0"
|
|
|
@@ -78,11 +78,11 @@
|
|
|
添加订单号
|
|
|
</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!-- 输入提示 -->
|
|
|
<div class="input-tips">
|
|
|
<span class="tip-text">
|
|
|
- 支持:回车、逗号、空格分隔 |
|
|
|
+ 支持:回车、逗号、空格分隔 |
|
|
|
已添加 {{ queryParams.orderCodes.length }} 个订单号
|
|
|
<span v-if="maxOrderCodes > 0"> (最多{{ maxOrderCodes }}个)</span>
|
|
|
</span>
|
|
|
@@ -220,7 +220,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+
|
|
|
<el-form-item label="是否首次进线" prop="isFirst">
|
|
|
<el-select filterable v-model="queryParams.isFirst" placeholder="状态" clearable size="small">
|
|
|
<el-option
|
|
|
@@ -414,7 +414,7 @@
|
|
|
plain
|
|
|
icon="el-icon-phone"
|
|
|
size="mini"
|
|
|
-
|
|
|
+
|
|
|
@click="setErpPhone"
|
|
|
v-hasPermi="['his:storeOrder:createErpOrder']"
|
|
|
>设置推送手机</el-button>
|
|
|
@@ -572,12 +572,12 @@
|
|
|
<div v-if="currentSort.prop" class="sort-info">
|
|
|
<el-tag size="small" type="info" closable @close="clearSort">
|
|
|
<i class="el-icon-sort"></i>
|
|
|
- 当前排序:{{ getSortLabel(currentSort.prop) }}
|
|
|
+ 当前排序:{{ getSortLabel(currentSort.prop) }}
|
|
|
{{ currentSort.order === 'ascending' ? '升序' : '降序' }}
|
|
|
</el-tag>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="mini"
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
@click="clearSort"
|
|
|
style="margin-left: 8px; color: #909399;"
|
|
|
>
|
|
|
@@ -675,7 +675,7 @@
|
|
|
<el-button @click="uploadStatus.open = false">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+
|
|
|
<!-- 设置推送手机对话框 -->
|
|
|
<el-dialog :title="erpPhone.title" :visible.sync="erpPhone.open" width="600px" append-to-body>
|
|
|
<div style="margin-bottom: 20px;">
|
|
|
@@ -684,9 +684,9 @@
|
|
|
<el-table :data="phoneList" border style="width: 100%">
|
|
|
<el-table-column prop="phone" label="手机号" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
- v-if="scope.row.editing"
|
|
|
- v-model="scope.row.phone"
|
|
|
+ <el-input
|
|
|
+ v-if="scope.row.editing"
|
|
|
+ v-model="scope.row.phone"
|
|
|
placeholder="请输入手机号"
|
|
|
@blur="validatePhone(scope.row)"
|
|
|
@keyup.enter.native="handleSavePhone(scope.$index)"
|
|
|
@@ -696,27 +696,27 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="300">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- v-if="scope.row.editing"
|
|
|
- type="success"
|
|
|
- size="mini"
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.editing"
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
@click="handleSavePhone(scope.$index)"
|
|
|
>保存</el-button>
|
|
|
- <el-button
|
|
|
- v-if="scope.row.editing"
|
|
|
- type="info"
|
|
|
- size="mini"
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.editing"
|
|
|
+ type="info"
|
|
|
+ size="mini"
|
|
|
@click="handleCancelEdit(scope.$index)"
|
|
|
>取消</el-button>
|
|
|
- <el-button
|
|
|
- v-if="!scope.row.editing"
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
+ <el-button
|
|
|
+ v-if="!scope.row.editing"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
@click="handleEditPhone(scope.$index)"
|
|
|
>修改</el-button>
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- size="mini"
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ size="mini"
|
|
|
@click="handleDeletePhone(scope.$index)"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
@@ -747,9 +747,9 @@
|
|
|
<div v-loading="erpAccountDialog.loading">
|
|
|
<el-form :model="erpAccountForm" label-width="100px">
|
|
|
<el-form-item label="ERP账户" required>
|
|
|
- <el-select
|
|
|
- v-model="erpAccountForm.selectedAccount"
|
|
|
- placeholder="请选择ERP账户"
|
|
|
+ <el-select
|
|
|
+ v-model="erpAccountForm.selectedAccount"
|
|
|
+ placeholder="请选择ERP账户"
|
|
|
style="width: 100%"
|
|
|
filterable
|
|
|
>
|
|
|
@@ -765,7 +765,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
+
|
|
|
<!-- 订单统计信息 -->
|
|
|
<div class="order-summary" v-if="orderSummary">
|
|
|
<el-divider content-position="left">订单统计</el-divider>
|
|
|
@@ -791,11 +791,11 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="cancelErpAccountDialog">取 消</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
@click="confirmCreateErpOrder"
|
|
|
:disabled="!erpAccountForm.selectedAccount"
|
|
|
:loading="erpAccountDialog.submitting"
|
|
|
@@ -811,12 +811,12 @@
|
|
|
<el-button type="default" size="small" @click="unselectAllFields">全不选</el-button>
|
|
|
<el-button type="success" size="small" @click="selectDefaultFields">选择常用</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="field-selection-container">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="8" v-for="field in exportFieldOptions" :key="field.key">
|
|
|
- <el-checkbox
|
|
|
- v-model="field.checked"
|
|
|
+ <el-checkbox
|
|
|
+ v-model="field.checked"
|
|
|
:label="field.label"
|
|
|
style="margin-bottom: 12px; width: 100%;"
|
|
|
>
|
|
|
@@ -825,7 +825,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="field-count-info" style="margin-top: 20px; padding: 10px; background: #f5f7fa; border-radius: 4px;">
|
|
|
<i class="el-icon-info"></i>
|
|
|
<span v-if="getSelectedFieldsCount() > 0">
|
|
|
@@ -837,11 +837,11 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="cancelExportFieldDialog">取 消</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
@click="confirmExportFields"
|
|
|
>确认导出</el-button>
|
|
|
</div>
|
|
|
@@ -880,11 +880,11 @@ export default {
|
|
|
prop: null,
|
|
|
order: null
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 排序字段映射
|
|
|
sortFieldMap: {
|
|
|
'companyUserName': '员工',
|
|
|
- 'packageName': '套餐名称',
|
|
|
+ 'packageName': '套餐名称',
|
|
|
'payPrice': '应收金额',
|
|
|
'payMoney': '实收金额',
|
|
|
'createTime': '下单时间'
|
|
|
@@ -898,7 +898,7 @@ export default {
|
|
|
},
|
|
|
// 输入框是否可见
|
|
|
inputVisible: false,
|
|
|
-
|
|
|
+
|
|
|
// 无效订单号对话框
|
|
|
showInvalidDialog: false,
|
|
|
// 当前输入值
|
|
|
@@ -937,7 +937,7 @@ export default {
|
|
|
title:"订单详情",
|
|
|
open:false,
|
|
|
},
|
|
|
- sourceOptions:[],
|
|
|
+ sourceOptions:[],
|
|
|
importExpress: {
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
@@ -1226,13 +1226,13 @@ export default {
|
|
|
// 新增排序处理方法
|
|
|
handleSortChange({ column, prop, order }) {
|
|
|
console.log('排序变化:', { column, prop, order });
|
|
|
-
|
|
|
+
|
|
|
// 更新当前排序状态
|
|
|
this.currentSort = {
|
|
|
prop: prop,
|
|
|
order: order
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
// 更新查询参数
|
|
|
if (order) {
|
|
|
this.queryParams.sortField = prop;
|
|
|
@@ -1241,11 +1241,11 @@ export default {
|
|
|
this.queryParams.sortField = null;
|
|
|
this.queryParams.sortOrder = null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 重新查询数据
|
|
|
this.queryParams.pageNum = 1; // 重置到第一页
|
|
|
this.getList();
|
|
|
-
|
|
|
+
|
|
|
// 显示排序提示
|
|
|
if (order) {
|
|
|
const fieldLabel = this.getSortLabel(prop);
|
|
|
@@ -1253,12 +1253,12 @@ export default {
|
|
|
this.$message.success(`已按${fieldLabel}${orderLabel}排序`);
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 获取排序字段的中文标签
|
|
|
getSortLabel(prop) {
|
|
|
return this.sortFieldMap[prop] || prop;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 清除排序
|
|
|
clearSort() {
|
|
|
this.currentSort = {
|
|
|
@@ -1281,38 +1281,38 @@ export default {
|
|
|
// 修改查询列表方法,添加排序参数
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
-
|
|
|
+
|
|
|
// 处理多选参数
|
|
|
if(this.payTypeArr.length>0){
|
|
|
this.queryParams.payType=this.payTypeArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.payType=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.scheduleIdArr.length>0){
|
|
|
this.queryParams.scheduleId=this.scheduleIdArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.scheduleId=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.buyTypeArr.length>0){
|
|
|
this.queryParams.orderBuyType=this.buyTypeArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.orderbuyType=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.channelArr.length>0){
|
|
|
this.queryParams.orderChannel=this.channelArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.orderChannel=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.qwSubjectArr.length>0){
|
|
|
this.queryParams.qwSubject=this.qwSubjectArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.qwSubject=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 处理公司参数
|
|
|
if(this.companyIds && this.companyIds.length>1){
|
|
|
this.queryParams.companyIds = this.companyIds
|
|
|
@@ -1322,16 +1322,16 @@ export default {
|
|
|
this.queryParams.companyId = this.companyId
|
|
|
this.queryParams.companyIds = null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 处理订单号数组
|
|
|
if (this.queryParams.orderCodes && this.queryParams.orderCodes.length > 0) {
|
|
|
this.queryParams.orderCodeList = this.queryParams.orderCodes.join(',');
|
|
|
} else {
|
|
|
this.queryParams.orderCodeList = null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
console.log('查询参数:', this.queryParams);
|
|
|
-
|
|
|
+
|
|
|
listOrder(this.queryParams).then(response => {
|
|
|
this.orderList = response.rows;
|
|
|
this.total = response.total;
|
|
|
@@ -1346,15 +1346,15 @@ export default {
|
|
|
this.payRemainTotal = "0"
|
|
|
this.productInfo = response.productInfo;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.loading = false;
|
|
|
-
|
|
|
+
|
|
|
if(response.msg == 'jnmy'){
|
|
|
this.SFDFopen = true;
|
|
|
} else{
|
|
|
this.SFDFopen = false;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 如果有排序,显示排序结果提示
|
|
|
if (this.currentSort.prop) {
|
|
|
const fieldLabel = this.getSortLabel(this.currentSort.prop);
|
|
|
@@ -1370,72 +1370,72 @@ export default {
|
|
|
// 处理键盘按下事件
|
|
|
handleKeyDown(event) {
|
|
|
const { key, target } = event
|
|
|
-
|
|
|
+
|
|
|
// 处理退格键删除标签
|
|
|
if (key === 'Backspace' && !target.value && this.queryParams.orderCodes.length > 0) {
|
|
|
event.preventDefault()
|
|
|
this.removeOrderCode(this.queryParams.orderCodes.length - 1)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 处理分隔符
|
|
|
if ([',', ',', ' ', 'Enter'].includes(key)) {
|
|
|
event.preventDefault()
|
|
|
this.handleInputConfirm()
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 处理键盘抬起事件(实时分割输入)
|
|
|
handleKeyUp(event) {
|
|
|
const value = event.target.value
|
|
|
-
|
|
|
+
|
|
|
// 检查是否包含分隔符
|
|
|
if (/[,,\s]/.test(value)) {
|
|
|
this.handleInputConfirm()
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 确认输入
|
|
|
handleInputConfirm() {
|
|
|
const inputValue = this.currentInput.trim()
|
|
|
-
|
|
|
+
|
|
|
if (inputValue) {
|
|
|
// 分割多个订单号
|
|
|
const codes = inputValue.split(/[,,\s]+/).filter(code => code.trim())
|
|
|
-
|
|
|
+
|
|
|
codes.forEach(code => {
|
|
|
this.addOrderCode(code.trim())
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.currentInput = ''
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 添加订单号
|
|
|
addOrderCode(code) {
|
|
|
if (!code) return
|
|
|
-
|
|
|
+
|
|
|
// 检查数量限制
|
|
|
if (this.maxOrderCodes > 0 && this.queryParams.orderCodes.length >= this.maxOrderCodes) {
|
|
|
this.$message.warning(`最多只能添加 ${this.maxOrderCodes} 个订单号`)
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 检查重复
|
|
|
if (this.queryParams.orderCodes.includes(code)) {
|
|
|
this.$message.warning(`订单号 "${code}" 已存在`)
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 添加到列表
|
|
|
this.queryParams.orderCodes.push(code)
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 删除订单号
|
|
|
removeOrderCode(index) {
|
|
|
this.queryParams.orderCodes.splice(index, 1)
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 清空所有标签
|
|
|
clearAllTags() {
|
|
|
this.$confirm('确认清空所有订单号吗?', '提示', {
|
|
|
@@ -1476,7 +1476,7 @@ export default {
|
|
|
this.erpSettingType = 'push'
|
|
|
this.calculateOrderSummary();
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//获取ERP账户列表
|
|
|
async getErpAccountList() {
|
|
|
try {
|
|
|
@@ -1494,7 +1494,7 @@ export default {
|
|
|
this.$message.error(response.msg || '获取ERP账户列表失败');
|
|
|
this.erpAccountList = [];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
} catch (error) {
|
|
|
console.error('获取ERP账户列表失败:', error);
|
|
|
this.$message.error('获取ERP账户列表失败');
|
|
|
@@ -1503,13 +1503,13 @@ export default {
|
|
|
this.erpAccountDialog.loading = false;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 新增:计算订单统计信息
|
|
|
calculateOrderSummary() {
|
|
|
let selectedCount = 0;
|
|
|
let totalAmount = 0;
|
|
|
let queryCount = this.total || 0;
|
|
|
-
|
|
|
+
|
|
|
if (this.ids.length > 0) {
|
|
|
// 如果有选中的订单,统计选中的订单
|
|
|
selectedCount = this.ids.length;
|
|
|
@@ -1525,14 +1525,14 @@ export default {
|
|
|
totalAmount += parseFloat(order.payMoney || 0);
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.orderSummary = {
|
|
|
selectedCount,
|
|
|
totalAmount: totalAmount.toFixed(2),
|
|
|
queryCount
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//确认创建ERP订单
|
|
|
confirmCreateErpOrder() {
|
|
|
if (!this.erpAccountForm.selectedAccount) {
|
|
|
@@ -1542,8 +1542,8 @@ export default {
|
|
|
console.log("-----------------",this.erpSettingType)
|
|
|
if(this.erpSettingType == 'set'){
|
|
|
this.$confirm(
|
|
|
- `确认将订单设置ERP账户为"${this.erpAccountForm.selectedAccount}"吗?`,
|
|
|
- '确认',
|
|
|
+ `确认将订单设置ERP账户为"${this.erpAccountForm.selectedAccount}"吗?`,
|
|
|
+ '确认',
|
|
|
{
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -1554,8 +1554,8 @@ export default {
|
|
|
});
|
|
|
} else if(this.erpSettingType == 'push'){
|
|
|
this.$confirm(
|
|
|
- `确认将订单推送到ERP账户"${this.erpAccountForm.selectedAccount}"吗?`,
|
|
|
- '确认推送',
|
|
|
+ `确认将订单推送到ERP账户"${this.erpAccountForm.selectedAccount}"吗?`,
|
|
|
+ '确认推送',
|
|
|
{
|
|
|
confirmButtonText: '确定推送',
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -1569,12 +1569,12 @@ export default {
|
|
|
|
|
|
async executSetErpOrder() {
|
|
|
this.erpAccountDialog.submitting = true;
|
|
|
-
|
|
|
+
|
|
|
try {
|
|
|
let param = {
|
|
|
loginAccount: this.erpAccountForm.selectedAccount
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
if (this.ids.length > 0) {
|
|
|
// 如果有选中的订单,只推送选中的
|
|
|
param.orderIds = this.ids;
|
|
|
@@ -1605,11 +1605,11 @@ export default {
|
|
|
} else {
|
|
|
this.queryParams.qwSubject = null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 合并查询参数
|
|
|
param = { ...param, ...this.queryParams };
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const response = await batchSetErpOrder(param);
|
|
|
if (response.code === 200) {
|
|
|
this.$message.success('订单ERP账号设置成功');
|
|
|
@@ -1626,16 +1626,16 @@ export default {
|
|
|
this.erpAccountDialog.submitting = false;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//执行创建ERP订单
|
|
|
async executeCreateErpOrder() {
|
|
|
this.erpAccountDialog.submitting = true;
|
|
|
-
|
|
|
+
|
|
|
try {
|
|
|
let param = {
|
|
|
loginAccount: this.erpAccountForm.selectedAccount
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
if (this.ids.length > 0) {
|
|
|
// 如果有选中的订单,只推送选中的
|
|
|
param.orderIds = this.ids;
|
|
|
@@ -1666,11 +1666,11 @@ export default {
|
|
|
} else {
|
|
|
this.queryParams.qwSubject = null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 合并查询参数
|
|
|
param = { ...param, ...this.queryParams };
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const response = await batchCreateErpOrder(param);
|
|
|
if (response.code === 200) {
|
|
|
this.$message.success('ERP订单创建成功');
|
|
|
@@ -1687,7 +1687,7 @@ export default {
|
|
|
this.erpAccountDialog.submitting = false;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 新增:取消ERP账户选择对话框
|
|
|
cancelErpAccountDialog() {
|
|
|
this.erpAccountDialog.open = false;
|
|
|
@@ -1737,7 +1737,7 @@ export default {
|
|
|
param = this.queryParams;
|
|
|
param.erpPhone=this.erpPhoneValue;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
editErpPhone(param).then(response=>{
|
|
|
this.msgSuccess("修改成功");
|
|
|
this.setPhoneOpen = false;
|
|
|
@@ -1764,7 +1764,7 @@ export default {
|
|
|
originalPhone: phone.trim()
|
|
|
}));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 保存原始数据用于取消操作
|
|
|
this.originalPhoneList = this.phoneList;
|
|
|
});
|
|
|
@@ -1795,7 +1795,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
// 检查是否重复
|
|
|
- const duplicateIndex = this.phoneList.findIndex((item, idx) =>
|
|
|
+ const duplicateIndex = this.phoneList.findIndex((item, idx) =>
|
|
|
idx !== index && item.phone === phone
|
|
|
);
|
|
|
if (duplicateIndex !== -1) {
|
|
|
@@ -1846,17 +1846,17 @@ export default {
|
|
|
this.$message.error('请先保存正在编辑的手机号');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 检查是否有空的手机号
|
|
|
const emptyPhone = this.phoneList.find(item => !item.phone.trim());
|
|
|
if (emptyPhone) {
|
|
|
this.$message.error('存在空的手机号,请删除或填写完整');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 构造手机号列表
|
|
|
const phoneList = this.phoneList.map(item => item.phone);
|
|
|
-
|
|
|
+
|
|
|
// 调用保存接口
|
|
|
saveErpPhone(phoneList).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
@@ -1876,7 +1876,7 @@ export default {
|
|
|
this.phoneList = JSON.parse(JSON.stringify(this.originalPhoneList));
|
|
|
this.erpPhone.open = false;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
handleImportExpress() {
|
|
|
this.importExpress.title = "导入";
|
|
|
this.importExpress.open = true;
|
|
|
@@ -1911,7 +1911,7 @@ export default {
|
|
|
this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
|
|
this.getList();
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 提交上传文件
|
|
|
submitFileFormExpress() {
|
|
|
this.$refs.importExpress.submit();
|
|
|
@@ -2108,7 +2108,7 @@ export default {
|
|
|
};
|
|
|
this.queryParams.sortField = null;
|
|
|
this.queryParams.sortOrder = null;
|
|
|
-
|
|
|
+
|
|
|
// 清除订单号标签
|
|
|
this.queryParams.orderCodes = [];
|
|
|
this.currentInput = '';
|
|
|
@@ -2120,7 +2120,7 @@ export default {
|
|
|
this.$refs.orderTable.clearSort();
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
@@ -2223,7 +2223,7 @@ export default {
|
|
|
}).then(response => {
|
|
|
console.log(response)
|
|
|
if(response.code==200){
|
|
|
-
|
|
|
+
|
|
|
that.msgSuccess(response.msg);
|
|
|
that.taskId=response.data;
|
|
|
that.time=setInterval(function(){
|
|
|
@@ -2245,7 +2245,7 @@ export default {
|
|
|
// 打开字段选择对话框
|
|
|
this.exportFieldDialog.open = true;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 导出字段选择相关方法
|
|
|
// 全选字段
|
|
|
selectAllFields() {
|
|
|
@@ -2253,22 +2253,22 @@ export default {
|
|
|
field.checked = true;
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 全不选字段
|
|
|
unselectAllFields() {
|
|
|
this.exportFieldOptions.forEach(field => {
|
|
|
field.checked = false;
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 选择常用字段
|
|
|
selectDefaultFields() {
|
|
|
// 先全不选
|
|
|
this.unselectAllFields();
|
|
|
// 然后选择常用字段
|
|
|
- const defaultFields = ['orderCode', 'prescribeCode', 'companyName', 'companyUserNickName',
|
|
|
- 'storeName', 'miniProgramName', 'userName', 'userPhone', 'userAddress', 'totalPrice',
|
|
|
- 'totalNum', 'payPrice', 'payMoney', 'createTime', 'payTime',
|
|
|
+ const defaultFields = ['orderCode', 'prescribeCode', 'companyName', 'companyUserNickName',
|
|
|
+ 'storeName', 'miniProgramName', 'userName', 'userPhone', 'userAddress', 'totalPrice',
|
|
|
+ 'totalNum', 'payPrice', 'payMoney', 'createTime', 'payTime',
|
|
|
'payType', 'status', 'packageName', 'patientName'];
|
|
|
this.exportFieldOptions.forEach(field => {
|
|
|
if (defaultFields.includes(field.key)) {
|
|
|
@@ -2276,22 +2276,22 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 获取已选择字段数量
|
|
|
getSelectedFieldsCount() {
|
|
|
return this.exportFieldOptions.filter(field => field.checked).length;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 取消导出字段选择
|
|
|
cancelExportFieldDialog() {
|
|
|
this.exportFieldDialog.open = false;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 确认导出字段
|
|
|
confirmExportFields() {
|
|
|
// 获取已选择的字段
|
|
|
const selectedFieldsArray = this.exportFieldOptions.filter(field => field.checked);
|
|
|
-
|
|
|
+
|
|
|
let selectedFields = '';
|
|
|
if (selectedFieldsArray.length === 0) {
|
|
|
// 如果没有选择任何字段,则导出全部字段(不传filter参数)
|
|
|
@@ -2300,51 +2300,51 @@ export default {
|
|
|
// 如果选择了字段,则只导出选中的字段
|
|
|
selectedFields = selectedFieldsArray.map(field => field.key).join(',');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 关闭弹窗
|
|
|
this.exportFieldDialog.open = false;
|
|
|
-
|
|
|
+
|
|
|
// 执行导出操作
|
|
|
this.doExportOrder(selectedFields);
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 执行导出操作
|
|
|
doExportOrder(selectedFields) {
|
|
|
var that = this;
|
|
|
-
|
|
|
+
|
|
|
// 处理查询参数
|
|
|
if(this.payTypeArr.length>0){
|
|
|
this.queryParams.payType=this.payTypeArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.payType=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.scheduleIdArr.length>0){
|
|
|
this.queryParams.scheduleId=this.scheduleIdArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.scheduleId=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.buyTypeArr.length>0){
|
|
|
this.queryParams.orderBuyType=this.buyTypeArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.orderbuyType=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.channelArr.length>0){
|
|
|
this.queryParams.orderChannel=this.channelArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.orderChannel=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.qwSubjectArr.length>0){
|
|
|
this.queryParams.qwSubject=this.qwSubjectArr.toString();
|
|
|
} else {
|
|
|
this.queryParams.qwSubject=null
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const queryParams = this.queryParams;
|
|
|
-
|
|
|
+
|
|
|
// 根据是否选择字段显示不同的确认消息
|
|
|
let confirmMessage = '';
|
|
|
if (selectedFields === null) {
|
|
|
@@ -2353,21 +2353,21 @@ export default {
|
|
|
const fieldCount = selectedFields.split(',').length;
|
|
|
confirmMessage = `确认导出选中的 ${fieldCount} 个字段的订单数据?`;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.$confirm(confirmMessage, "确认导出", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
this.exportLoading = true;
|
|
|
-
|
|
|
+
|
|
|
// 构建请求参数
|
|
|
const requestParams = {...queryParams};
|
|
|
// 只有当selectedFields不为null时才添加filter参数
|
|
|
if (selectedFields !== null) {
|
|
|
requestParams.filter = selectedFields;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return exportOrder2(requestParams);
|
|
|
}).then(response => {
|
|
|
console.log(response)
|
|
|
@@ -2414,7 +2414,7 @@ export default {
|
|
|
this.getTreeselect();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
// companyChange(val){
|
|
|
// console.log(val);
|
|
|
@@ -2578,15 +2578,15 @@ export default {
|
|
|
min-width: auto;
|
|
|
width: 100%;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.tags-wrapper {
|
|
|
min-height: 40px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.quick-actions {
|
|
|
flex-direction: column;
|
|
|
align-items: flex-start;
|
|
|
gap: 8px;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|