This commit is contained in:
liushuai
2018-12-17 20:37:10 +08:00
parent 916996c1ab
commit 05f44d8b7d
13 changed files with 1501 additions and 233 deletions

View File

@@ -717,7 +717,8 @@ export default {
},
purchaseRequisition() {
if (this.RequisitionList !== '') {
if (this.time !== '') {
console.log(this.time)
if (this.time !== '' && this.time !== null) {
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
this.result = 0
if (this.PartType === '基本件') {
@@ -794,7 +795,7 @@ export default {
}
},
PurchasingDepartment() {
if (this.time !== '') {
if (this.time !== '' && this.time !== null) {
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
if (this.PartType === '基本件') {
purchaseRequisition2(this.projectFloatValue, this.machineFloatValue, this.groupFloatValue, this.BasicPartsNumber, this.NumberOfParts, this.time).then(response => {
@@ -813,11 +814,11 @@ export default {
this.tableData6 = response.data
})
} else {
this.$message.success('请购失败')
this.$message.error('请购失败')
}
})
} else {
PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing, this.time, this.MaterialNum, this.NumberOfParts, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => {
PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing, this.time, this.MaterialNum, this.NumberOfParts, this.projectFloatValue, this.machineFloatValue).then(response => {
if (response.data[0].result !== '0') {
this.$message.success('请购成功')
if (this.PartType === '外购件') {
@@ -830,7 +831,7 @@ export default {
})
}
} else {
this.$message.success('请购失败')
this.$message.error('请购失败')
}
})
}

View File

@@ -77,6 +77,17 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<span>有效时间</span>
<el-date-picker
v-model="time"
type="date"
size="small"
value-format="yyyy-MM-dd"
placeholder="选择日期"/>
<el-button type="primary" size="small" icon="el-icon-setting" style="margin-left:10px" @click="setUp">设定</el-button>
<el-button type="success" size="small" icon="el-icon-edit-outline" style="margin-left:10px" @click="generate">生成设备加工能力</el-button>
</el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="800px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px" class="demo-ruleForm">
@@ -163,13 +174,14 @@
</template>
<script>
import { getData, initProcessing, addTable, editTable, deleteTable } from '@/api/ManufacturingCenter/WorkshopEquipmentManagement'
import { getData, initProcessing, addTable, editTable, deleteTable, setUp, generate } from '@/api/ManufacturingCenter/WorkshopEquipmentManagement'
export default {
data() {
return {
equipmentName: '', // 设备名称
List: [],
check: 0,
time: '',
pageCurrent: 1,
pageSize: 10,
total: null,
@@ -348,6 +360,24 @@ export default {
})
})
},
setUp() {
if (this.time !== '') {
setUp(this.time).then(response => {
if (response.data[0].result === '1') {
this.$message.success('设定成功')
} else { this.$message.error('设定失败') }
})
} else {
this.$message.warning('请选择有效时间')
}
},
generate() {
generate().then(response => {
if (response.data[0].result === '1') {
this.$message.success('生成成功')
} else { this.$message.error('生成失败') }
})
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1