🦄 refactor: 票据审核页面代码重构
This commit is contained in:
parent
7407d6afa2
commit
dc27f047f3
|
@ -122,12 +122,8 @@
|
||||||
style="margin-bottom: 0.5rem"
|
style="margin-bottom: 0.5rem"
|
||||||
>
|
>
|
||||||
<t-radio-group v-model="dialogData.Status">
|
<t-radio-group v-model="dialogData.Status">
|
||||||
<t-radio value="1" @change="refuse === false"
|
<t-radio value="1" @click="refuse = false">审核通过</t-radio>
|
||||||
>审核通过</t-radio
|
<t-radio value="2" @click="refuse = true">审核拒绝</t-radio>
|
||||||
>
|
|
||||||
<t-radio value="2" @change="refuse === true"
|
|
||||||
>审核拒绝</t-radio
|
|
||||||
>
|
|
||||||
</t-radio-group>
|
</t-radio-group>
|
||||||
</t-form-item>
|
</t-form-item>
|
||||||
<t-form-item />
|
<t-form-item />
|
||||||
|
@ -172,6 +168,7 @@ const destroyList = useDestroy();
|
||||||
const tableData = ref([]);
|
const tableData = ref([]);
|
||||||
const data = ref([]);
|
const data = ref([]);
|
||||||
const headerTitle = ref("");
|
const headerTitle = ref("");
|
||||||
|
const rowItem = ref({});
|
||||||
// 表格表头
|
// 表格表头
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
|
@ -254,7 +251,7 @@ const refresh = () => {
|
||||||
// 弹出框表单
|
// 弹出框表单
|
||||||
const dialogData = ref({
|
const dialogData = ref({
|
||||||
refuseInfo: "",
|
refuseInfo: "",
|
||||||
status: "",
|
Status: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
// 查询表单
|
// 查询表单
|
||||||
|
@ -322,7 +319,7 @@ const breakageAdd = () => {
|
||||||
visiblePost.value = true;
|
visiblePost.value = true;
|
||||||
dialogData.value = {
|
dialogData.value = {
|
||||||
refuseInfo: "",
|
refuseInfo: "",
|
||||||
status: "",
|
Status: "",
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -339,8 +336,10 @@ const FORM_RULES = {
|
||||||
// 新增
|
// 新增
|
||||||
const breakSub = async ({ validateResult, firstError }) => {
|
const breakSub = async ({ validateResult, firstError }) => {
|
||||||
if (validateResult === true) {
|
if (validateResult === true) {
|
||||||
dialogData.value.breakStatus = 0;
|
dialogData.value = {
|
||||||
await breakageList.addBreakageList(dialogData.value);
|
...rowItem.row.value,
|
||||||
|
};
|
||||||
|
await destroyList.auditDestroyList(dialogData.value);
|
||||||
getNewTable();
|
getNewTable();
|
||||||
MessagePlugin.success("提交成功");
|
MessagePlugin.success("提交成功");
|
||||||
visiblePost.value = false;
|
visiblePost.value = false;
|
||||||
|
@ -352,6 +351,7 @@ const breakSub = async ({ validateResult, firstError }) => {
|
||||||
// 审核
|
// 审核
|
||||||
const breakEdit = (item) => {
|
const breakEdit = (item) => {
|
||||||
visiblePost.value = true;
|
visiblePost.value = true;
|
||||||
|
rowItem.value = item;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 弹出框表单重置
|
// 弹出框表单重置
|
||||||
|
|
|
@ -14,6 +14,10 @@ export const useDestroy = defineStore("destroyList", {
|
||||||
console.log(this.destroyList);
|
console.log(this.destroyList);
|
||||||
return this.destroyList;
|
return this.destroyList;
|
||||||
},
|
},
|
||||||
|
auditDestroyList(item) {
|
||||||
|
console.log(item);
|
||||||
|
// let arr = thisz
|
||||||
|
},
|
||||||
},
|
},
|
||||||
persist: true,
|
persist: true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user