|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<hc-card title="材料调差" class="hc-debit-pay-material-material">
|
|
|
<template #extra>
|
|
|
- <el-button hc-btn type="primary">
|
|
|
+ <el-button hc-btn type="primary" @click="addFormModal">
|
|
|
<hc-icon name="add" />
|
|
|
<span>新增</span>
|
|
|
</el-button>
|
|
@@ -19,6 +19,15 @@
|
|
|
<el-link type="danger" @click="rowDelClick(row)">删除</el-link>
|
|
|
</template>
|
|
|
</hc-table>
|
|
|
+ <!-- 新增/编辑 -->
|
|
|
+ <hc-new-dialog v-model="isFormModal" :title="`${formModel.id ? '编辑' : '新增'}材料调差单`" is-footer-center is-table widths="80rem" @close="modalClose">
|
|
|
+ 1111111
|
|
|
+ <template #footer>
|
|
|
+ <el-button hc-btn @click="modalClose">取消</el-button>
|
|
|
+ <el-button :loading="saveLoaing" hc-btn type="primary" @click="modalSave">提交</el-button>
|
|
|
+ <el-button v-if="!formModel.id" :loading="saveLoaing" hc-btn type="primary" @click="modalSaveClose">提交并关闭</el-button>
|
|
|
+ </template>
|
|
|
+ </hc-new-dialog>
|
|
|
</hc-card>
|
|
|
</template>
|
|
|
|
|
@@ -72,6 +81,32 @@ const getTableData = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+//弹窗
|
|
|
+const isFormModal = ref(false)
|
|
|
+const formModel = ref({})
|
|
|
+
|
|
|
+//新增
|
|
|
+const addFormModal = () => {
|
|
|
+ isFormModal.value = true
|
|
|
+ formModel.value = {}
|
|
|
+}
|
|
|
+
|
|
|
+//保存
|
|
|
+const saveLoaing = ref(false)
|
|
|
+const modalSave = async () => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//关闭弹窗
|
|
|
+const modalClose = () => {
|
|
|
+ isFormModal.value = false
|
|
|
+}
|
|
|
+
|
|
|
+//保存并关闭
|
|
|
+const modalSaveClose = () => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
//材料名称被点击
|
|
|
const rowTop = (row) => {
|
|
|
|
|
@@ -82,9 +117,12 @@ const rowEditClick = (row) => {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//删除
|
|
|
const rowDelClick = (row) => {
|
|
|
-
|
|
|
+ HcDelMsg(async (resolve) => {
|
|
|
+ resolve()
|
|
|
+ })
|
|
|
}
|
|
|
</script>
|
|
|
|