Jelajahi Sumber

采购退货申请单

lilei 2 tahun lalu
induk
melakukan
9c97bc91be

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1660187017431
+  "version": 1660188439466
 }

+ 8 - 0
src/api/purchaseReturnApply.js

@@ -135,6 +135,14 @@ export const purchaseReturnApplyReadExcel = (params) => {
   })
 }
 
+// 批量导入产品
+export const purchaseReturnApplyCreateList = (params) => {
+  return axios({
+    url: `/purchaseReturnApply/detail/createList`,
+    data: params,
+    method: 'post'
+  })
+}
 // 导出明细
 export const purchaseReturnApplyExport = (params) => {
  return axios({

+ 5 - 1
src/views/purchasingManagement/purchaseReturnApplyForm/chooseImportModal.vue

@@ -138,7 +138,11 @@ export default {
       if (this.loadData.length == 0) {
         this.$message.warning('无可导入的产品!')
       } else {
-        this.$emit('ok', this.loadData)
+        const data = {
+          purchaseReturnApplySn: this.paramsData.purchaseReturnApplySn,
+          detailList: this.loadData
+        }
+        this.$emit('ok', data)
         this.isShow = false
       }
     },

+ 11 - 5
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -212,7 +212,11 @@
     </a-card>
 
     <!-- 导入明细 -->
-    <importGuideModal :openModal="openGuideModal" :params="{purchaseReturnApplySn: $route.params.sn, purchaseReturnApplyNo:detailData?detailData.purchaseReturnApplyNo:''}" @close="openGuideModal=false" @ok="hanldeImprotOk" />
+    <importGuideModal
+      :openModal="openGuideModal"
+      :params="{purchaseReturnApplySn: $route.params.sn, purchaseReturnApplyNo:detailData?detailData.purchaseReturnApplyNo:''}"
+      @close="openGuideModal=false"
+      @ok="hanldeImprotOk" />
   </div>
 </template>
 
@@ -234,7 +238,8 @@ import {
   modifyReturnReason,
   purchaseReturnSubmit,
   purchaseReturnApplyPrint,
-  purchaseReturnApplyExport } from '@/api/purchaseReturnApply'
+  purchaseReturnApplyExport,
+  purchaseReturnApplyCreateList } from '@/api/purchaseReturnApply'
 export default {
   name: 'PurchaseReturnEdit',
   components: { STable, VSelect, Print, ProductType, importGuideModal },
@@ -341,10 +346,11 @@ export default {
     // 确认导入明细
     hanldeImprotOk (obj) {
       this.spinning = true
-      salesDetailInsertImport(obj).then(res => {
+      purchaseReturnApplyCreateList(obj).then(res => {
         if (res.status == 200) {
-          this.$refs.table.refresh(true)
-          this.getOrderDetail(false)
+          this.$refs.chooseTable.refresh(true)
+          this.getDetail()
+          this.openGuideModal = false
         }
         this.spinning = false
       })

+ 2 - 3
src/views/purchasingManagement/purchaseReturnApplyForm/importGuideModal.vue

@@ -116,9 +116,8 @@ export default {
     },
     // 导入
     hanldeOk (obj) {
-      if (obj && obj.length > 0) {
+      if (obj && obj.detailList.length > 0) {
         this.$emit('ok', obj)
-        this.isShow = false
       }
     },
     // 关闭
@@ -130,7 +129,7 @@ export default {
     handleExport () {
       const link = document.createElement('a')
       link.style.display = 'none'
-      link.href = 'https://jianguan-images.oss-cn-beijing.aliyuncs.com/template/SalesDetailImport.xlsx'
+      link.href = 'https://jianguan-images.oss-cn-beijing.aliyuncs.com/template/purchaseReturnApplyImport.xlsx'
       link.setAttribute('download', '采购退货申请单产品明细模板' + '.xlsx')
       document.body.appendChild(link)
       link.click()