| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <template>
- <view class="mainBox">
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="订单" @clickLeft="back">
- </uni-nav-bar>
- <view v-for="(item, index) in tableList" :key="index" style="position: relative;">
- <myCard :item="item" :index="index+1" :btnList="btnList" :columns="columns"
- @del="del(item)"></myCard>
- </view>
- <view class="add" @click="add">
- <u-icon name="plus" color="#fff"></u-icon>
- </view>
- <u-toast ref="uToast"></u-toast>
- </view>
- </template>
- <script>
- import {
- getTableList,
- deleteInformation
- } from '@/api/saleManage/saleorder/index.js'
- import myCard from '../components/myCard.vue'
- export default {
- components: {
- myCard
- },
- data() {
- return {
- btnList: [{
- name: '详情',
- apiName: '',
- btnType: 'primary',
- type: '1',
- pageUrl: '/pages/saleManage/saleOrder/components/drawer',
- }, {
- name: '修改',
- apiName: '',
- btnType: 'primary',
- type: '1',
- pageUrl: '/pages/saleManage/saleOrder/add',
- judge: [{
- key: 'orderStatus',
- value: [0, 3]
- }],
- }, {
- name: '删除',
- apiName: 'del',
- btnType: 'error ',
- type: '2',
- pageUrl: '',
- judge: [{
- key: 'orderStatus',
- value: [0, 3]
- }],
- }],
- columns: [
- [{
- label: '名称:',
- prop: 'name',
- type: 'title',
- className: 'perce100',
- }],
- [{
- label: '编码:',
- prop: 'orderNo'
- }, {
- label: '产品名称:',
- prop: 'productNames'
- }],
- [{
- label: '销售类型:',
- prop: 'saleTypeName'
- }, {
- label: '项目名称:',
- prop: 'projectName'
- }],
- [{
- label: '客户名称:',
- prop: 'partaName'
- }, {
- label: '客户联系人:',
- prop: 'partaLinkName'
- }],
- [{
- label: '金额(元):',
- prop: 'payAmount'
- }, {
- label: '审核状态:',
- prop: 'orderStatus',
- formatter: (row) => {
- const reviewStatus = {
- 0: '未提交',
- 1: '审核中',
- 2: '已审核',
- 3: '审核不通过'
- }
- return reviewStatus[row.orderStatus];
- }
- }],
- [{
- label: '创建人:',
- prop: 'createUserName'
- }],
- [{
- label: '操作:',
- prop: 'action',
- type: 'action',
- className: 'perce100',
- }],
- ],
- tableList: [],
- page: 1,
- size: 10,
- isEnd: false,
- //报价管理-审核枚举
- }
- },
- computed: {
- },
- onShow() {
- this.isEnd = false
- this.page = 1
- this.getList()
- },
- methods: {
- //获取列表信息
- getList() {
- if (this.isEnd) {
- return
- }
- uni.showLoading({
- title: '加载中'
- })
- let data = {
- pageNum: this.page,
- size: this.size,
- }
- getTableList(data).then(res => {
- if (this.page === 1) {
- this.tableList = res.list
- } else {
- this.tableList.push(...res.list)
- }
- this.page += 1
- this.isEnd = this.tableList.length >= res.count
- }).then(() => {
- uni.hideLoading()
- })
- },
- del(row) {
- deleteInformation([row.id]).then(res => {
- this.isEnd = false
- this.page = 1
- this.$refs.uToast.show({
- type: "success",
- message: "操作成功",
- })
- this.getList(this.where)
- })
- },
- add() {
- uni.navigateTo({
- url: '/pages/saleManage/saleOrder/add'
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .add {
- width: 96rpx;
- height: 96rpx;
- border-radius: 48rpx;
- background: #3c9cff;
- position: fixed;
- bottom: 100rpx;
- right: 24rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- </style>
|