|
@@ -1,20 +1,55 @@
|
|
|
<template>
|
|
|
<div class="page">
|
|
|
- <template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
|
|
|
- :table-events="tableEvents" :operationColumnWidth="50" :options-evens-group="optionsEvensGroup"
|
|
|
- :moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
|
|
|
+ <template-page
|
|
|
+ v-show="!formDialog"
|
|
|
+ ref="pageRef"
|
|
|
+ :get-list="getList"
|
|
|
+ :table-attributes="tableAttributes"
|
|
|
+ :table-events="tableEvents"
|
|
|
+ :options-evens-group="optionsEvensGroup"
|
|
|
+ :moreParameters="moreParameters"
|
|
|
+ :column-parsing="columnParsing"
|
|
|
+ :operation="operation()"
|
|
|
+ :exportList="exportList"
|
|
|
+ >
|
|
|
</template-page>
|
|
|
<div class="detail" v-if="formDialog">
|
|
|
- <auxiliarySalesOrderDetail v-if="orderSource == 'M_SALES'" :id="id" @back="backList" :formType="2" title="辅材销售订单详情">
|
|
|
+ <auxiliarySalesOrderDetail
|
|
|
+ v-if="orderSource == 'M_SALES'"
|
|
|
+ :id="id"
|
|
|
+ @back="backList"
|
|
|
+ :formType="2"
|
|
|
+ title="辅材销售订单详情"
|
|
|
+ >
|
|
|
</auxiliarySalesOrderDetail>
|
|
|
- <attachmentSalesOrderDetail v-if="orderSource == 'P_SALES'" :id="id" @back="backList" :formType="2"
|
|
|
- title="配件销售订单详情"></attachmentSalesOrderDetail>
|
|
|
- <auxiliarySalesReturnOrderDetail v-if="orderSource == 'SALES_RET'" :id="id" @back="backList" :formType="2"
|
|
|
- title="辅材销售退货单详情"></auxiliarySalesReturnOrderDetail>
|
|
|
- <attachmentNewReturnDetail v-if="orderSource == 'NEW_PARTS_RET'" :id="id" @back="backList" :formType="2"
|
|
|
- title="配件新件返还详情"></attachmentNewReturnDetail>
|
|
|
- <attachmentOldReturnDetail v-if="orderSource == 'OLD_PARTS_RET'" :id="id" @back="backList" :formType="2"
|
|
|
- title="配件旧件返还详情"></attachmentOldReturnDetail>
|
|
|
+ <attachmentSalesOrderDetail
|
|
|
+ v-if="orderSource == 'P_SALES'"
|
|
|
+ :id="id"
|
|
|
+ @back="backList"
|
|
|
+ :formType="2"
|
|
|
+ title="配件销售订单详情"
|
|
|
+ ></attachmentSalesOrderDetail>
|
|
|
+ <auxiliarySalesReturnOrderDetail
|
|
|
+ v-if="orderSource == 'SALES_RET'"
|
|
|
+ :id="id"
|
|
|
+ @back="backList"
|
|
|
+ :formType="2"
|
|
|
+ title="辅材销售退货单详情"
|
|
|
+ ></auxiliarySalesReturnOrderDetail>
|
|
|
+ <attachmentNewReturnDetail
|
|
|
+ v-if="orderSource == 'NEW_PARTS_RET'"
|
|
|
+ :id="id"
|
|
|
+ @back="backList"
|
|
|
+ :formType="2"
|
|
|
+ title="配件新件返还详情"
|
|
|
+ ></attachmentNewReturnDetail>
|
|
|
+ <attachmentOldReturnDetail
|
|
|
+ v-if="orderSource == 'OLD_PARTS_RET'"
|
|
|
+ :id="id"
|
|
|
+ @back="backList"
|
|
|
+ :formType="2"
|
|
|
+ title="配件旧件返还详情"
|
|
|
+ ></attachmentOldReturnDetail>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -28,10 +63,17 @@ import auxiliarySalesReturnOrderDetail from '../components/auxiliarySalesReturnO
|
|
|
import attachmentNewReturnDetail from '../components/attachmentNewReturnDetail.vue'
|
|
|
import attachmentOldReturnDetail from '../components/attachmentOldReturnDetail.vue'
|
|
|
import { downloadFiles } from '@/utils/util'
|
|
|
-import { listPageV2, pageExport } from "@/api/auxiliaryFittings/transaction";
|
|
|
+import { listPageV2, pageExport, websitTradeTradeRefund } from '@/api/auxiliaryFittings/transaction'
|
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
export default {
|
|
|
- components: { TemplatePage, auxiliarySalesOrderDetail, attachmentSalesOrderDetail, auxiliarySalesReturnOrderDetail, attachmentNewReturnDetail, attachmentOldReturnDetail },
|
|
|
+ components: {
|
|
|
+ TemplatePage,
|
|
|
+ auxiliarySalesOrderDetail,
|
|
|
+ attachmentSalesOrderDetail,
|
|
|
+ auxiliarySalesReturnOrderDetail,
|
|
|
+ attachmentNewReturnDetail,
|
|
|
+ attachmentOldReturnDetail
|
|
|
+ },
|
|
|
mixins: [import_mixin, operation_mixin],
|
|
|
data() {
|
|
|
return {
|
|
@@ -74,7 +116,6 @@ export default {
|
|
|
this.recordSelected = data
|
|
|
},
|
|
|
|
|
|
-
|
|
|
operation() {
|
|
|
return this.operationBtn({
|
|
|
detail: {
|
|
@@ -87,15 +128,38 @@ export default {
|
|
|
this.$message.warning('订单来源为空!')
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ refund: {
|
|
|
+ click: ({ row, index, column }) => {
|
|
|
+ this.$prompt('退款金额', '退款', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern: /^\d+(\.\d+)?$/,
|
|
|
+ inputErrorMessage: '请输入正确的金额'
|
|
|
+ })
|
|
|
+ .then(({ value }) => {
|
|
|
+ websitTradeTradeRefund({
|
|
|
+ id: row.id,
|
|
|
+ retAmount: value
|
|
|
+ }).then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '退款成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
backList() {
|
|
|
this.id = ''
|
|
|
- this.formDialog = false;
|
|
|
+ this.formDialog = false
|
|
|
this.$refs.pageRef.refreshList()
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|