|
@@ -1,8 +1,248 @@
|
|
|
<template>
|
|
|
+ <a-card size="small" :bordered="false" class="pickUp-wrap">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="审核时间">
|
|
|
+ <rangeDate ref="rangeExamineDate" @change="dateExamineChange" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="提货单号">
|
|
|
+ <a-input id="pickUp-billNo" v-model.trim="queryParam.purchaseReturnBillNo" allowClear placeholder="请输入客户采退申请单号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="关联销退单号">
|
|
|
+ <a-input id="pickUp-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入总部销退单号"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <template v-if="advanced">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="申请人">
|
|
|
+ <employee style="width: 100%;" id="pickUp-Employee" v-model="queryParam.applyPersonSn"></employee>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="物流点">
|
|
|
+ <employee style="width: 100%;" id="pickUp-Employee2" v-model="queryParam.applyPersonSn"></employee>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="发货方">
|
|
|
+ <dealerSubareaScopeList ref="dealerSubareaScopeList" id="pickUp-buyerSn" @change="custChange" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </template>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <span class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable fixPagination"
|
|
|
+ ref="table"
|
|
|
+ :style="{ height: tableHeight+64.5+'px' }"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ y: tableHeight }"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <!-- 单号 -->
|
|
|
+ <template slot="salesReturnBillNo" slot-scope="text, record">
|
|
|
+ <div v-if="$hasPermissions('B_salesReturnDetail')">
|
|
|
+ <span class="link-bule" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-else>{{ record.salesReturnBillNo }}</div>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-info"
|
|
|
+ @click="handleDetail(record)"
|
|
|
+ id="pickUp-detail-btn">详情</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
+ </a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { commonMixin } from '@/utils/mixin'
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
+import employee from '../../expenseManagement/expenseReimbursement/employee.js'
|
|
|
+import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
+import { salesReturnList } from '@/api/salesReturn'
|
|
|
+export default {
|
|
|
+ name: 'BillOfLadingList',
|
|
|
+ mixins: [commonMixin],
|
|
|
+ components: {
|
|
|
+ STable,
|
|
|
+ VSelect,
|
|
|
+ dealerSubareaScopeList,
|
|
|
+ employee,
|
|
|
+ rangeDate
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ spinning: false,
|
|
|
+ // 高级搜索 展开/关闭
|
|
|
+ advanced: false,
|
|
|
+ tableHeight: 0,
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ createDate: [], // 创建时间
|
|
|
+ // 查询参数
|
|
|
+ queryParam: {
|
|
|
+ beginAuditDate: '',
|
|
|
+ endAuditDate: '',
|
|
|
+ buyerSn: undefined, // 客户名称
|
|
|
+ salesReturnBillNo: undefined, // 总部销退单号
|
|
|
+ purchaseReturnBillNo: '',
|
|
|
+ billStatus: undefined, // 业务状态
|
|
|
+ shippingAddrProvinceSn: undefined,
|
|
|
+ salesReturnBillSource: undefined
|
|
|
+ },
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ this.spinning = true
|
|
|
+ return salesReturnList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ let data
|
|
|
+ if (res.status == 200) {
|
|
|
+ data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.disabled = false
|
|
|
+ }
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ visibleAudit: false,
|
|
|
+ auditInfo: null,
|
|
|
+ spinningAudit: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const arr = [
|
|
|
+ { title: '编号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '提货单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '10%', align: 'center' },
|
|
|
+ { title: '关联销退单', dataIndex: 'salesReturnBillSourceDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '申请人', dataIndex: 'purchaseReturnBillNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '主题', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '物流公司', dataIndex: 'buyerName2', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '物流点', dataIndex: 'buyerName1', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '发货方', dataIndex: 'purchaseReturnBillNo1', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '收货人', dataIndex: 'purchaseReturnBillNo2', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
|
|
|
+ ]
|
|
|
+ return arr
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 审核时间 change
|
|
|
+ dateExamineChange (date) {
|
|
|
+ this.queryParam.beginAuditDate = date[0]
|
|
|
+ this.queryParam.endAuditDate = date[1]
|
|
|
+ },
|
|
|
+ custChange (val) {
|
|
|
+ this.queryParam.buyerSn = val.key
|
|
|
+ },
|
|
|
+ // 详情
|
|
|
+ handleDetail (row) {
|
|
|
+ this.$router.push({ name: 'billOfLadingDetail', params: { sn: row.salesReturnBillSn } })
|
|
|
+ },
|
|
|
+ resetSearchForm () {
|
|
|
+ this.$refs.rangeExamineDate.resetDate()
|
|
|
+ if (this.advanced) {
|
|
|
+ this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
+ }
|
|
|
+ this.queryParam.beginAuditDate = ''
|
|
|
+ this.queryParam.endAuditDate = ''
|
|
|
+ this.queryParam.buyerSn = undefined
|
|
|
+ this.queryParam.salesReturnBillNo = ''
|
|
|
+ this.queryParam.purchaseReturnBillNo = ''
|
|
|
+ this.queryParam.billStatus = undefined
|
|
|
+ this.queryParam.salesReturnBillSource = undefined
|
|
|
+ this.queryParam.shippingAddrProvinceSn = undefined
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ pageInit () {
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setTableH () {
|
|
|
+ const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 175
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ advanced (newValue, oldValue) {
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
+ this.setTableH()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
+ this.pageInit()
|
|
|
+ this.resetSearchForm()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ activated () {
|
|
|
+ // 如果是新页签打开,则重置当前页面
|
|
|
+ if (this.$store.state.app.isNewTab) {
|
|
|
+ this.pageInit()
|
|
|
+ this.resetSearchForm()
|
|
|
+ }
|
|
|
+ // 仅刷新列表,不重置页面
|
|
|
+ if (this.$store.state.app.updateList) {
|
|
|
+ this.pageInit()
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {})
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
-
|
|
|
-<style>
|
|
|
-</style>
|
|
|
+<style lang="less">
|
|
|
+ .pickUp-wrap{
|
|
|
+ .sTable{
|
|
|
+ .badge-con-t{
|
|
|
+ .ant-badge-count{
|
|
|
+ transform: scale(0.8);
|
|
|
+ font-size: 13px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|