|
@@ -16,6 +16,7 @@
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button size="mini" @click="formCancel">取 消</el-button>
|
|
|
<el-button size="mini" @click="formConfirm" type="primary">确 定</el-button>
|
|
|
+ <el-button size="mini" @click="passExamination" type="primary">审核通过</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -60,24 +61,25 @@ export default {
|
|
|
operation(h, { row, index, column }) {
|
|
|
return (
|
|
|
<div class='operation-btns'>
|
|
|
+ {row.flag=="SAVE" ? <el-button type="text" onClick={() => {
|
|
|
+ this.getDetail(row.purchaseRetId, 1)
|
|
|
+ }}>编辑</el-button> : null}
|
|
|
+ {row.flag=="SAVE" ? <el-button type="text" onClick={() => {
|
|
|
+ this.getDetail(row.purchaseRetId, 3)
|
|
|
+ }}>审核</el-button> : null}
|
|
|
<el-button type="text" onClick={() => {
|
|
|
- Object.assign(this.formData, row)
|
|
|
- this.formDialogType = 1
|
|
|
- this.openForm()
|
|
|
- }}>编辑</el-button>
|
|
|
- <el-button type="text" onClick={() => {
|
|
|
- Object.assign(this.formData, row)
|
|
|
- this.formDialogType = 2
|
|
|
- this.openForm()
|
|
|
+ this.getDetail(row.purchaseRetId, 2)
|
|
|
}}>详情</el-button>
|
|
|
- <el-button type="text" onClick={() => {
|
|
|
- Object.assign(this.formData, row)
|
|
|
- this.formDialogType = 3
|
|
|
- this.openForm()
|
|
|
- }}>审核</el-button>
|
|
|
</div>
|
|
|
)
|
|
|
},
|
|
|
+ getDetail(purchaseRetId, type) {
|
|
|
+ websitPurchaseRetDetail({ purchaseRetId }).then(res => {
|
|
|
+ Object.assign(this.formData, res.data)
|
|
|
+ this.formDialogType = type
|
|
|
+ this.openForm()
|
|
|
+ })
|
|
|
+ },
|
|
|
formConfirm() {
|
|
|
this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
|
|
|
if (valid) {
|
|
@@ -88,6 +90,17 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ passExamination() {
|
|
|
+ this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
|
|
|
+ if (valid) {
|
|
|
+ websitPurchaseRetConfirm({ purchaseRetId: this.formData.purchaseRetId, flag: "OK" }).then(res => {
|
|
|
+ this.$message({ type: 'success', message: `审核通过!` })
|
|
|
+ this.formCancel()
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|