Bläddra i källkod

装箱单参照方式修改

jbb 2 år sedan
förälder
incheckning
a16fbf0030

+ 4 - 1
src/api/document/packing-list/packinglist-clothes.js

@@ -41,8 +41,11 @@ const fileDetail = params => postAction('/splt/syPackingListTailoring/importExce
 //导入
 const upload = params => postAction('/splt/syPackingListTailoring/importExcel3', params)
 
+// 参照
+const queryOrderData = params => getAction('/splt/syPackingListTailoring/querySpaplId2', params)
 
 
 
-export {spltList,orderSpltList,deleteSpltList,batchDelete,orderSpltListId,editSpltList,addSpltList,spltListId,SubmitList,cancelSubmitList,bitchSubmitList,bitchCancelSubmitList,fileDetail,upload}
+
+export {spltList,orderSpltList,deleteSpltList,batchDelete,orderSpltListId,editSpltList,addSpltList,spltListId,SubmitList,cancelSubmitList,bitchSubmitList,bitchCancelSubmitList,fileDetail,upload,queryOrderData}
 

+ 17 - 3
src/views/packing-list/clothes-list.vue

@@ -97,7 +97,8 @@
     <!-- 操作按钮区域 推送 导入 新增-->
     <a-card :bordered="false" style="marginTop:10px;">
       <div class="table-operator">
-        <a-button type="primary" @click="openClothesAdd" icon="plus">新增</a-button>
+        <!-- <a-button type="primary" @click="openClothesAdd" icon="plus">新增</a-button> -->
+        <a-button type="primary" @click="referadvancePackingList" icon="ordered-list">参照预装箱单</a-button>
         <a-button type="primary" @click="push" icon="export">推送</a-button>
         <a-button type="primary" @click="bitchSubmit" icon="check">批量提交</a-button>
         <a-button type="primary" @click="bitchCanelSubmit" icon="close">批量取消提交</a-button>
@@ -219,6 +220,7 @@
     <div>
       <clothesAdd-drawer ref="clothesAddDrawer" :fatherList="getSpltList" @ok="modalFormOk"></clothesAdd-drawer>
       <detailsClothes-drawer ref="detailsClothesDrawer" :father="bb" @ok="modalFormOk"></detailsClothes-drawer>
+      <reference-pre-packlist ref="ReferencePrePacklist" @callback='referCallback'  @ok="modalFormOk"></reference-pre-packlist>
       <!-- <editClothes-drawer ref="editClothesDrawer" :father="cc" @ok="modalFormOk"></editClothes-drawer> -->
     </div>
     <!-- 导入确认框 -->
@@ -236,6 +238,7 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { downFile } from '@/api/manage'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import ReferencePrePacklist from '@views/packing-list/packinglist-clothes/referencePrePacklist'
 import clothesAddDrawer from '@views/packing-list/packinglist-clothes/clothesAddDrawer.vue'
 import detailsClothesDrawer from '@views/packing-list/packinglist-clothes/detailsClothesDrawer.vue'
 import editClothesDrawer from '@views/packing-list/packinglist-clothes/editClothesDrawer.vue'
@@ -245,7 +248,7 @@ import { spltList,deleteSpltList,spltListId,SubmitList,cancelSubmitList,bitchSub
 export default {
   name: 'ClothesList', // 装箱单-成衣
   mixins: [JeecgListMixin],
-  components: { JEllipsis, clothesAddDrawer, detailsClothesDrawer, editClothesDrawer },
+  components: { JEllipsis, clothesAddDrawer, detailsClothesDrawer, editClothesDrawer,ReferencePrePacklist },
   data() {
     // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
 
@@ -518,7 +521,7 @@ export default {
   },
   methods: {
     //分页查询
-    getSpltList() { 
+    getSpltList() {
      var that = this;
       this.$nextTick(() => {
         this.queryParam.pageSize=20
@@ -821,6 +824,17 @@ export default {
     onDateChange(value, dateString) {
       this.queryParam.stratDate = dateString[0]
       this.queryParam.endDate = dateString[1]
+    },
+      // 参照预装箱单
+    referadvancePackingList() {
+      console.log('打开参照订单数据')
+      // 打开订单数据弹框
+      this.$refs.ReferencePrePacklist.referencePrePacklist = true
+      this.$refs.ReferencePrePacklist.queryParam = {}
+      this.$refs.ReferencePrePacklist.searchQuery()
+    },
+    referCallback(){
+      this.getSpltList()
     },
     // --------------------------------------
     // ??

+ 2 - 2
src/views/packing-list/packinglist-clothes/clothesAddDrawer.vue

@@ -142,9 +142,9 @@
 
       <!--操作按钮区域 参照预装箱单 増行-->
       <a-card :bordered="true" style="margin:10px 0 60px 0;">
-        <div class="table-operator">
+        <!-- <div class="table-operator">
           <a-button type="primary" @click="referadvancePackingList" icon="ordered-list">参照预装箱单</a-button>
-        </div>
+        </div> -->
 
         <!-- 子表 :pagination="ipagination"  -->
         <a-spin :spinning="confirmLoading">

+ 23 - 9
src/views/packing-list/packinglist-clothes/referencePrePacklist.vue

@@ -109,7 +109,7 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
-import { orderSpltList } from '@api/document/packing-list/packinglist-clothes.js'
+import { orderSpltList,queryOrderData } from '@api/document/packing-list/packinglist-clothes.js'
 
 export default {
   name: 'AdvancePackingListModal', // 参照预装箱单 弹框
@@ -382,14 +382,28 @@ export default {
     onSubmit() {
       if (this.selectedRowKeys.length == 0) {
         this.$message.error('请选择数据');
-      } else if(this.selectedRowKeys.length == 1){
-        this.$emit('callback', this.selectedRowKeys);
-        this.close()
-        var msg = "选中记录后,会清除编辑的内容。";
-        this.$message.info(msg);        
-      }else {
-        this.$message.error('只能选择一行数据!');
-      }
+      } else{
+        var id = this.selectedRowKeys.toString()
+        debugger
+         queryOrderData({ids:id}).then(res => {
+         if (res.success) {
+           debugger
+         this.loading = false
+          this.$emit('callback', this.selectedRowKeys);
+            this.close()
+          }else {
+           this.$message.error('res.message')
+          }
+        })
+      } 
+      // if(this.selectedRowKeys.length == 1){
+      //   this.$emit('callback', this.selectedRowKeys);
+      //   this.close()
+      //   var msg = "选中记录后,会清除编辑的内容。";
+      //   this.$message.info(msg);        
+      // }else {
+      //   this.$message.error('只能选择一行数据!');
+      // }
     },
 
     close() {