|
@@ -37,7 +37,6 @@
|
|
|
<text class="report-export-status" :class="'report-export-status-' + item.status">{{
|
|
<text class="report-export-status" :class="'report-export-status-' + item.status">{{
|
|
|
getStatusText(item.status) }}</text>
|
|
getStatusText(item.status) }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="report-export-item-row">报表类型:{{ item.reportType == 1 ? "黑名单" : "购销分析" }}</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">时间:{{ formatDate(item.beginTime) }}--{{
|
|
<view class="report-export-item-row">时间:{{ formatDate(item.beginTime) }}--{{
|
|
|
formatDate(item.endTime)
|
|
formatDate(item.endTime)
|
|
@@ -81,19 +80,6 @@
|
|
|
<view class="report-export-create-modal-close" @click.stop="closeCreate">×</view>
|
|
<view class="report-export-create-modal-close" @click.stop="closeCreate">×</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="report-export-create-modal-body" :style="{ paddingBottom: 0 }" @click="closeDropdownAll">
|
|
<view class="report-export-create-modal-body" :style="{ paddingBottom: 0 }" @click="closeDropdownAll">
|
|
|
- <view class="report-export-create-modal-row" style="margin-top: 0">
|
|
|
|
|
- <!-- <text class="report-export-create-modal-label">报表类型</text> -->
|
|
|
|
|
- <!-- <view class="report-export-create-modal-inputwrap" @click.stop> -->
|
|
|
|
|
- <view class="report-type-tabs">
|
|
|
|
|
- <view class="report-type-tab" :class="{
|
|
|
|
|
- active: form.report === options.report[0],
|
|
|
|
|
- }" @click.stop="selectReportType(options.report[0])">{{ options.report[0] }}</view>
|
|
|
|
|
- <view class="report-type-tab" :class="{ active: form.report === options.report[1] }"
|
|
|
|
|
- @click.stop="selectReportType(options.report[1])">
|
|
|
|
|
- {{ options.report[1] }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <!-- </view> -->
|
|
|
|
|
- </view>
|
|
|
|
|
<scroll-view scroll-y="true" :style="{
|
|
<scroll-view scroll-y="true" :style="{
|
|
|
height: '750rpx',
|
|
height: '750rpx',
|
|
|
paddingBottom: '40rpx',
|
|
paddingBottom: '40rpx',
|
|
@@ -204,14 +190,14 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="report-export-create-modal-row" v-if="form.report === '黑名单'">
|
|
|
|
|
|
|
+ <!-- <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">
|
|
<view class="report-export-create-modal-inputwrap">
|
|
|
<input class="report-export-dropdown-search-input" v-model="form.otherCustomer"
|
|
<input class="report-export-dropdown-search-input" v-model="form.otherCustomer"
|
|
|
placeholder="请填写(多个客户用半角逗号隔开)" placeholder-class="report-export-dropdown-other-customer-input"
|
|
placeholder="请填写(多个客户用半角逗号隔开)" placeholder-class="report-export-dropdown-other-customer-input"
|
|
|
:disabled="modalType === 'read'" :style="{ color: '#666', padding: 0, border: 'none' }" />
|
|
:disabled="modalType === 'read'" :style="{ color: '#666', padding: 0, border: 'none' }" />
|
|
|
</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"
|
|
<view class="report-export-create-modal-inputwrap"
|
|
@@ -263,18 +249,6 @@
|
|
|
<view class="report-export-create-modal" :class="{ 'report-export-create-modal--open': filterModalOpen }">
|
|
<view class="report-export-create-modal" :class="{ 'report-export-create-modal--open': filterModalOpen }">
|
|
|
<view class="report-export-create-modal-title" @click="closeDropdownAll">筛选条件</view>
|
|
<view class="report-export-create-modal-title" @click="closeDropdownAll">筛选条件</view>
|
|
|
<view class="report-export-create-modal-body" @click="closeDropdownAll">
|
|
<view class="report-export-create-modal-body" @click="closeDropdownAll">
|
|
|
- <view class="report-export-create-modal-row">
|
|
|
|
|
- <text class="report-export-create-modal-label">报表类型:</text>
|
|
|
|
|
- <view class="report-export-create-modal-inputwrap" :style="{ border: 'none' }" @click.stop>
|
|
|
|
|
- <view class="report-type-tabs">
|
|
|
|
|
- <view class="report-type-tab" :class="{
|
|
|
|
|
- active: filterForm.report === options.report[0],
|
|
|
|
|
- }" @click.stop="pickFilterOption('report', options.report[0])">{{ options.report[0] }}</view>
|
|
|
|
|
- <view class="report-type-tab" :class="{ active: filterForm.report === options.report[1] }"
|
|
|
|
|
- @click.stop="pickFilterOption('report', options.report[1])">{{ options.report[1] }}</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.stop="openFilterDropdown('product')">
|
|
<view class="report-export-create-modal-inputwrap" @click.stop="openFilterDropdown('product')">
|
|
@@ -352,10 +326,6 @@
|
|
|
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 reportTypeMap = {
|
|
|
|
|
- 黑名单: 1,
|
|
|
|
|
- 购销分析: 2,
|
|
|
|
|
-};
|
|
|
|
|
const customerTypeMap = {
|
|
const customerTypeMap = {
|
|
|
VIP客户: "VIP",
|
|
VIP客户: "VIP",
|
|
|
二级客户: "二级",
|
|
二级客户: "二级",
|
|
@@ -388,8 +358,7 @@ export default {
|
|
|
customerType: "",
|
|
customerType: "",
|
|
|
customer: [],
|
|
customer: [],
|
|
|
product: { physicName: "" },
|
|
product: { physicName: "" },
|
|
|
- report: "黑名单",
|
|
|
|
|
- otherCustomer: "",
|
|
|
|
|
|
|
+ // otherCustomer: "",
|
|
|
},
|
|
},
|
|
|
dateRange: [],
|
|
dateRange: [],
|
|
|
computeTimer: null,
|
|
computeTimer: null,
|
|
@@ -403,7 +372,6 @@ export default {
|
|
|
region: [],
|
|
region: [],
|
|
|
customerType: ["VIP客户", "二级客户", "三级客户"],
|
|
customerType: ["VIP客户", "二级客户", "三级客户"],
|
|
|
product: [],
|
|
product: [],
|
|
|
- report: ["黑名单", "购销分析"],
|
|
|
|
|
status: ["全部", "待开始", "进行中", "已完成"],
|
|
status: ["全部", "待开始", "进行中", "已完成"],
|
|
|
},
|
|
},
|
|
|
// dropdown search inputs (create modal)
|
|
// dropdown search inputs (create modal)
|
|
@@ -418,7 +386,6 @@ export default {
|
|
|
|
|
|
|
|
// dropdown search inputs (filter modal)
|
|
// dropdown search inputs (filter modal)
|
|
|
filterSearchForm: {
|
|
filterSearchForm: {
|
|
|
- report: "",
|
|
|
|
|
product: "",
|
|
product: "",
|
|
|
},
|
|
},
|
|
|
// Pagination state for filter products
|
|
// Pagination state for filter products
|
|
@@ -435,11 +402,10 @@ export default {
|
|
|
taskTitle: "创建任务",
|
|
taskTitle: "创建任务",
|
|
|
filterModalOpen: false,
|
|
filterModalOpen: false,
|
|
|
filterForm: {
|
|
filterForm: {
|
|
|
- report: "",
|
|
|
|
|
product: { physicName: "" },
|
|
product: { physicName: "" },
|
|
|
status: "全部",
|
|
status: "全部",
|
|
|
},
|
|
},
|
|
|
- filterDropdown: { report: false, product: false },
|
|
|
|
|
|
|
+ filterDropdown: { product: false },
|
|
|
filterDateRange: [],
|
|
filterDateRange: [],
|
|
|
modalType: "",
|
|
modalType: "",
|
|
|
dropdownUpward: false,
|
|
dropdownUpward: false,
|
|
@@ -517,13 +483,13 @@ export default {
|
|
|
getCustomerName(data = {}) {
|
|
getCustomerName(data = {}) {
|
|
|
const { customerName = "", otherCustomer = "" } = data;
|
|
const { customerName = "", otherCustomer = "" } = data;
|
|
|
let name = customerName || "";
|
|
let name = customerName || "";
|
|
|
- if (otherCustomer) {
|
|
|
|
|
- if (name) {
|
|
|
|
|
- name += `,${otherCustomer}`;
|
|
|
|
|
- } else {
|
|
|
|
|
- name = otherCustomer;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (otherCustomer) {
|
|
|
|
|
+ // if (name) {
|
|
|
|
|
+ // name += `,${otherCustomer}`;
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // name = otherCustomer;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
const arr = name.split(",");
|
|
const arr = name.split(",");
|
|
|
if (arr.length == 0) return "--";
|
|
if (arr.length == 0) return "--";
|
|
|
return arr.length == 1 ? arr[0].trim() : `${arr.length}个公司`;
|
|
return arr.length == 1 ? arr[0].trim() : `${arr.length}个公司`;
|
|
@@ -531,10 +497,6 @@ export default {
|
|
|
formatDate(date) {
|
|
formatDate(date) {
|
|
|
return formatDate({ date }, "YYYY-MM-DD");
|
|
return formatDate({ date }, "YYYY-MM-DD");
|
|
|
},
|
|
},
|
|
|
- selectReportType(op) {
|
|
|
|
|
- if (this.modalType === "read") return;
|
|
|
|
|
- this.form.report = op;
|
|
|
|
|
- },
|
|
|
|
|
getStatusText(status) {
|
|
getStatusText(status) {
|
|
|
if (status == "1") {
|
|
if (status == "1") {
|
|
|
return "导出待开始";
|
|
return "导出待开始";
|
|
@@ -637,8 +599,7 @@ export default {
|
|
|
physicName: item.physicName,
|
|
physicName: item.physicName,
|
|
|
drugEntBaseInfoId: item.drugEntBaseInfoId,
|
|
drugEntBaseInfoId: item.drugEntBaseInfoId,
|
|
|
},
|
|
},
|
|
|
- report: item.reportType == 1 ? "黑名单" : "购销分析",
|
|
|
|
|
- otherCustomer: item?.otherCustomer || "",
|
|
|
|
|
|
|
+ // otherCustomer: item?.otherCustomer || "",
|
|
|
};
|
|
};
|
|
|
this.dateRange = [item.beginTime, item.endTime];
|
|
this.dateRange = [item.beginTime, item.endTime];
|
|
|
}
|
|
}
|
|
@@ -666,7 +627,6 @@ export default {
|
|
|
request("/report/getReportTaskPage", {
|
|
request("/report/getReportTaskPage", {
|
|
|
taskType: statusMap?.[this.filterForm?.status] || "",
|
|
taskType: statusMap?.[this.filterForm?.status] || "",
|
|
|
drugEntBaseInfoId: this.filterForm?.product?.drugEntBaseInfoId,
|
|
drugEntBaseInfoId: this.filterForm?.product?.drugEntBaseInfoId,
|
|
|
- reportType: reportTypeMap?.[this.filterForm?.report] || "",
|
|
|
|
|
beginTime: this.filterDateRange[0],
|
|
beginTime: this.filterDateRange[0],
|
|
|
endTime: this.filterDateRange[1],
|
|
endTime: this.filterDateRange[1],
|
|
|
customerName: this.keyword || "",
|
|
customerName: this.keyword || "",
|
|
@@ -691,11 +651,11 @@ export default {
|
|
|
// ...this.list[1],
|
|
// ...this.list[1],
|
|
|
// status: 3,
|
|
// status: 3,
|
|
|
// });
|
|
// });
|
|
|
- // this.list.push({
|
|
|
|
|
- // ...this.list[0],
|
|
|
|
|
- // finishTime: "2025-12-15",
|
|
|
|
|
- // status: 3,
|
|
|
|
|
- // });
|
|
|
|
|
|
|
+ this.list.push({
|
|
|
|
|
+ ...this.list[0],
|
|
|
|
|
+ finishTime: "2025-12-15",
|
|
|
|
|
+ status: 3,
|
|
|
|
|
+ });
|
|
|
// this.animateAll();
|
|
// this.animateAll();
|
|
|
}
|
|
}
|
|
|
this.fetchLoading = false;
|
|
this.fetchLoading = false;
|
|
@@ -712,7 +672,7 @@ export default {
|
|
|
toDetail(item) {
|
|
toDetail(item) {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: `/packages/traceabilityReport/pages/reportExport/detail/index?id=${item.id
|
|
url: `/packages/traceabilityReport/pages/reportExport/detail/index?id=${item.id
|
|
|
- }&reportType=${item.reportType}&title=${encodeURIComponent(
|
|
|
|
|
|
|
+ }&title=${encodeURIComponent(
|
|
|
this.getCustomerName(item.customerName)
|
|
this.getCustomerName(item.customerName)
|
|
|
)}`,
|
|
)}`,
|
|
|
});
|
|
});
|
|
@@ -724,7 +684,6 @@ export default {
|
|
|
this.modalType = "create";
|
|
this.modalType = "create";
|
|
|
this.taskTitle = "创建任务";
|
|
this.taskTitle = "创建任务";
|
|
|
this.createModalOpen = true;
|
|
this.createModalOpen = true;
|
|
|
- if (!this.form.report) this.form.report = this.options.report[0] || "";
|
|
|
|
|
},
|
|
},
|
|
|
closeCreate() {
|
|
closeCreate() {
|
|
|
this.filterModalOpen = false;
|
|
this.filterModalOpen = false;
|
|
@@ -735,8 +694,7 @@ export default {
|
|
|
customerType: "",
|
|
customerType: "",
|
|
|
customer: [],
|
|
customer: [],
|
|
|
product: { physicName: "" },
|
|
product: { physicName: "" },
|
|
|
- report: "黑名单",
|
|
|
|
|
- otherCustomer: "",
|
|
|
|
|
|
|
+ // otherCustomer: "",
|
|
|
};
|
|
};
|
|
|
this.searchForm = {
|
|
this.searchForm = {
|
|
|
region: "",
|
|
region: "",
|
|
@@ -784,8 +742,7 @@ export default {
|
|
|
customerType: customerTypeMap?.[this.form?.customerType] || "",
|
|
customerType: customerTypeMap?.[this.form?.customerType] || "",
|
|
|
customerId,
|
|
customerId,
|
|
|
customerName,
|
|
customerName,
|
|
|
- otherCustomer: this.form?.otherCustomer || "",
|
|
|
|
|
- reportType: reportTypeMap?.[this.form?.report] || "",
|
|
|
|
|
|
|
+ // otherCustomer: this.form?.otherCustomer || "",
|
|
|
drugEntBaseInfoId: this.form?.product?.drugEntBaseInfoId || "",
|
|
drugEntBaseInfoId: this.form?.product?.drugEntBaseInfoId || "",
|
|
|
beginTime: this.dateRange[0],
|
|
beginTime: this.dateRange[0],
|
|
|
endTime: this.dateRange[1],
|
|
endTime: this.dateRange[1],
|
|
@@ -812,15 +769,11 @@ export default {
|
|
|
let customerOk = Array.isArray(f.customer)
|
|
let customerOk = Array.isArray(f.customer)
|
|
|
? f.customer.length > 0
|
|
? f.customer.length > 0
|
|
|
: !!f.customer;
|
|
: !!f.customer;
|
|
|
- if (f.report === "黑名单") {
|
|
|
|
|
- customerOk = customerOk || !!f.otherCustomer;
|
|
|
|
|
- }
|
|
|
|
|
return (
|
|
return (
|
|
|
f.region?.regionName &&
|
|
f.region?.regionName &&
|
|
|
f.customerType &&
|
|
f.customerType &&
|
|
|
customerOk &&
|
|
customerOk &&
|
|
|
f.product?.physicName &&
|
|
f.product?.physicName &&
|
|
|
- f.report &&
|
|
|
|
|
drOk
|
|
drOk
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
@@ -880,7 +833,6 @@ export default {
|
|
|
customer: false,
|
|
customer: false,
|
|
|
product: false,
|
|
product: false,
|
|
|
};
|
|
};
|
|
|
- this.filterDropdown.report = false;
|
|
|
|
|
this.filterDropdown.product = false;
|
|
this.filterDropdown.product = false;
|
|
|
},
|
|
},
|
|
|
openFilterDropdown(k) {
|
|
openFilterDropdown(k) {
|
|
@@ -901,7 +853,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
pickFilterOption(k, v) {
|
|
pickFilterOption(k, v) {
|
|
|
- if (["status", "report"].includes(k) && this.filterForm[k] === v) {
|
|
|
|
|
|
|
+ if (["status"].includes(k) && this.filterForm[k] === v) {
|
|
|
this.filterForm[k] = "";
|
|
this.filterForm[k] = "";
|
|
|
this.filterDropdown[k] = false;
|
|
this.filterDropdown[k] = false;
|
|
|
return;
|
|
return;
|
|
@@ -1147,7 +1099,6 @@ export default {
|
|
|
progress: 0,
|
|
progress: 0,
|
|
|
progressTarget: target,
|
|
progressTarget: target,
|
|
|
action,
|
|
action,
|
|
|
- report: "购销分析",
|
|
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
return res;
|
|
return res;
|
|
@@ -1626,34 +1577,6 @@ export default {
|
|
|
background: #f0f5ff;
|
|
background: #f0f5ff;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.report-type-tabs {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- background: #f5f7fa;
|
|
|
|
|
- padding: 8rpx;
|
|
|
|
|
- border-radius: 40rpx;
|
|
|
|
|
- box-sizing: border-box;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.report-type-tab {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- height: 64rpx;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- border-radius: 40rpx;
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- color: #606266;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.report-type-tab.active {
|
|
|
|
|
- background: #2c69ff;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- box-shadow: 0 2rpx 12rpx rgba(44, 105, 255, 0.2);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
.report-export-input-arrow {
|
|
.report-export-input-arrow {
|
|
|
width: 16rpx;
|
|
width: 16rpx;
|
|
|
height: 16rpx;
|
|
height: 16rpx;
|