|
@@ -93,9 +93,13 @@
|
|
|
:scroll="{ y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
+ <!-- 采购退货单号 -->
|
|
|
+ <template slot="sparePartsReturnNo" slot-scope="text, record">
|
|
|
+ <span class="link-bule" @click="handleDetail(record)">{{ record.sparePartsReturnNo }}</span>
|
|
|
+ </template>
|
|
|
<!-- 入库单号 -->
|
|
|
<template slot="sparePartsNo" slot-scope="text, record">
|
|
|
- <span v-if="$hasPermissions('B_sparePartsDetail')" class="link-bule" @click="handleDetail(record)">{{ record.sparePartsNo }}</span>
|
|
|
+ <span v-if="$hasPermissions('B_sparePartsDetail')" class="link-bule" @click="handleWarehousingDetail(record)">{{ record.sparePartsNo }}</span>
|
|
|
<span v-else>{{ record.sparePartsNo }}</span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
@@ -104,43 +108,51 @@
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-warning"
|
|
|
+ v-if="record.state == 'WAIT_AUDIT'"
|
|
|
@click="openReviewModal = true"
|
|
|
- id="allocateBillList-examine-btn">审核进度</a-button>
|
|
|
+ id="allocateBillList-examine-btn">审核</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_sparePartsEdit')"
|
|
|
+ v-if="record.state == 'WAIT_SUBMIT'"
|
|
|
@click="handleEdit(record)"
|
|
|
class="button-info"
|
|
|
id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_sparePartsEdit')"
|
|
|
+ class="button-warning"
|
|
|
+ @click="openReviewModal = true"
|
|
|
+ v-if="record.state == 'FINISH_AUDIT' ||record.state == 'NOAGREE_AUDIT' "
|
|
|
+ id="allocateBillList-examine-btn">审核进度</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.state == 'FINISH_AUDIT'"
|
|
|
@click="handleEdit(record)"
|
|
|
class="button-info"
|
|
|
id="bulkWarehousingOrderList-edit-btn">同步到ERP</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_sparePartsEdit')"
|
|
|
+ v-if="record.state == 'NOAGREE_AUDIT'"
|
|
|
@click="handleEdit(record)"
|
|
|
class="button-info"
|
|
|
id="bulkWarehousingOrderList-edit-btn">再次提交</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
- v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_sparePartsDel')"
|
|
|
+ v-if="record.state == 'WAIT_SUBMIT'"
|
|
|
@click="handleDel(record)"
|
|
|
class="button-error"
|
|
|
id="bulkWarehousingOrderList-del-btn">删除</a-button>
|
|
|
- <span v-if="!(record.state == 'WAIT_AUDIT'&&($hasPermissions('B_sparePartsEdit') || $hasPermissions('B_sparePartsDel') || $hasPermissions('B_sparePartsAudit')))">--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
<!-- 选择基本信息弹框 -->
|
|
|
<add-modal v-drag :openModal="openModal" @ok="handleOk" @close="openModal=false" />
|
|
|
<detailModal v-drag :openModal="openDetailModal" :itemSn="itemSn" @close="closeDetailModal" />
|
|
|
+ <sparePartsDetailModal v-drag :openModal="openWarehousingDetailModal" :itemSn="warehousingSn" @close="closeWarehousingDetailModal" />
|
|
|
<!-- 导出提示框 -->
|
|
|
<reportModal :visible="showExport" @close="showExport=false"></reportModal>
|
|
|
<!-- 选择审核人员 -->
|
|
@@ -155,16 +167,18 @@ import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import addModal from './addModal.vue'
|
|
|
import detailModal from './detailModal.vue'
|
|
|
+import sparePartsDetailModal from '../bulkWarehousingOrder/detailModal.vue'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import chooseDepartUserModal from './chooseDepartUserModal.vue'
|
|
|
import reviewProgressModal from './reviewProgressModal.vue'
|
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
-import { sparePartsList, sparePartsDelete, sparePartsAudit, sparePartsDetailExport } from '@/api/spareParts'
|
|
|
+import { toFixedDecimal } from '@/libs/tools.js'
|
|
|
+import { sparePartsReturnList, sparePartsReturnDelete, sparePartsReturnSave, sparePartsAudit, sparePartsDetailExport } from '@/api/sparePartsReturn'
|
|
|
export default {
|
|
|
name: 'PurchaseReturnList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable, VSelect, reportModal, detailModal, addModal, chooseDepartUserModal, rangeDate, reviewProgressModal },
|
|
|
+ components: { STable, VSelect, reportModal, detailModal, addModal, chooseDepartUserModal, rangeDate, reviewProgressModal, sparePartsDetailModal },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
@@ -176,22 +190,34 @@ export default {
|
|
|
auditInfo: null,
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
- productCode: '',
|
|
|
- relationNo: '',
|
|
|
+ productCode: undefined,
|
|
|
+ relationNo: undefined,
|
|
|
state: undefined,
|
|
|
sparePartsType: undefined,
|
|
|
- sparePartsNo: '',
|
|
|
- supplierName: '',
|
|
|
- kingdeeNo: ''
|
|
|
-
|
|
|
+ sparePartsNo: undefined,
|
|
|
+ supplierName: undefined,
|
|
|
+ kingdeeNo: undefined
|
|
|
},
|
|
|
+ columns: [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '采购退货单号', scopedSlots: { customRender: 'sparePartsReturnNo' }, width: '15%', align: 'center' },
|
|
|
+ { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: '15%', align: 'center' },
|
|
|
+ { title: '供应商名称', dataIndex: 'supplierName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '退货原因', dataIndex: 'explainInfo', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '申请退货数量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '退货金额', dataIndex: 'totalCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
|
|
|
+ { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '审核状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
|
|
|
+ ],
|
|
|
openDepartUserModal: false,
|
|
|
loading: false,
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return sparePartsList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return sparePartsReturnList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -207,28 +233,12 @@ export default {
|
|
|
},
|
|
|
openDetailModal: false,
|
|
|
itemSn: null,
|
|
|
+ warehousingSn: null,
|
|
|
rowSelectionInfo: null,
|
|
|
- openReviewModal: false
|
|
|
+ openReviewModal: false,
|
|
|
+ openWarehousingDetailModal: false
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- columns () {
|
|
|
- const arr = [
|
|
|
- { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '采购退货单号', scopedSlots: { customRender: 'sparePartsNo' }, width: '15%', align: 'center' },
|
|
|
- { title: '入库单号', scopedSlots: { customRender: 'sparePartsNo' }, width: '15%', align: 'center' },
|
|
|
- { title: '供应商名称', dataIndex: 'supplierName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '退货原因', dataIndex: 'remark', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '申请退货数量', dataIndex: 'productTotalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '退货金额', dataIndex: 'productTotalCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '审核时间', dataIndex: 'sparePartsTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '审核状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
|
|
|
- ]
|
|
|
- return arr
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
// 提交时间
|
|
|
dateChange (date) {
|
|
@@ -262,16 +272,26 @@ export default {
|
|
|
handleEdit (row) {
|
|
|
this.$router.push({ path: `/purchasingManagement/purchaseReturn/purchaseReturnDeatil` })
|
|
|
},
|
|
|
- // 详情
|
|
|
+ // 采购退货详情
|
|
|
handleDetail (row) {
|
|
|
- this.itemSn = row.sparePartsSn
|
|
|
+ this.itemSn = row.sparePartsReturnNo
|
|
|
this.openDetailModal = true
|
|
|
},
|
|
|
- // 关闭弹框
|
|
|
+ // 入库单详情
|
|
|
+ handleWarehousingDetail (row) {
|
|
|
+ this.warehousingSn = row.sparePartsSn
|
|
|
+ this.openWarehousingDetailModal = true
|
|
|
+ },
|
|
|
+ // 关闭采购退货详情弹框
|
|
|
closeDetailModal () {
|
|
|
this.itemSn = null
|
|
|
this.openDetailModal = false
|
|
|
},
|
|
|
+ // 关闭入库单详情弹框
|
|
|
+ closeWarehousingDetailModal () {
|
|
|
+ this.warehousingSn = null
|
|
|
+ this.openWarehousingDetailModal = false
|
|
|
+ },
|
|
|
// 删除
|
|
|
handleDel (row) {
|
|
|
const _this = this
|
|
@@ -281,7 +301,7 @@ export default {
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|
|
|
- sparePartsDelete({ sn: row.sparePartsSn }).then(res => {
|
|
|
+ sparePartsReturnDelete({ sn: row.sparePartsReturnNo }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$refs.table.refresh()
|