|
|
@@ -1,51 +1,59 @@
|
|
|
<template>
|
|
|
<div class="other">
|
|
|
- <el-form label-width="120px" ref="form" :model="form">
|
|
|
- <div class="divider">
|
|
|
- <div class="title">
|
|
|
- <div class="ele-bg-primary"></div>
|
|
|
- <span>计划</span>
|
|
|
- </div>
|
|
|
- <div class="ele-bg-primary ele-width"></div>
|
|
|
- </div>
|
|
|
- <el-row :gutter="24">
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="固定提前期" prop="fixLeadTime">
|
|
|
- <el-input v-model="form.fixLeadTime" @input="inputFix"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="变动提前期" prop="changeLeadTime">
|
|
|
- <el-input v-model="form.changeLeadTime" @input="inputChange"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="检验提前期" prop="checkLeadTime">
|
|
|
- <el-input v-model="form.checkLeadTime" @input="inputCheck"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="累计提前期" prop="cumLeadTime">
|
|
|
- <el-input v-model="form.cumLeadTime" readonly/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="提前期单位" prop="unit">
|
|
|
- <DictSelection dictName="提前期单位" clearable v-model="form.unit">
|
|
|
- </DictSelection>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="订货间隔期" prop="scheduleType">
|
|
|
- <div class="form-line">
|
|
|
- <el-input v-model="form.orderIntervalTime"/>
|
|
|
- <DictSelection class="line-select" dictName="提前期单位" clearable v-model="form.orderIntervalUnit">
|
|
|
- </DictSelection>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
+ <el-form label-width="100px" ref="form" :model="form">
|
|
|
+ <div class="divider">
|
|
|
+ <div class="title">
|
|
|
+ <div class="ele-bg-primary"></div>
|
|
|
+ <span>计划</span>
|
|
|
+ </div>
|
|
|
+ <div class="ele-bg-primary ele-width"></div>
|
|
|
+ </div>
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="固定提前期" prop="fixLeadTime">
|
|
|
+ <el-input v-model="form.fixLeadTime" @input="inputFix" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="变动提前期" prop="changeLeadTime">
|
|
|
+ <el-input v-model="form.changeLeadTime" @input="inputChange" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="检验提前期" prop="checkLeadTime">
|
|
|
+ <el-input v-model="form.checkLeadTime" @input="inputCheck" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="累计提前期" prop="cumLeadTime">
|
|
|
+ <el-input v-model="form.cumLeadTime" readonly />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="提前期单位" prop="unit">
|
|
|
+ <DictSelection dictName="提前期单位" clearable v-model="form.unit">
|
|
|
+ </DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="订货间隔期" prop="scheduleType">
|
|
|
+ <div class="form-line">
|
|
|
+ <el-input
|
|
|
+ v-model="form.orderIntervalTime"
|
|
|
+ style="width: calc(100% - 100px)"
|
|
|
+ />
|
|
|
+ <DictSelection
|
|
|
+ dictName="提前期单位"
|
|
|
+ clearable
|
|
|
+ v-model="form.orderIntervalUnit"
|
|
|
+ style="width: 100px"
|
|
|
+ >
|
|
|
+ </DictSelection>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -57,39 +65,48 @@
|
|
|
default: {}
|
|
|
}
|
|
|
},
|
|
|
- components: { },
|
|
|
+ components: {},
|
|
|
data() {
|
|
|
- return {
|
|
|
-
|
|
|
-
|
|
|
- };
|
|
|
+ return {};
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- inputFix(val){
|
|
|
- const changeLeadTime = this.form.changeLeadTime?Number(this.form.changeLeadTime):0
|
|
|
- const checkLeadTime = this.form.checkLeadTime?Number(this.form.checkLeadTime):0
|
|
|
- val = val?Number(val):0
|
|
|
- this.form.cumLeadTime = val + changeLeadTime + checkLeadTime
|
|
|
+ inputFix(val) {
|
|
|
+ const changeLeadTime = this.form.changeLeadTime
|
|
|
+ ? Number(this.form.changeLeadTime)
|
|
|
+ : 0;
|
|
|
+ const checkLeadTime = this.form.checkLeadTime
|
|
|
+ ? Number(this.form.checkLeadTime)
|
|
|
+ : 0;
|
|
|
+ val = val ? Number(val) : 0;
|
|
|
+ this.form.cumLeadTime = val + changeLeadTime + checkLeadTime;
|
|
|
},
|
|
|
- inputChange(val){
|
|
|
- const fixLeadTime = this.form.fixLeadTime?Number(this.form.fixLeadTime):0
|
|
|
- const checkLeadTime = this.form.checkLeadTime?Number(this.form.checkLeadTime):0
|
|
|
- val = val?Number(val):0
|
|
|
- this.form.cumLeadTime = val + fixLeadTime + checkLeadTime
|
|
|
+ inputChange(val) {
|
|
|
+ const fixLeadTime = this.form.fixLeadTime
|
|
|
+ ? Number(this.form.fixLeadTime)
|
|
|
+ : 0;
|
|
|
+ const checkLeadTime = this.form.checkLeadTime
|
|
|
+ ? Number(this.form.checkLeadTime)
|
|
|
+ : 0;
|
|
|
+ val = val ? Number(val) : 0;
|
|
|
+ this.form.cumLeadTime = val + fixLeadTime + checkLeadTime;
|
|
|
},
|
|
|
- inputCheck(val){
|
|
|
- const fixLeadTime = this.form.fixLeadTime?Number(this.form.fixLeadTime):0
|
|
|
- const changeLeadTime = this.form.changeLeadTime?Number(this.form.changeLeadTime):0
|
|
|
- val = val?Number(val):0
|
|
|
- this.form.cumLeadTime = val + fixLeadTime + changeLeadTime
|
|
|
+ inputCheck(val) {
|
|
|
+ const fixLeadTime = this.form.fixLeadTime
|
|
|
+ ? Number(this.form.fixLeadTime)
|
|
|
+ : 0;
|
|
|
+ const changeLeadTime = this.form.changeLeadTime
|
|
|
+ ? Number(this.form.changeLeadTime)
|
|
|
+ : 0;
|
|
|
+ val = val ? Number(val) : 0;
|
|
|
+ this.form.cumLeadTime = val + fixLeadTime + changeLeadTime;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .other{
|
|
|
+ .other {
|
|
|
background: #fff;
|
|
|
padding: 1px 17px;
|
|
|
}
|
|
|
@@ -108,17 +125,17 @@
|
|
|
font-size: 20px;
|
|
|
}
|
|
|
}
|
|
|
- .ele-width{
|
|
|
+ .ele-width {
|
|
|
width: 100%;
|
|
|
height: 2px;
|
|
|
}
|
|
|
}
|
|
|
- .form-line{
|
|
|
+ .form-line {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- .line-select{
|
|
|
- margin-left:15px;
|
|
|
+ .line-select {
|
|
|
+ margin-left: 15px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|