This commit is contained in:
X1627315083
2023-12-15 16:38:55 +08:00
parent 1e52104b89
commit 5d6a420447
6 changed files with 83 additions and 11 deletions

2
.env
View File

@@ -1,3 +1,3 @@
# NODE_ENV = 'production' # NODE_ENV = 'production'
NODE_ENV = 'development' NODE_ENV = 'development'
VUE_APP_BASE_URL = 'http://www.aida.com.hk' VUE_APP_BASE_URL = 'http://18.167.251.121:10086'

View File

@@ -1,2 +1,2 @@
NODE_ENV = 'production' NODE_ENV = 'production'
VUE_APP_BASE_URL = 'http://www.aida.com.hk' VUE_APP_BASE_URL = 'http://18.167.251.121:10086'

View File

@@ -1,3 +1,3 @@
NODE_ENV = 'development' NODE_ENV = 'development'
VUE_APP_BASE_URL = 'http://18.167.251.121:10086' VUE_APP_BASE_URL = 'http://18.167.251.121:10088'
# VUE_APP_BASE_URL = 'http://192.168.1.7:5567' # VUE_APP_BASE_URL = 'http://192.168.1.7:5567'

View File

@@ -1,4 +1,4 @@
NODE_ENV = 'production' NODE_ENV = 'production'
# VUE_APP_BASE_URL = 'https://aida.com.hk/test' # VUE_APP_BASE_URL = 'https://aida.com.hk/test'
VUE_APP_BASE_URL = 'http://18.167.251.121:10086' VUE_APP_BASE_URL = 'http://18.167.251.121:10088'

View File

@@ -164,8 +164,9 @@ export const Https = {
trialOrderList:`/api/account/trialOrderList`,//获取审批列表 trialOrderList:`/api/account/trialOrderList`,//获取审批列表
switchIsAutoApproval:`/api/account/switchIsAutoApproval`,//切换是否自动审批 switchIsAutoApproval:`/api/account/switchIsAutoApproval`,//切换是否自动审批
switchIsAutoApproval:`/api/account/getIsAutoApproval`,//获取是否自动审批 getIsAutoApproval:`/api/account/getIsAutoApproval`,//获取是否自动审批
trialOrderApproval:`/api/account/trialOrderApproval`,//通过审批 trialOrderApproval:`/api/account/trialOrderApproval`,//通过审批
trialOrderRefuse:`/api/account/trialOrderRefuse`,//拒绝审批
}, },

View File

@@ -9,6 +9,10 @@
<HeaderComponent></HeaderComponent> <HeaderComponent></HeaderComponent>
<div class="trial_page_body"> <div class="trial_page_body">
<div class="trial_table_search"> <div class="trial_table_search">
<div class="trial_table_voluntarily">
<span>voluntarily</span>
<a-switch v-model:checked="voluntarily" @change="setIsAutoApproval" />
</div>
<a-range-picker <a-range-picker
class="range_picker" class="range_picker"
v-model:value="rangePickerValue" v-model:value="rangePickerValue"
@@ -76,12 +80,14 @@
v-if="column?.Operations" v-if="column?.Operations"
> >
<div <div
v-show="status == 0"
class="operate_item" class="operate_item"
@click="setConsent(record, index)" @click="setConsent(record, index)"
> >
consent consent
</div> </div>
<div <div
v-show="status == 0"
class="operate_item" class="operate_item"
@click="setRefuse(record, index)" @click="setRefuse(record, index)"
> >
@@ -147,12 +153,31 @@ export default defineComponent({
// ); // );
// return time; // return time;
// }, // },
},
{
title: 'State',
align: "center",
ellipsis: true,
width: 100,
dataIndex: "status",
key: "status",
customRender: (record: any) => {
let str
if(record.value == 0){
str ='unprocessed'
}else if(record.value == 1){
str ='pending'
}else if(record.value == 2){
str ='rejected'
}
return str;
},
}, },
{ {
title: 'Address', title: 'Address',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 150, width: 100,
dataIndex: "country", dataIndex: "country",
key: "country", key: "country",
}, },
@@ -160,7 +185,7 @@ export default defineComponent({
title: 'Surname', title: 'Surname',
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: 150, width: 100,
dataIndex: "surname", dataIndex: "surname",
key: "surname", key: "surname",
}, },
@@ -209,6 +234,7 @@ export default defineComponent({
let collectionList: any = ref([]); let collectionList: any = ref([]);
let userInfo: any = {}; let userInfo: any = {};
let status: any = ref(0); let status: any = ref(0);
let voluntarily: any = ref(false);
return { return {
rangePickerValue, rangePickerValue,
columns, columns,
@@ -218,6 +244,7 @@ export default defineComponent({
status, status,
currentState, currentState,
state, state,
voluntarily,
}; };
}, },
data() { data() {
@@ -241,7 +268,9 @@ export default defineComponent({
if (this.userInfo.userId == 83) { if (this.userInfo.userId == 83) {
} else { } else {
router.replace("/home"); router.replace("/home");
return
} }
this.getIsAutoApproval()
}, },
methods: { methods: {
//改变页码 //改变页码
@@ -256,6 +285,25 @@ export default defineComponent({
this.currentPage = 1; this.currentPage = 1;
this.gettrialList(); this.gettrialList();
}, },
//获取是否自动审批
getIsAutoApproval(){
Https.axiosPost(Https.httpUrls.getIsAutoApproval, {}).then(
(rv: any) => {
this.voluntarily = rv
}
);
},
setIsAutoApproval(){
return
Https.axiosPost(Https.httpUrls.switchIsAutoApproval, {}).then(
(rv: any) => {
this.getIsAutoApproval
}
);
},
//获取列表
gettrialList() { gettrialList() {
let startDate: any = this.rangePickerValue let startDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[0]).getTime() ? new Date(this.rangePickerValue[0]).getTime()
@@ -277,13 +325,24 @@ export default defineComponent({
); );
}, },
setConsent(record: any, index: number){ setConsent(record: any, index: number){
console.log(record);
return
Https.axiosPost(Https.httpUrls.trialOrderApproval, {ids:record.id}).then(
(rv: any) => {
message.success('同意成功~')
}
);
}, },
setRefuse(record: any, index: number){ setRefuse(record: any, index: number){
Https.axiosPost(Https.httpUrls.trialOrderRefuse, {ids:record.id}).then(
(rv: any) => {
message.success('拒绝成功~')
}
);
}, },
//删除分组 //删除分组
deleteGroup(record: any, index: number) { deleteGroup(record: any, index: number) {
return
let deleteGroupFun = (id: any, index: number) => { let deleteGroupFun = (id: any, index: number) => {
let data = { let data = {
userGroupId: id, userGroupId: id,
@@ -360,7 +419,19 @@ export default defineComponent({
font-size: 2.2rem; font-size: 2.2rem;
} }
} }
.trial_table_voluntarily{
padding: 0 2rem;
margin: 0 2rem;
margin-left: 0;
border: 0.1rem solid #f1f1f1;
span{
font-size: 1.8rem;
}
>button{
transform: scale(.8);
}
}
.content_search_block { .content_search_block {
margin-left: 4rem; margin-left: 4rem;
display: flex; display: flex;