|
@@ -1,54 +1,65 @@
|
|
|
<template>
|
|
|
- <a-card size="small" :bordered="false" class="warehousingAuditList-wrap">
|
|
|
+ <a-card size="small" :bordered="false" class="returnConfirmationList-wrap">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div 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="采购单号">
|
|
|
- <a-input id="warehousingAuditList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入采购单号"/>
|
|
|
+ <a-form-item label="创建时间">
|
|
|
+ <a-range-picker
|
|
|
+ style="width:100%"
|
|
|
+ id="returnConfirmationList-createDate"
|
|
|
+ :disabledDate="disabledDate"
|
|
|
+ v-model="createDate"
|
|
|
+ :format="dateFormat"
|
|
|
+ :placeholder="['开始时间', '结束时间']" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="采购入库单号">
|
|
|
- <a-input id="warehousingAuditList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入采购入库单号"/>
|
|
|
+ <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
|
|
|
+ <custList id="returnConfirmationList-buyerName" v-model="queryParam.buyerName"></custList>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="入库时间">
|
|
|
- <a-range-picker v-model="queryParam.creatDate" id="warehousingAuditList-creatDate"/>
|
|
|
+ <a-form-item label="销退单号">
|
|
|
+ <a-input id="returnConfirmationList-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="财务审核状态">
|
|
|
+ <a-form-item label="是否抓单">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.grabFlag"
|
|
|
+ ref="grabFlag"
|
|
|
+ id="returnConfirmationList-grabFlag"
|
|
|
+ code="FLAG"
|
|
|
+ placeholder="请选择"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.billStatus"
|
|
|
ref="billStatus"
|
|
|
- id="warehousingAuditList-billStatus"
|
|
|
- code="PAYMENT_TYPE"
|
|
|
- placeholder="请选择财务审核状态"
|
|
|
+ id="returnConfirmationList-billStatus"
|
|
|
+ code="SALES_RETURN_CONFIRM_STATUS"
|
|
|
+ placeholder="请选择状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <span class="table-page-search-submitButtons">
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehousingAuditList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="warehousingAuditList-reset">重置</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
- </a>
|
|
|
- </span>
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="returnConfirmationList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="returnConfirmationList-reset">重置</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <!-- alert -->
|
|
|
- <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
- <div slot="message">共 <strong>6</strong> 条记录,其中待审核 <strong>14</strong> 条 </div>
|
|
|
- </a-alert>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable"
|
|
@@ -57,130 +68,151 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1290 }"
|
|
|
+ :scroll="{ x: 1460, y: tableHeight }"
|
|
|
bordered>
|
|
|
- <!-- 采购单号 -->
|
|
|
- <template slot="purchaseBillNo" slot-scope="text, record">
|
|
|
- <span style="color: #ed1c24;cursor: pointer;">{{ record.purchaseBillNo }}</span>
|
|
|
- </template>
|
|
|
- <!-- 采购入库单号 -->
|
|
|
- <template slot="purchaseNos" slot-scope="text, record">
|
|
|
- <span style="color: #ed1c24;cursor: pointer;">{{ record.purchaseNo }}</span>
|
|
|
- </template>
|
|
|
- <!-- 状态 -->
|
|
|
- <template slot="auditStatus" slot-scope="text, record">
|
|
|
- <a-tag :color="record.auditStatus=='FINISH'?'green':'red'" >{{ record.auditStatus=='FINISH'? '待备货审核': '待单据审核' }}</a-tag>
|
|
|
+ <!-- 销退单号 -->
|
|
|
+ <template slot="salesReturnBillNo" slot-scope="text, record">
|
|
|
+ <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="link" @click="handleExamine(record, 1)" id="warehousingAudit-adopt-btn">通过</a-button>
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
- <a-button size="small" type="link" @click="handleExamine(record, 2)" id="warehousingAudit-unadopt-btn">不通过</a-button>
|
|
|
- <a-divider type="vertical" style="margin: 0;" />
|
|
|
- <a-button size="small" type="link" @click="handleDetail(record)" id="warehousingAudit-detail-btn">详情</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.billStatus=='WAIT_FINANCIAL_AUDIT'"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleAudit(record)"
|
|
|
+ id="returnConfirmationList-audit-btn">退货确认</a-button>
|
|
|
+ <span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
+ <!-- 查看 -->
|
|
|
+ <confirmation-detail-modal :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import moment from 'moment'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-// import { getRoleList, getServiceList } from '@/api/manage'
|
|
|
+import custList from '@/views/common/custList.vue'
|
|
|
+import confirmationDetailModal from './detailModal.vue'
|
|
|
+import { salesReturnFinancialList, salesReturnFinancial } from '@/api/salesReturn'
|
|
|
export default {
|
|
|
- components: { STable, VSelect },
|
|
|
+ components: { STable, VSelect, confirmationDetailModal, custList },
|
|
|
data () {
|
|
|
return {
|
|
|
- advanced: false, // 高级搜索 展开/关闭
|
|
|
+ queryParam: { // 查询条件
|
|
|
+ salesReturnBillNo: '', // 单号
|
|
|
+ buyerName: undefined,
|
|
|
+ grabFlag: undefined,
|
|
|
+ billStatus: undefined // 状态
|
|
|
+ },
|
|
|
+ tableHeight: 0,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- // 查询参数
|
|
|
- queryParam: {},
|
|
|
- // 表头
|
|
|
+ createDate: [], // 创建时间
|
|
|
+ dateFormat: 'YYYY-MM-DD',
|
|
|
+ advanced: false,
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, align: 'center' },
|
|
|
- { title: '采购入库单号', scopedSlots: { customRender: 'purchaseNos' }, align: 'center' },
|
|
|
- { title: '总款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '入库总数量', dataIndex: 'totalQty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '入库总成本', dataIndex: 'totalAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '入库时间', dataIndex: 'sauditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '财务审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '财务审核状态', scopedSlots: { customRender: 'auditStatus' }, width: 120, align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 190, align: 'center', fixed: 'right' }
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单据来源', dataIndex: 'salesReturnBillSourceDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: 220, align: 'center' },
|
|
|
+ { title: '退货客户', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '退货数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '退货金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '确认时间', dataIndex: 'confirmTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '状态', dataIndex: 'billStatusDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
- // const 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
|
|
|
- // return data
|
|
|
- // })
|
|
|
- const _this = this
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [
|
|
|
- { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
+ if (this.tableHeight == 0) {
|
|
|
+ this.tableHeight = window.innerHeight - 380
|
|
|
+ }
|
|
|
+ // 创建时间
|
|
|
+ if (this.createDate && this.createDate.length > 0) {
|
|
|
+ this.queryParam.beginDate = moment(this.createDate[0]).format(this.dateFormat)
|
|
|
+ this.queryParam.endDate = moment(this.createDate[1]).format(this.dateFormat)
|
|
|
+ } else {
|
|
|
+ this.queryParam.beginDate = undefined
|
|
|
+ this.queryParam.endDate = undefined
|
|
|
+ }
|
|
|
+ return salesReturnFinancialList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ const 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
|
|
|
- resolve(data)
|
|
|
+ this.disabled = false
|
|
|
+ return data
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ openModal: false,
|
|
|
+ itemSn: ''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // 详情
|
|
|
+ // 不可选日期
|
|
|
+ disabledDate (date, dateStrings) {
|
|
|
+ return date && date.valueOf() > Date.now()
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ resetSearchForm () {
|
|
|
+ this.queryParam.salesReturnBillNo = ''
|
|
|
+ this.queryParam.buyerName = undefined
|
|
|
+ this.queryParam.grabFlag = undefined
|
|
|
+ this.queryParam.billStatus = undefined
|
|
|
+ this.createDate = []
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ // 详情
|
|
|
handleDetail (row) {
|
|
|
- this.$router.push({ path: `/financialManagement/warehousingAudit/detail/${row.id}` })
|
|
|
+ this.itemSn = row.salesReturnBillSn
|
|
|
+ this.openModal = true
|
|
|
},
|
|
|
- // 审核
|
|
|
- handleExamine (row, type) {
|
|
|
+ closeModal () {
|
|
|
+ this.itemSn = ''
|
|
|
+ this.openModal = false
|
|
|
+ },
|
|
|
+ // 单个审核
|
|
|
+ handleAudit (row) {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
- content: '操作后不可恢复,确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
|
|
|
+ content: '请点击下方按钮确认操作',
|
|
|
centered: true,
|
|
|
+ okText: '通过',
|
|
|
+ cancelText: '不通过',
|
|
|
onOk () {
|
|
|
- // delectRolePower({
|
|
|
- // id: row.id
|
|
|
- // }).then(res => {
|
|
|
- // console.log(res, 'res1111')
|
|
|
- // if (res.status == 200) {
|
|
|
- // _this.$message.success(res.message)
|
|
|
- // _this.$refs.table.refresh()
|
|
|
- // }
|
|
|
- // })
|
|
|
+ _this.auditOrder(row.salesReturnBillSn, 'FINISH')
|
|
|
+ },
|
|
|
+ onCancel (e) {
|
|
|
+ if (!e.triggerCancel) {
|
|
|
+ _this.auditOrder(row.salesReturnBillSn, 'FINANCIAL_REJECT')
|
|
|
+ }
|
|
|
+ _this.$destroyAll()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 重置
|
|
|
- resetSearchForm () {
|
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
- this.queryParam.bundleName = ''
|
|
|
- this.queryParam.itemName = ''
|
|
|
- this.oldTime = undefined
|
|
|
- this.newTime = undefined
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ auditOrder (sn, flag) {
|
|
|
+ const _this = this
|
|
|
+ salesReturnFinancial({ salesReturnBillSn: sn, billStatus: flag }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+
|
|
|
<style lang="less">
|
|
|
- .warehousingAuditList-wrap{
|
|
|
+ .returnConfirmationList-wrap{
|
|
|
.sTable{
|
|
|
- margin-top: 15px;
|
|
|
+ margin-top: 20px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|