Merge pull request '组批次规则维护复制功能' (#10) from develop-组批次规则拓扑图 into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-frontend/pulls/10
This commit is contained in:
commit
d8b21c55d0
@ -93,6 +93,9 @@ export default {
|
||||
props:{
|
||||
id:{
|
||||
type:Number
|
||||
},
|
||||
titleType:{
|
||||
type:String,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -145,7 +148,7 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
}else{
|
||||
this.reset();
|
||||
this.reset();
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
@ -173,17 +176,34 @@ export default {
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
// if (this.form.id != null) {
|
||||
if(this.titleType=="edit"){
|
||||
updateEmisTransPlanRule(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$emit("on-changed");
|
||||
});
|
||||
} else {
|
||||
} else if(this.titleType=="add"){
|
||||
addEmisTransPlanRule(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$emit("on-changed");
|
||||
this.$emit("on-changed");
|
||||
});
|
||||
}
|
||||
} else if(this.titleType=="copy"){
|
||||
let newform ={
|
||||
endDate:this.form.endDate,
|
||||
remark:this.form.remark,
|
||||
lineCode:this.form.lineCode,
|
||||
productType:this.form.productType,
|
||||
startSiteCode:this.form.startSiteCode,
|
||||
nextSiteCode:this.form.nextSiteCode,
|
||||
manager:this.form.manager,
|
||||
supplierCode:this.form.supplierCode,
|
||||
startDate:this.form.startDate,
|
||||
};
|
||||
addEmisTransPlanRule(newform).then(response => {
|
||||
this.$modal.msgSuccess("复制成功");
|
||||
this.$emit("on-changed");
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -133,6 +133,14 @@
|
||||
v-hasPermi="['emis:emisTransPlanRule:edit']"
|
||||
>按线路重算</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleCopy"
|
||||
>复制规则</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@ -157,7 +165,7 @@
|
||||
</XdTable>
|
||||
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="50%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||
<emisTransPlanRuleForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisTransPlanRuleForm>
|
||||
<emisTransPlanRuleForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm" :titleType="titleType"></EmisTransPlanRuleForm>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="titleBatchForm" :visible.sync="openBatchUpdateForm" width="50%" :destroy-on-close="true" :close-on-click-modal="false" v-dialogDrag append-to-body>
|
||||
@ -229,7 +237,7 @@ export default {
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
titleType:'',
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
@ -298,6 +306,7 @@ export default {
|
||||
this.currentId=null;
|
||||
this.openForm= true;
|
||||
this.titleForm = "新增规则";
|
||||
this.titleType="add"
|
||||
},
|
||||
handleShowMoreInput(){
|
||||
this.moreInputVisible = !this.moreInputVisible;
|
||||
@ -320,6 +329,14 @@ export default {
|
||||
this.currentId= row.id||this.ids[0];
|
||||
this.openForm = true;
|
||||
this.titleForm = "修改规则";
|
||||
this.titleType="edit";
|
||||
},
|
||||
/**复制按钮操作 */
|
||||
handleCopy(row){
|
||||
this.currentId= row.id||this.ids[0];
|
||||
this.openForm = true;
|
||||
this.titleForm = "复制规则";
|
||||
this.titleType="copy";
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user