|
@@ -102,7 +102,7 @@
|
|
|
<a-button type="primary" @click="bitchSubmit" icon="check">批量提交</a-button>
|
|
|
<a-button type="primary" @click="bitchCanelSubmit" icon="close">批量取消提交</a-button>
|
|
|
<!-- <a-button type="primary" icon="download" @click="handleExportXls('装箱单-成衣')">装箱单成衣导出</a-button> -->
|
|
|
- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" >
|
|
|
+ <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :customRequest="uploadFlie">
|
|
|
<a-button type="primary" icon="import">导入-来源预装箱单</a-button>
|
|
|
</a-upload>
|
|
|
</div>
|
|
@@ -221,6 +221,14 @@
|
|
|
<detailsClothes-drawer ref="detailsClothesDrawer" :father="bb" @ok="modalFormOk"></detailsClothes-drawer>
|
|
|
<!-- <editClothes-drawer ref="editClothesDrawer" :father="cc" @ok="modalFormOk"></editClothes-drawer> -->
|
|
|
</div>
|
|
|
+ <!-- 导入确认框 -->
|
|
|
+ <div>
|
|
|
+ <a-modal :visible="visible" title="是否继续导入" @ok="handleOk" @cancel="handleCancel">
|
|
|
+ <ul>
|
|
|
+ <li v-for="(item,index) in message" :key="index">{{item}}</li>
|
|
|
+ </ul>
|
|
|
+ </a-modal>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -231,7 +239,7 @@ import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
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'
|
|
|
-import { spltList,deleteSpltList,spltListId,SubmitList,cancelSubmitList,bitchSubmitList,bitchCancelSubmitList} from '@api/document/packing-list/packinglist-clothes'
|
|
|
+import { spltList,deleteSpltList,spltListId,SubmitList,cancelSubmitList,bitchSubmitList,bitchCancelSubmitList,fileDetail,upload} from '@api/document/packing-list/packinglist-clothes'
|
|
|
|
|
|
|
|
|
export default {
|
|
@@ -480,7 +488,9 @@ export default {
|
|
|
|
|
|
selectedRowKeys: [], // 勾选航
|
|
|
loading: false, // 表格加载
|
|
|
-
|
|
|
+ visible:false,
|
|
|
+ message:[],//导入文件信息
|
|
|
+ file:{},//导入文件
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
pageNo: '' // 初始页
|
|
@@ -546,6 +556,40 @@ export default {
|
|
|
},
|
|
|
// 推送
|
|
|
push() {},
|
|
|
+ // 导入
|
|
|
+ uploadFlie(file) {
|
|
|
+ const formData = new FormData()
|
|
|
+ formData.append('file', file.file)
|
|
|
+ fileDetail(formData).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ if (res.success) {
|
|
|
+ this.visible = true
|
|
|
+ this.message = res.message.split(';').filter((element) => {
|
|
|
+ return element !== "";
|
|
|
+ });
|
|
|
+ this.file = file
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })},
|
|
|
+ //继续导入
|
|
|
+ handleOk(){
|
|
|
+ const formData = new FormData()
|
|
|
+ formData.append('file', this.file.file)
|
|
|
+ upload(formData).then(res => {
|
|
|
+ this.visible = false
|
|
|
+ if (res.success) {
|
|
|
+ this.getSpltList()
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //取消导入
|
|
|
+ handleCancel(){
|
|
|
+ this.visible = false
|
|
|
+ this.loading = false
|
|
|
+ },
|
|
|
|
|
|
//批量提交
|
|
|
bitchSubmit(){
|