|
|
@@ -290,6 +290,16 @@
|
|
|
<el-col :span="1.5">
|
|
|
<el-button plain type="info" icon="el-icon-upload2" size="mini" @click="handleImport" v-hasPermi="['store:storeOrder:importExpress']">导入银行回单</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ plain
|
|
|
+ icon="el-icon-upload2"
|
|
|
+ size="mini"
|
|
|
+ @click="handleImportStatus"
|
|
|
+ v-hasPermi="['his:storeOrder:editImport']"
|
|
|
+ >导入订单状态</el-button>
|
|
|
+ </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
@@ -1043,6 +1053,33 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog :title="uploadStatus.title" :visible.sync="uploadStatus.open" width="400px" append-to-body>
|
|
|
+ <el-upload
|
|
|
+ ref="uploadStatus"
|
|
|
+ :limit="1"
|
|
|
+ accept=".xlsx, .xls"
|
|
|
+ :headers="uploadStatus.headers"
|
|
|
+ :action="uploadStatus.url + '?updateSupport=' + upload.updateSupport"
|
|
|
+ :disabled="uploadStatus.isUploading"
|
|
|
+ :on-progress="handleFileUploadProgressOrder"
|
|
|
+ :on-success="handleFileSuccessOrder"
|
|
|
+ :auto-upload="false"
|
|
|
+ drag
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
+ <div class="el-upload__tip text-center" slot="tip">
|
|
|
+ <div class="el-upload__tip" slot="tip">
|
|
|
+ </div>
|
|
|
+ <span>仅允许导入xls、xlsx格式文件。</span>
|
|
|
+ <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importUpdateOrderTemplate">下载模板</el-link>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitOrderStatusFileForm">确 定</el-button>
|
|
|
+ <el-button @click="uploadStatus.open = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -1060,7 +1097,7 @@ import {
|
|
|
getOrderItemsNum,
|
|
|
importDeliveryNoteExpressTemplate, exportStoreOrderDetails, exportStoreOrderItemsDetails,getErpAccount,
|
|
|
queryErpPhone,
|
|
|
- saveErpPhone,editErpPhone,batchCreateErpOrder,batchSetErpOrder,importExpressTemplate
|
|
|
+ saveErpPhone,editErpPhone,batchCreateErpOrder,batchSetErpOrder,importExpressTemplate,importUpdateOrderTemplate
|
|
|
} from '@/api/hisStore/storeOrder'
|
|
|
import { getUserList } from "@/api/hisStore/user";
|
|
|
import { getAddressList } from "@/api/hisStore/userAddress";
|
|
|
@@ -1370,6 +1407,21 @@ export default {
|
|
|
},
|
|
|
showFinanceTableField: false,
|
|
|
signProjectName:null,
|
|
|
+
|
|
|
+ uploadStatus: {
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 是否更新已经存在的用户数据
|
|
|
+ updateSupport: 0,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + "/store/store/storeOrder/importOrderStatusData"
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -2360,6 +2412,11 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ handleImportStatus() {
|
|
|
+ this.uploadStatus.title = "导入";
|
|
|
+ this.uploadStatus.open = true;
|
|
|
+ },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
this.products.splice(this.products.findIndex(item => item.id === row.id), 1)
|
|
|
@@ -2570,6 +2627,26 @@ export default {
|
|
|
}
|
|
|
this.$refs.upload.submit();
|
|
|
},
|
|
|
+ // 文件上传中处理
|
|
|
+ handleFileUploadProgressOrder(event, file, fileList) {
|
|
|
+ this.uploadStatus.isUploading = true;
|
|
|
+ },
|
|
|
+ // 文件上传成功处理
|
|
|
+ handleFileSuccessOrder(response, file, fileList) {
|
|
|
+ this.uploadStatus.open = false;
|
|
|
+ this.uploadStatus.isUploading = false;
|
|
|
+ this.$refs.uploadStatus.clearFiles();
|
|
|
+ this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ importUpdateOrderTemplate(){
|
|
|
+ importUpdateOrderTemplate().then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ submitOrderStatusFileForm(){
|
|
|
+ this.$refs.uploadStatus.submit();
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|