123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394 |
- <template>
- <div class="arapDetail">
- <BaseDialog
- width="1200px"
- :isShow.sync="isShow"
- title="查看详情"
- :isShowFooter="false"
- >
- <el-radio-group
- v-model="status"
- @change="changeGroup"
- style="margin-bottom: 10px"
- >
- <el-radio-button :label="0">完单订单</el-radio-button>
- <el-radio-button :label="1" v-if="type !== 3">退款订单</el-radio-button>
- <el-radio-button :label="2">结算记录</el-radio-button>
- </el-radio-group>
- <search-box-new
- ref="searchBox"
- :formData="formData"
- :formList="formList"
- :redIcon="false"
- @search="search"
- @init="init"
- />
- <pictureList :list="showTabList[status]" />
- <table-list
- :key="type + status + ''"
- :tableSets="tableSet"
- :tableData="tableData"
- :navText="dialogNavText"
- >
- <template slot="btn" slot-scope="props">
- <el-button type="text" @click="openDialog(props.scope.row)">
- 查看详情
- </el-button>
- </template>
- </table-list>
- <pagination
- :total="total"
- :pageSize.sync="formData.pageSize"
- :currentPage.sync="formData.pageNum"
- @search="search"
- />
- <!-- 订单详情 -->
- <dislog-order-details
- :orderSn="activeOrderInfo.orderSn"
- :orderFrom="activeOrderInfo.orderFrom"
- :dialogVisible.sync="orderDialogVisible"
- />
- </BaseDialog>
- </div>
- </template>
- <script>
- import tableList from "@/components/tableList";
- import pagination from "@/components/pagination";
- import searchBoxNew from "@/components/searchBoxNew";
- import pictureList from "@/components/Comon/pictureList.vue";
- import dislogOrderDetails from "../components/dislogOrderDetails.vue";
- export default {
- name: "SaasMasterPlatformDislogArapDetails",
- props: {
- dialogVisible: {
- type: Boolean,
- default: false,
- },
- type: {
- type: Number,
- default: 1,
- },
- },
- data() {
- return {
- dialogNavText: {
- index: 0,
- num: true,
- border: true,
- choice: false,
- choiceRadio: false,
- radioKey: "specTemplateId",
- radioFixed: false,
- addHide: !false,
- tableHide: false,
- dontNum: false,
- headShow: false,
- backFatherBtn: {
- status: false,
- title: "未定义",
- },
- },
- tableData: [],
- formData: {
- pageSize: 10,
- pageNum: 1,
- },
- total: 0,
- status: 0,
- showTabList: [
- [
- {
- label: "待付提成",
- prop: "orderUncollectedTotal",
- img: "未收款",
- },
- {
- label: "已付提成",
- prop: "orderUncollectedTotal",
- img: "已收款",
- },
- ],
- [
- {
- label: "待扣提成",
- prop: "orderReceivedTotal",
- img: "已退款",
- },
- {
- label: "已扣提成",
- prop: "orderUncollectedTotal",
- img: "成本金额",
- },
- ],
- [
- {
- label: "结算金额",
- prop: "orderPriceTotal",
- img: "已收款",
- },
- {
- label: "完单提成",
- prop: "orderReceivedTotal",
- img: "已退款",
- },
- {
- label: "扣除提成",
- prop: "orderUncollectedTotal",
- img: "未收款",
- },
- ],
- ],
- activeOrderInfo: {},
- orderDialogVisible: false,
- loading: false,
- };
- },
- mounted() {},
- methods: {
- init() {},
- search(v) {
- this.loading = true;
- if (v === 2) {
- this.formData = {
- pageSize: 10,
- pageNum: 1,
- };
- }
- // this.getDataList(this.backData());
- },
- getDataList(data) {
- const fn = [orderList, tenantList, sellerList][this.type];
- fn(data)
- .then((res) => {
- this.tableData = res.rows;
- this.total = res.total;
- this.navText.index = res.total;
- })
- .finally(() => {
- this.loading = false;
- });
- },
- changeGroup() {},
- openDialog(data) {
- this.activeOrderInfo = data;
- this.orderDialogVisible = true;
- },
- },
- components: {
- tableList,
- pagination,
- searchBoxNew,
- pictureList,
- dislogOrderDetails,
- },
- computed: {
- isShow: {
- get() {
- if (this.dialogVisible) {
- this.init();
- }
- return this.dialogVisible;
- },
- set(val) {
- this.$emit("update:dialogVisible", false);
- },
- },
- text() {
- return ["分成", "提成", "佣金"][this.type - 1];
- },
- formList() {
- const key = ["完单", "退款", "结算"][this.status];
- let data = [
- {
- prop1: "startTime",
- prop2: "endTime",
- placeholder1: key + "开始时间",
- placeholder2: key + "结束时间",
- scope: "moreDataPicker",
- },
- ];
- if (this.status == 0) {
- data.unshift({
- prop: "divideStatus",
- placeholder: "分成状态",
- scope: "select",
- options: [
- { label: "待审核", value: 0 },
- { label: "已通过", value: 1 },
- { label: "未通过", value: 2 },
- { label: "已撤销", value: 3 },
- ],
- });
- }
- if (this.status != 2) {
- data.push({
- prop: "orderSn",
- placeholder: "订单单号",
- });
- }
- return data;
- },
- tableSet() {
- if (this.status == 0) {
- let data = [
- {
- label: "完单时间",
- prop: "userName",
- hidden: true,
- },
- {
- label: "订单单号",
- prop: "orderSn",
- hidden: true,
- },
- {
- label: `已付${this.text}(元)`,
- prop: "goodsName",
- hidden: true,
- },
- {
- label: `待付${this.text}(元)`,
- prop: "userPhone",
- hidden: true,
- },
- ];
- if (this.type != 3) {
- data.push(
- {
- label: "预付时间",
- prop: "majorName",
- hidden: true,
- },
- {
- label: "剩余天数",
- prop: "predictPayDay",
- hidden: true,
- }
- );
- } else {
- data.push({
- label: "佣金状态",
- prop: "majorName",
- hidden: true,
- });
- }
- return data;
- } else if (this.status == 1) {
- return [
- {
- label: "退款时间",
- prop: "userName",
- hidden: true,
- },
- {
- label: "订单单号",
- prop: "orderSn",
- hidden: true,
- },
- {
- label: `扣除${this.text}(元)`,
- prop: "goodsName",
- hidden: true,
- },
- {
- label: "扣除状态",
- prop: "orderSn",
- hidden: true,
- },
- ];
- } else {
- let data = [
- {
- label: "结算时间",
- prop: "userName",
- hidden: true,
- },
- {
- label: "结算金额(元)",
- prop: "orderSn",
- hidden: true,
- },
- {
- label: `完成${this.text}(元)`,
- prop: "goodsName",
- hidden: true,
- },
- {
- label: `扣除${this.text}(元)`,
- prop: "userPhone",
- hidden: true,
- },
- ];
- if (this.type != 3) {
- data.push();
- }
- return data;
- }
- },
- pictureList() {
- if (this.status == 0) {
- return [
- {
- label: `待付${this.text}`,
- prop: "orderUncollectedTotal",
- img: "未收款",
- },
- {
- label: `已付${this.text}`,
- prop: "orderUncollectedTotal",
- img: "已收款",
- },
- ];
- } else if (this.status == 1) {
- return [
- {
- label: `待扣${this.text}`,
- prop: "orderReceivedTotal",
- img: "已退款",
- },
- {
- label: `已扣${this.text}`,
- prop: "orderUncollectedTotal",
- img: "成本金额",
- },
- ];
- } else {
- let data = [
- {
- label: "结算金额",
- prop: "orderPriceTotal",
- img: "已收款",
- },
- ];
- if (this.type != 3) {
- data.push(
- {
- label: `完单${this.text}`,
- prop: "orderReceivedTotal",
- img: "已退款",
- },
- {
- label: `扣除${this.text}`,
- prop: "orderUncollectedTotal",
- img: "未收款",
- }
- );
- }
- return data;
- }
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .arapDetail {
- margin-top: 10px;
- #tableList {
- padding: 0;
- }
- }
- </style>
|