parent
8ece48edfb
commit
f2cfb10329
8 changed files with 436 additions and 16885 deletions
@ -0,0 +1,129 @@ |
||||
<template> |
||||
<el-dialog |
||||
v-drag |
||||
title="转试" |
||||
:modelValue="openShow" |
||||
:before-close="cancel" |
||||
:def-width="500" |
||||
append-to-body |
||||
> |
||||
<el-form ref="form" :model="formData" :rules="rules" label-width="100px" class="el-form-row"> |
||||
<el-form-item label="试验计划" prop="testValue"> |
||||
<el-select v-model="formData.testValue" placeholder="请选择"> |
||||
<el-option |
||||
v-for="item in optionsList" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="备注" prop="memo"> |
||||
<el-input |
||||
v-model="formData.memo" |
||||
:autosize="{ minRows: 3, maxRows: 6 }" |
||||
show-word-limit |
||||
maxlength="900" |
||||
type="textarea" |
||||
placeholder="请输入内容" |
||||
/> |
||||
</el-form-item> |
||||
</el-form> |
||||
<template #footer> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="cancel">取消</el-button> |
||||
<el-button type="primary" @click="submit" :disabled="isDisabled">确定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
import { |
||||
trialItemList, |
||||
launchTest, |
||||
isTransferTest, |
||||
} from '@/api/productionManagement/sinTerWorkOrder'; |
||||
|
||||
export default { |
||||
props: { |
||||
showDialog: { type: Boolean, default: false }, |
||||
rowItem: { |
||||
type: Object, |
||||
default: () => {}, |
||||
}, |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow: false, |
||||
formData: { testValue: null }, |
||||
// rules: { |
||||
// testValue: [this.$validation.required] |
||||
// }, |
||||
optionsList: [], |
||||
isDisabled: false, |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
this.open(); |
||||
}, |
||||
methods: { |
||||
open() { |
||||
// 查询转试得试验项目数据 |
||||
trialItemList().then(res => { |
||||
this.optionsList = res.data.data; |
||||
}); |
||||
// this.$ajax.post('prWorkOrder/trialItemList').then(res => { |
||||
// if (this.$ifAjax(res)) { |
||||
// this.optionsList = res.data; |
||||
// } |
||||
// }); |
||||
}, |
||||
submit() { |
||||
this.isDisabled = true; |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
launchTest({ |
||||
testList: [this.formData.testValue], |
||||
remark: this.formData.memo, |
||||
batchNo: this.rowItem.batchNo, |
||||
quantity: this.rowItem.makeQty, |
||||
partCode: this.rowItem.partCode, |
||||
partName: this.rowItem.partName, |
||||
productType: this.rowItem.productType, |
||||
woId: this.rowItem.woId, |
||||
woCode: this.rowItem.woCode, |
||||
}).then(res => { |
||||
this.$message.success('转试成功'); |
||||
this.cancel(false); |
||||
this.isDisabled = false; |
||||
}); |
||||
this.$ajax.post('prWorkOrder/launchTest', { |
||||
testList: [this.formData.testValue], |
||||
remark: this.formData.memo, |
||||
batchNo: this.rowItem.batchNo, |
||||
quantity: this.rowItem.makeQty, |
||||
partCode: this.rowItem.pjYieldOrder.partCode, |
||||
partName: this.rowItem.pjYieldOrder.partName, |
||||
productType: this.rowItem.pjYieldOrder.productType, |
||||
woId: this.rowItem.woId, |
||||
woCode: this.rowItem.woCode, |
||||
}); |
||||
// .then(res => { |
||||
// if (this.$ifAjax(res)) { |
||||
// this.$message.success('转试成功'); |
||||
// this.cancel(false); |
||||
// this.isDisabled = false; |
||||
// } |
||||
// }); |
||||
} |
||||
}); |
||||
}, |
||||
cancel(flag = false) { |
||||
this.$emit('cancel', flag); |
||||
this.formData = {}; |
||||
this.$refs.form.resetFields(); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue