|
@@ -66,9 +66,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-form>
|
|
</el-form>
|
|
- <template v-if="type === 'distribute'">
|
|
|
|
- 剩余积分值: {{ form.availScore }}
|
|
|
|
- </template>
|
|
|
|
|
|
+ <template v-if="type === 'distribute'"> 剩余积分值: {{ form.availScore }} </template>
|
|
<!-- 审核说明表单 -->
|
|
<!-- 审核说明表单 -->
|
|
<el-form class="reviewForm" v-if="type === 'review' || type === 'dismantleReview'" :model="reviewForm" ref="reviewFormRef" label-width="100px">
|
|
<el-form class="reviewForm" v-if="type === 'review' || type === 'dismantleReview'" :model="reviewForm" ref="reviewFormRef" label-width="100px">
|
|
<el-form-item
|
|
<el-form-item
|
|
@@ -127,13 +125,13 @@ import dayjs from 'dayjs';
|
|
import ElQuarterPicker from '@/components/ElQuarterPicker/index';
|
|
import ElQuarterPicker from '@/components/ElQuarterPicker/index';
|
|
import dismantleTable from './dismantleTable.vue';
|
|
import dismantleTable from './dismantleTable.vue';
|
|
import tableDate from './tableDate.vue';
|
|
import tableDate from './tableDate.vue';
|
|
-import {createListApi, planCheckApi, planDetailCreateApi, getPlanDetailsApi, checkPlanDetailsApi, planUpdateApi, getListDescendantApi} from '@/api/wmdeptbudget/plan.js';
|
|
|
|
|
|
+import { createListApi, planCheckApi, planDetailCreateApi, getPlanDetailsApi, checkPlanDetailsApi, planUpdateApi, getListDescendantApi } from '@/api/wmdeptbudget/plan.js';
|
|
|
|
|
|
-import {getListDrugApi} from '@/api/assignPoints/currency/index';
|
|
|
|
-import {listCsoApi} from '@/api/csmpages/index.js';
|
|
|
|
|
|
+import { getListDrugApi } from '@/api/assignPoints/currency/index';
|
|
|
|
+import { listCsoApi } from '@/api/csmpages/index.js';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- components: {dismantleTable, tableDate, ElQuarterPicker},
|
|
|
|
|
|
+ components: { dismantleTable, tableDate, ElQuarterPicker },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
btnType: '',
|
|
btnType: '',
|
|
@@ -165,12 +163,12 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
rules: {
|
|
rules: {
|
|
- skuId: [{required: true, message: '请填写生产企业', trigger: 'blur'}],
|
|
|
|
- planName: [{required: true, message: '请填写目标名称', trigger: 'blur'}],
|
|
|
|
- monthrange: [{required: true, message: '请选择目标周期'}],
|
|
|
|
- consigneeId: [{required: true, message: '请选择承接对象', trigger: 'blur'}],
|
|
|
|
- planScore: [{required: true, message: '请填写目标总值', trigger: 'blur'}],
|
|
|
|
- planType: [{required: true, message: '请选择承接对象', trigger: 'blur'}]
|
|
|
|
|
|
+ skuId: [{ required: true, message: '请填写生产企业', trigger: 'blur' }],
|
|
|
|
+ planName: [{ required: true, message: '请填写目标名称', trigger: 'blur' }],
|
|
|
|
+ monthrange: [{ required: true, message: '请选择目标周期' }],
|
|
|
|
+ consigneeId: [{ required: true, message: '请选择承接对象', trigger: 'blur' }],
|
|
|
|
+ planScore: [{ required: true, message: '请填写目标总值', trigger: 'blur' }],
|
|
|
|
+ planType: [{ required: true, message: '请选择承接对象', trigger: 'blur' }]
|
|
},
|
|
},
|
|
reviewForm: {
|
|
reviewForm: {
|
|
msg: ''
|
|
msg: ''
|
|
@@ -178,7 +176,7 @@ export default {
|
|
reviewFormMsgRequired: false,
|
|
reviewFormMsgRequired: false,
|
|
|
|
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
- disabledDate: time => {
|
|
|
|
|
|
+ disabledDate: (time) => {
|
|
// 使用箭头函数保持this上下文
|
|
// 使用箭头函数保持this上下文
|
|
const planIssueDate = new Date(this.planIssueRange);
|
|
const planIssueDate = new Date(this.planIssueRange);
|
|
const planExpiryDate = new Date(this.planExpiryRange);
|
|
const planExpiryDate = new Date(this.planExpiryRange);
|
|
@@ -198,7 +196,7 @@ export default {
|
|
},
|
|
},
|
|
skuIdChange(e) {
|
|
skuIdChange(e) {
|
|
if (e) {
|
|
if (e) {
|
|
- const curr = this.drugList.find(item => item.drug_id === e);
|
|
|
|
|
|
+ const curr = this.drugList.find((item) => item.drug_id === e);
|
|
if (curr) this.form.ent_name = curr.ent_name;
|
|
if (curr) this.form.ent_name = curr.ent_name;
|
|
}
|
|
}
|
|
this.nameChange();
|
|
this.nameChange();
|
|
@@ -208,8 +206,8 @@ export default {
|
|
let skuIdName;
|
|
let skuIdName;
|
|
let consigneeIdName;
|
|
let consigneeIdName;
|
|
if (this.form.skuId && this.form.consigneeId) {
|
|
if (this.form.skuId && this.form.consigneeId) {
|
|
- skuIdName = this.drugList.find(item => item.drug_id === this.form.skuId);
|
|
|
|
- consigneeIdName = this.csoList.find(item => item.deptId === this.form.consigneeId);
|
|
|
|
|
|
+ skuIdName = this.drugList.find((item) => item.drug_id === this.form.skuId);
|
|
|
|
+ consigneeIdName = this.csoList.find((item) => item.deptId === this.form.consigneeId);
|
|
}
|
|
}
|
|
if (this.form.planType === 'ANN') {
|
|
if (this.form.planType === 'ANN') {
|
|
if (skuIdName && consigneeIdName) {
|
|
if (skuIdName && consigneeIdName) {
|
|
@@ -239,7 +237,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
confirm() {
|
|
confirm() {
|
|
- this.$refs.ruleForm.validate(async valid => {
|
|
|
|
|
|
+ this.$refs.ruleForm.validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
// 判断如果是编辑 走编辑接口
|
|
// 判断如果是编辑 走编辑接口
|
|
|
|
|
|
@@ -320,8 +318,8 @@ export default {
|
|
let skuIdName;
|
|
let skuIdName;
|
|
let consigneeIdName;
|
|
let consigneeIdName;
|
|
if (this.form.skuId && this.form.consigneeId) {
|
|
if (this.form.skuId && this.form.consigneeId) {
|
|
- skuIdName = this.drugList.find(item => item.drug_id === this.form.skuId);
|
|
|
|
- consigneeIdName = this.csoList.find(item => item.deptId === this.form.consigneeId);
|
|
|
|
|
|
+ skuIdName = this.drugList.find((item) => item.drug_id === this.form.skuId);
|
|
|
|
+ consigneeIdName = this.csoList.find((item) => item.deptId === this.form.consigneeId);
|
|
}
|
|
}
|
|
if (this.form.planType === 'ANN') {
|
|
if (this.form.planType === 'ANN') {
|
|
this.form.planIssue = e + '-01-01';
|
|
this.form.planIssue = e + '-01-01';
|
|
@@ -448,7 +446,7 @@ export default {
|
|
reviewClick(result) {
|
|
reviewClick(result) {
|
|
this.reviewFormMsgRequired = !result;
|
|
this.reviewFormMsgRequired = !result;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.$refs.reviewFormRef.validate(async valid => {
|
|
|
|
|
|
+ this.$refs.reviewFormRef.validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
const obj = {
|
|
const obj = {
|
|
planId: this.form.planId,
|
|
planId: this.form.planId,
|
|
@@ -500,7 +498,7 @@ export default {
|
|
consigneeIdChange(e) {
|
|
consigneeIdChange(e) {
|
|
if (this.type === 'distribute') {
|
|
if (this.type === 'distribute') {
|
|
if (e) {
|
|
if (e) {
|
|
- const consigneeIdName = this.csoList.find(item => item.deptId === e);
|
|
|
|
|
|
+ const consigneeIdName = this.csoList.find((item) => item.deptId === e);
|
|
const name = this.currentRow.planName + '-' + consigneeIdName.name;
|
|
const name = this.currentRow.planName + '-' + consigneeIdName.name;
|
|
this.form.planName = name;
|
|
this.form.planName = name;
|
|
}
|
|
}
|
|
@@ -528,9 +526,9 @@ export default {
|
|
const allQty = data.reduce((prev, curr) => prev + curr.qty, 0);
|
|
const allQty = data.reduce((prev, curr) => prev + curr.qty, 0);
|
|
const allTotal = data.reduce((prev, curr) => prev + curr.subtotal, 0);
|
|
const allTotal = data.reduce((prev, curr) => prev + curr.subtotal, 0);
|
|
|
|
|
|
- if (allTotal != this.form.planScore) {
|
|
|
|
- return this.$message.info('拆解总任务分值需等于目标总值');
|
|
|
|
- }
|
|
|
|
|
|
+ // if (allTotal != this.form.planScore) {
|
|
|
|
+ // return this.$message.info('拆解总任务分值需等于目标总值');
|
|
|
|
+ // }
|
|
const obj = {
|
|
const obj = {
|
|
planId: this.form.planId,
|
|
planId: this.form.planId,
|
|
qty: allQty,
|
|
qty: allQty,
|
|
@@ -555,7 +553,7 @@ export default {
|
|
dismantleReviewSubmt(type) {
|
|
dismantleReviewSubmt(type) {
|
|
this.reviewFormMsgRequired = !type;
|
|
this.reviewFormMsgRequired = !type;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.$refs.reviewFormRef.validate(async valid => {
|
|
|
|
|
|
+ this.$refs.reviewFormRef.validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
const obj = {
|
|
const obj = {
|
|
detailsId: this.form.planDetails.detailsId,
|
|
detailsId: this.form.planDetails.detailsId,
|