选择产品线时记录上一次选择的分发责任人
This commit is contained in:
@@ -153,8 +153,8 @@
|
|||||||
placeholder="请选择分发负责人"
|
placeholder="请选择分发负责人"
|
||||||
readonly
|
readonly
|
||||||
@click.native="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)"
|
@click.native="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)"
|
||||||
v-if="!scope.row.distributePerson"></el-input>
|
></el-input>
|
||||||
<span v-else>{{ scope.row.distributePerson }}</span>
|
<!-- <span v-else>{{ scope.row.distributePerson }}</span>-->
|
||||||
</template>
|
</template>
|
||||||
<!-- <template slot-scope="scope,text" v-if="showColumn">-->
|
<!-- <template slot-scope="scope,text" v-if="showColumn">-->
|
||||||
<!-- <div>-->
|
<!-- <div>-->
|
||||||
@@ -563,6 +563,7 @@ export default {
|
|||||||
distributePerson: "", //分发责任人
|
distributePerson: "", //分发责任人
|
||||||
distributePersonId: "", //分发责任人id
|
distributePersonId: "", //分发责任人id
|
||||||
id: "",
|
id: "",
|
||||||
|
pastProject: [], //用来存放上次选中的产品线信息
|
||||||
sarStandProjectLibraries: [{
|
sarStandProjectLibraries: [{
|
||||||
projectManager: "",
|
projectManager: "",
|
||||||
projectLevel: "",
|
projectLevel: "",
|
||||||
@@ -710,6 +711,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//确认添加事件
|
//确认添加事件
|
||||||
okStand() {
|
okStand() {
|
||||||
|
this.pastProject = JSON.parse(localStorage.getItem('projectList'))
|
||||||
let proData = [];
|
let proData = [];
|
||||||
if (this.dataList.length >= 1) {
|
if (this.dataList.length >= 1) {
|
||||||
this.dataList.forEach(item => {
|
this.dataList.forEach(item => {
|
||||||
@@ -727,6 +729,14 @@ export default {
|
|||||||
this.standModel = false;
|
this.standModel = false;
|
||||||
} else {
|
} else {
|
||||||
if (this.standList.length >= 1) {
|
if (this.standList.length >= 1) {
|
||||||
|
this.pastProject.forEach(item => {
|
||||||
|
this.standList.map(items => {
|
||||||
|
if( item.productLine === items.productLine){
|
||||||
|
items.distributePersonId = item.distributePersonId
|
||||||
|
items.distributePerson = item.distributePerson
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
this.dataList = this.standList;
|
this.dataList = this.standList;
|
||||||
this.roleForm.directorUser = this.dataList[0].uname;
|
this.roleForm.directorUser = this.dataList[0].uname;
|
||||||
this.listForm.dataList = this.standList;
|
this.listForm.dataList = this.standList;
|
||||||
@@ -774,6 +784,7 @@ export default {
|
|||||||
this.isSubmit = true;
|
this.isSubmit = true;
|
||||||
this.listForm.commentText = this.commentText;
|
this.listForm.commentText = this.commentText;
|
||||||
var json = Object.assign(this.listForm, this.roleForm);
|
var json = Object.assign(this.listForm, this.roleForm);
|
||||||
|
localStorage.setItem('projectList', JSON.stringify(this.dataList))
|
||||||
this.$refs["listForm"].validate((valid) => {
|
this.$refs["listForm"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs["roleForm"].validate((valid) => {
|
this.$refs["roleForm"].validate((valid) => {
|
||||||
|
|||||||
@@ -686,7 +686,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//确认添加事件
|
//确认添加事件
|
||||||
okStand() {
|
okStand() {
|
||||||
// this.pastProject = JSON.parse(localStorage.getItem('projectList'))
|
this.pastProject = JSON.parse(localStorage.getItem('projectList'))
|
||||||
let proData = [];
|
let proData = [];
|
||||||
if (this.dataList.length >= 1) {
|
if (this.dataList.length >= 1) {
|
||||||
this.dataList.forEach(item => {
|
this.dataList.forEach(item => {
|
||||||
@@ -704,6 +704,14 @@ export default {
|
|||||||
this.standModel = false;
|
this.standModel = false;
|
||||||
} else {
|
} else {
|
||||||
if (this.standList.length >= 1) {
|
if (this.standList.length >= 1) {
|
||||||
|
this.pastProject.forEach(item => {
|
||||||
|
this.standList.map(items => {
|
||||||
|
if( item.productLine === items.productLine){
|
||||||
|
items.distributePersonId = item.distributePersonId
|
||||||
|
items.distributePerson = item.distributePerson
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
this.dataList = this.standList;
|
this.dataList = this.standList;
|
||||||
this.roleForm.directorUser = this.dataList[0].uname;
|
this.roleForm.directorUser = this.dataList[0].uname;
|
||||||
this.listForm.dataList = this.standList;
|
this.listForm.dataList = this.standList;
|
||||||
@@ -749,7 +757,7 @@ export default {
|
|||||||
this.isSubmit = true;
|
this.isSubmit = true;
|
||||||
this.listForm.commentText = this.commentText;
|
this.listForm.commentText = this.commentText;
|
||||||
var json = Object.assign(this.listForm, this.roleForm);
|
var json = Object.assign(this.listForm, this.roleForm);
|
||||||
// localStorage.setItem('projectList', JSON.stringify(this.dataList))
|
localStorage.setItem('projectList', JSON.stringify(this.dataList))
|
||||||
this.$refs["listForm"].validate((valid) => {
|
this.$refs["listForm"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs["roleForm"].validate((valid) => {
|
this.$refs["roleForm"].validate((valid) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user