提成明细加上服务时间范围查询、优化订单营养师助理售后绑定关系逻辑
This commit is contained in:
@ -807,6 +807,10 @@ export default {
|
||||
};
|
||||
this.screenNutriAssisIdOptions = this.nutriAssisIdOptions;
|
||||
this.screenAfterSaleIdOptions = this.afterSaleIdOptions;
|
||||
|
||||
//处理原先设定的营养师、助理、售后绑定关系发生变化(比如原先订单的售后或助理发生变化)之后,需要自动更换
|
||||
this.handleOnDietIdChange(this.form.nutritionistIdList);
|
||||
|
||||
this.resetForm("form");
|
||||
},
|
||||
handleOnClosed() {
|
||||
@ -851,15 +855,21 @@ export default {
|
||||
},
|
||||
//监听营养师下拉列表
|
||||
handleOnDietIdChange(val) {
|
||||
let assistantAfterArray = orderUtils.getAfterSaleAndAssistantByDietId(this.dietitianAfterAssistantOptions, (val && val.length != null) ? val[val.length-1] : 0);
|
||||
this.form = {
|
||||
let assistantAfterArray = orderUtils.getAfterSaleAndAssistantByDietId(this.dietitianAfterAssistantOptions, (val && val != null) ? val[val.length-1] : 0);
|
||||
/*this.form = {
|
||||
...this.form,
|
||||
nutriAssisId: assistantAfterArray ? orderUtils.getRandomValueByArray(assistantAfterArray[0]) : 0,
|
||||
afterSaleId: assistantAfterArray ? orderUtils.getRandomValueByArray(assistantAfterArray[1]) : 0,
|
||||
};
|
||||
};*/
|
||||
if(this.form.nutriAssisId == null || assistantAfterArray[0].indexOf(this.form.nutriAssisId) == -1){
|
||||
this.form.nutriAssisId = assistantAfterArray ? orderUtils.getRandomValueByArray(assistantAfterArray[0]) : 0;
|
||||
}
|
||||
if(this.form.afterSaleId == null || assistantAfterArray[1].indexOf(this.form.afterSaleId) == -1){
|
||||
this.form.afterSaleId = assistantAfterArray ? orderUtils.getRandomValueByArray(assistantAfterArray[1]) : 0;
|
||||
}
|
||||
this.screenNutriAssisIdOptions = orderUtils.getAfterSaleOrAssistantByIds(this.nutriAssisIdOptions, assistantAfterArray[0]);
|
||||
this.screenAfterSaleIdOptions = orderUtils.getAfterSaleOrAssistantByIds(this.afterSaleIdOptions, assistantAfterArray[1]);
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听收款账号的变化
|
||||
|
@ -664,7 +664,7 @@ export default {
|
||||
},
|
||||
//监听营养师下拉列表
|
||||
handleOnDietIdChange(val) {
|
||||
console.log(val);
|
||||
//console.log(val);
|
||||
let assistantAfterArray = orderUtils.getAfterSaleAndAssistantByDietId(this.dietitianAfterAssistantOptions, val);
|
||||
console.log(assistantAfterArray);
|
||||
this.form = {
|
||||
|
@ -261,6 +261,7 @@ export default {
|
||||
this.queryParam.userId = this.data.userId;
|
||||
this.queryParam.reviewStatus = this.data.reviewStatus;
|
||||
this.queryParam.endTime = this.data.endTime;
|
||||
this.serverDateScope = this.data.serverDateScope;
|
||||
this.title = `「${this.data.name}`;
|
||||
this.fileName = this.data.name;
|
||||
if (this.data.yearMonth) {
|
||||
|
@ -823,8 +823,8 @@ export function dealHealthy(customerHealthy) {
|
||||
return customerHealthy;
|
||||
}
|
||||
|
||||
export const extendHealthyTitle = {"0":"减脂","5":"降血压","6":"降血糖","3": "备孕营养", "1": "月经不调", "2": "多囊调理", "11":"心脑血管调理","13":"胃肠肿瘤调理","4":"产后调理","7":"高血脂","10":"消化系统管理","14":"增重"};
|
||||
export const projectName = {"0":"减脂","5":"高血压","6":"高血糖","3": "备孕营养", "1":"月经不调", "2":"多囊卵巢综合症", "13":"胃肠肿瘤","4":"产后调理","7":"高血脂","10":"消化系统管理","14":"增重"};
|
||||
export const extendHealthyTitle = {"0":"减脂","1": "月经不调","2": "多囊调理", "3": "备孕营养", "4":"产后调理","5":"降血压","6":"降血糖","7":"高血脂调理","8":"高尿酸调理","9":"营养性贫血调理","10":"消化系统调理","11":"心脑血管调理","12":"99体验","13":"胃肠肿瘤调理","14":"增重"};
|
||||
export const projectName = {"0":"减脂","1":"月经不调","2":"多囊卵巢综合症", "3": "备孕营养", "4":"产后调理", "5":"高血压","6":"高血糖","7":"高血脂","8":"高尿酸","9":"营养性贫血","10":"消化系统管理","11":"心脑血管系统","12":"99体验","13":"胃肠肿瘤","14":"增重"};
|
||||
//需要填写慢病调查问卷的项目
|
||||
export const extendHealthyIndex = [5, 6, 1, 2, 13,4,7];
|
||||
//跳过减脂经历问卷的项目
|
||||
|
@ -39,7 +39,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="截止月份" prop="month">
|
||||
<el-form-item label="截止订单成交月份" prop="month" label-width="140px">
|
||||
<el-date-picker
|
||||
v-model="month"
|
||||
@change="monthRangeChange"
|
||||
@ -48,6 +48,7 @@
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态" prop="reviewStatus">
|
||||
<el-select
|
||||
v-model="queryParams.reviewStatus"
|
||||
@ -63,7 +64,19 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-form-item label="服务时间" prop="dateScope">
|
||||
<el-date-picker
|
||||
v-model="serverDateScope"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left:25lpx">
|
||||
<el-button
|
||||
type="cyan"
|
||||
icon="el-icon-search"
|
||||
@ -283,6 +296,7 @@ export default {
|
||||
sendCommissionPlanTable: false,
|
||||
sendCommissionPlan: {},
|
||||
fixLength: 2,
|
||||
serverDateScope: null
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -332,12 +346,17 @@ export default {
|
||||
/** 查询业务提成比例列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const dateRange = [
|
||||
dayjs(this.month).startOf("month").format("YYYY-MM-DD"),
|
||||
dayjs(this.month).endOf("month").format("YYYY-MM-DD"),
|
||||
];
|
||||
let dateRange = null;
|
||||
if(this.month && this.month != null){
|
||||
dateRange = [
|
||||
dayjs(this.month).startOf("month").format("YYYY-MM-DD"),
|
||||
dayjs(this.month).endOf("month").format("YYYY-MM-DD"),
|
||||
];
|
||||
}
|
||||
this.queryParams.serverScopeStartTime = this.serverDateScope && this.serverDateScope.length > 0 ? this.serverDateScope[0] : null;
|
||||
this.queryParams.serverScopeEndTime = this.serverDateScope && this.serverDateScope.length > 0 ? this.serverDateScope[1] : null;
|
||||
// console.log(dateRange)
|
||||
detailDayCommision(this.addDateRange(this.queryParams, dateRange)).then(
|
||||
detailDayCommision(dateRange != null ? this.addDateRange(this.queryParams, dateRange) : this.queryParams).then(
|
||||
(response) => {
|
||||
this.commisionList = response.rows;
|
||||
this.total = response.total;
|
||||
@ -416,11 +435,21 @@ export default {
|
||||
},
|
||||
handleDetailClick(row) {
|
||||
// console.log(row);
|
||||
const dateRange = [
|
||||
dayjs(this.month).startOf("month").format("YYYY-MM-DD"),
|
||||
dayjs(this.month).endOf("month").format("YYYY-MM-DD"),
|
||||
];
|
||||
this.$refs["ordercommissDetailRef"].showDrawer(this.addDateRange({'yearMonth': dayjs(this.month).endOf("month").format("YYYY-MM-DD"),'name': row.nickName, 'userId': row.userId, 'reviewStatus': this.queryParams.reviewStatus}, dateRange));
|
||||
let dateRange = null;
|
||||
if(this.month && this.month != null){
|
||||
dateRange = [
|
||||
dayjs(this.month).startOf("month").format("YYYY-MM-DD"),
|
||||
dayjs(this.month).endOf("month").format("YYYY-MM-DD"),
|
||||
];
|
||||
}
|
||||
let param = {
|
||||
'name': row.nickName,
|
||||
'userId': row.userId,
|
||||
'reviewStatus': this.queryParams.reviewStatus,
|
||||
'yearMonth': this.month == null ? null : dayjs(this.month).endOf("month").format("YYYY-MM-DD"),
|
||||
'serverDateScope': this.serverDateScope
|
||||
}
|
||||
this.$refs["ordercommissDetailRef"].showDrawer(dateRange != null ? this.addDateRange(param, dateRange) : param);
|
||||
},
|
||||
getSummaries(param) {
|
||||
//param 是固定的对象,里面包含 columns与 data参数的对象 {columns: Array[4], data: Array[5]},包含了表格的所有的列与数据信息
|
||||
|
Reference in New Issue
Block a user