Merge branch 'master' of gitee.com:darlk/ShengTangManage

This commit is contained in:
huangdeliang
2021-01-28 15:54:24 +08:00
8 changed files with 288 additions and 87 deletions

View File

@ -8,7 +8,7 @@
v-show="showSearch"
label-width="70px"
>
<el-col :span="6">
<!--<el-col :span="6">
<el-form-item label="手机号" prop="phone">
<el-input
v-model="queryParams.phone"
@ -18,12 +18,12 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
</el-col>-->
<el-col :span="6">
<el-form-item label="客户姓名" prop="customer">
<el-form-item label="客户信息" prop="customer">
<el-input
v-model="queryParams.customer"
placeholder="请输入客户姓名"
placeholder="请输入客户姓名或手机号"
clearable
size="small"
@keyup.enter.native="handleQuery"
@ -237,6 +237,18 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="订单金额" prop="amountFlag">
<el-select
v-model="queryParams.amountFlag"
placeholder="请选金额状态"
>
<el-option :key="0" label="全部订单" :value="null" />
<el-option :key="1" label="正常订单" :value="0" />
<el-option :key="2" label="退款订单" :value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="成交日期" prop="orderTime">
<el-date-picker
@ -1088,6 +1100,11 @@ export default {
this.payTypeIdOptions = response.data;
});
this.getDicts("cus_account").then((response) => {
response.data.splice(0, 0, {
dictValue: 0,
dictLabel: "无",
remark: null,
});
this.accountIdOptions = response.data;
});
this.getDicts("cus_serve_time").then((response) => {
@ -1223,6 +1240,7 @@ export default {
startTime: dayjs().add(3, "day").format("YYYY-MM-DD"),
pauseTime: null,
payTypeId: defaultPayType ? parseInt(defaultPayType.dictValue) : null,
accountId: defaultAccount ? parseInt(defaultAccount.dictValue) : null,
preSaleId: defaultPresale ? parseInt(defaultPresale.dictValue) : null,
createBy: null,
createTime: null,
@ -1261,8 +1279,6 @@ export default {
? parseInt(defaultConditioningProjectIdOption.dictValue)
: null,
becomeFanTime: dayjs().format("YYYY-MM-DD"),
//收款账号的初始化放最后使得可以watch中监听到变化保证策划、策划助理、运营、运营助理初始化
accountId: defaultAccount ? parseInt(defaultAccount.dictValue) : null,
};
this.resetForm("form");
},
@ -1293,6 +1309,7 @@ export default {
handleUpdate(row) {
this.reset();
const orderId = row.orderId || this.ids;
this.form.accountId = "no";
getOrder(orderId).then((response) => {
this.form = response.data;
this.form.giveServeDay = parseInt(this.form.giveServeDay + "");
@ -1385,38 +1402,47 @@ export default {
let planningAndOperationValue = this.orderDropdownCorrespondingOptions.find(
(opt) => parseInt(opt.dictValue) === this.form.accountId
);
let array = planningAndOperationValue.dictLabel.split("|");
let plannerIdOption = this.plannerIdOptions.find(
(opt) => opt.dictValue == array[0]
);
this.form.plannerId = plannerIdOption
? parseInt(plannerIdOption.dictValue)
: 0;
let plannerAssisIdOption = this.plannerAssisIdOptions.find(
(opt) => opt.dictValue == array[1]
);
this.form.plannerAssisId = plannerAssisIdOption
? parseInt(plannerAssisIdOption.dictValue)
: 0;
let operatorIdOption = this.operatorIdOptions.find(
(opt) => opt.dictValue == array[2]
);
this.form.operatorId = operatorIdOption
? parseInt(operatorIdOption.dictValue)
: 0;
let operatorAssisIdOption = this.operatorAssisIdOptions.find(
(opt) => opt.dictValue == array[3]
);
this.form.operatorAssisId = operatorAssisIdOption
? parseInt(operatorAssisIdOption.dictValue)
: 0;
if (planningAndOperationValue) {
let array = planningAndOperationValue.dictLabel.split("|");
let plannerIdOption = this.plannerIdOptions.find(
(opt) => opt.dictValue == array[0]
);
this.form.plannerId = plannerIdOption
? parseInt(plannerIdOption.dictValue)
: 0;
let plannerAssisIdOption = this.plannerAssisIdOptions.find(
(opt) => opt.dictValue == array[1]
);
this.form.plannerAssisId = plannerAssisIdOption
? parseInt(plannerAssisIdOption.dictValue)
: 0;
let operatorIdOption = this.operatorIdOptions.find(
(opt) => opt.dictValue == array[2]
);
this.form.operatorId = operatorIdOption
? parseInt(operatorIdOption.dictValue)
: 0;
let operatorAssisIdOption = this.operatorAssisIdOptions.find(
(opt) => opt.dictValue == array[3]
);
this.form.operatorAssisId = operatorAssisIdOption
? parseInt(operatorAssisIdOption.dictValue)
: 0;
} else {
this.form.plannerId = 0;
this.form.plannerAssisId = 0;
this.form.operatorId = 0;
this.form.operatorAssisId = 0;
}
}
},
},
watch: {
// 监听收款账号的变化
"form.accountId": function (newVal, oldVal) {
this.initPlanningAndOperation();
if (oldVal != "no" && newVal != "no") {
this.initPlanningAndOperation();
}
},
},
};