|
@@ -111,7 +111,7 @@
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180"></el-table-column>
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180"></el-table-column>
|
|
<el-table-column label="修改人" align="center" prop="updateBy"></el-table-column>
|
|
<el-table-column label="修改人" align="center" prop="updateBy"></el-table-column>
|
|
<el-table-column label="修改时间" align="center" prop="updateTime" width="180"></el-table-column>
|
|
<el-table-column label="修改时间" align="center" prop="updateTime" width="180"></el-table-column>
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px" fixed="right">
|
|
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px" fixed="right">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
@@ -127,6 +127,13 @@
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
v-hasPermi="['goal_management:annualSaleGoal:remove']"
|
|
v-hasPermi="['goal_management:annualSaleGoal:remove']"
|
|
>删除</el-button>
|
|
>删除</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-view"
|
|
|
|
+ @click="handleLook(scope.row.id)"
|
|
|
|
+ v-hasPermi="['goal_management:annualSaleGoal:query']"
|
|
|
|
+ >查看</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -317,6 +324,7 @@
|
|
<el-table-column label="二级分类编码" align="center" prop="twoLevelClassify" />
|
|
<el-table-column label="二级分类编码" align="center" prop="twoLevelClassify" />
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" />
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" />
|
|
<el-table-column label="物料" align="center" prop="material" />
|
|
<el-table-column label="物料" align="center" prop="material" />
|
|
|
|
+ <el-table-column label="总计" align="center" prop="totalGoal" />
|
|
<el-table-column label="一月目标" align="center" prop="januaryGoal" />
|
|
<el-table-column label="一月目标" align="center" prop="januaryGoal" />
|
|
<el-table-column label="二月目标" align="center" prop="februaryGoal" />
|
|
<el-table-column label="二月目标" align="center" prop="februaryGoal" />
|
|
<el-table-column label="三月目标" align="center" prop="marchGoal" />
|
|
<el-table-column label="三月目标" align="center" prop="marchGoal" />
|
|
@@ -470,6 +478,130 @@
|
|
</el-drawer>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
|
|
|
|
|
+ <el-drawer title="年度销售目标填报--详情" :visible.sync="drawLook" :direction="direction" :before-close="handleClose" size="100%">
|
|
|
|
+ <el-form :model="form" size="small" :inline="true" v-show="showSearch" label-width="120px">
|
|
|
|
+ <el-row :gutter="10">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="编码" prop="code">
|
|
|
|
+ <el-input v-model="form.code" placeholder="编码后端自动生成" disabled />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="目标名称" prop="goalName">
|
|
|
|
+ <el-input v-model="form.goalName" placeholder="目标名称后端自动生成" disabled />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="单据日期" prop="documentDate">
|
|
|
|
+ <el-date-picker clearable disabled
|
|
|
|
+ v-model="form.documentDate"
|
|
|
|
+ type="date"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ placeholder="请选择单据日期">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="年度" prop="annual">
|
|
|
|
+ <el-select v-model="form.annual" filterable placeholder="请选择年度" disabled>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in annualList"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="10">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="客户" prop="custom">
|
|
|
|
+ <dr-popover-select disabled v-model="form.custom" title="客户" type="CUSTOMER_PARAM" :dataMapping="{
|
|
|
|
+ customCode: 'code',
|
|
|
|
+ custom: 'name',
|
|
|
|
+ }" :source.sync="form"></dr-popover-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="销售组织" prop="saleZone" style="margin-left: -45px">
|
|
|
|
+ <dr-popover-select disabled v-model="form.saleZone" title="销售组织" type="ORG_PARAM" :dataMapping="{
|
|
|
|
+ saleZoneCode: 'code',
|
|
|
|
+ saleZone: 'name',
|
|
|
|
+ }" :source.sync="form"></dr-popover-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="制单人" prop="creator" style="margin-left: -45px">
|
|
|
|
+ <dr-popover-select disabled v-model="form.creator" title="制单人" type="CONTACTS_PARAM" :dataMapping="{
|
|
|
|
+ creatorCode: 'code',
|
|
|
|
+ creator: 'name',
|
|
|
|
+ }" :source.sync="form"></dr-popover-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="部门" prop="dept" style="margin-left: -15px">
|
|
|
|
+ <dr-popover-select disabled v-model="form.dept" title="部门" type="DEPT_PARAM" :dataMapping="{
|
|
|
|
+ deptCode: 'code',
|
|
|
|
+ dept: 'name',
|
|
|
|
+ }" :source.sync="form"></dr-popover-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="10">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="目标合计" prop="goalTotal">
|
|
|
|
+ <el-input disabled v-model="form.goalTotal" placeholder="请输入目标合计" disabled />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="备注" prop="notes">
|
|
|
|
+ <el-input disabled v-model="form.notes" placeholder="请输入备注" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-form-item label="单据状态" prop="documentStatus">
|
|
|
|
+ <el-input disabled v-model="form.documentStatus" placeholder="请输入单据状态" disabled />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-table v-loading="loading" :data="annualSaleGoalDetailsList" @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column type="selection" width="55" align="center" fixed />
|
|
|
|
+ <el-table-column label="id唯一标识" align="center" prop="id" />
|
|
|
|
+ <el-table-column label="编码" align="center" prop="code" />
|
|
|
|
+ <el-table-column label="销售组织" align="center" prop="saleOrg" />
|
|
|
|
+ <el-table-column label="销售区域" align="center" prop="saleZone" />
|
|
|
|
+ <el-table-column label="客户" align="center" prop="custom" />
|
|
|
|
+ <el-table-column label="负责人" align="center" prop="creator" />
|
|
|
|
+ <el-table-column label="一级分类编码" align="center" prop="oneLevelClassifyCode" />
|
|
|
|
+ <el-table-column label="一级分类" align="center" prop="oneLevelClassify" />
|
|
|
|
+ <el-table-column label="二级分类编码" align="center" prop="twoLevelClassifyCode" />
|
|
|
|
+ <el-table-column label="二级分类编码" align="center" prop="twoLevelClassify" />
|
|
|
|
+ <el-table-column label="物料编码" align="center" prop="materialCode" />
|
|
|
|
+ <el-table-column label="物料" align="center" prop="material" />
|
|
|
|
+ <el-table-column label="一月目标" align="center" prop="januaryGoal" />
|
|
|
|
+ <el-table-column label="二月目标" align="center" prop="februaryGoal" />
|
|
|
|
+ <el-table-column label="三月目标" align="center" prop="marchGoal" />
|
|
|
|
+ <el-table-column label="四月目标" align="center" prop="aprilGoal" />
|
|
|
|
+ <el-table-column label="五月目标" align="center" prop="mayGoal" />
|
|
|
|
+ <el-table-column label="六月目标" align="center" prop="juneGoal" />
|
|
|
|
+ <el-table-column label="七月目标" align="center" prop="julyGoal" />
|
|
|
|
+ <el-table-column label="八月目标" align="center" prop="augustGoal" />
|
|
|
|
+ <el-table-column label="九月目标" align="center" prop="septemberGoal" />
|
|
|
|
+ <el-table-column label="十月目标" align="center" prop="octoberGoal" />
|
|
|
|
+ <el-table-column label="十一月目标" align="center" prop="novemberGoal" />
|
|
|
|
+ <el-table-column label="十二月目标" align="center" prop="decemberGoal" />
|
|
|
|
+ </el-table>
|
|
|
|
+ <pagination
|
|
|
|
+ v-show="total>0"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ />
|
|
|
|
+ </el-drawer>
|
|
|
|
+
|
|
<TreeRefers ref="tree" :single="true" @doSubmit="selectionsToTreeInput"></TreeRefers>
|
|
<TreeRefers ref="tree" :single="true" @doSubmit="selectionsToTreeInput"></TreeRefers>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -607,6 +739,8 @@ export default {
|
|
drawerAdd: false,
|
|
drawerAdd: false,
|
|
// 修改抽屉
|
|
// 修改抽屉
|
|
drawEdit: false,
|
|
drawEdit: false,
|
|
|
|
+ // 查看抽屉
|
|
|
|
+ drawLook: false,
|
|
// 细节抽屉
|
|
// 细节抽屉
|
|
drawerDetails: false,
|
|
drawerDetails: false,
|
|
// 抽屉打开方向
|
|
// 抽屉打开方向
|
|
@@ -664,7 +798,7 @@ export default {
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
// 年度销售目标明细
|
|
// 年度销售目标明细
|
|
- annualSaleGoalDetailsList: null,
|
|
|
|
|
|
+ annualSaleGoalDetailsList: [],
|
|
totalDetails: 0,
|
|
totalDetails: 0,
|
|
// 参照条件
|
|
// 参照条件
|
|
referCondition: { type: '', isPage: true, title: '' },
|
|
referCondition: { type: '', isPage: true, title: '' },
|
|
@@ -814,12 +948,18 @@ export default {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.drawerDetails = false;
|
|
this.drawerDetails = false;
|
|
this.getDetailList()
|
|
this.getDetailList()
|
|
|
|
+ getAnnualSaleGoal(this.form.id).then(response => {
|
|
|
|
+ this.form = response.data
|
|
|
|
+ })
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
addAnnualSaleGoalDetails(this.formDetails).then(response => {
|
|
addAnnualSaleGoalDetails(this.formDetails).then(response => {
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.drawerDetails = false;
|
|
this.drawerDetails = false;
|
|
this.getDetailList()
|
|
this.getDetailList()
|
|
|
|
+ getAnnualSaleGoal(this.form.id).then(response => {
|
|
|
|
+ this.form = response.data
|
|
|
|
+ })
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -837,9 +977,13 @@ export default {
|
|
},
|
|
},
|
|
handleDetailsDelete(row) {
|
|
handleDetailsDelete(row) {
|
|
const ids = row.id || this.ids
|
|
const ids = row.id || this.ids
|
|
|
|
+ const code = this.form.code
|
|
this.$modal.confirm('是否确认删除年度销售目标编号为"' + ids + '"的数据项?').then(function () {
|
|
this.$modal.confirm('是否确认删除年度销售目标编号为"' + ids + '"的数据项?').then(function () {
|
|
- return delAnnualSaleGoalDetails(ids)
|
|
|
|
|
|
+ return delAnnualSaleGoalDetails(ids, code)
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
|
+ getAnnualSaleGoal(this.form.id).then(response => {
|
|
|
|
+ this.form = response.data
|
|
|
|
+ })
|
|
this.getDetailList()
|
|
this.getDetailList()
|
|
this.$modal.msgSuccess('删除成功')
|
|
this.$modal.msgSuccess('删除成功')
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
@@ -855,12 +999,14 @@ export default {
|
|
this.$confirm('确认关闭?').then(_ => {
|
|
this.$confirm('确认关闭?').then(_ => {
|
|
done();
|
|
done();
|
|
this.reset()
|
|
this.reset()
|
|
|
|
+ this.getList()
|
|
}).catch(_ => {})
|
|
}).catch(_ => {})
|
|
},
|
|
},
|
|
handleCloseDetails(done) {
|
|
handleCloseDetails(done) {
|
|
this.$confirm('确认关闭?').then(_ => {
|
|
this.$confirm('确认关闭?').then(_ => {
|
|
done();
|
|
done();
|
|
this.resetDetails()
|
|
this.resetDetails()
|
|
|
|
+ this.getList()
|
|
}).catch(_ => {})
|
|
}).catch(_ => {})
|
|
},
|
|
},
|
|
/** 查看时间范围,范围是个数组*/
|
|
/** 查看时间范围,范围是个数组*/
|
|
@@ -870,6 +1016,8 @@ export default {
|
|
},
|
|
},
|
|
// 打开明细新增or编辑界面
|
|
// 打开明细新增or编辑界面
|
|
openDetailsDrawer() {
|
|
openDetailsDrawer() {
|
|
|
|
+ this.resetDetails()
|
|
|
|
+
|
|
this.drawerDetails = true
|
|
this.drawerDetails = true
|
|
this.formDetails.code = this.form.code
|
|
this.formDetails.code = this.form.code
|
|
this.formDetails.saleZone = this.form.saleZone
|
|
this.formDetails.saleZone = this.form.saleZone
|
|
@@ -931,6 +1079,14 @@ export default {
|
|
this.loading = false
|
|
this.loading = false
|
|
console.log(this.annualSaleGoalDetailsList);
|
|
console.log(this.annualSaleGoalDetailsList);
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ handleLook(id) {
|
|
|
|
+ this.resetDetails()
|
|
|
|
+ getAnnualSaleGoal(id).then(response => {
|
|
|
|
+ this.form = response.data
|
|
|
|
+ this.drawLook = !this.drawLook
|
|
|
|
+ this.getDetailList()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|