|
@@ -3,7 +3,7 @@
|
|
|
<div class="silent-expire-alarm">
|
|
|
<!-- 搜索条件区 -->
|
|
|
<div class="search-section">
|
|
|
- <Search :SearchForm="SearchFormBuyOrder" @query="intData" @reset="reset"/>
|
|
|
+ <Search :SearchForm="SearchFormBuyOrder" @query="intData" @reset="reset" />
|
|
|
</div>
|
|
|
<div class="audit-btn" v-if="userType == 2">
|
|
|
<a-button @click="showAudit = true" type="text">
|
|
@@ -14,7 +14,7 @@
|
|
|
</a-button>
|
|
|
</div>
|
|
|
<!-- 数据表格 -->
|
|
|
- <a-table :data="tableData" :pagination="pageData" :columns="columns" @page-change="evChangePage"
|
|
|
+ <a-table :data="tableData" :pagination="pageData" :columns="BuyOrdercolumns" @page-change="evChangePage"
|
|
|
:scroll="{ x: 'auto' }">
|
|
|
<template #image="{ record }">
|
|
|
<a-image width="60" height="60" :src="record.contractImg" :preview-props="{
|
|
@@ -26,31 +26,33 @@
|
|
|
<div class="line_heis" @click="openDetail(record)">{{ record.id }}</div>
|
|
|
</template>
|
|
|
<template #statusType="{ record }">
|
|
|
- <a-tag color="#ff7d00" v-if="record.moderationStatus == 1">{{$t('order.TobeReviewed')}}</a-tag>
|
|
|
+ <a-tag color="#ff7d00" v-if="record.moderationStatus == 1">{{ $t('order.TobeReviewed') }}</a-tag>
|
|
|
<a-tag color="#00b42a" v-if="record.moderationStatus == 2">{{ $t('order.PassTheExamination') }}</a-tag>
|
|
|
- <a-tag color="#f53f3f" v-if="record.moderationStatus == 3">{{$t('order.rejected')}}</a-tag>
|
|
|
+ <a-tag color="#f53f3f" v-if="record.moderationStatus == 3">{{ $t('order.rejected') }}</a-tag>
|
|
|
</template>
|
|
|
<template #LogisticsStatus="{ record }">
|
|
|
- <a-tag color="#168cff" v-if="record.tmsStatus == 1">{{$t('order.unshipped')}}</a-tag>
|
|
|
- <a-tag color="#00b42a" v-if="record.tmsStatus == 2">{{$t('order.shipped')}}</a-tag>
|
|
|
+ <a-tag color="#168cff" v-if="record.tmsStatus == 1">{{ $t('order.unshipped') }}</a-tag>
|
|
|
+ <a-tag color="#00b42a" v-if="record.tmsStatus == 2">{{ $t('order.shipped') }}</a-tag>
|
|
|
</template>
|
|
|
<template #operate="{ record }">
|
|
|
<div class="setting">
|
|
|
<div v-if="userType == 1">
|
|
|
<a-button type="text" v-if="record.moderationStatus == 1 && record.status == 1"
|
|
|
- @click="statusOrder(record)">{{$t('order.examine')}}</a-button>
|
|
|
- <a-button @click="uploadModal(record)" type="text">{{ record.contractImg == '' ? $t('order.UploadContract') : $t('order.ViewTheContract')
|
|
|
+ @click="statusOrder(record)">{{ $t('order.examine') }}</a-button>
|
|
|
+ <a-button @click="uploadModal(record)" type="text">{{ record.contractImg == '' ? $t('order.UploadContract')
|
|
|
+ : $t('order.ViewTheContract')
|
|
|
}}</a-button>
|
|
|
</div>
|
|
|
<div v-if="userType == 2">
|
|
|
- <a-button type="text" @click="adminCancel(record)"
|
|
|
- v-if="record.moderationStatus == 2 && userType !== 1">{{ $t('order.unsubscribe') }}</a-button>
|
|
|
+ <a-button type="text" @click="adminCancel(record)" v-if="record.moderationStatus == 2 && userType !== 1">{{
|
|
|
+ $t('order.unsubscribe') }}</a-button>
|
|
|
</div>
|
|
|
- <a-button @click="openPriceing(record)" type="text"
|
|
|
- v-if="record.moderationStatus == 2 && userType == 1 ">{{ $t('order.UploadAmount') }}</a-button>
|
|
|
+ <a-button @click="openPriceing(record)" type="text" v-if="record.moderationStatus == 2 && userType == 1">{{
|
|
|
+ $t('order.UploadAmount') }}</a-button>
|
|
|
<!-- <a-button @click="openDetail(record)" type="text" v-if="userType !== 1">套餐</a-button>
|
|
|
<a-button @click="openDetail(record)" type="text" v-if="userType !== 1">资费</a-button> -->
|
|
|
- <a-button @click="openEndDate(record)" type="text" v-if="userType==1 && record.moderationStatus == 2">{{ $t('order.ChangeValidity') }}</a-button>
|
|
|
+ <a-button @click="openEndDate(record)" type="text" v-if="userType == 2 && record.moderationStatus == 2">{{
|
|
|
+ $t('order.ChangeValidity') }}</a-button>
|
|
|
<a-button @click="openDetail(record)" type="text">{{ $t('order.view') }}</a-button>
|
|
|
|
|
|
</div>
|
|
@@ -59,7 +61,8 @@
|
|
|
|
|
|
|
|
|
<a-modal v-model:visible="uploadContract" width="600px" :title="$t('order.UploadContract')"
|
|
|
- @cancel="closeModal(uploadContract, formContract)" @ok="handleBeforeOk" :okText="$t('form.Confirm')" :cancelText="$t('form.Cancel')">
|
|
|
+ @cancel="closeModal(uploadContract, formContract)" @ok="handleBeforeOk" :okText="$t('form.Confirm')"
|
|
|
+ :cancelText="$t('form.Cancel')">
|
|
|
<a-form :model="formContract" auto-label-width>
|
|
|
<a-form-item field="customerName" :label="$t('lotCard.userName')">
|
|
|
<div class="audit-txt" style="color:#418035;">{{ FormDataList.userName }}</div>
|
|
@@ -73,17 +76,19 @@
|
|
|
</a-form>
|
|
|
</a-modal>
|
|
|
|
|
|
- <a-modal v-model:visible="showPrning" :title="$t('order.UploadAmount')" @cancel="closeModal(showPrning, formPreing)" @ok="handelPriceing"
|
|
|
- :okText="$t('form.Confirm')" :cancelText="$t('form.Cancel')">
|
|
|
+ <a-modal v-model:visible="showPrning" :title="$t('order.UploadAmount')" @cancel="closeModal(showPrning, formPreing)"
|
|
|
+ @ok="handelPriceing" :okText="$t('form.Confirm')" :cancelText="$t('form.Cancel')">
|
|
|
<a-form :model="formPreing" auto-label-width>
|
|
|
<a-form-item :label="$t('order.PurchaseAmount')">
|
|
|
- <a-input v-model="formPreing.amount" :placeholder="$t('form.datapoolForm.pleaseSelect')+$t('order.PurchaseAmount')" />
|
|
|
+ <a-input v-model="formPreing.amount"
|
|
|
+ :placeholder="$t('form.datapoolForm.pleaseSelect') + $t('order.PurchaseAmount')" />
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
</a-modal>
|
|
|
|
|
|
- <a-modal v-model:visible="showEndDate" :title="$t('order.ChangeValidity')" @cancel="closeModal(showEndDate, formEndDate)"
|
|
|
- @ok="handelEndDate" :okText="$t('form.Confirm')" :cancelText="$t('form.Cancel')">
|
|
|
+ <a-modal v-model:visible="showEndDate" :title="$t('order.ChangeValidity')"
|
|
|
+ @cancel="closeModal(showEndDate, formEndDate)" @ok="handelEndDate" :okText="$t('form.Confirm')"
|
|
|
+ :cancelText="$t('form.Cancel')">
|
|
|
<a-form :model="formEndDate" auto-label-width>
|
|
|
<a-form-item :label="$t('lotCard.validity')">
|
|
|
<a-date-picker v-model="formEndDate.endDate" style="width: 100%;" />
|
|
@@ -94,7 +99,7 @@
|
|
|
<Card v-model:modelValue="showAudit" @submit="intData()" />
|
|
|
<Status v-model:modelValue="showStatus" @submit="intData()" :FormDataList="FormDataList" />
|
|
|
<Detaile v-model:modelValue="showDetail" @submit="intData()" :FormDataList="FormDataList" />
|
|
|
- <returnCard v-model:modelValue="showReturn" :ReturnData="ReturnData" :id="id" @submit="intData()"></returnCard>
|
|
|
+ <returnCard v-model:modelValue="showReturn" :ReturnData="ReturnData" @submit="intData()"></returnCard>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -102,8 +107,8 @@
|
|
|
import { ref, onMounted, toRefs } from 'vue';
|
|
|
import { Message } from '@arco-design/web-vue';
|
|
|
import { purchaseOrderList } from '@/api/path/purchase';
|
|
|
-import {tariiffManageDate} from '@/api/path/tariffManagement.api'
|
|
|
-import { UploadOrderCardContract, TariffOrderCard, SettingPricing } from '@/api/path/order'
|
|
|
+import { tariiffManageDate } from '@/api/path/tariffManagement.api'
|
|
|
+import { UploadOrderCardContract, SettingPricing } from '@/api/path/order'
|
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
|
import Upload from "@/components/upload/index.vue";
|
|
|
import Card from './Card.vue'
|
|
@@ -111,9 +116,9 @@ import Status from './status.vue'
|
|
|
import Detaile from './detaile.vue'
|
|
|
import Search from '@/components/Search/index.vue'
|
|
|
import returnCard from './returnCard.vue'
|
|
|
-import {useI18n} from 'vue-i18n'
|
|
|
-const {t} = useI18n();
|
|
|
-import {SearchFormBuyOrder} from '../config'
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
+const { t } = useI18n();
|
|
|
+import { SearchFormBuyOrder,BuyOrdercolumns } from '../config'
|
|
|
// 数据层
|
|
|
const state = ref({
|
|
|
userName: localStorage.getItem('user_login_information')?.username,
|
|
@@ -135,8 +140,7 @@ const state = ref({
|
|
|
showDetail: false,
|
|
|
uploadContract: false,
|
|
|
showReturn: false,
|
|
|
- ReturnData: [],
|
|
|
- id: null,
|
|
|
+ ReturnData: {},
|
|
|
showPrning: false,
|
|
|
formPreing: {
|
|
|
id: '',
|
|
@@ -147,8 +151,8 @@ const state = ref({
|
|
|
id: '',
|
|
|
endDate: ''
|
|
|
},
|
|
|
- SearchForm:{},
|
|
|
- orderTypeStatus:[]
|
|
|
+ SearchForm: {},
|
|
|
+ orderTypeStatus: []
|
|
|
});
|
|
|
|
|
|
const {
|
|
@@ -163,7 +167,6 @@ const {
|
|
|
uploadContract,
|
|
|
showReturn,
|
|
|
ReturnData,
|
|
|
- id,
|
|
|
showPrning,
|
|
|
formPreing,
|
|
|
showEndDate,
|
|
@@ -172,27 +175,11 @@ const {
|
|
|
orderTypeStatus
|
|
|
} = toRefs(state.value);
|
|
|
|
|
|
-const columns = [
|
|
|
- { title: t('order.SerialNumber'), dataIndex: 'index', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.OrderNum'), slotName: 'id', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.AuditStatus'), slotName: 'statusType', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.LogisticsStatus'), slotName: 'LogisticsStatus', align: 'center', ellipsis: true },
|
|
|
- { title: t('lotCard.userName'), dataIndex: 'userName', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.NumberCardsPurchased'), dataIndex: 'quantity', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.SilentPeriod')+(t('lotCard.month')), dataIndex: 'periodOfSilence', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.CardType'), dataIndex: 'cardType', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.CarrierName'), dataIndex: 'sourceName', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.tariff'), dataIndex: 'trafficName', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.PurchaseAmount'), dataIndex: 'amount', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.ContractPhoto'), slotName: 'image', align: 'center', ellipsis: true },
|
|
|
- { title: t('order.OrderTime'), dataIndex: 'createdAt', align: 'center', ellipsis: true },
|
|
|
- { title: t('lotCard.validity'), dataIndex: 'endDate', align: 'center', ellipsis: true },
|
|
|
- { title: t('lotCard.Controls'), slotName: 'operate', align: 'center', ellipsis: true }
|
|
|
-];
|
|
|
+
|
|
|
|
|
|
// 订单列表
|
|
|
const intData = async (item) => {
|
|
|
- if(item){
|
|
|
+ if (item) {
|
|
|
SearchForm.value = item
|
|
|
}
|
|
|
const param = {
|
|
@@ -218,17 +205,14 @@ const intData = async (item) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const reset = (item)=>[
|
|
|
+const reset = (item) => {
|
|
|
SearchForm.value = item,
|
|
|
pageData.value.current = 1,
|
|
|
intData()
|
|
|
-]
|
|
|
+}
|
|
|
// 用户退订
|
|
|
const adminCancel = (data) => {
|
|
|
- TariffOrderCard({ id: data.trafficId }).then(res => {
|
|
|
- ReturnData.value = res.data || []
|
|
|
- })
|
|
|
- id.value = data.id
|
|
|
+ ReturnData.value = data
|
|
|
showReturn.value = true
|
|
|
}
|
|
|
// 分页
|
|
@@ -305,9 +289,9 @@ const openEndDate = (data) => {
|
|
|
showEndDate.value = true;
|
|
|
}
|
|
|
|
|
|
-const handelEndDate = async()=>{
|
|
|
+const handelEndDate = async () => {
|
|
|
let res = await tariiffManageDate(formEndDate.value)
|
|
|
- if(res.code === 200) {
|
|
|
+ if (res.code === 200) {
|
|
|
Message.success(res.message)
|
|
|
closeModal(showEndDate.value, formEndDate.value)
|
|
|
intData();
|