|
@@ -15,13 +15,32 @@
|
|
|
<a-input id="purchaseReturnList-purchaseReturnNo" v-model.trim="queryParam.purchaseReturnNo" allowClear placeholder="请输入退货单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="供应商">
|
|
|
+ <a-select v-model="queryParam.purchaseTargetSn" placeholder="请选择供应商">
|
|
|
+ <a-select-option v-for="item in purchaseTragetType" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn">
|
|
|
+ {{ item.purchaseTargetName }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="是否抓单">
|
|
|
+ <v-select
|
|
|
+ code="FLAG"
|
|
|
+ id="purchaseReturnList-grabFlag"
|
|
|
+ v-model="queryParam.grabFlag"
|
|
|
+ allowClear
|
|
|
+ placeholder="请选择是否抓单"></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="业务状态">
|
|
|
<v-select
|
|
|
v-model="queryParam.state"
|
|
|
ref="state"
|
|
|
id="purchaseReturnList-state"
|
|
|
- code="PURCHASE_RETURN_STATUS"
|
|
|
+ code="PURCHASE_RETURN_NO_SYNC_STATUS"
|
|
|
placeholder="请选择业务状态"
|
|
|
allowClear
|
|
|
></v-select>
|
|
@@ -121,7 +140,14 @@
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
<!-- 选择基本信息弹框 -->
|
|
|
- <basic-info-modal :openModal="openModal" @ok="handleEdit" @close="openModal=false" />
|
|
|
+ <basic-info-modal :openModal="openModal" @load="setPurchaseTragetType" @ok="handleEdit" @close="openModal=false" />
|
|
|
+ <!-- 审核 -->
|
|
|
+ <auditModal
|
|
|
+ :openModal="visibleAudit"
|
|
|
+ :spinning="spinningAudit"
|
|
|
+ @close="visibleAudit=false"
|
|
|
+ @ok="auditOrder(true)"
|
|
|
+ @fail="auditOrder(false)" />
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -129,20 +155,24 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-import { purchaseTargetList } from '@/api/purchase'
|
|
|
import basicInfoModal from './basicInfoModal.vue'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
+import auditModal from '@/views/common/auditModal.vue'
|
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
|
-import { purchaseReturnList, purchaseReturnDel, purchaseReturnOutStockBill, purchaseReturnFinishBill } from '@/api/purchaseReturn'
|
|
|
+import { purchaseReturnQueryNoSyncPage, purchaseReturnDel, purchaseReturnOutStock, purchaseReturnAudit } from '@/api/purchaseReturn'
|
|
|
export default {
|
|
|
name: 'PurchaseReturnList',
|
|
|
- components: { STable, VSelect, rangeDate, stateIcon, basicInfoModal },
|
|
|
+ components: { STable, VSelect, rangeDate, stateIcon, basicInfoModal, auditModal },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
openModal: false, // 基本信息弹框是否显示
|
|
|
+ visibleAudit: false,
|
|
|
+ spinningAudit: false,
|
|
|
+ auditInfo: null,
|
|
|
+ purchaseTragetType: [], // 供应商数据
|
|
|
time: [
|
|
|
getDate.getCurrMonthDays().starttime,
|
|
|
getDate.getCurrMonthDays().endtime
|
|
@@ -152,7 +182,9 @@ export default {
|
|
|
endDate: getDate.getCurrMonthDays().endtime,
|
|
|
purchaseReturnNo: '', // 退货单号
|
|
|
state: undefined, // 业务状态
|
|
|
- settleState: undefined
|
|
|
+ settleState: undefined,
|
|
|
+ purchaseTargetSn: undefined,
|
|
|
+ grabFlag: undefined
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
tableHeight: 0,
|
|
@@ -175,7 +207,7 @@ export default {
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return purchaseReturnList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return purchaseReturnQueryNoSyncPage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -188,8 +220,7 @@ export default {
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
|
- },
|
|
|
- purchaseTragetType: []
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -211,6 +242,12 @@ export default {
|
|
|
this.queryParam.purchaseReturnNo = ''
|
|
|
this.queryParam.state = undefined
|
|
|
this.queryParam.settleState = undefined
|
|
|
+ this.queryParam.purchaseTargetSn = undefined
|
|
|
+ this.queryParam.grabFlag = undefined
|
|
|
+ },
|
|
|
+ // 获取供应商数据
|
|
|
+ setPurchaseTragetType (data) {
|
|
|
+ this.purchaseTragetType = data
|
|
|
},
|
|
|
// 删除
|
|
|
handleDel (row) {
|
|
@@ -246,11 +283,11 @@ export default {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
- content: '确定要生成出库单吗?',
|
|
|
+ content: '确定要出库吗?',
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|
|
|
- purchaseReturnOutStockBill({ sn: row.purchaseReturnSn }).then(res => {
|
|
|
+ purchaseReturnOutStock({ sn: row.purchaseReturnSn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$refs.table.refresh()
|
|
@@ -262,42 +299,33 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 审核
|
|
|
- handleAudit (row) {
|
|
|
- const _this = this
|
|
|
- this.$confirm({
|
|
|
- title: '提示',
|
|
|
- content: '确定要完结该单据吗?',
|
|
|
- centered: true,
|
|
|
- onOk () {
|
|
|
- _this.spinning = true
|
|
|
- purchaseReturnFinishBill({ sn: row.purchaseReturnSn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- _this.$message.success(res.message)
|
|
|
- _this.$refs.table.refresh()
|
|
|
- _this.spinning = false
|
|
|
- } else {
|
|
|
- _this.spinning = false
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- getParentDealer () {
|
|
|
- purchaseTargetList({ purchaseTargetType: 'SUPPLIER_SYS' }).then(res => {
|
|
|
+ auditOrder (billStatus) {
|
|
|
+ this.spinningAudit = true
|
|
|
+ purchaseReturnAudit({
|
|
|
+ purchaseReturnSn: this.auditInfo.purchaseReturnSn,
|
|
|
+ auditFlag: billStatus
|
|
|
+ }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.purchaseTragetType = res.data
|
|
|
+ this.visibleAudit = false
|
|
|
+ this.$message.success(res.message)
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ this.spinningAudit = false
|
|
|
} else {
|
|
|
- this.purchaseTragetType = []
|
|
|
+ this.visibleAudit = false
|
|
|
+ this.spinningAudit = false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 审核
|
|
|
+ handleAudit (row) {
|
|
|
+ this.auditInfo = row
|
|
|
+ this.visibleAudit = true
|
|
|
+ },
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|
|
|
- this.getParentDealer()
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|