|
@@ -15,7 +15,7 @@
|
|
|
:on-change="handleSuccess"
|
|
|
:auto-upload="false">
|
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
- <el-button style="margin-left: 10px;" size="small" type="success" @click="batchUpload" v-loading.fullscreen.lock="fullscreenLoading">提交</el-button>
|
|
|
+ <el-button style="margin-left: 10px;" size="small" type="success" @click="showConfirm">提交</el-button>
|
|
|
</el-upload>
|
|
|
|
|
|
</div>
|
|
@@ -106,7 +106,26 @@
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
-
|
|
|
+ <el-dialog
|
|
|
+ title=" ."
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ label-position="right"
|
|
|
+ label-width="150px"
|
|
|
+ >
|
|
|
+ <el-form-item label="运单文件批次号" prop="fileBatchNum">
|
|
|
+ <el-input placeholder="运单文件批次号" v-model="fileBatchNum"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="batchUpload" v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<!-- 查看 -->
|
|
|
<el-dialog
|
|
|
@close="handleEditDialogClose"
|
|
@@ -235,6 +254,8 @@ export default{
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
+ dialogVisible: false,
|
|
|
+ fileBatchNum: '',
|
|
|
fullscreenLoading: false,
|
|
|
customerName: ``,
|
|
|
companyName: ``,
|
|
@@ -302,9 +323,21 @@ export default{
|
|
|
var url = hostUrl + `noCar/templateDownload?fileName=1`// eslint-disable-line
|
|
|
window.location.href = url
|
|
|
},
|
|
|
+ showConfirm(){
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.fileBatchNum = '';
|
|
|
+ },
|
|
|
// 批量上传模板信息
|
|
|
async batchUpload() {
|
|
|
+ if(this.fileBatchNum == '' || this.fileBatchNum == null){
|
|
|
+ this.$message.error(`请输入本次运单所对应的批次号`);
|
|
|
+ return
|
|
|
+ }
|
|
|
const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50
|
|
|
+ if(this.formUserList.file == ''){
|
|
|
+ this.$message.error(`未上传文件`)
|
|
|
+ this.dialogVisible = false
|
|
|
+ }
|
|
|
let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(`.`)).toLowerCase()
|
|
|
let AllUpExt = `.xlsx`
|
|
|
if (extName != AllUpExt) {
|
|
@@ -316,6 +349,7 @@ export default{
|
|
|
this.$message.error(`上传文件大小不能超过50MB!`)
|
|
|
return false
|
|
|
}
|
|
|
+ this.dialogVisible = false
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: `系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...`,
|
|
@@ -325,6 +359,7 @@ export default{
|
|
|
const formData = new FormData()
|
|
|
formData.append(`customerName`, this.formUserList.customerName)
|
|
|
formData.append(`file`, this.formUserList.file)
|
|
|
+ formData.append(`batchNum`, this.fileBatchNum)
|
|
|
const response = await this.$http.post(`noCar/batchImprotBillWay`, formData)
|
|
|
var {data: { code, msg, data }} = response
|
|
|
if (code == 0 && msg == `success`) {
|