| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987 |
- <template>
- <div id="cloud-balance">
- <section class="top">
- <!-- <h3>交易订单中心</h3> -->
- <section>
- <div class="type-boxs">
- <span class="vsub">订单类型:</span>
- <div class="inlineb">
- <el-checkbox-group v-model="productType" @change="changeOrder" size="mini">
- <el-checkbox-button v-for="itm in TypeList" :label="itm.id" :key="itm.id">{{itm.name}}</el-checkbox-button>
- </el-checkbox-group>
- </div>
- <div class="inlineb vsub">
- <span>交易类型:</span>
- <el-select v-model="orderTypes" placeholder="交易类型">
- <el-option
- v-for="item of orderTypesOption"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </div>
- </div>
- <!-- <div class="type-boxs">
- <span class="vsub">交易类型:</span>
- <div class="inlineb">
- <el-checkbox-group v-model="tradeType" @change="changeTrade" size="mini">
- <el-checkbox-button
- v-for="itm in tradeList"
- :label="itm.id"
- :key="itm.id"
- >{{itm.type}}</el-checkbox-button>
- </el-checkbox-group>
- </div>
- </div>-->
- <div class="type-boxs">
- <span class="vsub">支付方式:</span>
- <div class="inlineb">
- <el-checkbox-group v-model="payType" @change="changePay" size="mini">
- <el-checkbox-button v-for="itm in payList" :label="itm.id" :key="itm.id">{{itm.name}}</el-checkbox-button>
- </el-checkbox-group>
- </div>
- </div>
- <div class="type-boxs">
- <div class="inlineb">
- <span class>时间范围:</span>
- <el-date-picker
- v-model="timeRange"
- type="daterange"
- align="right"
- unlink-panels
- range-separator="到"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :picker-options="pickerOptions2"
- ></el-date-picker>
- </div>
- <div class="inlineb">
- <span class>时间类型:</span>
- <el-select v-model="timeType" placeholder="请选择">
- <el-option
- v-for="item in timeOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </div>
- <div class="inlineb">
- <span class>状态:</span>
- <div class="inlineb">
- <el-select v-model="orderState" clearable placeholder>
- <el-option
- v-for="item of orderStateOption"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </div>
- </div>
- <el-checkbox v-model="checked">人工财务</el-checkbox>
- </div>
- <div class="type-boxs">
- <div class="inlineb">
- <span class>编号:</span>
- <div class="inlineb">
- <el-input style="width: 230px;" v-model="searchId" placeholder="订单编号/订单名称/支付编号"></el-input>
- </div>
- </div>
- <div class="inlineb">
- <span class>用户:</span>
- <div class="inlineb">
- <el-input style="width: 180px;" v-model="checkUser" placeholder="uid/昵称/姓名"></el-input>
- </div>
- </div>
- <div class="inlineb">
- <span class>项目:</span>
- <!-- <div class="inlineb">
- <el-select v-model="productTypes" placeholder>
- <el-option
- v-for="item of productTypesOption"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </div>-->
- <div class="inlineb">
- <el-input style="width: 100px;" type="number" v-model="productId" placeholder="项目ID"></el-input>
- </div>
- </div>
- <el-button type="primary" @click="getFinanceList">筛选</el-button>
- <el-button @click="downFinanceList">导出报表</el-button>
- </div>
- <div class="type-boxs">
- <div>
- <span>订单数量:{{totalCount}}(成功{{successCount}}),</span>
- <span>
- 收入金额:
- <span class="green">{{totalHave}}元(成功{{totalSuccess}}元)</span>
- </span>
- ,
- <span>
- 支出金额:
- <span class="orange">{{PayCount}}元(成功{{paySuccess}}元)</span>
- </span>
- </div>
- </div>
- </section>
- </section>
- <!-- <section class="selector-box">
- <section class="selector-box-left">
- <el-select v-model="status" placeholder="项目状态">
- <el-option
- v-for="item of jobStatusList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-select v-model="period" placeholder="账单状态">
- <el-option
- v-for="item of periodStatusList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-input style="width: 200px;" v-model="checkUser" placeholder="负责人"></el-input>
- <el-input style="width: 200px;" v-model="jobID" placeholder="项目ID"></el-input>
- <el-button @click="clickSearchConfirm">确认</el-button>
- </section>
- <el-button @click="clickExport" type="primary">导出</el-button>
- </section>-->
- <div class="trcenter changeheight" width="100%">
- <!-- height="250" -->
- <el-table :data="finaceList" border height="100%" width="100%">
- <el-table-column label="订单名称">
- <template slot-scope="scope">
- <!-- @click="clickDev(scope.row.uid)" -->
- <span class="lblue point">
- <nuxt-link
- :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
- >{{scope.row.product_title}}</nuxt-link>
- </span>
- </template>
- </el-table-column>
- <el-table-column label="用户">
- <template slot-scope="scope">{{scope.row.user_info.nickname}}({{scope.row.uid }})</template>
- </el-table-column>
- <el-table-column label="实际金额">
- <template slot-scope="scope">
- <span
- v-if="parseInt(scope.row.real_amount)>=0"
- class="green"
- >+{{(scope.row.real_amount/100).toFixed(2)}}</span>
- <span v-else class="orange">{{(scope.row.real_amount/100).toFixed(2)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="channel_name" label="支付方式"></el-table-column>
- <el-table-column prop="order_state_name" label="订单状态"></el-table-column>
- <el-table-column prop label="创建时间">
- <template slot-scope="scope">
- <span>{{formatDate(scope.row.created_at)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="name" label="到账时间">
- <template slot-scope="scope">
- <span>{{formatDate(scope.row.pay_time)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="order_no" label="订单编号"></el-table-column>
- <el-table-column prop="out_order_id" label="支付编号"></el-table-column>
- <el-table-column width="100" label="订单类型">
- <template slot-scope="scope">
- {{scope.row.product_type_name}}
- <!-- order_type -->
- <!-- <span v-if="scope.row.state==1" class="state-success state-border">成功</span>
- <span v-if="scope.row.state==2" class="state-wait state-border">待提交</span>
- <span v-if="scope.row.state==3" class="state-load state-border">提交中</span>
- <span v-if="scope.row.state==4" class="state-faile state-border">失败</span>-->
- </template>
- </el-table-column>
- <el-table-column prop="order_type_name" label="交易类型">
- <template slot-scope="scope">
- <span>{{scope.row.order_type_name}}</span>
- </template>
- </el-table-column>
- <el-table-column label="关联项目">
- <template slot-scope="scope">
- <a :href="scope.row.related_project.url?scope.row.related_project.url:'#'">
- <span
- class="lblue"
- >{{scope.row.related_project.name?scope.row.related_project.name:"--"}}</span>
- </a>
- </template>
- </el-table-column>
- <el-table-column prop="operator_uid" label="人工">
- <template slot-scope="scope">
- <span v-if="scope.row.operator_info.nickname">{{scope.row.operator_info.nickname}}</span>
- <span>({{scope.row.operator_uid}})</span>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="order-footer">
- <el-pagination
- background
- @current-change="getFinanceList"
- @size-change="changePageSize"
- :current-page.sync="currentPage"
- :page-sizes="[10, 20, 30, 40]"
- :page-size="20"
- layout="total, sizes, prev, pager, next, jumper"
- :total="totalCount"
- ></el-pagination>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- finaceList: [],
- successCount: 0,
- totalHave: 0,
- totalSuccess: 0,
- PayCount: 0,
- paySuccess: 0,
- productId: "",
- productType: [0],
- orderTypes: "",
- orderTypesOption: [],
- orderState: "",
- orderStateOption: [],
- productTypes: "",
- productTypesOption: [],
- checked: false,
- orderType: [0],
- tradeType: [0],
- payType: [0],
- timeType: 2,
- timeOptions: [
- {
- value: 1,
- label: "到帐时间"
- },
- {
- value: 2,
- label: "创建时间"
- }
- ],
- TypeList: [
- {
- id: 0,
- type: "全部"
- },
- {
- id: 1,
- type: "整包项目"
- },
- {
- id: 2,
- type: "云端工作"
- },
- {
- id: 3,
- type: "雇佣工作"
- }
- ],
- tradeList: [
- {
- id: 0,
- type: "全部"
- },
- {
- id: 1,
- type: "充值"
- },
- {
- id: 2,
- type: "提现"
- },
- {
- id: 3,
- type: "购买"
- },
- {
- id: 4,
- type: "购买"
- }
- ],
- payList: [
- {
- id: 1,
- type: "充值"
- },
- {
- id: 2,
- type: "提现"
- },
- {
- id: 3,
- type: "购买"
- },
- {
- id: 4,
- type: "购买"
- }
- ],
- pickerOptions2: {
- shortcuts: [
- {
- text: "全部",
- onClick(picker) {
- picker.$emit("pick", []);
- }
- },
- {
- text: "最近7天",
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit("pick", [start, end]);
- }
- },
- {
- text: "最近30天",
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit("pick", [start, end]);
- }
- },
- {
- text: "本周",
- onClick(picker) {
- var week = new Date().getDay() - 1;
- console.log(week);
- if (week == -1) {
- week = 6;
- }
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * week);
- picker.$emit("pick", [start, end]);
- }
- },
- {
- text: "本月",
- onClick(picker) {
- var month = new Date().getMonth + 1;
- var year = new Date().getFullYear();
- // console.log(month, year);
- var day = new Date().getDate() - 1;
- console.log(day);
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * day);
- picker.$emit("pick", [start, end]);
- }
- },
- {
- text: "本年",
- onClick(picker) {
- var month = new Date().getMonth + 1;
- var year = new Date().getFullYear();
- // console.log(month, year);
- var day = new Date().getDate() - 1;
- var firstDay = new Date(year, 0, 1);
- var dateDiff = new Date() - firstDay;
- var msPerDay = 1000 * 60 * 60 * 24;
- //计算天数
- var diffDays = Math.ceil(dateDiff / msPerDay) - 1;
- console.log(diffDays);
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * diffDays);
- picker.$emit("pick", [start, end]);
- }
- }
- ]
- },
- timeRange: "",
- arriveTime: "",
- searchId: "",
- tableData3: [
- {
- date: "2016-05-03",
- name: "王小虎",
- money: "200",
- state: 1
- },
- {
- date: "2016-05-02",
- name: "王小虎",
- money: "-100",
- state: 2
- },
- {
- date: "2016-05-04",
- name: "王小虎",
- money: "-100",
- state: 3
- },
- {
- date: "2016-05-01",
- name: "王小虎",
- money: "-100",
- state: 4
- },
- {
- date: "2016-05-08",
- name: "王小虎",
- money: "2100",
- state: 1
- },
- {
- date: "2016-05-06",
- name: "王小虎",
- money: "-1200",
- state: 4
- },
- {
- date: "2016-05-07",
- name: "王小虎",
- money: "-100",
- state: 1
- }
- ],
- // 下发的总数据
- totalData: {},
- // 项目ID
- jobID: "",
- // 审核人
- period: "",
- status: "",
- // 状态列表数据
- jobStatusList: [],
- // 负责人
- checkUser: "",
- // 审核人列表
- periodStatusList: [],
- // 数据总条目
- totalCount: 0,
- currentPage: 1,
- currentPageSize: 20,
- // 列表宽度
- // tableWidths,
- // 列表头显示内容
- // tableHeaders,
- // 列表头字段
- // tableProps,
- // 列表数据
- tableData: [],
- localData: {
- env: "test"
- }
- };
- },
- computed: {
- isTest() {
- return this.localData.env === "test";
- },
- whole() {
- return this.totalData.whole || {};
- },
- totalDeposit() {
- return this.whole.total_deposit;
- },
- totalFee() {
- return this.whole.total_fee;
- }
- },
- mounted() {
- this.getAllChice();
- this.getTableData();
- this.getFinanceList();
- },
- methods: {
- handleOrderClick(id) {
- this.$router.push(`/main/bills/${id}`);
- },
- formatDate(time) {
- var now = new Date(time * 1000);
- var year = now.getFullYear();
- var month = now.getMonth() + 1;
- var date = now.getDate();
- var hour = now.getHours();
- var minute = now.getMinutes();
- var second = now.getSeconds();
- if (hour < 10) {
- hour = "0" + hour;
- }
- if (minute < 10) {
- minute = "0" + minute;
- }
- if (second < 10) {
- second = "0" + second;
- }
- return (
- year +
- "-" +
- month +
- "-" +
- date +
- " " +
- hour +
- ":" +
- minute +
- ":" +
- second
- );
- },
- // 改变订单类型
- changeOrder() {
- var haveAll = false;
- for (var i = 0; i < this.productType.length; i++) {
- if (this.productType[i] == 0) {
- haveAll = true;
- }
- }
- // 选择其他的时候,去掉全部,全部在第一位
- if (
- this.productType[0] == 0 &&
- 1 < this.productType.length < this.TypeList.length
- ) {
- var arr = [];
- for (var i = 0; i < this.productType.length; i++) {
- if (this.productType[i] != 0) {
- arr.push(this.productType[i]);
- }
- }
- this.productType = arr;
- }
- // 选择全部的时候去掉其他,全部在最后一位
- if (this.productType[this.productType.length - 1] == 0) {
- this.productType = [0];
- }
- if (!haveAll && this.productType.length == this.TypeList.length - 1) {
- this.productType = [0];
- }
- if (this.productType.length == 0) {
- console.log("sss:", this.productType);
- this.productType = [0];
- }
- },
- // 改变支付方式
- changePay() {
- var haveAll = false;
- for (var i = 0; i < this.payType.length; i++) {
- if (this.payType[i] == 0) {
- haveAll = true;
- }
- }
- // 选择其他的时候,去掉全部,全部在第一位
- if (
- this.payType[0] == 0 &&
- 1 < this.payType.length < this.payList.length
- ) {
- var arr = [];
- for (var i = 0; i < this.payType.length; i++) {
- if (this.payType[i] != 0) {
- arr.push(this.payType[i]);
- }
- }
- this.payType = arr;
- }
- // 选择全部的时候去掉其他,全部在最后一位
- if (this.payType[this.payType.length - 1] == 0) {
- this.payType = [0];
- }
- if (!haveAll && this.payType.length == this.payList.length - 1) {
- this.payType = [0];
- }
- if (this.payType.length == 0) {
- console.log("sss:", this.orderType);
- this.payType = [0];
- }
- },
- clickExport() {
- window.open("/api/admin/job/get_all_periods?action=export");
- },
- /**
- * 获取筛选值
- */
- async getEnum() {
- let { data } = await this.$get("/api/admin/job/getEnum");
- console.log(data);
- if (data) {
- let { jobStatusList, periodStatusList } = data;
- this.jobStatusList = jobStatusList;
- this.periodStatusList = periodStatusList;
- }
- },
- // 点击操作
- clickOperate({ job_id, id }) {
- if (this.isTest)
- window.open(
- `https://dev.test-rooter.proginn.com/main/wage_settlement?job_id=${job_id}&period_id=${id}`
- );
- else
- window.open(
- `https://rooter.proginn.com/main/wage_settlement?job_id=${job_id}&period_id=${id}`
- );
- },
- // 点击账单
- clickOrder(i) {
- if (this.isTest)
- window.open(
- `https://dev.test-rooter.proginn.com/main/wage_details?job_id=${i.job_id}&period_id=${i.id}`
- );
- else
- window.open(
- `https://rooter.proginn.com/main/wage_details?job_id=${i.job_id}&period_id=${i.id}`
- );
- },
- // 点击开发者
- clickDev(uid) {
- if (this.isTest)
- window.open(`https://dev.test.proginn.com/rooter/user/${uid}`);
- else window.open(`https://www.proginn.com/rooter/user/${uid}`);
- },
- // 点击企业
- clickCompany(uid) {
- if (this.isTest)
- window.open(`https://dev.test.proginn.com/rooter/user/${uid}`);
- else window.open(`https://www.proginn.com/rooter/user/${uid}`);
- },
- // 点击账单id
- clickJobID(jobID) {
- if (this.isTest)
- window.open(
- `https://dev.test.proginn.com/rooter/cloudjobitem/${jobID}`
- );
- else window.open(`https://www.proginn.com/rooter/cloudjobitem/${jobID}`);
- },
- // 点击重试
- async clickRetry(id) {
- const res = await this.$post("/api/admin/payment/redoDraw", { id });
- // console.log(res)
- },
- // 根据状态显示图表样式
- tableRowClassName({ row, rowIndex }) {
- // console.log({row, rowIndex})
- let className = "";
- if (row.j_status_name === "结束合作") className = "end-row";
- // console.log(className)
- return className;
- },
- // 格式化列表数据
- formatTableData(data) {
- return data.map(i => ({
- ...i,
- payAround: `${i.start_time}<br>${i.end_time}`,
- pre_send_salary_timeShow: new Date(
- i.pre_send_salary_time * 1000
- ).toLocaleDateString()
- }));
- },
- /**
- * 点击筛选确认
- */
- clickSearchConfirm() {
- this.currentPage = 1;
- // this.getTableData();
- },
- changePageSize(pageSize) {
- this.currentPageSize = pageSize;
- this.getFinanceList();
- },
- // 获取列表数据
- async getTableData() {
- this.tableData = [];
- let url = "/api/admin/job/get_all_periods";
- let body = { page: this.currentPage, page_size: this.currentPageSize };
- if (this.status) body.j_status = this.status;
- if (this.period) body.p_status = this.period;
- if (this.checkUser) body.chk_user = this.checkUser;
- if (this.jobID) body.job_id = this.jobID;
- const res = await this.$post(url, body);
- const data = res.data;
- this.tableData = this.formatTableData(data.list);
- this.totalData = data;
- // // console.log(this.tableData)
- this.totalCount = Number(data.total);
- this.totalPage = data.totalPage;
- this.localData.env = data.current_env;
- },
- async downFinanceList() {
- var checkedTF = 0;
- // console.log(this.checked);
- if (this.checked) {
- // console.log(333);
- checkedTF = 1;
- }
- var arr1 = [];
- if (this.productType[0] == 0) {
- arr1 = "";
- } else {
- arr1 = this.productType.toString();
- }
- var arr2 = [];
- if (this.payType[0] == 0) {
- arr2 = "";
- } else {
- arr2 = this.payType.toString();
- }
- var time = 1;
- if (this.timeType == "") {
- time = "";
- } else {
- time = this.timeType;
- }
- var starTime = "";
- var endTime = "";
- if (this.timeRange.length) {
- starTime = this.formatDate(this.timeRange[0] / 1000);
- endTime = this.formatDate(this.timeRange[1] / 1000);
- } else {
- starTime = "";
- endTime = "";
- }
- let body = {
- // 1111
- product_type: arr1,
- order_type: this.orderTypes,
- channel: arr2,
- start_time: starTime,
- end_time: endTime,
- date_type: time,
- status: this.orderState,
- artificial_mark: checkedTF,
- order: this.searchId,
- user: this.checkUser,
- // this.productTypes
- product_id: this.productId,
- page: this.currentPage,
- page_size: this.currentPageSize
- };
- // http://local-rooter.proginn.com:20201/api/admin/order/export?product_type=&order_type=&channel=&start_time=&end_time=&date_type=2&status=&artificial_mark=0&order=&user=&product_id=&page=1&page_size=20
- // const res = await this.$get("/api/admin/order/export", body);
- var url =
- window.location.host +
- "/api/admin/order/export?product_type=" +
- arr1 +
- "&order_type=" +
- this.orderTypes +
- "&channel=" +
- arr2 +
- "&start_time=" +
- starTime +
- "&end_time=" +
- endTime +
- "&date_type=" +
- time +
- "&status=" +
- this.orderState +
- "&artificial_mark=" +
- checkedTF +
- "&order=" +
- this.searchId +
- "&user=" +
- this.checkUser +
- "&product_id=" +
- this.productId;
- console.log(url);
- window.location.href = "http://" + url;
- },
- async getFinanceList() {
- // console.log("timeRange:", this.timeRange);
- // return false;
- var checkedTF = 0;
- console.log(this.checked);
- if (this.checked) {
- console.log(333);
- checkedTF = 1;
- }
- var arr1 = [];
- if (this.productType[0] == 0) {
- arr1 = "";
- } else {
- arr1 = this.productType.toString();
- }
- var arr2 = [];
- if (this.payType[0] == 0) {
- arr2 = "";
- } else {
- arr2 = this.payType.toString();
- }
- var time = 1;
- if (this.timeType == "") {
- time = "";
- } else {
- time = this.timeType;
- }
- var starTime = "";
- var endTime = "";
- if (this.timeRange) {
- starTime = this.formatDate(this.timeRange[0] / 1000);
- endTime = this.formatDate(this.timeRange[1] / 1000);
- } else {
- starTime = "";
- endTime = "";
- }
- let body = {
- // 1111
- product_type: arr1,
- order_type: this.orderTypes,
- channel: arr2,
- start_time: starTime,
- end_time: endTime,
- date_type: time,
- status: this.orderState,
- artificial_mark: checkedTF,
- order: this.searchId,
- user: this.checkUser,
- // this.productTypes
- product_id: this.productId,
- page: this.currentPage,
- page_size: this.currentPageSize
- };
- const res = await this.$post("/api/admin/order/get_orders", body);
- var data = res.data;
- this.finaceList = data.orders;
- this.totalCount = Number(data.count);
- this.successCount = data.successCount;
- (this.totalHave = data.income_sum),
- (this.totalSuccess = data.income_success_sum);
- this.PayCount = data.expense_sum;
- this.paySuccess = data.expense_success_sum;
- },
- async getAllChice() {
- let body = {};
- const res = await this.$post("/api/admin/order/get_all_choice");
- var data = res.data;
- console.log(data);
- this.orderTypesOption = data.order_types;
- this.orderTypesOption.unshift({
- id: "",
- name: "全部"
- });
- this.orderStateOption = data.order_state;
- this.payList = data.channels;
- this.payList.unshift({
- id: 0,
- name: "全部"
- });
- this.TypeList = data.product_types;
- this.TypeList.unshift({
- id: 0,
- name: "全部"
- });
- // this.productTypesOption = data.product_types;
- // this.finaceList = data;
- // this.totalCount = Number(data.total);
- }
- },
- created() {
- console.log(process.env.NODE_ENV);
- }
- };
- </script>
- <style scoped>
- .order-footer {
- position: absolute;
- bottom: 10px;
- left: 10px;
- }
- #order-wrap {
- width: 100%;
- }
- #cloud-balance {
- white-space: nowrap;
- overflow-x: scroll;
- height: calc(100% - 40px);
- }
- .changeheight {
- height: calc(100%) !important;
- }
- .top {
- display: flex;
- flex-direction: column;
- justify-content: center;
- height: 270px;
- }
- .selector-box {
- /* margin-top: 10px; */
- }
- .selector-box {
- display: flex;
- justify-content: space-between;
- }
- /* .selector-box-left {
- } */
- .table {
- margin-top: 10px;
- height: calc(100% - 320px);
- }
- .order-table {
- /* height: calc(100% - 300px); */
- }
- .end-row {
- background: rgba(0, 0, 0, 0.1);
- }
- .inlineb {
- display: inline-block;
- }
- .vsub {
- vertical-align: sub;
- }
- .type-boxs {
- margin-bottom: 10px;
- }
- .green {
- color: rgba(37, 155, 36, 1);
- }
- .orange {
- color: rgba(255, 152, 0, 1);
- }
- .state-success {
- display: inline-block;
- padding: 0px 8px;
- text-align: center;
- border: 1px solid rgb(48, 142, 255);
- }
- .state-wait {
- display: inline-block;
- padding: 0px 8px;
- text-align: center;
- border: 1px solid rgb(134, 130, 130);
- }
- .state-load {
- display: inline-block;
- padding: 0px 8px;
- text-align: center;
- border: 1px solid rgb(37, 155, 36);
- }
- .state-faile {
- display: inline-block;
- padding: 0px 8px;
- text-align: center;
- border: 1px solid rgb(229, 28, 35);
- }
- </style>
|