|
@@ -100,7 +100,7 @@
|
|
|
<a-button type="primary" @click="addAdpacking" icon="plus">新增</a-button>
|
|
|
<a-button type="primary" icon="download" @click="handleExportXls('预装箱单-成衣','0')">预装箱单成衣导出</a-button>
|
|
|
<a-button type="primary" icon="download" @click="handleExportXls('预装箱单-成衣','1')">预装箱单成衣导出-装箱单</a-button>
|
|
|
- <a-upload productName="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
|
|
+ <a-upload productName="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :customRequest="uploadFlie">
|
|
|
<a-button type="primary" icon="import">导入-来源出运明细</a-button>
|
|
|
</a-upload>
|
|
|
<a-button type="primary" @click="batchSubmit" icon="check">批量提交</a-button>
|
|
@@ -249,6 +249,14 @@
|
|
|
|
|
|
<detailsAdpacking-drawer ref="detailsAdpackingDrawer" @ok="modalFormOk"></detailsAdpacking-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>
|
|
|
|
|
@@ -260,7 +268,7 @@ import { downFile } from '@/api/manage'
|
|
|
import addAdpackingDrawer from '@views/advance-packingList/addAdpackingDrawer.vue'
|
|
|
import detailsAdpackingDrawer from '@views/advance-packingList/detailsAdpackingDrawer.vue'
|
|
|
|
|
|
-import { getadPaList, itemByMainId, submit, cancelSubmit, deleteAdPaList,batchSubmit,batchPush,push,batchCanelSubmit,exportList} from '@api/document/advance-packingList.js'
|
|
|
+import { getadPaList, itemByMainId, submit, cancelSubmit, deleteAdPaList,batchSubmit,batchPush,push,batchCanelSubmit,exportList,fileDetail,upload} from '@api/document/advance-packingList.js'
|
|
|
|
|
|
export default {
|
|
|
productName: 'AdPaListClothes', // 预装箱单-成衣
|
|
@@ -475,7 +483,9 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
adPaListClothesData: [],
|
|
|
-
|
|
|
+ visible:false,
|
|
|
+ message:[],//导入文件信息
|
|
|
+ file:{},//导入文件
|
|
|
queryParam: {
|
|
|
pageSize:20
|
|
|
// pageNo: '',
|
|
@@ -505,6 +515,7 @@ export default {
|
|
|
console.log(this.queryParam)
|
|
|
this.$nextTick(() => {
|
|
|
getadPaList(this.queryParam).then(res => {
|
|
|
+ this.loading = false
|
|
|
if (res.success) {
|
|
|
this.adPaListClothesData = [];
|
|
|
if (res.result.records != null){
|
|
@@ -515,6 +526,8 @@ export default {
|
|
|
current: res.result.current,
|
|
|
pageSize: res.result.size
|
|
|
}
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -623,6 +636,42 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 导入信息
|
|
|
+ uploadFlie(file) {
|
|
|
+ const formData = new FormData()
|
|
|
+ formData.append('file',file.file)
|
|
|
+ fileDetail(formData).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.visible = true
|
|
|
+ this.message = res.message.split(';').filter((element) => {
|
|
|
+ return element !== "";
|
|
|
+ });
|
|
|
+ console.log(this.message)
|
|
|
+ debugger
|
|
|
+ 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.getadPaListClothes()
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //取消导入
|
|
|
+ handleCancel(){
|
|
|
+ this.visible = false
|
|
|
+ this.loading = false
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
// 删除
|
|
|
handleDelete(record) {
|