更新
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 1000;pageCurrent = 1;pageSize = 1000;getTableData()">查询</el-button>
|
||||
<el-button icon="el-icon-circle-plus-outline" type="primary" size="small" @click="openUrgentItem()">加急件</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div v-for="(file, key) in hadFile" :key="key">
|
||||
@@ -262,11 +263,49 @@
|
||||
@current-change="handleCurrentChangeWB"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="添加加急件" center style="min-height: 300px" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="机床号" prop="机床号" style="margin-left: 70px">
|
||||
<el-select v-model="form.机床号" placeholder="选择机床" filterable clearable size="small" style="width:200px" @change="getGroupSelect1">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="组号" prop="组号" style="margin-left: 70px">
|
||||
<el-select v-model="form.组号" placeholder="选择组号" filterable clearable size="small" style="width:200px">
|
||||
<el-option
|
||||
v-for="item in group1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件图号" prop="零件图号" style="margin-left: 70px">
|
||||
<el-input v-model="form.零件图号" placeholder="零件图号" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件名称" prop="零件名称" style="margin-left: 70px">
|
||||
<el-input v-model="form.零件名称" placeholder="零件名称" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件数量" prop="零件数量" style="margin-left: 70px">
|
||||
<el-input v-model="form.零件数量" placeholder="零件数量" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件备注" prop="零件备注" style="margin-left: 70px">
|
||||
<el-input v-model="form.零件备注" placeholder="零件备注" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { machineSelect, groupSelect, basicPartsData, deleteBasicParts, purchasePartsData, deletePurchaseData, getFileData } from '@/api/TechnologyCenter/QueryParts'
|
||||
import { machineSelect, groupSelect, basicPartsData, deleteBasicParts, purchasePartsData, deletePurchaseData, getFileData, addUrgentItem } from '@/api/TechnologyCenter/QueryParts'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { ServerIP } from '@/utils/request'
|
||||
export default {
|
||||
@@ -277,8 +316,10 @@ export default {
|
||||
machine: [],
|
||||
groupValue: '',
|
||||
group: [],
|
||||
group1: [],
|
||||
loading: false,
|
||||
loadingWB: false,
|
||||
dialogFormVisible: false,
|
||||
total: 0,
|
||||
tableData: [],
|
||||
tableDataWB: [],
|
||||
@@ -287,6 +328,21 @@ export default {
|
||||
pageCurrentWB: 1,
|
||||
pageSizeWB: 1000,
|
||||
totalWB: 0,
|
||||
form: {
|
||||
机床号: '',
|
||||
组号: '',
|
||||
零件图号: '',
|
||||
零件名称: '',
|
||||
零件数量: '',
|
||||
零件备注: ''
|
||||
},
|
||||
rules: {
|
||||
机床号: [{ required: true, message: '请选择机床', trigger: 'change' }],
|
||||
组号: [{ required: true, message: '请选择组号', trigger: 'change' }],
|
||||
零件图号: [{ required: true, message: '请输入零件图号', trigger: 'blur' }],
|
||||
零件名称: [{ required: true, message: '请输入零件名称', trigger: 'blur' }],
|
||||
零件数量: [{ required: true, message: '请输入零件数量', trigger: 'blur' }]
|
||||
},
|
||||
hadFile: []
|
||||
}
|
||||
},
|
||||
@@ -357,6 +413,29 @@ export default {
|
||||
getGroupSelect(val) {
|
||||
this.getSelect(groupSelect, ['组号', '组件流水号'], 'group', val)
|
||||
},
|
||||
getGroupSelect1() {
|
||||
this.form.组号 = ''
|
||||
this.getSelect(groupSelect, ['组号', '组件流水号'], 'group1', this.form.机床号)
|
||||
},
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addUrgentItem(this.form.组号, this.form.零件图号, this.form.零件名称, this.form.零件数量, this.form.零件备注, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.getTableData()
|
||||
this.dialogFormVisible = false
|
||||
} else {
|
||||
this.$message.error('添加成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getTableData() {
|
||||
this.getFileData(this.machineValue)
|
||||
console.log(this.hadFile, 88899)
|
||||
@@ -398,6 +477,12 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
openUrgentItem() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
if (row.基本件流水号) {
|
||||
this.deleteRow(deleteBasicParts, row.基本件流水号, function() {
|
||||
|
||||
Reference in New Issue
Block a user