Browse Source

bug 修复

lilei 4 năm trước cách đây
mục cha
commit
55d150cf11

+ 14 - 6
src/views/salesManagement/salesReturn/detail.vue

@@ -42,11 +42,12 @@
     </a-card>
     <a-card size="small" :bordered="false" class="footer-cont">
       <a-button
-        size="small"
         type="primary"
         class="button-warning"
+        style="width: 150px;"
+        size="large"
         v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')"
-        @click="handleEexamine(record)"
+        @click="handleEexamine()"
         id="salesReturn-eexamine-btn">审核</a-button>
       <a-button
         type="primary"
@@ -55,16 +56,17 @@
         style="width: 150px;"
         id="salesDetail-edit-btn"
         v-if="detailData&&detailData.salesReturnBillSource == 'SALES' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'WAIT_SUBMIT')"
-        @click="handleEdit(record)"
+        @click="handleEdit()"
       >
         编辑
       </a-button>
       <a-button
-        size="small"
+        size="large"
+        style="width: 150px;"
         v-if="detailData&&detailData.salesReturnBillSource != 'SALES' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')"
         type="primary"
         class="button-info"
-        @click="handleEdit(record)"
+        @click="handleEdit()"
         id="salesReturn-edit-btn">改单</a-button>
     </a-card>
   </div>
@@ -197,8 +199,9 @@ export default {
       this.$router.push({ name: 'salesReturnList' })
     },
     //  审核
-    handleEexamine (row) {
+    handleEexamine () {
       const _this = this
+      const row = this.detailData
       this.$confirm({
         title: '提示',
         content: '请点击下方按钮确认操作?',
@@ -228,6 +231,11 @@ export default {
         }
       })
     },
+    // 编辑
+    handleEdit () {
+      const row = this.detailData
+      this.$router.push({ name: row.grabFlag == 1 ? 'salesReturnGrabEdit' : 'salesReturnEdit', params: { sn: row.salesReturnBillSn, buyerSn: row.buyerSn } })
+    },
     //  详情
     getDetail () {
       salesReturnDetail({ sn: this.$route.params.sn }).then(res => {

+ 1 - 1
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -254,7 +254,7 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
-          salesReturnDetailDel({ id: row.id }).then(res => {
+          salesReturnDetailDel({ salesReturnDetailSn: row.salesReturnDetailSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm(true)
             }

+ 1 - 1
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -271,7 +271,7 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
-          salesReturnDetailDel({ id: row.id }).then(res => {
+          salesReturnDetailDel({ salesReturnDetailSn: row.salesReturnDetailSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm(true)
             }