|
@@ -24,7 +24,6 @@
|
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- 信息表生成时间 -->
|
|
|
|
|
<el-form-item label="生成时间">
|
|
<el-form-item label="生成时间">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="createTimeRange"
|
|
v-model="createTimeRange"
|
|
@@ -38,25 +37,21 @@
|
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- 认领状态筛选 -->
|
|
|
|
|
<el-form-item label="认领状态" prop="claimStatus">
|
|
<el-form-item label="认领状态" prop="claimStatus">
|
|
|
<el-select v-model="queryParams.claimStatus" placeholder="请选择" clearable size="small" style="width: 120px">
|
|
<el-select v-model="queryParams.claimStatus" placeholder="请选择" clearable size="small" style="width: 120px">
|
|
|
<el-option label="未认领" :value="0" />
|
|
<el-option label="未认领" :value="0" />
|
|
|
<el-option label="已认领" :value="1" />
|
|
<el-option label="已认领" :value="1" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- 完善状态筛选 -->
|
|
|
|
|
<el-form-item label="完善状态" prop="completeStatus">
|
|
<el-form-item label="完善状态" prop="completeStatus">
|
|
|
<el-select v-model="queryParams.completeStatus" placeholder="请选择" clearable size="small" style="width: 120px">
|
|
<el-select v-model="queryParams.completeStatus" placeholder="请选择" clearable size="small" style="width: 120px">
|
|
|
<el-option label="未完善" :value="0" />
|
|
<el-option label="未完善" :value="0" />
|
|
|
<el-option label="已完善" :value="1" />
|
|
<el-option label="已完善" :value="1" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- 已购 -->
|
|
|
|
|
<el-form-item label="购买状态" prop="purchased">
|
|
<el-form-item label="购买状态" prop="purchased">
|
|
|
<el-checkbox v-model="queryParams.purchased">已购</el-checkbox>
|
|
<el-checkbox v-model="queryParams.purchased">已购</el-checkbox>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- 购买次数范围 -->
|
|
|
|
|
<el-form-item label="购买次数">
|
|
<el-form-item label="购买次数">
|
|
|
<el-input-number v-model="queryParams.minBuyCount" :min="0" size="small" style="width: 100px" controls-position="right" placeholder="最少" />
|
|
<el-input-number v-model="queryParams.minBuyCount" :min="0" size="small" style="width: 100px" controls-position="right" placeholder="最少" />
|
|
|
<span style="margin: 0 5px">-</span>
|
|
<span style="margin: 0 5px">-</span>
|
|
@@ -85,7 +80,7 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
- <!-- 表格 -->
|
|
|
|
|
|
|
+ <!-- 客户列表表格 -->
|
|
|
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="客户姓名" align="center" prop="customerName" />
|
|
<el-table-column label="客户姓名" align="center" prop="customerName" />
|
|
@@ -100,7 +95,6 @@
|
|
|
<template slot-scope="scope">{{ parseTime(scope.row.filingTime) }}</template>
|
|
<template slot-scope="scope">{{ parseTime(scope.row.filingTime) }}</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="归属销售" align="center" prop="companyUserName" />
|
|
<el-table-column label="归属销售" align="center" prop="companyUserName" />
|
|
|
- <!-- 修正:归属分组应使用 deptName -->
|
|
|
|
|
<el-table-column label="归属分组" align="center" prop="deptName" />
|
|
<el-table-column label="归属分组" align="center" prop="deptName" />
|
|
|
<el-table-column label="负责医生" align="center" prop="doctorName" />
|
|
<el-table-column label="负责医生" align="center" prop="doctorName" />
|
|
|
<el-table-column label="购买次数" align="center" prop="buyCount" />
|
|
<el-table-column label="购买次数" align="center" prop="buyCount" />
|
|
@@ -109,18 +103,14 @@
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
|
|
|
- <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.myCustomerFlag"
|
|
|
|
|
- @click="handleUpdate(scope.row)">修改
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.myCustomerFlag"
|
|
|
|
|
- @click="handleDelete(scope.row)">删除
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <!-- 认领按钮:无条件显示 -->
|
|
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.myCustomerFlag" @click="handleUpdate(scope.row)">修改</el-button>
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.myCustomerFlag" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-user" @click="handleClaim(scope.row)">认领客户</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-user" @click="handleClaim(scope.row)">认领客户</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handlePrescribe(scope.row)">查看处方</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handlePrescribe(scope.row)">查看处方</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-document" @click="handleCollection(scope.row)">查看信息采集</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-document" @click="handleCollection(scope.row)">查看信息采集</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-document-copy" @click="handleViewLog(scope.row)">认领记录</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-document-copy" @click="handleViewLog(scope.row)">认领记录</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-folder-add" @click="handleCreateOrder(scope.row)">制单</el-button>
|
|
<el-button size="mini" type="text" icon="el-icon-folder-add" @click="handleCreateOrder(scope.row)">制单</el-button>
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-view" @click="handleViewOrderList(scope.row)">查看订单列表</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -135,8 +125,9 @@
|
|
|
|
|
|
|
|
<!-- ========== 新增/编辑/详情 弹窗 ========== -->
|
|
<!-- ========== 新增/编辑/详情 弹窗 ========== -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body :close-on-click-modal="false">
|
|
<el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body :close-on-click-modal="false">
|
|
|
|
|
+ <!-- 内容不变,省略... -->
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px" size="small">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px" size="small">
|
|
|
- <!-- 第一行:客户姓名、性别、年龄、电话 -->
|
|
|
|
|
|
|
+ <!-- 第一行 -->
|
|
|
<div style="display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px;">
|
|
<div style="display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px;">
|
|
|
<el-form-item label="客户姓名" prop="customerName" style="flex: 1; min-width: 140px; margin-bottom: 0;">
|
|
<el-form-item label="客户姓名" prop="customerName" style="flex: 1; min-width: 140px; margin-bottom: 0;">
|
|
|
<el-input v-model="form.customerName" placeholder="请输入客户姓名" :disabled="isDetail"/>
|
|
<el-input v-model="form.customerName" placeholder="请输入客户姓名" :disabled="isDetail"/>
|
|
@@ -147,62 +138,52 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="年龄" prop="age" style="flex: 0.7; min-width: 120px; margin-bottom: 0;">
|
|
<el-form-item label="年龄" prop="age" style="flex: 0.7; min-width: 120px; margin-bottom: 0;">
|
|
|
- <el-input-number v-model="form.age" :min="18" :max="200" placeholder="年龄" controls-position="right"
|
|
|
|
|
- style="width: 100%" :disabled="isDetail"/>
|
|
|
|
|
|
|
+ <el-input-number v-model="form.age" :min="18" :max="200" placeholder="年龄" controls-position="right" style="width: 100%" :disabled="isDetail"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="电话" prop="phone" style="flex: 1.2; min-width: 150px; margin-bottom: 0;">
|
|
<el-form-item label="电话" prop="phone" style="flex: 1.2; min-width: 150px; margin-bottom: 0;">
|
|
|
<el-input v-model="form.phone" placeholder="请输入电话" :disabled="isDetail"/>
|
|
<el-input v-model="form.phone" placeholder="请输入电话" :disabled="isDetail"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <!-- 第二行:地址、建档时间 -->
|
|
|
|
|
|
|
+ <!-- 第二行 -->
|
|
|
<div style="display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px;">
|
|
<div style="display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px;">
|
|
|
<el-form-item label="地址" prop="address" style="flex: 2; min-width: 200px; margin-bottom: 0;">
|
|
<el-form-item label="地址" prop="address" style="flex: 2; min-width: 200px; margin-bottom: 0;">
|
|
|
<el-input v-model="form.address" placeholder="请输入地址" :disabled="isDetail"/>
|
|
<el-input v-model="form.address" placeholder="请输入地址" :disabled="isDetail"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="建档时间" prop="filingTime" style="flex: 1; min-width: 180px; margin-bottom: 0;">
|
|
<el-form-item label="建档时间" prop="filingTime" style="flex: 1; min-width: 180px; margin-bottom: 0;">
|
|
|
- <el-date-picker v-model="form.filingTime" type="datetime" placeholder="选择建档时间"
|
|
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%" :disabled="isDetail"/>
|
|
|
|
|
|
|
+ <el-date-picker v-model="form.filingTime" type="datetime" placeholder="选择建档时间" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%" :disabled="isDetail"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <!-- 第三行:客服姓名、约诊时间、负责医生 -->
|
|
|
|
|
|
|
+ <!-- 第三行 -->
|
|
|
<div style="display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px;">
|
|
<div style="display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px;">
|
|
|
<el-form-item label="客服姓名" prop="companyUserName" style="flex: 1; min-width: 130px; margin-bottom: 0;">
|
|
<el-form-item label="客服姓名" prop="companyUserName" style="flex: 1; min-width: 130px; margin-bottom: 0;">
|
|
|
<el-input v-model="form.companyUserName" placeholder="客服姓名" :disabled="isDetail"/>
|
|
<el-input v-model="form.companyUserName" placeholder="客服姓名" :disabled="isDetail"/>
|
|
|
<input type="hidden" v-model="form.companyUserId"/>
|
|
<input type="hidden" v-model="form.companyUserId"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="约诊时间" prop="appointmentTime" style="flex: 1.2; min-width: 180px; margin-bottom: 0;">
|
|
<el-form-item label="约诊时间" prop="appointmentTime" style="flex: 1.2; min-width: 180px; margin-bottom: 0;">
|
|
|
- <el-date-picker v-model="form.appointmentTime" type="datetime" placeholder="选择约诊时间"
|
|
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%" :disabled="isDetail"/>
|
|
|
|
|
|
|
+ <el-date-picker v-model="form.appointmentTime" type="datetime" placeholder="选择约诊时间" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%" :disabled="isDetail"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="负责医生" prop="doctorName" style="flex: 1; min-width: 130px; margin-bottom: 0;">
|
|
<el-form-item label="负责医生" prop="doctorName" style="flex: 1; min-width: 130px; margin-bottom: 0;">
|
|
|
<el-input v-model="form.doctorName" placeholder="负责医生" :disabled="isDetail"/>
|
|
<el-input v-model="form.doctorName" placeholder="负责医生" :disabled="isDetail"/>
|
|
|
<input type="hidden" v-model="form.doctorId"/>
|
|
<input type="hidden" v-model="form.doctorId"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <!-- 独占行文本域 -->
|
|
|
|
|
|
|
+ <!-- 文本域 -->
|
|
|
<div style="margin-bottom: 15px;">
|
|
<div style="margin-bottom: 15px;">
|
|
|
<el-form-item label="现病史" prop="presentIllness" style="margin-bottom: 0;">
|
|
<el-form-item label="现病史" prop="presentIllness" style="margin-bottom: 0;">
|
|
|
- <el-input type="textarea" v-model="form.presentIllness" placeholder="请输入现病史" :rows="3"
|
|
|
|
|
- :disabled="isDetail"/>
|
|
|
|
|
|
|
+ <el-input type="textarea" v-model="form.presentIllness" placeholder="请输入现病史" :rows="3" :disabled="isDetail"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="margin-bottom: 15px;">
|
|
<div style="margin-bottom: 15px;">
|
|
|
<el-form-item label="现用药情况" prop="currentMedication" style="margin-bottom: 0;">
|
|
<el-form-item label="现用药情况" prop="currentMedication" style="margin-bottom: 0;">
|
|
|
- <el-input type="textarea" v-model="form.currentMedication" placeholder="请输入现用药情况" :rows="3"
|
|
|
|
|
- :disabled="isDetail"/>
|
|
|
|
|
|
|
+ <el-input type="textarea" v-model="form.currentMedication" placeholder="请输入现用药情况" :rows="3" :disabled="isDetail"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="margin-bottom: 0;">
|
|
<div style="margin-bottom: 0;">
|
|
|
<el-form-item label="过敏史" prop="allergyHistory" style="margin-bottom: 0;">
|
|
<el-form-item label="过敏史" prop="allergyHistory" style="margin-bottom: 0;">
|
|
|
- <el-input type="textarea" v-model="form.allergyHistory" placeholder="请输入过敏史" :rows="3"
|
|
|
|
|
- :disabled="isDetail"/>
|
|
|
|
|
|
|
+ <el-input type="textarea" v-model="form.allergyHistory" placeholder="请输入过敏史" :rows="3" :disabled="isDetail"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
-
|
|
|
|
|
<div slot="footer" class="dialog-footer" v-if="!isDetail">
|
|
<div slot="footer" class="dialog-footer" v-if="!isDetail">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
@@ -213,8 +194,7 @@
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!-- 处方列表弹窗 -->
|
|
<!-- 处方列表弹窗 -->
|
|
|
- <el-dialog title="处方信息" :visible.sync="prescribeOpen" width="1100px" append-to-body
|
|
|
|
|
- :close-on-click-modal="false">
|
|
|
|
|
|
|
+ <el-dialog title="处方信息" :visible.sync="prescribeOpen" width="1100px" append-to-body :close-on-click-modal="false">
|
|
|
<el-table v-loading="prescribeLoading" :data="prescribeList">
|
|
<el-table v-loading="prescribeLoading" :data="prescribeList">
|
|
|
<el-table-column label="处方ID" align="center" prop="prescribeId"/>
|
|
<el-table-column label="处方ID" align="center" prop="prescribeId"/>
|
|
|
<el-table-column label="处方单号" align="center" prop="prescribeCode"/>
|
|
<el-table-column label="处方单号" align="center" prop="prescribeCode"/>
|
|
@@ -237,23 +217,12 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="处方图片" align="center" prop="prescribeImgUrl">
|
|
<el-table-column label="处方图片" align="center" prop="prescribeImgUrl">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-image
|
|
|
|
|
- v-if="scope.row.doctorConfirm == 1 && scope.row.prescribeImgUrl"
|
|
|
|
|
- style="width: 60px; height: 60px"
|
|
|
|
|
- :src="scope.row.prescribeImgUrl"
|
|
|
|
|
- :preview-src-list="[scope.row.prescribeImgUrl]"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-image v-if="scope.row.doctorConfirm == 1 && scope.row.prescribeImgUrl" style="width: 60px; height: 60px" :src="scope.row.prescribeImgUrl" :preview-src-list="[scope.row.prescribeImgUrl]" />
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
- <pagination
|
|
|
|
|
- v-show="prescribeTotal > 0"
|
|
|
|
|
- :total="prescribeTotal"
|
|
|
|
|
- :page.sync="prescribeQueryParams.pageNum"
|
|
|
|
|
- :limit.sync="prescribeQueryParams.pageSize"
|
|
|
|
|
- @pagination="getPrescribeList"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <pagination v-show="prescribeTotal > 0" :total="prescribeTotal" :page.sync="prescribeQueryParams.pageNum" :limit.sync="prescribeQueryParams.pageSize" @pagination="getPrescribeList" />
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!-- 信息采集弹窗 -->
|
|
<!-- 信息采集弹窗 -->
|
|
@@ -268,17 +237,11 @@
|
|
|
<template slot-scope="scope">{{ parseTime(scope.row.claimTime) }}</template>
|
|
<template slot-scope="scope">{{ parseTime(scope.row.claimTime) }}</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
- <pagination
|
|
|
|
|
- v-show="claimLogTotal > 0"
|
|
|
|
|
- :total="claimLogTotal"
|
|
|
|
|
- :page.sync="claimLogQueryParams.pageNum"
|
|
|
|
|
- :limit.sync="claimLogQueryParams.pageSize"
|
|
|
|
|
- @pagination="getClaimLogList"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <pagination v-show="claimLogTotal > 0" :total="claimLogTotal" :page.sync="claimLogQueryParams.pageNum" :limit.sync="claimLogQueryParams.pageSize" @pagination="getClaimLogList" />
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
- <!-- ========== 独立的认领确认弹窗(带认领号码输入) ========== -->
|
|
|
|
|
- <el-dialog title="认领客户" :visible.sync="claimDialogVisible" width="450px" append-to-body
|
|
|
|
|
- :close-on-click-modal="false">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 认领确认弹窗 -->
|
|
|
|
|
+ <el-dialog title="认领客户" :visible.sync="claimDialogVisible" width="450px" append-to-body :close-on-click-modal="false">
|
|
|
<el-form :model="claimForm" ref="claimForm" :rules="claimRules" label-width="100px" size="small">
|
|
<el-form :model="claimForm" ref="claimForm" :rules="claimRules" label-width="100px" size="small">
|
|
|
<el-form-item label="客户名称">
|
|
<el-form-item label="客户名称">
|
|
|
<span>{{ currentClaimRow && currentClaimRow.customerName }}</span>
|
|
<span>{{ currentClaimRow && currentClaimRow.customerName }}</span>
|
|
@@ -294,8 +257,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <!-- 制单弹窗 - 全部字段必填 -->
|
|
|
|
|
|
|
+ <!-- 制单弹窗 -->
|
|
|
<el-dialog :title="createOrder.title" :visible.sync="createOrder.open" width="1000px" append-to-body :close-on-click-modal="false" @close="createOrderCancel">
|
|
<el-dialog :title="createOrder.title" :visible.sync="createOrder.open" width="1000px" append-to-body :close-on-click-modal="false" @close="createOrderCancel">
|
|
|
|
|
+ <!-- 内容不变,省略... -->
|
|
|
<el-form ref="createOrderForm" :model="createOrderForm" :rules="createOrderRules" label-width="120px">
|
|
<el-form ref="createOrderForm" :model="createOrderForm" :rules="createOrderRules" label-width="120px">
|
|
|
<el-form-item label="收货人姓名" prop="realName" required>
|
|
<el-form-item label="收货人姓名" prop="realName" required>
|
|
|
<el-input v-model="createOrderForm.realName" placeholder="请输入收货人姓名" />
|
|
<el-input v-model="createOrderForm.realName" placeholder="请输入收货人姓名" />
|
|
@@ -307,32 +271,17 @@
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-select @change="provinceChange" v-model="createOrderForm.provinceId" placeholder="请选择省" clearable>
|
|
<el-select @change="provinceChange" v-model="createOrderForm.provinceId" placeholder="请选择省" clearable>
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in province"
|
|
|
|
|
- :key="item.cityId"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- :value="item.cityId">
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ <el-option v-for="item in province" :key="item.cityId" :label="item.name" :value="item.cityId" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-select @change="cityChange" v-model="createOrderForm.cityId" placeholder="请选择市" clearable :disabled="!createOrderForm.provinceId">
|
|
<el-select @change="cityChange" v-model="createOrderForm.cityId" placeholder="请选择市" clearable :disabled="!createOrderForm.provinceId">
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in city"
|
|
|
|
|
- :key="item.cityId"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- :value="item.cityId">
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ <el-option v-for="item in city" :key="item.cityId" :label="item.name" :value="item.cityId" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-select @change="districtChange" v-model="createOrderForm.districtId" placeholder="请选择区" clearable :disabled="!createOrderForm.cityId">
|
|
<el-select @change="districtChange" v-model="createOrderForm.districtId" placeholder="请选择区" clearable :disabled="!createOrderForm.cityId">
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in district"
|
|
|
|
|
- :key="item.cityId"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- :value="item.cityId">
|
|
|
|
|
- </el-option>
|
|
|
|
|
|
|
+ <el-option v-for="item in district" :key="item.cityId" :label="item.name" :value="item.cityId" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -341,31 +290,14 @@
|
|
|
<el-input v-model="createOrderForm.detail" placeholder="请输入收货人详细地址" />
|
|
<el-input v-model="createOrderForm.detail" placeholder="请输入收货人详细地址" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="商品列表" prop="products">
|
|
<el-form-item label="商品列表" prop="products">
|
|
|
- <el-select
|
|
|
|
|
- v-model="createOrderForm.erpType"
|
|
|
|
|
- placeholder="请选择ERP类型"
|
|
|
|
|
- clearable
|
|
|
|
|
- size="small"
|
|
|
|
|
- filterable
|
|
|
|
|
- @change="changeErp"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="dict in erpList"
|
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-select v-model="createOrderForm.erpType" placeholder="请选择ERP类型" clearable size="small" filterable @change="changeErp">
|
|
|
|
|
+ <el-option v-for="dict in erpList" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
<div style="float: right">
|
|
<div style="float: right">
|
|
|
- <el-button
|
|
|
|
|
- plain
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- @click="handleAddProduct"
|
|
|
|
|
- >添加商品</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button plain type="primary" icon="el-icon-plus" @click="handleAddProduct">添加商品</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<el-table border :key="tablekey" width="100%" style="margin-top:5px;" :data="products">
|
|
<el-table border :key="tablekey" width="100%" style="margin-top:5px;" :data="products">
|
|
|
|
|
+ <!-- 商品表格列省略... -->
|
|
|
<el-table-column label="商品编号" align="center" prop="barCode" />
|
|
<el-table-column label="商品编号" align="center" prop="barCode" />
|
|
|
<el-table-column label="商品图片" align="center" width="100">
|
|
<el-table-column label="商品图片" align="center" width="100">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -381,41 +313,26 @@
|
|
|
<el-table-column label="单价" align="center" prop="price" />
|
|
<el-table-column label="单价" align="center" prop="price" />
|
|
|
<el-table-column label="数量" align="center" prop="count" width="200px">
|
|
<el-table-column label="数量" align="center" prop="count" width="200px">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <div>
|
|
|
|
|
- <el-input-number v-model="scope.row.count" @change="handleProductCountChange(scope.row)" size="mini" :min="1" :max="scope.row.stock"></el-input-number>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-input-number v-model="scope.row.count" @change="handleProductCountChange(scope.row)" size="mini" :min="1" :max="scope.row.stock"></el-input-number>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="小计" align="center" prop="money" />
|
|
<el-table-column label="小计" align="center" prop="money" />
|
|
|
<el-table-column label="操作" align="center" width="100px">
|
|
<el-table-column label="操作" align="center" width="100px">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="text"
|
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
|
- @click="removeProduct(scope.row)"
|
|
|
|
|
- >删除</el-button>
|
|
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="removeProduct(scope.row)">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
- <el-col>
|
|
|
|
|
- <span>商品合计:{{products.length}}</span><span style="margin-left:10px;">商品总价:{{totalMoney.toFixed(2)}}</span>
|
|
|
|
|
- </el-col>
|
|
|
|
|
|
|
+ <el-col><span>商品合计:{{products.length}}</span><span style="margin-left:10px;">商品总价:{{totalMoney.toFixed(2)}}</span></el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
<el-form-item label="赠品列表">
|
|
<el-form-item label="赠品列表">
|
|
|
<div style="float: right">
|
|
<div style="float: right">
|
|
|
- <el-button
|
|
|
|
|
- plain
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- @click="handleAddGiftProduct"
|
|
|
|
|
- >添加赠品</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button plain type="primary" icon="el-icon-plus" @click="handleAddGiftProduct">添加赠品</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<el-table border width="100%" style="margin-top:5px;" :data="giftProducts">
|
|
<el-table border width="100%" style="margin-top:5px;" :data="giftProducts">
|
|
|
|
|
+ <!-- 赠品表格列省略... -->
|
|
|
<el-table-column label="商品编号" align="center" prop="barCode" />
|
|
<el-table-column label="商品编号" align="center" prop="barCode" />
|
|
|
<el-table-column label="商品图片" align="center" width="100">
|
|
<el-table-column label="商品图片" align="center" width="100">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -431,43 +348,25 @@
|
|
|
<el-table-column label="单价" align="center" prop="price" />
|
|
<el-table-column label="单价" align="center" prop="price" />
|
|
|
<el-table-column label="数量" align="center" prop="count" width="200px">
|
|
<el-table-column label="数量" align="center" prop="count" width="200px">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <div>
|
|
|
|
|
- <el-input-number v-model="scope.row.count" @change="handleGiftProductCountChange(scope.row)" size="mini" :min="1" :max="scope.row.stock"></el-input-number>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-input-number v-model="scope.row.count" @change="handleGiftProductCountChange(scope.row)" size="mini" :min="1" :max="scope.row.stock"></el-input-number>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="小计" align="center" prop="money" />
|
|
<el-table-column label="小计" align="center" prop="money" />
|
|
|
<el-table-column label="操作" align="center" width="100px">
|
|
<el-table-column label="操作" align="center" width="100px">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="text"
|
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
|
- @click="removeGiftProduct(scope.row)"
|
|
|
|
|
- >删除</el-button>
|
|
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="removeGiftProduct(scope.row)">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="支付方式" prop="payType" required>
|
|
<el-form-item label="支付方式" prop="payType" required>
|
|
|
<el-select v-model="createOrderForm.payType" placeholder="请选择支付方式" clearable size="small">
|
|
<el-select v-model="createOrderForm.payType" placeholder="请选择支付方式" clearable size="small">
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in payTypeOptions"
|
|
|
|
|
- :key="item.dictValue"
|
|
|
|
|
- :label="item.dictLabel"
|
|
|
|
|
- :value="item.dictValue"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-option v-for="item in payTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- ========== 抵扣金额 ========== -->
|
|
|
|
|
<el-form-item label="抵扣金额" prop="receiveMoneyId">
|
|
<el-form-item label="抵扣金额" prop="receiveMoneyId">
|
|
|
<el-select v-model="createOrderForm.receiveMoneyId" placeholder="请选择收款记录" @change="handleReceiptChange" clearable>
|
|
<el-select v-model="createOrderForm.receiveMoneyId" placeholder="请选择收款记录" @change="handleReceiptChange" clearable>
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in receiptList"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :label="`${parseTime(item.saleTime)} - ${item.totalFee}元`"
|
|
|
|
|
- :value="item.id"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <el-option v-for="item in receiptList" :key="item.id" :label="`${parseTime(item.saleTime)} - ${item.totalFee}元`" :value="item.id" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="抵扣金额" prop="reduceAmount">
|
|
<el-form-item label="抵扣金额" prop="reduceAmount">
|
|
@@ -487,13 +386,71 @@
|
|
|
<el-dialog :title="giftProduct.title" :visible.sync="giftProduct.open" width="1000px" append-to-body>
|
|
<el-dialog :title="giftProduct.title" :visible.sync="giftProduct.open" width="1000px" append-to-body>
|
|
|
<product-select ref="GiftDetails" @selectProduct="selectGiftProduct" />
|
|
<product-select ref="GiftDetails" @selectProduct="selectGiftProduct" />
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- ========== 新增:客户订单列表弹窗 ========== -->
|
|
|
|
|
+ <el-dialog title="客户订单列表" :visible.sync="orderListDialogVisible" width="1200px" append-to-body :close-on-click-modal="false" @close="orderListClose">
|
|
|
|
|
+ <!-- 搜索栏 -->
|
|
|
|
|
+ <el-form :model="orderQueryParams" ref="orderQueryForm" :inline="true" label-width="80px" size="small">
|
|
|
|
|
+ <el-form-item label="商品名称" prop="productName">
|
|
|
|
|
+ <el-input v-model="orderQueryParams.productName" placeholder="请输入商品名称" clearable @keyup.enter.native="handleOrderQuery" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleOrderQuery">搜索</el-button>
|
|
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetOrderQuery">重置</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table v-loading="orderListLoading" :data="orderList" border>
|
|
|
|
|
+ <el-table-column label="订单号" align="center" prop="orderCode" width="180" />
|
|
|
|
|
+ <el-table-column label="订单状态" align="center" prop="status" width="100">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span>{{ orderStatusFormat(scope.row.status) }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="实付金额" align="center" prop="payMoney" width="120">
|
|
|
|
|
+ <template slot-scope="scope">¥{{ scope.row.payMoney }}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="下单时间" align="center" prop="createTime" width="160">
|
|
|
|
|
+ <template slot-scope="scope">{{ parseTime(scope.row.createTime) }}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="收货人" align="center" prop="realName" width="100" />
|
|
|
|
|
+ <el-table-column label="收货电话" align="center" prop="userPhone" width="120" />
|
|
|
|
|
+ <el-table-column label="收货地址" align="center" prop="userAddress" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="支付方式" align="center" prop="payType" width="100">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <span v-if="scope.row.payType">{{ scope.row.payType }}</span>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" align="center" width="120" fixed="right">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-qrcode" v-if="scope.row.payType==='1'&&scope.row.paid===0" @click="handleGetQrCode(scope.row)">获取二维码</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+
|
|
|
|
|
+ <pagination v-show="orderTotal > 0" :total="orderTotal" :page.sync="orderQueryParams.pageNum" :limit.sync="orderQueryParams.pageSize" @pagination="getOrderList" />
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 二维码展示弹窗 -->
|
|
|
|
|
+ <el-dialog title="订单二维码" :visible.sync="qrCodeDialogVisible" width="450px" append-to-body :close-on-click-modal="false">
|
|
|
|
|
+ <div style="text-align: center; padding-bottom: 15px;">
|
|
|
|
|
+ <img v-if="qrCodeImage" :src="qrCodeImage" style="width: 100%; max-width: 300px;" />
|
|
|
|
|
+ <div v-else style="text-align: center; padding: 30px;">生成二维码中...</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="qrCodeDialogVisible = false">关 闭</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="downloadQrCode" :disabled="!qrCodeImage">下载二维码</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import {
|
|
import {
|
|
|
listCustomer, getCustomer, addCustomer, updateCustomer, delCustomer, exportCustomer,
|
|
listCustomer, getCustomer, addCustomer, updateCustomer, delCustomer, exportCustomer,
|
|
|
- getCompanyUserAndDoctor, getPrescribeListByIdAndPhone, claimCustomer, getCustomerLogList, getCanUsePayReceiptList
|
|
|
|
|
|
|
+ getCompanyUserAndDoctor, getPrescribeListByIdAndPhone, claimCustomer, getCustomerLogList, getCanUsePayReceiptList,
|
|
|
|
|
+ getOrderList, getQRCode // 新增导入
|
|
|
} from '@/api/qw/companyCustomer'
|
|
} from '@/api/qw/companyCustomer'
|
|
|
import { parseTime } from '@/utils/common'
|
|
import { parseTime } from '@/utils/common'
|
|
|
import { getCitys } from "@/api/hisStore/city";
|
|
import { getCitys } from "@/api/hisStore/city";
|
|
@@ -553,6 +510,7 @@ export default {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
|
|
+ // 原有数据...
|
|
|
loading: true,
|
|
loading: true,
|
|
|
ids: [],
|
|
ids: [],
|
|
|
single: true,
|
|
single: true,
|
|
@@ -564,115 +522,46 @@ export default {
|
|
|
open: false,
|
|
open: false,
|
|
|
dateRange: [],
|
|
dateRange: [],
|
|
|
createTimeRange: [],
|
|
createTimeRange: [],
|
|
|
- queryParams: {
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- pageSize: 10,
|
|
|
|
|
- customerName: null,
|
|
|
|
|
- phone: null,
|
|
|
|
|
- companyUserName: null,
|
|
|
|
|
- claimStatus: null,
|
|
|
|
|
- completeStatus: null,
|
|
|
|
|
- purchased: false,
|
|
|
|
|
- minBuyCount: null,
|
|
|
|
|
- maxBuyCount: null
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ queryParams: { pageNum: 1, pageSize: 10, customerName: null, phone: null, companyUserName: null, claimStatus: null, completeStatus: null, purchased: false, minBuyCount: null, maxBuyCount: null },
|
|
|
form: {},
|
|
form: {},
|
|
|
rules: {
|
|
rules: {
|
|
|
customerName: [{ required: true, message: "客户姓名不能为空", trigger: "blur" }],
|
|
customerName: [{ required: true, message: "客户姓名不能为空", trigger: "blur" }],
|
|
|
sex: [{ required: true, message: "请选择性别", trigger: "change" }],
|
|
sex: [{ required: true, message: "请选择性别", trigger: "change" }],
|
|
|
- age: [
|
|
|
|
|
- { required: true, message: "年龄不能为空", trigger: "blur" },
|
|
|
|
|
- { validator: validateAge, trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- phone: [
|
|
|
|
|
- { required: true, message: "电话不能为空", trigger: "blur" },
|
|
|
|
|
- { validator: validatePhone, trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ age: [{ required: true, message: "年龄不能为空", trigger: "blur" }, { validator: validateAge, trigger: "blur" }],
|
|
|
|
|
+ phone: [{ required: true, message: "电话不能为空", trigger: "blur" }, { validator: validatePhone, trigger: "blur" }],
|
|
|
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
|
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
|
|
companyUserName: [{ required: true, message: "客服姓名不能为空", trigger: "blur" }],
|
|
companyUserName: [{ required: true, message: "客服姓名不能为空", trigger: "blur" }],
|
|
|
doctorName: [{ required: true, message: "负责医生不能为空", trigger: "blur" }],
|
|
doctorName: [{ required: true, message: "负责医生不能为空", trigger: "blur" }],
|
|
|
},
|
|
},
|
|
|
- sexOptions: [
|
|
|
|
|
- { label: '女', value: '0' },
|
|
|
|
|
- { label: '男', value: '1' },
|
|
|
|
|
- { label: '未知', value: '2' }
|
|
|
|
|
- ],
|
|
|
|
|
- erpList: [
|
|
|
|
|
- { dictLabel: '聚水潭', dictValue: '1' },
|
|
|
|
|
- { dictLabel: '兔灵', dictValue: '2' },
|
|
|
|
|
- { dictLabel: '京东云仓', dictValue: '3' }
|
|
|
|
|
- ],
|
|
|
|
|
- // 处方相关
|
|
|
|
|
|
|
+ sexOptions: [{ label: '女', value: '0' }, { label: '男', value: '1' }, { label: '未知', value: '2' }],
|
|
|
|
|
+ erpList: [{ dictLabel: '聚水潭', dictValue: '1' }, { dictLabel: '兔灵', dictValue: '2' }, { dictLabel: '京东云仓', dictValue: '3' }],
|
|
|
prescribeOpen: false,
|
|
prescribeOpen: false,
|
|
|
prescribeLoading: false,
|
|
prescribeLoading: false,
|
|
|
prescribeList: [],
|
|
prescribeList: [],
|
|
|
prescribeTotal: 0,
|
|
prescribeTotal: 0,
|
|
|
currentPhone: '',
|
|
currentPhone: '',
|
|
|
currentId: null,
|
|
currentId: null,
|
|
|
- prescribeQueryParams: {
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- pageSize: 10
|
|
|
|
|
- },
|
|
|
|
|
- doctorConfirmOptions: [
|
|
|
|
|
- { dictValue: '0', dictLabel: "未确认" },
|
|
|
|
|
- { dictValue: '1', dictLabel: "已确认" }
|
|
|
|
|
- ],
|
|
|
|
|
- prescribeTypeOptions: [
|
|
|
|
|
- { dictValue: '1', dictLabel: "西药" },
|
|
|
|
|
- { dictValue: '2', dictLabel: "中药" },
|
|
|
|
|
- { dictValue: '3', dictLabel: "OTC" }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ prescribeQueryParams: { pageNum: 1, pageSize: 10 },
|
|
|
|
|
+ doctorConfirmOptions: [{ dictValue: '0', dictLabel: "未确认" }, { dictValue: '1', dictLabel: "已确认" }],
|
|
|
|
|
+ prescribeTypeOptions: [{ dictValue: '1', dictLabel: "西药" }, { dictValue: '2', dictLabel: "中药" }, { dictValue: '3', dictLabel: "OTC" }],
|
|
|
collectionVisible: false,
|
|
collectionVisible: false,
|
|
|
isDetail: false,
|
|
isDetail: false,
|
|
|
- // 认领弹窗
|
|
|
|
|
claimDialogVisible: false,
|
|
claimDialogVisible: false,
|
|
|
claimSubmitLoading: false,
|
|
claimSubmitLoading: false,
|
|
|
currentClaimRow: null,
|
|
currentClaimRow: null,
|
|
|
claimForm: { claimNumber: '' },
|
|
claimForm: { claimNumber: '' },
|
|
|
- claimRules: {
|
|
|
|
|
- claimNumber: [
|
|
|
|
|
- { required: true, message: '请输入认领号码', trigger: 'blur' },
|
|
|
|
|
- { validator: validateClaimNumber, trigger: 'blur' }
|
|
|
|
|
- ]
|
|
|
|
|
- },
|
|
|
|
|
- // 认领记录
|
|
|
|
|
|
|
+ claimRules: { claimNumber: [{ required: true, message: '请输入认领号码', trigger: 'blur' }, { validator: validateClaimNumber, trigger: 'blur' }] },
|
|
|
claimLogDialogVisible: false,
|
|
claimLogDialogVisible: false,
|
|
|
claimLogLoading: false,
|
|
claimLogLoading: false,
|
|
|
claimLogList: [],
|
|
claimLogList: [],
|
|
|
claimLogTotal: 0,
|
|
claimLogTotal: 0,
|
|
|
- claimLogQueryParams: {
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- pageSize: 10,
|
|
|
|
|
- companyCustomerId: null
|
|
|
|
|
- },
|
|
|
|
|
- // 制单相关
|
|
|
|
|
- createOrder: {
|
|
|
|
|
- open: false,
|
|
|
|
|
- title: '创建订单',
|
|
|
|
|
- },
|
|
|
|
|
- createOrderForm: {
|
|
|
|
|
- realName: '',
|
|
|
|
|
- phone: '',
|
|
|
|
|
- provinceId: null,
|
|
|
|
|
- cityId: null,
|
|
|
|
|
- districtId: null,
|
|
|
|
|
- province: '',
|
|
|
|
|
- city: '',
|
|
|
|
|
- district: '',
|
|
|
|
|
- detail: '',
|
|
|
|
|
- erpType: '',
|
|
|
|
|
- payType: '',
|
|
|
|
|
- reduceAmount: 0,
|
|
|
|
|
- receiveMoneyId: null // 选中的收款记录ID
|
|
|
|
|
- },
|
|
|
|
|
- //收款记录列表
|
|
|
|
|
|
|
+ claimLogQueryParams: { pageNum: 1, pageSize: 10, companyCustomerId: null },
|
|
|
|
|
+ createOrder: { open: false, title: '创建订单' },
|
|
|
|
|
+ createOrderForm: { realName: '', phone: '', provinceId: null, cityId: null, districtId: null, province: '', city: '', district: '', detail: '', erpType: '', payType: '', reduceAmount: 0, receiveMoneyId: null },
|
|
|
receiptList: [],
|
|
receiptList: [],
|
|
|
createOrderRules: {
|
|
createOrderRules: {
|
|
|
realName: [{ required: true, message: '收货人姓名不能为空', trigger: 'blur' }],
|
|
realName: [{ required: true, message: '收货人姓名不能为空', trigger: 'blur' }],
|
|
|
- phone: [
|
|
|
|
|
- { required: true, message: '收货人电话不能为空', trigger: 'blur' },
|
|
|
|
|
- { validator: validatePhone, trigger: 'blur' }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ phone: [{ required: true, message: '收货人电话不能为空', trigger: 'blur' }, { validator: validatePhone, trigger: 'blur' }],
|
|
|
detail: [{ required: true, message: '详细地址不能为空', trigger: 'blur' }],
|
|
detail: [{ required: true, message: '详细地址不能为空', trigger: 'blur' }],
|
|
|
payType: [{ required: true, message: '请选择支付方式', trigger: 'change' }],
|
|
payType: [{ required: true, message: '请选择支付方式', trigger: 'change' }],
|
|
|
address: [{ validator: validateAddress, trigger: 'change' }]
|
|
address: [{ validator: validateAddress, trigger: 'change' }]
|
|
@@ -688,6 +577,32 @@ export default {
|
|
|
tablekey: false,
|
|
tablekey: false,
|
|
|
totalMoney: 0.00,
|
|
totalMoney: 0.00,
|
|
|
payTypeOptions: [],
|
|
payTypeOptions: [],
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 新增:订单列表相关数据 ==========
|
|
|
|
|
+ orderListDialogVisible: false,
|
|
|
|
|
+ orderListLoading: false,
|
|
|
|
|
+ orderList: [],
|
|
|
|
|
+ orderTotal: 0,
|
|
|
|
|
+ currentCustomerId: null,
|
|
|
|
|
+ orderQueryParams: {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ companyCustomerId: null,
|
|
|
|
|
+ productName: null
|
|
|
|
|
+ },
|
|
|
|
|
+ // 订单状态映射(根据后端 FsStoreOrderVO.status 字段)
|
|
|
|
|
+ orderStatusMap: {
|
|
|
|
|
+ '-2': '退货成功',
|
|
|
|
|
+ '-1': '申请退款',
|
|
|
|
|
+ '0': '待发货',
|
|
|
|
|
+ '1': '待收货',
|
|
|
|
|
+ '2': '已收货',
|
|
|
|
|
+ '3': '已完成'
|
|
|
|
|
+ },
|
|
|
|
|
+ // 二维码弹窗
|
|
|
|
|
+ qrCodeDialogVisible: false,
|
|
|
|
|
+ qrCodeImage: null,
|
|
|
|
|
+ currentOrderId: null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -698,8 +613,11 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // ========== 制单相关方法 ==========
|
|
|
|
|
- // ========== 获取收款记录列表 ==========
|
|
|
|
|
|
|
+ // 订单状态格式化方法
|
|
|
|
|
+ orderStatusFormat(status) {
|
|
|
|
|
+ const key = String(status);
|
|
|
|
|
+ return this.orderStatusMap[key] || status;
|
|
|
|
|
+ },
|
|
|
async fetchReceiptList() {
|
|
async fetchReceiptList() {
|
|
|
try {
|
|
try {
|
|
|
const res = await getCanUsePayReceiptList();
|
|
const res = await getCanUsePayReceiptList();
|
|
@@ -1190,6 +1108,102 @@ export default {
|
|
|
this.claimLogList = [];
|
|
this.claimLogList = [];
|
|
|
this.claimLogTotal = 0;
|
|
this.claimLogTotal = 0;
|
|
|
});
|
|
});
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 打开订单列表弹窗 */
|
|
|
|
|
+ handleViewOrderList(row) {
|
|
|
|
|
+ this.currentCustomerId = row.id;
|
|
|
|
|
+ this.orderQueryParams.companyCustomerId = row.id;
|
|
|
|
|
+ this.orderQueryParams.pageNum = 1;
|
|
|
|
|
+ this.orderQueryParams.productName = '';
|
|
|
|
|
+ this.orderListDialogVisible = true;
|
|
|
|
|
+ this.getOrderList();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /** 获取订单列表 */
|
|
|
|
|
+ getOrderList() {
|
|
|
|
|
+ this.orderListLoading = true;
|
|
|
|
|
+ const params = { ...this.orderQueryParams };
|
|
|
|
|
+ // 清理空参数
|
|
|
|
|
+ Object.keys(params).forEach(key => {
|
|
|
|
|
+ if (params[key] === null || params[key] === undefined || params[key] === '') {
|
|
|
|
|
+ delete params[key];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ getOrderList(params).then(response => {
|
|
|
|
|
+ this.orderList = response.rows || [];
|
|
|
|
|
+ this.orderTotal = response.total || 0;
|
|
|
|
|
+ this.orderListLoading = false;
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.orderListLoading = false;
|
|
|
|
|
+ this.orderList = [];
|
|
|
|
|
+ this.orderTotal = 0;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /** 订单列表搜索 */
|
|
|
|
|
+ handleOrderQuery() {
|
|
|
|
|
+ this.orderQueryParams.pageNum = 1;
|
|
|
|
|
+ this.getOrderList();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /** 重置订单列表查询 */
|
|
|
|
|
+ resetOrderQuery() {
|
|
|
|
|
+ this.orderQueryParams.productName = '';
|
|
|
|
|
+ this.handleOrderQuery();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /** 关闭订单列表弹窗时重置数据 */
|
|
|
|
|
+ orderListClose() {
|
|
|
|
|
+ this.orderList = [];
|
|
|
|
|
+ this.orderTotal = 0;
|
|
|
|
|
+ this.orderQueryParams.pageNum = 1;
|
|
|
|
|
+ this.orderQueryParams.productName = '';
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /** 获取订单二维码 */
|
|
|
|
|
+ handleGetQrCode(row) {
|
|
|
|
|
+ if (!row.id) {
|
|
|
|
|
+ this.$message.error('订单信息异常,无法获取二维码');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.currentOrderId = row.id;
|
|
|
|
|
+ this.qrCodeImage = null;
|
|
|
|
|
+ this.qrCodeDialogVisible = true;
|
|
|
|
|
+
|
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
|
+ lock: true,
|
|
|
|
|
+ text: '正在生成二维码...',
|
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ getQRCode(row.id).then(response => {
|
|
|
|
|
+ if (response.url) {
|
|
|
|
|
+ this.qrCodeImage = response.url;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error('获取二维码失败:返回数据无效');
|
|
|
|
|
+ this.qrCodeDialogVisible = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ this.$message.error(error.msg || error.message || '生成二维码失败');
|
|
|
|
|
+ this.qrCodeDialogVisible = false;
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /** 下载二维码 */
|
|
|
|
|
+ downloadQrCode() {
|
|
|
|
|
+ if (!this.qrCodeImage) {
|
|
|
|
|
+ this.$message.warning('二维码尚未生成');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ const link = document.createElement('a');
|
|
|
|
|
+ link.href = this.qrCodeImage;
|
|
|
|
|
+ link.download = `订单二维码_${this.currentOrderId}.png`;
|
|
|
|
|
+ document.body.appendChild(link);
|
|
|
|
|
+ link.click();
|
|
|
|
|
+ document.body.removeChild(link);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|