123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- <template>
- <!-- 【单证】 订单数据 -->
- <div id="orderList">
- <a-card :bordered="false">
- <!-- 查询区域 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :md="6" :sm="8">
- <a-form-item label="订单号">
- <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="订单日期">
- <a-date-picker
- style="width: 100%"
- format="YYYY-MM-DD"
- v-model="queryParam.orderDate"
- placeholder="请选择订单日期"
- @change="onDateChange"
- ></a-date-picker>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="客户简称">
- <a-input placeholder="请输入客户简称" v-model="queryParam.customerAbbreviation"></a-input>
- </a-form-item>
- </a-col>
- <template v-if="toggleSearchStatus">
- <a-col :md="6" :sm="8">
- <a-form-item label="账套">
- <a-input placeholder="请输入账套" v-model="queryParam.account"></a-input>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="发货状态">
- <a-select placeholder="请选择发货状态" v-model="queryParam.dilivery">
- <a-select-option value="">请选择</a-select-option>
- <a-select-option value="0">未发货</a-select-option>
- <a-select-option value="1">已发货</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="成品/面辅料">
- <!-- 成品传0 面辅料传1 -->
- <a-select placeholder="请选择" v-model="queryParam.isProduct">
- <a-select-option value="">请选择</a-select-option>
- <a-select-option value="0">成品</a-select-option>
- <a-select-option value="1">面辅料</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </template>
- <a-col :md="6" :sm="8">
- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
- <a @click="handleToggleSearch" style="margin-left: 8px">
- {{ toggleSearchStatus ? '收起' : '展开' }}
- <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
- </a>
- </span>
- </a-col>
- </a-row>
- </a-form>
- </div>
- </a-card>
- <!-- 操作按钮区域 -->
- <a-card :bordered="false" style="marginTop:10px;">
- <div class="table-operator">
- <a-button type="primary" @click="synchronization" icon="reload">同步</a-button>
- </div>
- <!-- 主表信息 rowKey="id" :pagination="ipagination" -->
- <div>
- <a-table
- bordered
- :row-key="record => record.id"
- :columns="orderLIstColumns"
- :data-source="orderListData"
- :loading="loading"
- :pagination="pagination"
- :scroll="{ x: 1500 }"
- @change="handleTableChange"
- >
- <!-- 订单号 链接-->
- <span slot="orderNumber" slot-scope="text">
- <a>{{ text }}</a>
- </span>
- </a-table>
- </div>
- </a-card>
- <!-- 订单数据明细 抽屉 -->
- <orderDetail-drawer ref="orderDetailDrawer" :fatherList="getOrderList" @ok="modalFormOk"></orderDetail-drawer>
- </div>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import moment from 'moment'
- import OrderDetailDrawer from '@views/order/orderDetailDrawer.vue'
- import { orderList } from '@api/document/order'
- export default {
- name: 'OrderList', // 【单证】 订单数据
- mixins: [JeecgListMixin],
- components: { JEllipsis, moment, OrderDetailDrawer },
- data() {
- let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
- // sorter: true, table表头排序
- return {
- // 表头
- orderLIstColumns: [
- {
- title: '订单号',
- width: 260,
- dataIndex: 'orderNumber',
- fixed: 'left',
- className: 'replacecolor',
- align: 'left',
- customCell: this.showDrawer,
- scopedSlots: { customRender: 'orderNumber' }
- },
- {
- title: '订单日期',
- width: 120,
- dataIndex: 'orderDate',
- fixed: 'left',
- customRender: text => {
- return moment(text).format('YYYY-MM-DD')
- },
- className: 'replacecolor'
- },
- { title: '业务类型', width: 100, dataIndex: 'businessTypeValue', className: 'replacecolor' },
- { title: '客户订单号', width: 120, dataIndex: 'customerOrderNumber;', className: 'replacecolor' },
- {
- title: '销售类型',
- width: 100,
- dataIndex: 'salesTypeValue',
- className: 'replacecolor'
- },
- { title: '客户简称', width: 150, dataIndex: 'customerAbbreviation', className: 'replacecolor' },
- { title: '客户名称', width: 220, dataIndex: 'customerName', align: 'left', className: 'replacecolor' },
- { title: '供应商', width: 120, dataIndex: 'supplier', className: 'replacecolor' },
- { title: '汇率', width: 90, dataIndex: 'exchangeRate', className: 'replacecolor' },
- { title: '整单合计', width: 120, dataIndex: 'wholeOrderTotal', className: 'replacecolor' },
- { title: '销售部门', width: 100, dataIndex: 'salesDepartment', className: 'replacecolor' },
- { title: '业务员', width: 140, dataIndex: 'salesman', className: 'replacecolor' },
- { title: '币种', width: 90, dataIndex: 'currencyValue', className: 'replacecolor' },
- { title: '品牌方', width: 120, dataIndex: 'brandSide', className: 'replacecolor' },
- { title: '第三方', width: 120, dataIndex: 'thirdParty', className: 'replacecolor' },
- { title: '定金比例(%)', width: 120, dataIndex: 'depositRatio', className: 'replacecolor' },
- { title: '定金', width: 100, dataIndex: 'deposit', className: 'replacecolor' },
- { title: '协同路线', width: 160, dataIndex: 'collaborativeRoute', className: 'replacecolor' },
- { title: '付款条件', width: 180, dataIndex: 'termOfPayment', className: 'replacecolor' },
- { title: '最终客户', width: 120, dataIndex: 'endCustomer', className: 'replacecolor' },
- {
- title: '订单备注',
- width: 220,
- dataIndex: 'orderRemarks',
- customRender: t => ellipsis(t),
- className: 'replacecolor',
- scopedSlots: { customRender: 'orderRemarks' }
- },
- {
- title: '价格备注',
- width: 120,
- dataIndex: 'priceRemarks',
- customRender: t => ellipsis(t),
- className: 'replacecolor',
- scopedSlots: { customRender: 'priceRemarks' }
- },
- {
- title: '订单变更说明',
- width: 220,
- dataIndex: 'orderChangeDescription',
- fixed: 'right',
- customRender: t => ellipsis(t),
- className: 'replacecolor',
- scopedSlots: { customRender: 'orderChangeDescription' }
- }
- ],
- orderListData: [], // 主表信息
- loading: false, // 表格加载
- queryParam: {
- orderNumber: '',
- orderDate: '',
- customerAbbreviation: '',
- account: '',
- dilivery: '',
- isProduct: '', // 客户需求新增
- pageNo: '' // 初始页
- },
- pagination: {
- // total: '',
- // current: 0,
- // pageSize: 0
- }
- }
- },
- created() {
- this.getOrderList()
- },
- methods: {
- // 分页查询
- getOrderList() {
- this.$nextTick(() => {
- orderList(this.queryParam).then(res => {
- if (res.success) {
- this.orderListData = res.result.records
- console.log('订单数据列表', this.orderListData)
- this.pagination = {
- total: res.result.total,
- current: res.result.current,
- pageSize: res.result.size
- }
- }
- })
- })
- },
- // 【订单号】 抽屉
- showDrawer(record) {
- return {
- on: {
- click: event => {
- this.$refs.orderDetailDrawer.visible = true
- this.$refs.orderDetailDrawer.record = record // 接口参数
- this.$refs.orderDetailDrawer.getOrderChild()
- this.$refs.orderDetailDrawer.orderDetail = record // 详情页主表赋值
- }
- }
- }
- },
- // 查询按钮
- searchQuery() {
- this.queryParam.pageNo = ''
- this.getOrderList()
- // console.log('发货状态', this.queryParam.dilivery)
- },
- searchReset() {
- this.queryParam = {}
- this.getOrderList()
- },
- // 查询条件 订单日期转换成字符串并赋值
- onDateChange(value, dateString) {
- this.queryParam.orderDate = dateString
- },
- // 同步
- synchronization() {
- console.log('订单数据--同步')
- },
- handleTableChange(pagination, filters, sorter) {
- this.queryParam.pageNo = pagination.current
- this.getOrderList()
- }
- },
- computed: {},
- mounted() {}
- }
- </script>
- <style lang="less" scoped>
- @import '~@assets/less/common.less';
- @import '~@assets/less/overwriter.less';
- /deep/ .ant-table-thead > tr > th {
- text-align: center;
- // font-weight: 700;
- }
- /deep/ .ant-table-tbody {
- text-align: center;
- }
- // /deep/ th.replacecolor {
- // background-color: #ccc;
- // }
- </style>
|