|
@@ -131,7 +131,6 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-import { purchaseTargetList } from '@/api/purchase'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
|
import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill, purchaseReturnFinishBill } from '@/api/purchaseReturnApply'
|
|
@@ -163,6 +162,8 @@ export default {
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
+ delete parameter.index
|
|
|
+ delete parameter.tableId
|
|
|
return purchaseReturnList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
@@ -176,8 +177,7 @@ export default {
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
|
- },
|
|
|
- purchaseTragetType: []
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -260,30 +260,19 @@ export default {
|
|
|
if (row) { // 编辑
|
|
|
_this.$router.push({ path: `/purchasingManagement/purchaseReturn/edit/${row.id}/${row.purchaseReturnSn}/${row.returnTargetName}` })
|
|
|
} else { // 新增
|
|
|
- let content
|
|
|
- if (this.purchaseTragetType.length > 0) {
|
|
|
- content = '退货供应商:' + this.purchaseTragetType[0].purchaseTargetName
|
|
|
- } else {
|
|
|
- content = '退货供应商:--'
|
|
|
- }
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
- content: content,
|
|
|
+ content: <div><div style="padding:10px 0;">供应商:箭冠营销中心</div><div style='color:#999;'><div>说明:</div><div>1、采购退货申请单提交后,箭冠营销中心系统将能查看到此单并进行后续处理。</div><div>2、采购退货申请单中的产品,不会占用库存。</div></div></div>,
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
- const params = {
|
|
|
- returnTargetSn: _this.purchaseTragetType[0].purchaseTargetSn,
|
|
|
- returnTargetName: _this.purchaseTragetType[0].purchaseTargetName,
|
|
|
- returnTargetType: _this.purchaseTragetType[0].purchaseTargetType
|
|
|
- }
|
|
|
_this.spinning = true
|
|
|
- purchaseReturnSave(params).then(res => {
|
|
|
+ purchaseReturnSave({}).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
const data = res.data
|
|
|
_this.spinning = false
|
|
|
// 重置查询条件
|
|
|
_this.resetData()
|
|
|
- _this.$router.push({ path: `/purchasingManagement/purchaseReturn/add/${data.id}/${data.purchaseReturnSn}/${data.returnTargetName}` })
|
|
|
+ _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: data.purchaseReturnSn } })
|
|
|
} else {
|
|
|
_this.spinning = false
|
|
|
}
|
|
@@ -334,22 +323,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getParentDealer () {
|
|
|
- purchaseTargetList({ purchaseTargetType: 'SUPPLIER_SYS' }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.purchaseTragetType = res.data
|
|
|
- } else {
|
|
|
- this.purchaseTragetType = []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|
|
|
- this.getParentDealer()
|
|
|
-
|
|
|
// 是否打开的页签
|
|
|
const a = this.$store.state.app.isNewTab
|
|
|
// 是否要刷新列表
|