|
|
@@ -323,6 +323,16 @@
|
|
|
v-hasPermi="['store:healthStoreOrder:exportDeliver']"
|
|
|
>导入发货</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-->
|
|
|
<!-- v-hasPermi="['store:storeOrder:healthExportShippingOrder']"-->
|
|
|
@@ -998,6 +1008,33 @@
|
|
|
<el-button @click="uploadDeliver.open = false">取 消</el-button>
|
|
|
</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>
|
|
|
|
|
|
@@ -1022,7 +1059,7 @@ import {
|
|
|
editErpPhone,
|
|
|
batchCreateErpOrder,
|
|
|
batchSetErpOrder,
|
|
|
- importExpressTemplate
|
|
|
+ importExpressTemplate, importUpdateOrderTemplate
|
|
|
} from '@/api/hisStore/storeOrder'
|
|
|
import { getUserList } from '@/api/hisStore/user'
|
|
|
import { getAddressList } from '@/api/hisStore/userAddress'
|
|
|
@@ -1051,6 +1088,20 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ uploadStatus: {
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 是否更新已经存在的用户数据
|
|
|
+ updateSupport: 0,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + "/store/store/storeOrder/importOrderStatusData"
|
|
|
+ },
|
|
|
uploadDeliver:{
|
|
|
open:false,
|
|
|
title:"导入发货",
|
|
|
@@ -1359,6 +1410,30 @@ export default {
|
|
|
this.getAppMallOptions();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 文件上传中处理
|
|
|
+ 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();
|
|
|
+ },
|
|
|
+ handleImportStatus() {
|
|
|
+ this.uploadStatus.title = "导入";
|
|
|
+ this.uploadStatus.open = true;
|
|
|
+ },
|
|
|
// 提交上传文件
|
|
|
submitFileFormDeliver() {
|
|
|
console.log("submitFileFormDeliver");
|