|
|
|
@ -420,10 +420,10 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="新建领料申请单" :close-on-click-modal="false" v-drag :visible.sync="createNotifyFlag" width="300px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form :inline="true" :model="notifyData" :rules="notifyRules" ref="notifyForm" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="'工厂_BU'" style="width: 97%"> |
|
|
|
<el-form-item :label="'工厂_BU'" prop="bu" style="width: 97%"> |
|
|
|
<el-select v-model="notifyData.bu" placeholder="请选择" style="width: 100%"> |
|
|
|
<el-option |
|
|
|
v-for = "i in userBuList" |
|
|
|
@ -439,7 +439,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="'车间'"> |
|
|
|
<el-form-item :label="'车间'" prop="workCenterNo"> |
|
|
|
<el-select v-model="notifyData.workCenterNo" clearable placeholder="请选择" style="width: 100%"> |
|
|
|
<el-option |
|
|
|
v-for = "i in workCenterList" |
|
|
|
@ -1131,6 +1131,15 @@ |
|
|
|
workCenterList: [], |
|
|
|
createNotifyFlag: false, |
|
|
|
saveOrderDetailFlag: false, |
|
|
|
// 新建领料申请单表单验证规则 |
|
|
|
notifyRules: { |
|
|
|
bu: [ |
|
|
|
{ required: true, message: '请选择工厂_BU', trigger: 'change' } |
|
|
|
], |
|
|
|
workCenterNo: [ |
|
|
|
{ required: true, message: '请选择车间', trigger: 'change' } |
|
|
|
] |
|
|
|
}, |
|
|
|
closeData:{ |
|
|
|
site:'', |
|
|
|
notifyNo:'', |
|
|
|
@ -3076,33 +3085,41 @@ |
|
|
|
|
|
|
|
//保存领料申请单 |
|
|
|
saveNotify() { |
|
|
|
let buValue = this.notifyData.bu |
|
|
|
let site = buValue.split('_')[0] |
|
|
|
let bu = buValue.split('_')[1] |
|
|
|
let inData = { |
|
|
|
site: site, |
|
|
|
bu: bu, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
remark: this.notifyData.remark, |
|
|
|
workCenterNo: this.notifyData.workCenterNo, |
|
|
|
} |
|
|
|
createNotify(inData).then(({data})=>{ |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
this.createNotifyFlag = false |
|
|
|
// 刷新主表数据 |
|
|
|
this.searchTable() |
|
|
|
}else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
// 验证表单 |
|
|
|
this.$refs.notifyForm.validate((valid) => { |
|
|
|
if (!valid) { |
|
|
|
this.$message.warning('请填写必填项'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
let buValue = this.notifyData.bu |
|
|
|
let site = buValue.split('_')[0] |
|
|
|
let bu = buValue.split('_')[1] |
|
|
|
let inData = { |
|
|
|
site: site, |
|
|
|
bu: bu, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
remark: this.notifyData.remark, |
|
|
|
workCenterNo: this.notifyData.workCenterNo, |
|
|
|
} |
|
|
|
createNotify(inData).then(({data})=>{ |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
this.createNotifyFlag = false |
|
|
|
// 刷新主表数据 |
|
|
|
this.searchTable() |
|
|
|
}else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//新增派工单明细 |
|
|
|
|