|
@@ -120,67 +120,64 @@
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-warning"
|
|
|
- v-if="(record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'FINANCIAL_REJECT')&&$hasPermissions('B_salesReturnAudit')"
|
|
|
- @click="handleEexamine(record)"
|
|
|
- id="salesReturn-eexamine-btn">审核进度</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- v-if="record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT')&&$hasPermissions('B_salesReturnEdit')"
|
|
|
- type="link"
|
|
|
- class="button-info"
|
|
|
- @click="handleEdit(record)"
|
|
|
- id="salesReturn-edit-btn">编辑</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- v-if="record.salesReturnBillSource != 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT')&&$hasPermissions('B_salesReturnEdit')"
|
|
|
- type="link"
|
|
|
- class="button-info"
|
|
|
- @click="handleEdit(record)"
|
|
|
- id="salesReturn-edit-btn">改单</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- v-if="record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT')&&$hasPermissions('B_salesReturnDel')"
|
|
|
- type="link"
|
|
|
- class="button-error"
|
|
|
- @click="handleDel(record)"
|
|
|
- id="salesReturn-del-btn">删除</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- v-if="record.salesReturnBillSource != 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT')&&$hasPermissions('B_salesReturnDel')"
|
|
|
- type="link"
|
|
|
- class="button-error"
|
|
|
- @click="handleDel(record)"
|
|
|
- id="salesReturn-del-btn">取消</a-button>
|
|
|
-
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-info"
|
|
|
- @click="handleEdit(record)"
|
|
|
- id="salesReturn-edit-btn">再次编辑</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-info"
|
|
|
- @click="handleEdit(record)"
|
|
|
- id="salesReturn-edit-btn">申请提货</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-info"
|
|
|
- @click="handleConfirm(record)"
|
|
|
- id="salesReturn-edit-btn">客服确认</a-button>
|
|
|
+ <div>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-warning"
|
|
|
+ v-if="record.billStatus == 'WAIT_AUDIT'"
|
|
|
+ @click="handleEexamine(record)"
|
|
|
+ id="salesReturn-eexamine-btn">审核进度</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-warning"
|
|
|
+ v-if="record.billStatus == 'WAIT_SUBMIT'"
|
|
|
+ @click="handleSubmit(record)"
|
|
|
+ id="salesReturn-eexamine-btn">提交</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ v-if="record.billStatus == 'WAIT_SUBMIT' && $hasPermissions('B_salesReturnEdit')"
|
|
|
+ type="link"
|
|
|
+ class="button-info"
|
|
|
+ @click="handleEdit(record)"
|
|
|
+ id="salesReturn-edit-btn">{{ record.salesReturnBillSource == 'SALES' ? '编辑' : '改单' }}</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ v-if="record.billStatus == 'WAIT_SUBMIT' && $hasPermissions('B_salesReturnEdit')"
|
|
|
+ type="link"
|
|
|
+ class="button-error"
|
|
|
+ @click="handleDel(record)"
|
|
|
+ id="salesReturn-del-btn">{{ record.salesReturnBillSource == 'SALES' ? '删除' : '取消' }}</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-info"
|
|
|
+ v-if="record.salesReturnBillSource == 'SALES'&&record.billStatus == 'AUDIT_REJECT'"
|
|
|
+ @click="handleAgainEdit(record)"
|
|
|
+ id="salesReturn-edit-btn">再次编辑</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-info"
|
|
|
+ v-if="record.billStatus == 'WAIT_RECEIVE'"
|
|
|
+ @click="handleEdit(record)"
|
|
|
+ id="salesReturn-edit-btn">申请提货</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-info"
|
|
|
+ v-if="record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'WAIT_CUSTOMER_SERVICE_CONFIRM'"
|
|
|
+ @click="handleConfirm(record)"
|
|
|
+ id="salesReturn-edit-btn">客服确认</a-button>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
<!-- 选择客户弹框 -->
|
|
|
<choose-custom-modal :show="openModal" @ok="handleEdit" @cancel="openModal=false"></choose-custom-modal>
|
|
|
- <!-- 审核 -->
|
|
|
- <auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_CHECK')" @fail="auditOrder('AUDIT_REJECT')" />
|
|
|
+ <!-- 审核进度 -->
|
|
|
+ <verifyModal :openModal="visibleAudit" :itemSn="auditInfo&&auditInfo.salesReturnBillSn" @close="visibleAudit=false"></verifyModal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -191,9 +188,9 @@ import subarea from '@/views/common/subarea.js'
|
|
|
import { getArea } from '@/api/data'
|
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
-import auditModal from '@/views/common/auditModal.vue'
|
|
|
+import verifyModal from './verifyModal.vue'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-import { salesReturnList, salesReturnQueryCount, salesReturnAudit, salesReturnDel } from '@/api/salesReturn'
|
|
|
+import { salesReturnList, updateAgain, salesReturnDel } from '@/api/salesReturn'
|
|
|
import moment from 'moment'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
export default {
|
|
@@ -205,7 +202,7 @@ export default {
|
|
|
chooseCustomModal,
|
|
|
dealerSubareaScopeList,
|
|
|
rangeDate,
|
|
|
- auditModal,
|
|
|
+ verifyModal,
|
|
|
subarea
|
|
|
},
|
|
|
data () {
|
|
@@ -265,14 +262,14 @@ export default {
|
|
|
{ title: '编号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '单据来源', dataIndex: 'salesReturnBillSourceDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '是否同步给客户', dataIndex: 'syncFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户采退申请单号', dataIndex: 'purchaseReturnBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '是否同步给客户', dataIndex: 'syncFlag', width: '7%', align: 'center', customRender: function (text) { return text ? ['否', '是'][text] : '--' } },
|
|
|
+ { title: '客户采退申请单号', dataIndex: 'purchaseReturnApplyNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '10%', align: 'center' },
|
|
|
{ title: '客户名称', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '申请退货数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '仓库实收数量', dataIndex: 'totalBadQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '仓库实收数量', dataIndex: 'totalReceiveQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '坏件数量', dataIndex: 'totalBadQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '良品数量', dataIndex: 'totalBackStockQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '良品数量', dataIndex: 'totalGoodQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '返库数量', dataIndex: 'totalBackStockQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '审核时间', dataIndex: 'auditTime', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -303,6 +300,27 @@ export default {
|
|
|
handleEdit (row) {
|
|
|
this.$router.push({ name: 'salesReturnEdit', params: { sn: row.salesReturnBillSn, buyerSn: row.buyerSn } })
|
|
|
},
|
|
|
+ // 再次编辑
|
|
|
+ handleAgainEdit (row) {
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '系统将自动生成一个新的销售退货单,与原单据内容相同。确认再次编辑吗?',
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ _this.spinning = true
|
|
|
+ updateAgain({ salesReturnBillSn: row.salesReturnBillSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 详情
|
|
|
handleDetail (row) {
|
|
|
this.$router.push({ name: 'salesReturnDetail', params: { sn: row.salesReturnBillSn } })
|
|
@@ -328,27 +346,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 审核
|
|
|
+ // 审核进度
|
|
|
handleEexamine (row) {
|
|
|
this.auditInfo = row
|
|
|
this.visibleAudit = true
|
|
|
},
|
|
|
- auditOrder (billStatus) {
|
|
|
- this.spinningAudit = true
|
|
|
- salesReturnAudit({
|
|
|
- salesReturnBillSn: this.auditInfo.salesReturnBillSn,
|
|
|
- billStatus: billStatus
|
|
|
- }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.visibleAudit = false
|
|
|
- this.$message.success(res.message)
|
|
|
- this.$refs.table.refresh()
|
|
|
- this.spinningAudit = false
|
|
|
- } else {
|
|
|
- this.visibleAudit = false
|
|
|
- this.spinningAudit = false
|
|
|
- }
|
|
|
- })
|
|
|
+ // 提交
|
|
|
+ handleSubmit (row) {
|
|
|
+
|
|
|
},
|
|
|
resetSearchForm () {
|
|
|
this.$refs.rangeCreateDate.resetDate()
|
|
@@ -368,11 +373,6 @@ export default {
|
|
|
this.queryParam.shippingAddrProvinceSn = undefined
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- filterOption (input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
- },
|
|
|
// 省/市/区
|
|
|
getArea (leve, sn) {
|
|
|
let params
|