|
@@ -20,14 +20,7 @@
|
|
|
</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>
|
|
|
+ <HcdataModal v-model="isFormModal" :ids="rowId" @finish="dataModalFinish" />
|
|
|
</hc-card>
|
|
|
</template>
|
|
|
|
|
@@ -37,6 +30,7 @@ import { useAppStore } from '~src/store'
|
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
|
import { getArrValue } from 'js-fast-way'
|
|
|
import mainApi from '~api/debit-pay/material/material'
|
|
|
+import HcdataModal from './components/material/dataModal.vue'
|
|
|
|
|
|
//初始化
|
|
|
const store = useAppStore()
|
|
@@ -67,7 +61,7 @@ const tableData = ref([
|
|
|
//获取表格数据
|
|
|
const tableLoading = ref(false)
|
|
|
const getTableData = async () => {
|
|
|
- tableLoading.value = true
|
|
|
+ /*tableLoading.value = true
|
|
|
const { error, code, data } = await mainApi.getAllMaterial({
|
|
|
//...searchForm.value,
|
|
|
projectId: projectId.value,
|
|
@@ -78,45 +72,34 @@ const getTableData = async () => {
|
|
|
tableData.value = getArrValue(data)
|
|
|
} else {
|
|
|
tableData.value = []
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
-//弹窗
|
|
|
-const isFormModal = ref(false)
|
|
|
-const formModel = ref({})
|
|
|
-
|
|
|
//新增
|
|
|
+const isFormModal = ref(false)
|
|
|
+const rowId = ref('')
|
|
|
const addFormModal = () => {
|
|
|
+ rowId.value = ''
|
|
|
isFormModal.value = true
|
|
|
- formModel.value = {}
|
|
|
-}
|
|
|
-
|
|
|
-//保存
|
|
|
-const saveLoaing = ref(false)
|
|
|
-const modalSave = async () => {
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
-//关闭弹窗
|
|
|
-const modalClose = () => {
|
|
|
- isFormModal.value = false
|
|
|
-}
|
|
|
-
|
|
|
-//保存并关闭
|
|
|
-const modalSaveClose = () => {
|
|
|
-
|
|
|
}
|
|
|
|
|
|
//材料名称被点击
|
|
|
const rowTop = (row) => {
|
|
|
-
|
|
|
+ rowId.value = row.id
|
|
|
+ isFormModal.value = true
|
|
|
}
|
|
|
|
|
|
//编辑
|
|
|
const rowEditClick = (row) => {
|
|
|
-
|
|
|
+ rowId.value = row.id
|
|
|
+ isFormModal.value = true
|
|
|
}
|
|
|
|
|
|
+//数据弹窗完成
|
|
|
+const dataModalFinish = () => {
|
|
|
+ isFormModal.value = false
|
|
|
+ getTableData()
|
|
|
+}
|
|
|
|
|
|
//删除
|
|
|
const rowDelClick = (row) => {
|