|
@@ -2,19 +2,18 @@
|
|
import { ref, reactive, defineAsyncComponent, onMounted } from 'vue'
|
|
import { ref, reactive, defineAsyncComponent, onMounted } from 'vue'
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
import { fnMd5 } from '@/utils/common'
|
|
import { fnMd5 } from '@/utils/common'
|
|
-import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
|
import TableBase from '@/components/TableBase/index.vue'
|
|
import TableBase from '@/components/TableBase/index.vue'
|
|
import { Edit, Delete, Finished, View } from '@element-plus/icons-vue'
|
|
import { Edit, Delete, Finished, View } from '@element-plus/icons-vue'
|
|
import type { ColumnProps } from '@/components/TableBase/interface/index'
|
|
import type { ColumnProps } from '@/components/TableBase/interface/index'
|
|
-import { percentage_List, percentage_User_List } from '@/api/percentage/index'
|
|
|
|
-import { useTablePublic, options2} from '@/hooks/useTablePublic'
|
|
|
|
|
|
+import { percentage_List, percentage_User_List,percentage_del } from '@/api/percentage/index'
|
|
|
|
+import { useTablePublic, options2 } from '@/hooks/useTablePublic'
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const TableRef = ref<InstanceType<typeof TableBase> | null>(null)
|
|
const TableRef = ref<InstanceType<typeof TableBase> | null>(null)
|
|
-const { globalStore, searchOnTableList,updateOnTableList } = useTablePublic()
|
|
|
|
|
|
+const { globalStore, searchOnTableList, updateOnTableList } = useTablePublic()
|
|
|
|
|
|
const PercentageDetail1Ref = ref<InstanceType<typeof PercentageDetail1> | null>(null)
|
|
const PercentageDetail1Ref = ref<InstanceType<typeof PercentageDetail1> | null>(null)
|
|
- const PercentageDetail1 = defineAsyncComponent({
|
|
|
|
|
|
+const PercentageDetail1 = defineAsyncComponent({
|
|
loader: () => import(/*webpackChunkName: 'ContractForm'*/ './PercentageDetail1.vue'),
|
|
loader: () => import(/*webpackChunkName: 'ContractForm'*/ './PercentageDetail1.vue'),
|
|
delay: 500,
|
|
delay: 500,
|
|
timeout: 3000,
|
|
timeout: 3000,
|
|
@@ -32,10 +31,10 @@ const columns: ColumnProps[] = [
|
|
{ prop: 'T_money', label: '提成金额' },
|
|
{ prop: 'T_money', label: '提成金额' },
|
|
{ prop: 'T_approval_money', label: '审批金额' },
|
|
{ prop: 'T_approval_money', label: '审批金额' },
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
{ prop: 'T_send_money', label: '已发提成金额' },
|
|
{ prop: 'T_send_money', label: '已发提成金额' },
|
|
{ prop: 'T_State', label: '状态', name: 'T_State' },
|
|
{ prop: 'T_State', label: '状态', name: 'T_State' },
|
|
- { prop: 'operation', label: '操作', width: 260, fixed: 'right' }
|
|
|
|
|
|
+ { prop: 'operation', label: '操作', width: 280, fixed: 'right' }
|
|
]
|
|
]
|
|
|
|
|
|
const processContract = (type: string, row?: any) => {
|
|
const processContract = (type: string, row?: any) => {
|
|
@@ -44,8 +43,8 @@ const processContract = (type: string, row?: any) => {
|
|
// PercentageDetail1Ref.value?.VerifyltemApi()
|
|
// PercentageDetail1Ref.value?.VerifyltemApi()
|
|
PercentageDetail1Ref.value?.openDrawer(type, row)
|
|
PercentageDetail1Ref.value?.openDrawer(type, row)
|
|
}
|
|
}
|
|
-const processContractxiang = (id: string,titles:string) => {
|
|
|
|
- router.push({ name: 'PercentageDetail', params: { id, type: fnMd5('contract'),titles:titles}})
|
|
|
|
|
|
+const processContractxiang = (id: string, titles: string) => {
|
|
|
|
+ router.push({ name: 'PercentageDetail', params: { id, type: fnMd5('contract'), titles: titles } })
|
|
}
|
|
}
|
|
const initParam = reactive({
|
|
const initParam = reactive({
|
|
User_tokey: globalStore.GET_User_tokey,
|
|
User_tokey: globalStore.GET_User_tokey,
|
|
@@ -54,6 +53,9 @@ const initParam = reactive({
|
|
T_uuid: '',
|
|
T_uuid: '',
|
|
})
|
|
})
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
|
|
+const centerDialogVisible = ref(false)
|
|
|
|
+
|
|
|
|
+
|
|
interface ListItem {
|
|
interface ListItem {
|
|
value: string
|
|
value: string
|
|
label: string
|
|
label: string
|
|
@@ -84,8 +86,8 @@ onMounted(async () => {
|
|
|
|
|
|
const ContractFormRef = ref<InstanceType<typeof ContractForm> | null>(null)
|
|
const ContractFormRef = ref<InstanceType<typeof ContractForm> | null>(null)
|
|
const ContForm = reactive({
|
|
const ContForm = reactive({
|
|
- id:null,
|
|
|
|
- showTable:true
|
|
|
|
|
|
+ id: null,
|
|
|
|
+ showTable: true
|
|
})
|
|
})
|
|
const openContractFormDrawer = (type: string, row?: any) => {
|
|
const openContractFormDrawer = (type: string, row?: any) => {
|
|
ContForm.id = row.Id
|
|
ContForm.id = row.Id
|
|
@@ -98,6 +100,19 @@ const ContractForm = defineAsyncComponent({
|
|
timeout: 3000,
|
|
timeout: 3000,
|
|
suspensible: true
|
|
suspensible: true
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+const setId = ref()
|
|
|
|
+const subDelectfun = async (id: any,sub: any) => {
|
|
|
|
+ if (sub=='sub') {//提交
|
|
|
|
+ const reslut:any = await percentage_del({T_id: setId.value})
|
|
|
|
+ console.log('res',reslut)
|
|
|
|
+ if(reslut.Code==200){TableRef.value?.getTableList();centerDialogVisible.value = false}
|
|
|
|
+ } else {//显示
|
|
|
|
+ centerDialogVisible.value = true
|
|
|
|
+ setId.value = id
|
|
|
|
+ }
|
|
|
|
+ console.log('确定删除', id,sub)
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -147,14 +162,27 @@ const ContractForm = defineAsyncComponent({
|
|
<el-tag v-else-if="row.T_out === 1" type="warning" effect="dark"> 未出库 </el-tag>
|
|
<el-tag v-else-if="row.T_out === 1" type="warning" effect="dark"> 未出库 </el-tag>
|
|
<el-tag v-else type="danger" effect="dark"> --- </el-tag>
|
|
<el-tag v-else type="danger" effect="dark"> --- </el-tag>
|
|
</template>
|
|
</template>
|
|
- <template #right="{ row }">
|
|
|
|
- <el-button link type="warning" :disabled="![1,3].includes(row.T_State)" size="small" :icon="Finished" @click="processContract('审核',row)">审核</el-button>
|
|
|
|
- <el-button link type="primary" :disabled="![2,4,5].includes(row.T_State)" size="small" :icon="Edit" @click="openContractFormDrawer('edit', row)">打款明细</el-button>
|
|
|
|
- <el-button link type="success" size="small" :icon="View" @click="processContractxiang(row.Id,'详情')">详情</el-button>
|
|
|
|
|
|
+ <template #right="{ row }">
|
|
|
|
+ <el-button link type="warning" :disabled="![1, 3].includes(row.T_State)" size="small" :icon="Finished"
|
|
|
|
+ @click="processContract('审核', row)">审核</el-button>
|
|
|
|
+ <el-button link type="primary" :disabled="![2, 4, 5].includes(row.T_State)" size="small" :icon="Edit"
|
|
|
|
+ @click="openContractFormDrawer('edit', row)">打款明细</el-button>
|
|
|
|
+ <el-button link type="success" size="small" :icon="View"
|
|
|
|
+ @click="processContractxiang(row.Id, '详情')">详情</el-button>
|
|
|
|
+ <el-button link type="danger" size="small" :icon="View" @click="subDelectfun(row.Id,'show')">删除</el-button>
|
|
</template>
|
|
</template>
|
|
</TableBase>
|
|
</TableBase>
|
|
- <ContractForm ref="ContractFormRef" :ContForm="ContForm" @onTableList="updateOnTableList(TableRef)" />
|
|
|
|
- <PercentageDetail1 ref="PercentageDetail1Ref" @onTableList="updateOnTableList(TableRef)" />
|
|
|
|
|
|
+ <ContractForm ref="ContractFormRef" :ContForm="ContForm" @onTableList="updateOnTableList(TableRef)" />
|
|
|
|
+ <PercentageDetail1 ref="PercentageDetail1Ref" @onTableList="updateOnTableList(TableRef)" />
|
|
|
|
+ <el-dialog v-model="centerDialogVisible" title="提示" width="30%" center>
|
|
|
|
+ <span style="text-align: center;display: block;">删除操作,是否删除?</span>
|
|
|
|
+ <template #footer>
|
|
|
|
+ <span class="dialog-footer">
|
|
|
|
+ <el-button @click="centerDialogVisible = false">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="subDelectfun('','sub')">删除</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|