lilei 2 سال پیش
والد
کامیت
1f23a33a37

+ 3 - 3
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -214,7 +214,7 @@ import {
   purchaseReturnDetailSave,
   purchaseReturnDetailDel,
   purchaseReturnSubmit,
-  purchaseReturnDelAll,
+  purchaseReturnDetailDelAll,
   purchaseReturnModifyQty,
   modifyReturnReason,
   purchaseReturnDetailPrint,
@@ -387,7 +387,7 @@ export default {
         onOk () {
           if (isAll) { //  整单删除
             _this.spinning = true
-            purchaseReturnDelAll({ purchaseReturnApplySn: _this.$route.params.sn }).then(res => {
+            purchaseReturnDetailDelAll({ purchaseReturnApplySn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.$refs.table.refresh()
@@ -417,7 +417,7 @@ export default {
     handleSubmit () {
       const _this = this
       _this.spinning = true
-      purchaseReturnSubmit({ purchaseReturnApplySn: _this.$route.params.sn }).then(res => {
+      purchaseReturnSubmit({ sn: _this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           setTimeout(() => {

+ 13 - 30
src/views/purchasingManagement/purchaseReturnApplyForm/list.vue

@@ -74,8 +74,9 @@
         bordered>
         <!-- 采退单号 -->
         <template slot="purchaseReturnApplyNo" slot-scope="text, record">
-          <span class="table-td-link" @click="handleDetail(record)">{{ record.purchaseReturnApplyNo }}</span>
-          <!-- <span v-else>{{ record.purchaseReturnApplyNo }}</span> -->
+          <span class="table-td-link" v-if="$hasPermissions('B_purchaseReturnDetail')" @click="handleDetail(record)">{{ record.purchaseReturnNo }}</span>
+          <span v-else>{{ record.purchaseReturnNo }}</span>
+          <a-badge count="改" :offset="[10,0]" v-if="record.state=='HQ_CHANGE'"></a-badge>
         </template>
         <!-- 审核 -->
         <template slot="audit" slot-scope="text, record">
@@ -105,14 +106,14 @@
             v-else-if="(record.hasStockBill == '0' && (record.billStatus == 'CHECKED'||record.billStatus == 'FINISH'))"
             @click="handleWarehouse(record)"
             class="button-primary"
-            id="bulkReturnGoodsList-warehouse-btn">生成出库单</a-button>
+            id="bulkReturnGoodsList-warehouse-btn">生成采购退货单</a-button>
           <a-button
             size="small"
             type="link"
             v-else-if="record.billStatus == 'CHECKED'"
             @click="handleFinishBill(record)"
             class="button-primary"
-            id="bulkReturnGoodsList-warehouse-btn">完结单据</a-button>
+            id="bulkReturnGoodsList-warehouse-btn">再次编辑</a-button>
           <a-button
             size="small"
             type="link"
@@ -133,7 +134,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import stateIcon from '@/views/common/stateIcon'
-import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill, purchaseReturnFinishBill } from '@/api/purchaseReturnApply'
+import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnAgainCreate } from '@/api/purchaseReturnApply'
 export default {
   name: 'PurchaseReturnList',
   components: { STable, VSelect, rangeDate, stateIcon },
@@ -238,7 +239,7 @@ export default {
         centered: true,
         onOk () {
           _this.spinning = true
-          purchaseReturnDel({ id: row.id }).then(res => {
+          purchaseReturnDel({ purchaseReturnApplySn: row.purchaseReturnApplySn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -281,37 +282,16 @@ export default {
         })
       }
     },
-    //  生成出库单
-    handleWarehouse (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定要生成出库单吗?',
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          purchaseReturnOutStockBill({ sn: row.purchaseReturnApplySn }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
-        }
-      })
-    },
-    //  完结单据
+    // 再次编辑
     handleFinishBill (row) {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '确定要完结该单据吗?',
+        content: '系统将自动生成一个新的采购退货申请单,与原单据内容相同。确认再次编辑吗?',
         centered: true,
         onOk () {
           _this.spinning = true
-          purchaseReturnFinishBill({ sn: row.purchaseReturnApplySn }).then(res => {
+          purchaseReturnAgainCreate({ sn: row.purchaseReturnApplySn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -323,7 +303,10 @@ export default {
         }
       })
     },
+    // 生成采购单
+    handleWarehouse (row) {
 
+    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调