|
@@ -50,6 +50,7 @@
|
|
|
<view class="report-export-item-row">创建人:{{ item.userName || "" }}</view>
|
|
<view class="report-export-item-row">创建人:{{ item.userName || "" }}</view>
|
|
|
<view class="report-export-item-row">品种:{{ item.physicName || "" }}</view>
|
|
<view class="report-export-item-row">品种:{{ item.physicName || "" }}</view>
|
|
|
<view class="report-export-item-row">规格:{{ item.pkgSpec || "" }}</view>
|
|
<view class="report-export-item-row">规格:{{ item.pkgSpec || "" }}</view>
|
|
|
|
|
+ <view class="report-export-item-row" v-if="getPrepnSpecText(item.prepnSpec)">制剂规格:{{ getPrepnSpecText(item.prepnSpec) }}</view>
|
|
|
<view class="report-export-item-row">时间:{{ formatDate(item.beginTime) }}~{{ formatDate(item.endTime) }}</view>
|
|
<view class="report-export-item-row">时间:{{ formatDate(item.beginTime) }}~{{ formatDate(item.endTime) }}</view>
|
|
|
<!-- <view
|
|
<!-- <view
|
|
|
class="report-export-item-row"
|
|
class="report-export-item-row"
|
|
@@ -100,6 +101,25 @@
|
|
|
<uni-icons type="help" size="16" color="606266"></uni-icons>
|
|
<uni-icons type="help" size="16" color="606266"></uni-icons>
|
|
|
非协议客户请直接在“其他客户”输入客户名称</view
|
|
非协议客户请直接在“其他客户”输入客户名称</view
|
|
|
>
|
|
>
|
|
|
|
|
+ <view class="report-export-medical-tabs">
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="report-export-medical-tab-indicator"
|
|
|
|
|
+ :class="{ 'is-medical': searchForm.productMedical === '是' }"></view>
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="report-export-medical-tab"
|
|
|
|
|
+ :class="{ 'medical-active': searchForm.productMedical === '否' }"
|
|
|
|
|
+ :aria-disabled="modalType === 'read'"
|
|
|
|
|
+ @click.stop="modalType !== 'read' && setProductMedical('否', 'create')">
|
|
|
|
|
+ OTC
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="report-export-medical-tab"
|
|
|
|
|
+ :class="{ 'medical-active': searchForm.productMedical === '是' }"
|
|
|
|
|
+ :aria-disabled="modalType === 'read'"
|
|
|
|
|
+ @click.stop="modalType !== 'read' && setProductMedical('是', 'create')">
|
|
|
|
|
+ 医疗
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </view>
|
|
|
<view class="report-export-create-modal-row">
|
|
<view class="report-export-create-modal-row">
|
|
|
<text class="report-export-create-modal-label">省份</text>
|
|
<text class="report-export-create-modal-label">省份</text>
|
|
|
<view class="report-export-create-modal-inputwrap" @click.stop="modalType !== 'read' && openDropdown('region')">
|
|
<view class="report-export-create-modal-inputwrap" @click.stop="modalType !== 'read' && openDropdown('region')">
|
|
@@ -132,7 +152,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="report-export-create-modal-row">
|
|
|
|
|
|
|
+ <view v-if="searchForm.productMedical === '否'" class="report-export-create-modal-row">
|
|
|
<text class="report-export-create-modal-label">客户性质</text>
|
|
<text class="report-export-create-modal-label">客户性质</text>
|
|
|
<view class="report-export-create-modal-inputwrap" @click.stop="modalType !== 'read' && openDropdown('customerType')">
|
|
<view class="report-export-create-modal-inputwrap" @click.stop="modalType !== 'read' && openDropdown('customerType')">
|
|
|
<view class="report-export-create-modal-static">{{ form.customerType || "请选择客户性质" }}</view>
|
|
<view class="report-export-create-modal-static">{{ form.customerType || "请选择客户性质" }}</view>
|
|
@@ -151,7 +171,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="report-export-create-modal-row">
|
|
<view class="report-export-create-modal-row">
|
|
|
<text class="report-export-create-modal-label">客户</text>
|
|
<text class="report-export-create-modal-label">客户</text>
|
|
|
- <view class="report-export-create-modal-inputwrap" @click.stop="modalType !== 'read' && openDropdown('customer')">
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="report-export-create-modal-inputwrap"
|
|
|
|
|
+ :class="{ 'report-export-input-disabled': searchForm.productMedical === '否' && !form.customerType }"
|
|
|
|
|
+ @click.stop="modalType !== 'read' && (searchForm.productMedical === '是' || form.customerType) && openDropdown('customer')">
|
|
|
<view class="report-export-create-modal-static" :style="{ maxHeight: 'auto', overflowY: 'visible' }">
|
|
<view class="report-export-create-modal-static" :style="{ maxHeight: 'auto', overflowY: 'visible' }">
|
|
|
<block v-if="Array.isArray(form.customer) && form.customer.length">
|
|
<block v-if="Array.isArray(form.customer) && form.customer.length">
|
|
|
<view
|
|
<view
|
|
@@ -166,7 +189,7 @@
|
|
|
</text>
|
|
</text>
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
|
- <text v-else>请选择客户</text>
|
|
|
|
|
|
|
+ <text v-else>{{ searchForm.productMedical === "否" && !form.customerType ? "请先选择客户性质" : "请选择客户" }}</text>
|
|
|
<text
|
|
<text
|
|
|
v-if="form.customer && form.customer.length && modalType !== 'read'"
|
|
v-if="form.customer && form.customer.length && modalType !== 'read'"
|
|
|
class="customer-clear-all"
|
|
class="customer-clear-all"
|
|
@@ -174,7 +197,7 @@
|
|
|
>×</text
|
|
>×</text
|
|
|
>
|
|
>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="report-export-input-arrow" v-if="modalType !== 'read'"></view>
|
|
|
|
|
|
|
+ <view class="report-export-input-arrow" v-if="modalType !== 'read' && (searchForm.productMedical === '是' || form.customerType)"></view>
|
|
|
<view
|
|
<view
|
|
|
class="report-export-create-modal-dropdown"
|
|
class="report-export-create-modal-dropdown"
|
|
|
v-if="dropdown.customer"
|
|
v-if="dropdown.customer"
|
|
@@ -335,6 +358,28 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="report-export-create-modal-row">
|
|
|
|
|
+ <text class="report-export-create-modal-label">制剂规格</text>
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="report-export-create-modal-inputwrap"
|
|
|
|
|
+ :class="{
|
|
|
|
|
+ 'report-export-input-disabled': !form.product?.drugEntBaseInfoId,
|
|
|
|
|
+ }"
|
|
|
|
|
+ @click.stop="modalType !== 'read' && form.product?.drugEntBaseInfoId && openDropdown('prepnSpec')">
|
|
|
|
|
+ <view class="report-export-create-modal-static">{{ form.prepnSpec || "请选择制剂规格(不选则查询全部制剂规格)" }}</view>
|
|
|
|
|
+ <view class="report-export-input-arrow" v-if="modalType !== 'read'"></view>
|
|
|
|
|
+ <view class="report-export-create-modal-dropdown" v-if="dropdown.prepnSpec" @click.stop :style="[{ top: 'auto', bottom: '84rpx' }]">
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="report-export-create-modal-dropdown-item"
|
|
|
|
|
+ v-for="(op, i) in filteredOptions('prepnSpec')"
|
|
|
|
|
+ :key="'t-' + i"
|
|
|
|
|
+ @click.stop="modalType !== 'read' && pickOption('prepnSpec', op)"
|
|
|
|
|
+ >{{ op }}</view
|
|
|
|
|
+ >
|
|
|
|
|
+ <view v-if="filteredOptions('prepnSpec')?.length === 0" class="report-export-create-modal-dropdown-item"> 未查找到该品种制剂规格</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
<view class="report-export-create-modal-row">
|
|
<view class="report-export-create-modal-row">
|
|
|
<text class="report-export-create-modal-label">时间</text>
|
|
<text class="report-export-create-modal-label">时间</text>
|
|
|
<view class="report-export-create-modal-inputwrap" @click="openDatePicker">
|
|
<view class="report-export-create-modal-inputwrap" @click="openDatePicker">
|
|
@@ -396,6 +441,26 @@
|
|
|
@focus="onSearchFocus"
|
|
@focus="onSearchFocus"
|
|
|
@blur="onSearchBlur" />
|
|
@blur="onSearchBlur" />
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="report-export-dropdown-medical-row">
|
|
|
|
|
+ <text
|
|
|
|
|
+ class="report-export-dropdown-medical-tag"
|
|
|
|
|
+ :class="{ 'medical-active': filterSearchForm.productMedical === '' }"
|
|
|
|
|
+ @click.stop="setProductMedical('', 'filter')"
|
|
|
|
|
+ >全部</text
|
|
|
|
|
+ >
|
|
|
|
|
+ <text
|
|
|
|
|
+ class="report-export-dropdown-medical-tag"
|
|
|
|
|
+ :class="{ 'medical-active': filterSearchForm.productMedical === '是' }"
|
|
|
|
|
+ @click.stop="setProductMedical('是', 'filter')"
|
|
|
|
|
+ >医疗产品</text
|
|
|
|
|
+ >
|
|
|
|
|
+ <text
|
|
|
|
|
+ class="report-export-dropdown-medical-tag"
|
|
|
|
|
+ :class="{ 'medical-active': filterSearchForm.productMedical === '否' }"
|
|
|
|
|
+ @click.stop="setProductMedical('否', 'filter')"
|
|
|
|
|
+ >OTC</text
|
|
|
|
|
+ >
|
|
|
|
|
+ </view>
|
|
|
<scroll-view class="report-export-create-modal-dropdown-list" scroll-y @scrolltolower="loadMoreProducts('filter')">
|
|
<scroll-view class="report-export-create-modal-dropdown-list" scroll-y @scrolltolower="loadMoreProducts('filter')">
|
|
|
<view
|
|
<view
|
|
|
class="report-export-create-modal-dropdown-item"
|
|
class="report-export-create-modal-dropdown-item"
|
|
@@ -507,15 +572,22 @@
|
|
|
import EmptyView from "../../../wigets/empty.vue";
|
|
import EmptyView from "../../../wigets/empty.vue";
|
|
|
import { formatDate, getPaginatedList } from "../../../utils/utils.js";
|
|
import { formatDate, getPaginatedList } from "../../../utils/utils.js";
|
|
|
import request from "../../../request/index.js";
|
|
import request from "../../../request/index.js";
|
|
|
|
|
+const customerTypeOptions = ["VIP客户", "二级客户", "三级客户", "KA客户", "NKA客户", "区域核心连锁"];
|
|
|
const customerTypeMap = {
|
|
const customerTypeMap = {
|
|
|
VIP客户: "VIP",
|
|
VIP客户: "VIP",
|
|
|
二级客户: "二级",
|
|
二级客户: "二级",
|
|
|
三级客户: "三级",
|
|
三级客户: "三级",
|
|
|
|
|
+ 区域核心连锁: "区域核心连锁",
|
|
|
|
|
+ NKA客户: "NKA客户",
|
|
|
|
|
+ KA客户: "KA客户",
|
|
|
};
|
|
};
|
|
|
const customerTypeReverseMap = {
|
|
const customerTypeReverseMap = {
|
|
|
VIP: "VIP客户",
|
|
VIP: "VIP客户",
|
|
|
二级: "二级客户",
|
|
二级: "二级客户",
|
|
|
三级: "三级客户",
|
|
三级: "三级客户",
|
|
|
|
|
+ 区域核心连锁: "区域核心连锁",
|
|
|
|
|
+ NKA客户: "NKA客户",
|
|
|
|
|
+ KA客户: "KA客户",
|
|
|
};
|
|
};
|
|
|
const statusMap = {
|
|
const statusMap = {
|
|
|
全部: 0,
|
|
全部: 0,
|
|
@@ -544,6 +616,8 @@ export default {
|
|
|
customerType: "",
|
|
customerType: "",
|
|
|
customer: [],
|
|
customer: [],
|
|
|
product: { physicName: "" },
|
|
product: { physicName: "" },
|
|
|
|
|
+ pkgSpec: "",
|
|
|
|
|
+ prepnSpec: "",
|
|
|
otherCustomer: "",
|
|
otherCustomer: "",
|
|
|
otherCustomerCode: "",
|
|
otherCustomerCode: "",
|
|
|
},
|
|
},
|
|
@@ -556,18 +630,22 @@ export default {
|
|
|
otherCustomer: false,
|
|
otherCustomer: false,
|
|
|
product: false,
|
|
product: false,
|
|
|
pkgSpec: false,
|
|
pkgSpec: false,
|
|
|
|
|
+ prepnSpec: false,
|
|
|
},
|
|
},
|
|
|
options: {
|
|
options: {
|
|
|
region: [],
|
|
region: [],
|
|
|
- customerType: ["VIP客户", "二级客户", "三级客户"],
|
|
|
|
|
|
|
+ customerType: customerTypeOptions,
|
|
|
product: [],
|
|
product: [],
|
|
|
pkgSpec: [],
|
|
pkgSpec: [],
|
|
|
|
|
+ prepnSpec: [],
|
|
|
status: ["全部", "已完成", "待开始", "进行中"],
|
|
status: ["全部", "已完成", "待开始", "进行中"],
|
|
|
},
|
|
},
|
|
|
// dropdown search inputs (create modal)
|
|
// dropdown search inputs (create modal)
|
|
|
searchForm: {
|
|
searchForm: {
|
|
|
region: "",
|
|
region: "",
|
|
|
|
|
+ customerType: "",
|
|
|
product: "",
|
|
product: "",
|
|
|
|
|
+ productMedical: "否",
|
|
|
},
|
|
},
|
|
|
// Pagination state for products
|
|
// Pagination state for products
|
|
|
productPage: 0,
|
|
productPage: 0,
|
|
@@ -577,6 +655,7 @@ export default {
|
|
|
// dropdown search inputs (filter modal)
|
|
// dropdown search inputs (filter modal)
|
|
|
filterSearchForm: {
|
|
filterSearchForm: {
|
|
|
product: "",
|
|
product: "",
|
|
|
|
|
+ productMedical: "",
|
|
|
},
|
|
},
|
|
|
// Pagination state for filter products
|
|
// Pagination state for filter products
|
|
|
filterProductPage: 0,
|
|
filterProductPage: 0,
|
|
@@ -589,14 +668,16 @@ export default {
|
|
|
customerHasMore: true,
|
|
customerHasMore: true,
|
|
|
customerLoading: false,
|
|
customerLoading: false,
|
|
|
customerDebounceTimer: null,
|
|
customerDebounceTimer: null,
|
|
|
|
|
+ customerRequestVersion: 0,
|
|
|
taskTitle: "创建任务",
|
|
taskTitle: "创建任务",
|
|
|
filterModalOpen: false,
|
|
filterModalOpen: false,
|
|
|
filterForm: {
|
|
filterForm: {
|
|
|
product: { physicName: "" },
|
|
product: { physicName: "" },
|
|
|
status: "全部",
|
|
status: "全部",
|
|
|
pkgSpec: "",
|
|
pkgSpec: "",
|
|
|
|
|
+ prepnSpec: "",
|
|
|
},
|
|
},
|
|
|
- filterDropdown: { product: false, pkgSpec: false },
|
|
|
|
|
|
|
+ filterDropdown: { product: false, pkgSpec: false, prepnSpec: false },
|
|
|
filterDateRange: [],
|
|
filterDateRange: [],
|
|
|
modalType: "",
|
|
modalType: "",
|
|
|
dropdownUpward: false,
|
|
dropdownUpward: false,
|
|
@@ -643,6 +724,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
"form.customerType"(val) {
|
|
"form.customerType"(val) {
|
|
|
|
|
+ this.customerRequestVersion++;
|
|
|
|
|
+ this.customerLoading = false;
|
|
|
this.customerPage = 1;
|
|
this.customerPage = 1;
|
|
|
this.customerTotal = null;
|
|
this.customerTotal = null;
|
|
|
this.customerHasMore = true;
|
|
this.customerHasMore = true;
|
|
@@ -652,6 +735,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
"form.region": {
|
|
"form.region": {
|
|
|
handler() {
|
|
handler() {
|
|
|
|
|
+ this.customerRequestVersion++;
|
|
|
|
|
+ this.customerLoading = false;
|
|
|
this.customerPage = 1;
|
|
this.customerPage = 1;
|
|
|
this.customerTotal = null;
|
|
this.customerTotal = null;
|
|
|
this.customerHasMore = true;
|
|
this.customerHasMore = true;
|
|
@@ -702,6 +787,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
return this.formatDate(value);
|
|
return this.formatDate(value);
|
|
|
},
|
|
},
|
|
|
|
|
+ getPrepnSpecText(prepnSpec) {
|
|
|
|
|
+ return this.normalizeSpecOptions(prepnSpec).join(",");
|
|
|
|
|
+ },
|
|
|
getStatusText(status) {
|
|
getStatusText(status) {
|
|
|
if (status == "1") {
|
|
if (status == "1") {
|
|
|
return "导出待开始";
|
|
return "导出待开始";
|
|
@@ -717,13 +805,50 @@ export default {
|
|
|
path: "/reportExport/index.vue",
|
|
path: "/reportExport/index.vue",
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- const _data = res.data;
|
|
|
|
|
|
|
+ const _data = Array.isArray(res.data) ? res.data : [];
|
|
|
this.options.product = _data;
|
|
this.options.product = _data;
|
|
|
|
|
+ if (this.form?.product?.drugEntBaseInfoId || this.form?.product?.physicName) {
|
|
|
|
|
+ this.setPrepnSpecOptions(this.form.product);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ normalizeSpecOptions(list) {
|
|
|
|
|
+ const rawList = Array.isArray(list) ? list : list ? [list] : [];
|
|
|
|
|
+ const values = rawList
|
|
|
|
|
+ .map((item) => {
|
|
|
|
|
+ if (typeof item === "string" || typeof item === "number") return String(item);
|
|
|
|
|
+ if (item && typeof item === "object") {
|
|
|
|
|
+ return item.prepnSpec || item.prepnSpecName || item.pkgSpec || item.pkgSpecName || item.specName || item.name || item.value || "";
|
|
|
|
|
+ }
|
|
|
|
|
+ return "";
|
|
|
|
|
+ })
|
|
|
|
|
+ .map((item) => String(item || "").trim())
|
|
|
|
|
+ .filter(Boolean);
|
|
|
|
|
+ return Array.from(new Set(values));
|
|
|
|
|
+ },
|
|
|
|
|
+ resolveProductOption(product = {}) {
|
|
|
|
|
+ const productId = product?.drugEntBaseInfoId;
|
|
|
|
|
+ const productName = product?.physicName;
|
|
|
|
|
+ return (
|
|
|
|
|
+ (this.options.product || []).find((item) => {
|
|
|
|
|
+ const idMatched = productId && String(item?.drugEntBaseInfoId) === String(productId);
|
|
|
|
|
+ const nameMatched = productName && item?.physicName === productName;
|
|
|
|
|
+ return idMatched || nameMatched;
|
|
|
|
|
+ }) ||
|
|
|
|
|
+ product ||
|
|
|
|
|
+ {}
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ setPrepnSpecOptions(product) {
|
|
|
|
|
+ const selectedProduct = this.resolveProductOption(product);
|
|
|
|
|
+ this.options.prepnSpec = this.normalizeSpecOptions(selectedProduct?.prepnSpec);
|
|
|
|
|
+ },
|
|
|
getGuigeList(physicName) {
|
|
getGuigeList(physicName) {
|
|
|
- if (!physicName) return;
|
|
|
|
|
|
|
+ if (!physicName) {
|
|
|
|
|
+ this.options.pkgSpec = [];
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
request("/report/getDrugSpec", {
|
|
request("/report/getDrugSpec", {
|
|
|
physicName,
|
|
physicName,
|
|
|
path: "/reportExport/index.vue",
|
|
path: "/reportExport/index.vue",
|
|
@@ -745,15 +870,28 @@ export default {
|
|
|
},
|
|
},
|
|
|
getCustomerOptions() {
|
|
getCustomerOptions() {
|
|
|
if (!this.customerHasMore || this.customerLoading) return;
|
|
if (!this.customerHasMore || this.customerLoading) return;
|
|
|
|
|
+ const isMedical = this.searchForm.productMedical === "是";
|
|
|
|
|
+ if (!isMedical && !this.form.customerType) {
|
|
|
|
|
+ this.customers = [];
|
|
|
|
|
+ this.customerHasMore = false;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.customerLoading = true;
|
|
this.customerLoading = true;
|
|
|
- request("/customer/info/getCustomerInfo", {
|
|
|
|
|
|
|
+ const requestVersion = this.customerRequestVersion;
|
|
|
|
|
+ const params = {
|
|
|
pageNum: this.customerPage,
|
|
pageNum: this.customerPage,
|
|
|
pageSize: this.customerPageSize,
|
|
pageSize: this.customerPageSize,
|
|
|
customerName: this.customerSearch || "",
|
|
customerName: this.customerSearch || "",
|
|
|
- customerLevel: customerTypeMap?.[this.form.customerType] || undefined,
|
|
|
|
|
provinceCode: this.form?.region?.regionCode || undefined,
|
|
provinceCode: this.form?.region?.regionCode || undefined,
|
|
|
path: "/reportExport/index.vue",
|
|
path: "/reportExport/index.vue",
|
|
|
- }).then((res) => {
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+ if (isMedical) {
|
|
|
|
|
+ params.medicalFlag = "医疗";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ params.customerLevel = customerTypeMap?.[this.form.customerType] || undefined;
|
|
|
|
|
+ }
|
|
|
|
|
+ request("/customer/info/getCustomerInfo", params).then((res) => {
|
|
|
|
|
+ if (requestVersion !== this.customerRequestVersion) return;
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
const _data = res.data || {};
|
|
const _data = res.data || {};
|
|
|
this.customerTotal = _data.total || 0;
|
|
this.customerTotal = _data.total || 0;
|
|
@@ -858,12 +996,16 @@ export default {
|
|
|
drugEntBaseInfoId: item.drugEntBaseInfoId,
|
|
drugEntBaseInfoId: item.drugEntBaseInfoId,
|
|
|
},
|
|
},
|
|
|
pkgSpec: item?.pkgSpec || "",
|
|
pkgSpec: item?.pkgSpec || "",
|
|
|
|
|
+ prepnSpec: item?.prepnSpec || "",
|
|
|
otherCustomer: item?.otherCustomer || "",
|
|
otherCustomer: item?.otherCustomer || "",
|
|
|
otherCustomerCode: item?.otherCustomerCode || "",
|
|
otherCustomerCode: item?.otherCustomerCode || "",
|
|
|
};
|
|
};
|
|
|
if (item.physicName) {
|
|
if (item.physicName) {
|
|
|
this.getGuigeList(item.physicName);
|
|
this.getGuigeList(item.physicName);
|
|
|
}
|
|
}
|
|
|
|
|
+ this.setPrepnSpecOptions(this.form.product);
|
|
|
|
|
+ const selectedProduct = this.resolveProductOption(this.form.product);
|
|
|
|
|
+ this.searchForm.productMedical = selectedProduct?.isMedical || item?.isMedical || (customerTypeLabel === "医疗" ? "是" : "否");
|
|
|
this.dateRange = [this.normalizeDateToYMD(item.beginTime), this.normalizeDateToYMD(item.endTime)];
|
|
this.dateRange = [this.normalizeDateToYMD(item.beginTime), this.normalizeDateToYMD(item.endTime)];
|
|
|
}
|
|
}
|
|
|
this.createModalOpen = true;
|
|
this.createModalOpen = true;
|
|
@@ -964,16 +1106,24 @@ export default {
|
|
|
customerType: "",
|
|
customerType: "",
|
|
|
customer: [],
|
|
customer: [],
|
|
|
product: { physicName: "" },
|
|
product: { physicName: "" },
|
|
|
|
|
+ pkgSpec: "",
|
|
|
|
|
+ prepnSpec: "",
|
|
|
otherCustomer: "",
|
|
otherCustomer: "",
|
|
|
otherCustomerCode: "",
|
|
otherCustomerCode: "",
|
|
|
};
|
|
};
|
|
|
|
|
+ this.options.pkgSpec = [];
|
|
|
|
|
+ this.options.prepnSpec = [];
|
|
|
this.searchForm = {
|
|
this.searchForm = {
|
|
|
region: "",
|
|
region: "",
|
|
|
|
|
+ customerType: "",
|
|
|
product: "",
|
|
product: "",
|
|
|
|
|
+ productMedical: "否",
|
|
|
};
|
|
};
|
|
|
this.otherCustomerSearch = "";
|
|
this.otherCustomerSearch = "";
|
|
|
this.otherCustomers = [];
|
|
this.otherCustomers = [];
|
|
|
this.otherCustomerLoading = false;
|
|
this.otherCustomerLoading = false;
|
|
|
|
|
+ this.customerRequestVersion++;
|
|
|
|
|
+ this.customerLoading = false;
|
|
|
if (this.otherCustomerDebounceTimer) {
|
|
if (this.otherCustomerDebounceTimer) {
|
|
|
clearTimeout(this.otherCustomerDebounceTimer);
|
|
clearTimeout(this.otherCustomerDebounceTimer);
|
|
|
this.otherCustomerDebounceTimer = null;
|
|
this.otherCustomerDebounceTimer = null;
|
|
@@ -1012,13 +1162,14 @@ export default {
|
|
|
id: this.modalType === "create" ? undefined : this.currentItem?.id || "",
|
|
id: this.modalType === "create" ? undefined : this.currentItem?.id || "",
|
|
|
reportType: 2,
|
|
reportType: 2,
|
|
|
regionCode: this.form?.region?.regionCode || "",
|
|
regionCode: this.form?.region?.regionCode || "",
|
|
|
- customerType: customerTypeMap?.[this.form?.customerType] || "",
|
|
|
|
|
|
|
+ customerType: this.form?.customerType === "医疗" ? "医疗" : customerTypeMap?.[this.form?.customerType] || "",
|
|
|
customerId,
|
|
customerId,
|
|
|
customerName,
|
|
customerName,
|
|
|
otherCustomer: this.form?.otherCustomer || "",
|
|
otherCustomer: this.form?.otherCustomer || "",
|
|
|
otherCustomerCode: this.form?.otherCustomerCode || "",
|
|
otherCustomerCode: this.form?.otherCustomerCode || "",
|
|
|
drugEntBaseInfoId: this.form?.product?.drugEntBaseInfoId || "",
|
|
drugEntBaseInfoId: this.form?.product?.drugEntBaseInfoId || "",
|
|
|
pkgSpec: this.form?.pkgSpec || "",
|
|
pkgSpec: this.form?.pkgSpec || "",
|
|
|
|
|
+ prepnSpec: this.form?.prepnSpec || "",
|
|
|
physicName: this.form?.product?.physicName || "",
|
|
physicName: this.form?.product?.physicName || "",
|
|
|
beginTime: this.formatDate(this.dateRange[0], "YYYY-MM-DD"),
|
|
beginTime: this.formatDate(this.dateRange[0], "YYYY-MM-DD"),
|
|
|
endTime: this.formatDate(this.dateRange[1], "YYYY-MM-DD"),
|
|
endTime: this.formatDate(this.dateRange[1], "YYYY-MM-DD"),
|
|
@@ -1101,6 +1252,8 @@ export default {
|
|
|
this.closeDropdownAll();
|
|
this.closeDropdownAll();
|
|
|
this.dropdown[k] = true;
|
|
this.dropdown[k] = true;
|
|
|
if (k === "customer") {
|
|
if (k === "customer") {
|
|
|
|
|
+ this.customerRequestVersion++;
|
|
|
|
|
+ this.customerLoading = false;
|
|
|
this.customerPage = 1;
|
|
this.customerPage = 1;
|
|
|
this.customerTotal = null;
|
|
this.customerTotal = null;
|
|
|
this.customerHasMore = true;
|
|
this.customerHasMore = true;
|
|
@@ -1142,9 +1295,11 @@ export default {
|
|
|
otherCustomer: false,
|
|
otherCustomer: false,
|
|
|
product: false,
|
|
product: false,
|
|
|
pkgSpec: false,
|
|
pkgSpec: false,
|
|
|
|
|
+ prepnSpec: false,
|
|
|
};
|
|
};
|
|
|
this.filterDropdown.product = false;
|
|
this.filterDropdown.product = false;
|
|
|
this.filterDropdown.pkgSpec = false;
|
|
this.filterDropdown.pkgSpec = false;
|
|
|
|
|
+ this.filterDropdown.prepnSpec = false;
|
|
|
},
|
|
},
|
|
|
openFilterDropdown(k) {
|
|
openFilterDropdown(k) {
|
|
|
this.closeDropdownAll();
|
|
this.closeDropdownAll();
|
|
@@ -1172,6 +1327,7 @@ export default {
|
|
|
this.filterForm[k] = v;
|
|
this.filterForm[k] = v;
|
|
|
if (k === "product") {
|
|
if (k === "product") {
|
|
|
this.filterForm.pkgSpec = "";
|
|
this.filterForm.pkgSpec = "";
|
|
|
|
|
+ this.filterForm.prepnSpec = "";
|
|
|
this.getGuigeList(v.physicName);
|
|
this.getGuigeList(v.physicName);
|
|
|
}
|
|
}
|
|
|
this.filterDropdown[k] = false;
|
|
this.filterDropdown[k] = false;
|
|
@@ -1192,11 +1348,15 @@ export default {
|
|
|
product: { physicName: "" },
|
|
product: { physicName: "" },
|
|
|
status: "全部",
|
|
status: "全部",
|
|
|
pkgSpec: "",
|
|
pkgSpec: "",
|
|
|
|
|
+ prepnSpec: "",
|
|
|
|
|
+ };
|
|
|
|
|
+ this.filterSearchForm = {
|
|
|
|
|
+ product: "",
|
|
|
|
|
+ productMedical: "",
|
|
|
};
|
|
};
|
|
|
- this.filterSearchForm.product = "";
|
|
|
|
|
this.filterProductPage = 0;
|
|
this.filterProductPage = 0;
|
|
|
this.filterDisplayProducts = [];
|
|
this.filterDisplayProducts = [];
|
|
|
- this.filterDropdown = { product: false, pkgSpec: false };
|
|
|
|
|
|
|
+ this.filterDropdown = { product: false, pkgSpec: false, prepnSpec: false };
|
|
|
this.filterDateRange = [];
|
|
this.filterDateRange = [];
|
|
|
this.resetFetch();
|
|
this.resetFetch();
|
|
|
},
|
|
},
|
|
@@ -1214,6 +1374,9 @@ export default {
|
|
|
if (k === "product") {
|
|
if (k === "product") {
|
|
|
this.initProductList("create");
|
|
this.initProductList("create");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (k === "prepnSpec") {
|
|
|
|
|
+ this.setPrepnSpecOptions(this.form.product);
|
|
|
|
|
+ }
|
|
|
if (k === "otherCustomer" && !String(this.otherCustomerSearch || "").trim()) {
|
|
if (k === "otherCustomer" && !String(this.otherCustomerSearch || "").trim()) {
|
|
|
this.otherCustomers = [];
|
|
this.otherCustomers = [];
|
|
|
}
|
|
}
|
|
@@ -1244,10 +1407,16 @@ export default {
|
|
|
this.form.otherCustomer = selected.join(",");
|
|
this.form.otherCustomer = selected.join(",");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if ((k === "customerType" || k === "region") && this.form[k] !== v) {
|
|
|
|
|
+ this.form.customer = [];
|
|
|
|
|
+ this.customerSearch = "";
|
|
|
|
|
+ }
|
|
|
this.form[k] = v;
|
|
this.form[k] = v;
|
|
|
if (k === "product") {
|
|
if (k === "product") {
|
|
|
this.form.pkgSpec = "";
|
|
this.form.pkgSpec = "";
|
|
|
|
|
+ this.form.prepnSpec = "";
|
|
|
this.getGuigeList(v.physicName);
|
|
this.getGuigeList(v.physicName);
|
|
|
|
|
+ this.setPrepnSpecOptions(v);
|
|
|
}
|
|
}
|
|
|
this.dropdown[k] = false;
|
|
this.dropdown[k] = false;
|
|
|
},
|
|
},
|
|
@@ -1283,14 +1452,21 @@ export default {
|
|
|
filteredOptions(k, type) {
|
|
filteredOptions(k, type) {
|
|
|
const arr = this.options[k] || [];
|
|
const arr = this.options[k] || [];
|
|
|
let q = "";
|
|
let q = "";
|
|
|
|
|
+ let medical = "";
|
|
|
if (type === "filter") {
|
|
if (type === "filter") {
|
|
|
q = this.filterSearchForm[k] || "";
|
|
q = this.filterSearchForm[k] || "";
|
|
|
|
|
+ medical = this.filterSearchForm.productMedical || "";
|
|
|
} else {
|
|
} else {
|
|
|
q = this.searchForm[k] || "";
|
|
q = this.searchForm[k] || "";
|
|
|
|
|
+ medical = this.searchForm.productMedical || "";
|
|
|
|
|
+ }
|
|
|
|
|
+ let result = arr;
|
|
|
|
|
+ if (k === "product" && medical) {
|
|
|
|
|
+ result = arr.filter((it) => it && typeof it === "object" && it.isMedical === medical);
|
|
|
}
|
|
}
|
|
|
q = String(q).trim().toLocaleLowerCase();
|
|
q = String(q).trim().toLocaleLowerCase();
|
|
|
- if (!q) return arr;
|
|
|
|
|
- return arr.filter((it) => {
|
|
|
|
|
|
|
+ if (!q) return result;
|
|
|
|
|
+ return result.filter((it) => {
|
|
|
if (typeof it === "string") return it.toLocaleLowerCase().indexOf(q) !== -1;
|
|
if (typeof it === "string") return it.toLocaleLowerCase().indexOf(q) !== -1;
|
|
|
if (it && typeof it === "object") {
|
|
if (it && typeof it === "object") {
|
|
|
const name = k === "region" ? it.regionName || it.name || "" : it.physicName || it.productName || "";
|
|
const name = k === "region" ? it.regionName || it.name || "" : it.physicName || it.productName || "";
|
|
@@ -1299,6 +1475,31 @@ export default {
|
|
|
return false;
|
|
return false;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ setProductMedical(value, mode) {
|
|
|
|
|
+ if (mode === "filter") {
|
|
|
|
|
+ this.filterSearchForm.productMedical = value;
|
|
|
|
|
+ this.initProductList("filter");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (this.searchForm.productMedical !== value) {
|
|
|
|
|
+ this.form.customerType = value === "是" ? "医疗" : "";
|
|
|
|
|
+ this.form.customer = [];
|
|
|
|
|
+ this.customers = [];
|
|
|
|
|
+ this.customerSearch = "";
|
|
|
|
|
+ this.customerPage = 1;
|
|
|
|
|
+ this.customerTotal = null;
|
|
|
|
|
+ this.customerHasMore = true;
|
|
|
|
|
+ this.form.product = { physicName: "" };
|
|
|
|
|
+ this.form.pkgSpec = "";
|
|
|
|
|
+ this.form.prepnSpec = "";
|
|
|
|
|
+ this.options.pkgSpec = [];
|
|
|
|
|
+ this.options.prepnSpec = [];
|
|
|
|
|
+ this.searchForm.product = "";
|
|
|
|
|
+ }
|
|
|
|
|
+ this.searchForm.productMedical = value;
|
|
|
|
|
+ this.closeDropdownAll();
|
|
|
|
|
+ this.initProductList("create");
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// Initialize product list for pagination
|
|
// Initialize product list for pagination
|
|
|
initProductList(mode) {
|
|
initProductList(mode) {
|
|
|
const allProducts = this.filteredOptions("product", mode === "filter" ? "filter" : undefined);
|
|
const allProducts = this.filteredOptions("product", mode === "filter" ? "filter" : undefined);
|
|
@@ -1426,8 +1627,8 @@ export default {
|
|
|
const url = "/report/sendemail";
|
|
const url = "/report/sendemail";
|
|
|
request(url, {
|
|
request(url, {
|
|
|
taskId: this.currentItem?.id,
|
|
taskId: this.currentItem?.id,
|
|
|
- //emailAddress: email + "@999.com.cn",
|
|
|
|
|
- emailAddress: "hezhijie@dotouch.tech",
|
|
|
|
|
|
|
+ emailAddress: email + "@999.com.cn",
|
|
|
|
|
+ // emailAddress: "qianxinyu@dotouch.tech",
|
|
|
path: "reportExport/index.vue",
|
|
path: "reportExport/index.vue",
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
@@ -1868,6 +2069,70 @@ export default {
|
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.report-export-medical-tabs {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ height: 64rpx;
|
|
|
|
|
+ margin-top: 16rpx;
|
|
|
|
|
+ padding: 4rpx;
|
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
|
+ background: #f2f3f5;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.report-export-medical-tab-indicator {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 4rpx;
|
|
|
|
|
+ bottom: 4rpx;
|
|
|
|
|
+ left: 4rpx;
|
|
|
|
|
+ width: calc(50% - 4rpx);
|
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
|
+ background: #2c69ff;
|
|
|
|
|
+ box-shadow: 0 3rpx 8rpx rgba(44, 105, 255, 0.24);
|
|
|
|
|
+ transform: translateX(0);
|
|
|
|
|
+ transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
|
|
|
+ will-change: transform;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.report-export-medical-tab-indicator.is-medical {
|
|
|
|
|
+ transform: translateX(100%);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.report-export-medical-tab {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 1;
|
|
|
|
|
+ height: 64rpx;
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ color: #606266;
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ line-height: 64rpx;
|
|
|
|
|
+ transition: color 180ms ease-out, transform 100ms ease-out;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.report-export-medical-tab::after {
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.report-export-medical-tab.medical-active {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.report-export-medical-tab:active {
|
|
|
|
|
+ transform: scale(0.98);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+@media (prefers-reduced-motion: reduce) {
|
|
|
|
|
+ .report-export-medical-tab-indicator,
|
|
|
|
|
+ .report-export-medical-tab {
|
|
|
|
|
+ transition-duration: 0.01ms;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.report-export-create-modal-row {
|
|
.report-export-create-modal-row {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
@@ -1959,6 +2224,27 @@ export default {
|
|
|
padding: 10rpx;
|
|
padding: 10rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.report-export-dropdown-medical-row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 12rpx;
|
|
|
|
|
+ padding: 8rpx 16rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.report-export-dropdown-medical-tag {
|
|
|
|
|
+ padding: 6rpx 18rpx;
|
|
|
|
|
+ border-radius: 24rpx;
|
|
|
|
|
+ background: #f2f3f5;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.report-export-dropdown-medical-tag.medical-active {
|
|
|
|
|
+ background: #5497d5;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.report-export-dropdown-search-input {
|
|
.report-export-dropdown-search-input {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 60rpx;
|
|
height: 60rpx;
|