Commit 35d24f69 by 张立顺

feat 上传弹框 组件化

1 parent 3377206b
......@@ -8,11 +8,13 @@
label-width="120px"
:model="form"
:rules="rules">
<el-form-item label="导入文件:"
<slot name="prepend" />
<el-form-item :label="formItemLabel"
prop="fileName">
<el-col :span="16">
<el-input v-model="form.fileName"
readonly />
<slot name="tip" />
</el-col>
<el-col class="m-l-md"
:span="4">
......@@ -61,6 +63,10 @@ export default {
type: String,
default: "模版下载",
},
formItemLabel: {
type: String,
default: "导入文件:",
},
},
data() {
return {
......
......@@ -42,44 +42,11 @@
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
<d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleImport" @confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm" ref="fileRuleForm" :rules="fileRules" label-width="120px">
<!-- <el-form-item v-if="userInfo.beSuper" label="园区店:" prop="yqMerchantId">
<el-select v-model="fileForm.yqMerchantId">
<el-option v-for="item in baseData.parkServiceList.filter(i => i.merchantName !== '全部')"
:key="item.merchantId" :value="item.merchantId" :label="item.merchantName" />
</el-select>
</el-form-item> -->
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input readonly v-model="fileForm.fileName" />
</el-col>
<el-col :span="4" class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<!-- <el-link href="http://img01.glsx.com.cn/upload/salesexcel/预录订单导入模板.xlsx" type="primary"
class="import-template" icon="el-icon-link">
模版下载
</el-link> -->
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
<el-form-item v-show="showNum">
<span>导入成功{{ importNum.succNum }}条,导入失败{{ importNum.failNum }}条</span>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
</d2-container>
</template>
......@@ -97,17 +64,7 @@ export default {
userInfo: this.$store.state.d2admin.user.info,
hideVisible: false,
fileVisible: false,
fileForm: {},
total: 0,
showNum: false,
importNum: {
succNum: 0,
failNum: 0
},
fileRules: {
yqMerchantId: [{ required: true, message: '请选择园区店', trigger: 'change' }],
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
tableSearchForm: {},
searchForm: {
shopOrYqMerchantId: '',
......@@ -359,30 +316,7 @@ export default {
handleShowHide() {
this.hideVisible = !this.hideVisible
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[e.target.files[0].name.split('.')?.length - 1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过9M')
document.getElementById('fileUpload').value = ''
}
},
handleImport() {
this.fileForm = {
fileName: ''
}
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
this.fileVisible = !this.fileVisible
},
exportFailList(list) {
......@@ -396,27 +330,22 @@ export default {
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]))
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
recordUpload(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
recordUpload(params).then(res => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
},
......@@ -479,29 +408,4 @@ export default {
margin: 0 0;
}
.record-list .m-l-md {
margin-left: 20px;
}
.record-list .import-btn {
position: relative;
}
.record-list .import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.record-list .import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
</style>
......@@ -459,23 +459,10 @@
<download-account-dialog :account-visible="accountVisible" v-if="accountVisible" :scene="searchForm.sceneType" @custTmpl="handleCustTmpl" @handleBill="handleBill" @accountClose="accountClose" />
<!-- 出库面板 -->
<warehouse-detail v-if="warehouseVisible" :warehouse-visible="warehouseVisible" :order-info-id="orderId" @handleDrawerClose="handleDrawerClose" />
<d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleImport" @confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm" ref="fileRuleForm" :rules="fileRules" label-width="120px">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input readonly v-model="fileForm.fileName" />
</el-col>
<el-col :span="4" class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file" id="fileUpload" class="import-input" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" @change="importFile($event)" />
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport" />
<tmpl-drawer v-if="tmplDrawerVisible" :tmplDrawerVisible="tmplDrawerVisible" :type="tmplInfo.type" :tmplSelectList="tmplInfo.tmplSelectList" @handleConfirm="handleCustConfirm" @handleClose="handleCustVisible"></tmpl-drawer>
<system-bill-dialog v-if="billVisible" :billVisible="billVisible" :billTmplInfo="billTmplInfo" @handleClose="handleBillVisible" @handleConfirm="handleBillVisible"></system-bill-dialog>
</div>
......@@ -748,10 +735,6 @@ export default {
/** 根据场景控制页面显示隐藏end */
sceneList: sceneList,
positionTypeList: [], // 商品部位数据
fileRules: {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }]
},
fileForm: {},
fileVisible: false,
tmplDrawerVisible: false,
tmplInfo: {
......@@ -899,62 +882,30 @@ export default {
},
handleImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
// 上传文件,转码为base64
importFile(e) {
console.log(e)
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, "fileName", e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(",")
this.fileInfo =
e.target.files[0].name.split(".")[
e.target.files[0].name.split(".")?.length - 1
] +
"@" +
arrBase64[1]
document.getElementById("fileUpload").value = ""
}
} else {
this.notice.errorTips("上传文件不可超过9M")
document.getElementById('fileUpload').value = ''
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate((valid) => {
if (valid) {
var params = {
file: this.fileInfo
}
api.uploadFile(params).then((res) => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [
...this.updateList,
{
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: "upload"
}
]
this.actionSetDownloadList({ list, type: "updateList" })
this.notice.okTips("上传成功")
this.handleBatchImport()
api.uploadFile(params).then((res) => {
if (res) {
const list = [
...this.updateList,
{
name: fileName,
ifSuccess: false,
uuid: res,
type: "upload"
}
})
]
this.actionSetDownloadList({ list, type: "updateList" })
this.notice.okTips("上传成功")
this.handleBatchImport()
}
})
},
handleBatchImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType)
......@@ -1527,26 +1478,4 @@ export default {
margin-right: 5px;
display: inline-block;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
</style>
......@@ -178,39 +178,11 @@
@handleBatchCopyClose="handleBatchCopyClose"
@handleBatchCopyConfirm="handleBatchCopyConfirm">
</BatchCopyDialog>
<d2-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleBatchImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form ref="fileRuleForm"
label-width="120px"
:model="fileForm"
:rules="fileRules">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input v-model="fileForm.fileName" readonly />
</el-col>
<el-col class="m-l-md" :span="4">
<el-button class="import-btn">
导入文件
<input id="fileUpload"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
class="import-input"
type="file"
@change="importFile($event)">
<el-link class="import-template"
icon="el-icon-link"
type="primary"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleBatchImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
<!-- 批量修改库存模式弹窗 -->
<BatchModifyInventoryDialog :selected-data="selectedTableData"
......@@ -669,11 +641,7 @@ export default {
batchCopySelectScene: "", // 批量复制选中的场景值
batchCopyVisible: false,
batchCopySelectData: [], // 批量辅助选中的上架数据
fileRules: {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }],
},
fileForm: {},
fileVisible: false,
fileVisible: false,
batchModifyInventoryVisible: false,
selectedTableData: [],
};
......@@ -843,52 +811,28 @@ export default {
];
this.actionSetDownloadList({ list, type: "dowloadList" });
},
handleBatchImport() {
this.fileVisible = !this.fileVisible;
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields();
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024;
if (size < 9) {
this.$set(this.fileForm, "fileName", e.target.files[0].name);
// // 转码base64
const reader = new FileReader();
reader.readAsDataURL(e.target.files[0]);
reader.onload = (event) => {
const imgFile = event.target.result;
const arrBase64 = imgFile.split(",");
this.fileInfo = e.target.files[0].name.split(".")[e.target.files[0].name.split(".")?.length - 1] + "@" + arrBase64[1];
document.getElementById("fileUpload").value = "";
};
} else {
this.notice.errorTips("上传文件不可超过9M");
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate((valid) => {
if (valid) {
let params = {
file: this.fileInfo,
};
groundingImport(params).then((res) => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: "upload",
}];
handleBatchImport() {
this.fileVisible = !this.fileVisible;
},
handleConfirmImport({ fileName, fileData }) {
let params = {
file: fileData,
};
groundingImport(params).then((res) => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: "upload",
}];
this.actionSetDownloadList({ list, type: "updateList" });
this.notice.okTips("上传成功");
this.handleBatchImport();
}
});
}
});
},
this.actionSetDownloadList({ list, type: "updateList" });
this.notice.okTips("上传成功");
this.handleBatchImport();
}
});
},
handleReset() {
this.searchForm = {
upgradeGoodsName: "",
......@@ -1181,30 +1125,5 @@ export default {
margin-left: 8px;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
}
</style>
......@@ -117,29 +117,11 @@
:selected-scene="batchCopySelectScene" @handleBatchCopyConfirm="handleBatchCopyConfirm"
@handleBatchCopyClose="handleBatchCopyClose">
</batch-copy-dialog>
<d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleBatchImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm" ref="fileRuleForm" :rules="fileRules" label-width="120px">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input readonly v-model="fileForm.fileName" />
</el-col>
<el-col :span="4" class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary" class="import-template" icon="el-icon-link" @click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleBatchImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
</d2-container>
</template>
<script>
......@@ -520,10 +502,6 @@ export default {
batchCopySelectScene: '', // 批量复制选中的场景值
batchCopyVisible: false,
batchCopySelectData: [], // 批量辅助选中的上架数据
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
fileForm: {},
fileVisible: false
}
},
......@@ -704,48 +682,23 @@ export default {
},
handleBatchImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[e.target.files[0].name.split('.')?.length - 1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过9M')
document.getElementById('fileUpload').value = ''
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
groundingImport(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
groundingImport(params).then(res => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleBatchImport()
}
})
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleBatchImport()
}
})
},
......@@ -982,30 +935,5 @@ export default {
margin-left: 8px;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
}
</style>
......@@ -93,52 +93,11 @@
</slot>
</d2-dialog>
<!-- 导入门店设置 -->
<d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleImport"
@confirmDialog="handleConfirmImport" width="600px">
<slot>
<div>
<el-form :model="fileForm" :rules="fileRules" ref="fileRuleForm" label-width="120px">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input readonly v-model="fileForm.fileName" />
</el-col>
<el-col :span="4" class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)" />
<!-- href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/对账单模版.xlsx" -->
<el-link type="primary" class="import-template" @click="downLoadTemplate" icon="el-icon-link">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
<span v-show="showNum">
<div class="upload-statistics">
<div class="quantity">
<div class="success">{{ importNum.successCount }}</div>
<div>有效数据</div>
</div>
<div class="line"></div>
<div class="quantity">
<div class="err">{{ importNum.failCount }}</div>
<div>异常数据</div>
</div>
</div>
<div class="abnormal">
<p>数据异常的可能原因:</p>
<p class="color-33">
1. 订单编号不匹配
</p>
</div>
</span>
</div>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="downLoadTemplate" />
</div>
</template>
......@@ -162,15 +121,6 @@ export default {
data() {
return {
fileVisible: false,
showNum: false,
importNum: {
succNum: 0,
failNum: 0
},
fileForm: {},
fileRules: {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }]
},
pickerOptions: {
disabledDate: (time) => {
const maxMonth = dayjs().subtract(-1, 'months').endOf('month')
......@@ -297,109 +247,22 @@ export default {
result && downLoadFile(result)
})
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
console.log(e)
if (size < 9) {
this.$set(this.fileForm, "fileName", e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(",")
this.fileInfo =
e.target.files[0].name.split(".")[1] + "@" + arrBase64[1]
// orderManage.pictureUpload({ file: this.fileInfo }).then((res) => {
// if (res) {
// this.fileForm.fileUrl = res
// }
// // const refName = "file" + row.id
// // const refName = "file"
// e.target.value = ""
// // this.$refs[refName].value = ""
// })
document.getElementById("fileUpload").value = ""
}
} else {
this.notice.errorTips("上传文件不可超过9M")
document.getElementById("fileUpload").value = ""
}
},
handleImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate((valid) => {
if (valid) {
// var params = {
// fileUrl: this.fileForm.fileUrl
// }
merchantOutputValueTargetImport({ file: this.fileInfo }).then((result) => {
if (result) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: result,
type: 'upload'
}]
handleConfirmImport({ fileName, fileData }) {
merchantOutputValueTargetImport({ file: fileData }).then((result) => {
if (result) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: result,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
// console.log(result, 'result')
// const { url, dataList } = result
// console.log(url, 'url')
// if (url) {
// // this.$message.error('上传失败')
// this.$message.error('上传失败')
// downLoadFile(url)
// }
// if (dataList) {
// this.$message.success('上传成功')
// this.fileVisible = false
// this.hasPage = false
// // const listFilter = result.list
// this.tableData = dataList.map((item) => {
// item.dataMonth = this.search.targetDate
// item.isEdit = true
// item.areaSupervision = item.areaSupervision || {}
// item.residentManager = item.residentManager || {}
// item.area = item.area || ''
// // item.residentManagerOptionsList = item.residentManager?{}
// if (item.residentManager) {
// item.residentManagerOptionsList = [{
// userId: item.residentManager.userId,
// userName: item.residentManager.userName,
// userNum: item.residentManager.userNum,
// userType: item.residentManager.userType
// }]
// } else {
// item.residentManagerOptionsList = []
// }
// return item
// })
// // this.tableTotal = result.total
// }
})
// .catch((err) => {
// })
// orderManage.orderEndExportApi(params).then((res) => {
// if (res) {
// this.showNum = true
// this.importNum = {
// successCount: res.successCount,
// failCount: res.failCount
// }
// this.$message.success('上传成功')
// // this.handleImport()
// }
// })
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
},
......@@ -602,66 +465,4 @@ export default {
margin-top: 94px;
}
.upload-wrap {
display: flex;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
.m-l-md {
margin-left: 20px;
}
.upload-statistics {
display: flex;
align-items: center;
justify-content: space-between;
margin: 30px 70px;
.quantity {
font-size: 14px;
color: #333333;
text-align: center;
.success {
font-size: 26px;
color: #2cca74;
text-align: center;
margin-bottom: 4px;
}
.err {
font-size: 26px;
color: #eb4e4e;
text-align: center;
margin-bottom: 4px;
}
}
.line {
width: 1px;
height: 56px;
background: #e8e8ea;
}
}
</style>
......@@ -24,26 +24,11 @@
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
<d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleImport" @confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm" ref="fileRuleForm" :rules="fileRules" label-width="120px">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input readonly v-model="fileForm.fileName" />
</el-col>
<el-col :span="4" class="m-l-md">
<el-button class="import-btn">导入文件
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link href="http://img01.glsx.com.cn/upload/salesexcel/企微推送对象导入模板.xlsx" type="primary"
class="import-template" icon="el-icon-link">模版下载</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
<d2-dialog :title="chooseType" @closeDialog="handleObject" @confirmDialog="handleConfirmObject"
:is-visible="pushVisible">
<slot>
......@@ -92,9 +77,7 @@ export default {
data() {
return {
state,
// 上传文件数据
fileVisible: false,
fileForm: {},
// 搜索表格数据
tableSearchForm: {},
searchForm: {
......@@ -170,9 +153,6 @@ export default {
}
]
},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
changeList: [],
superviseList: [],
residentialList: [],
......@@ -196,25 +176,6 @@ export default {
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
...mapMutations('d2admin/user', ['setUpdateRefesh']),
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过9M')
document.getElementById('fileUpload').value = ''
}
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = deepClone(this.searchForm)
......@@ -224,38 +185,31 @@ export default {
keyDowmGetList() {
this.$refs.outputValueTable.refreshTable()
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
importContact(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
// labelText: ''
}]
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
importContact(params).then(res => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
},
handleImport() {
// this.fileForm = {
// fileName: ''
// }
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
this.fileVisible = !this.fileVisible
},
exportTemplate() {
window.open('http://img01.glsx.com.cn/upload/salesexcel/企微推送对象导入模板.xlsx')
},
merchantData(type) {
const superviseParams = {
currentPage: 1,
......@@ -401,31 +355,5 @@ export default {
.outputValue-list {
position: relative;
}
.outputValue-list .m-l-md {
margin-left: 20px;
}
.outputValue-list .import-btn {
position: relative;
}
.outputValue-list .import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.outputValue-list .import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
</style>
......@@ -605,46 +605,11 @@
@current-change="handleCurrentChange"
@size-change="handleSizeChange" />
</div>
<d2-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form ref="fileRuleForm"
label-width="120px"
:model="fileForm"
:rules="fileRules">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input v-model="fileForm.fileName" readonly />
</el-col>
<el-col class="m-l-md" :span="4">
<el-button class="import-btn">
导入文件
<input id="fileUpload"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
class="import-input"
type="file"
@change="importFile($event)" />
<el-link class="import-template"
href="http://img01.glsx.com.cn/upload/salesexcel/园区店客户订单导入模板.xlsx"
icon="el-icon-link"
type="primary">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
<el-form-item v-show="showNum">
<span>
导入成功{{ importNum.succNum }}条,导入失败{{
importNum.failNum
}}条
</span>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
<!-- 选择分账规则 -->
<ChooseRuleDialog v-if="ruleVisible"
......@@ -714,15 +679,6 @@ export default {
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
fileForm: {},
fileRules: {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }],
},
showNum: false,
importNum: {
succNum: 0,
failNum: 0,
},
fileVisible: false,
waitOrderNum: 0,
statusOpts: {
......@@ -1394,73 +1350,32 @@ export default {
},
handleImport() {
this.fileVisible = !this.fileVisible;
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields();
},
// 上传文件,转码为base64
importFile(e) {
// console.log(e)
const size = e.target.files[0].size / 1024 / 1024;
if (size < 9) {
this.$set(this.fileForm, "fileName", e.target.files[0].name);
// // 转码base64
const reader = new FileReader();
reader.readAsDataURL(e.target.files[0]);
reader.onload = (event) => {
const imgFile = event.target.result;
const arrBase64 = imgFile.split(",");
this.fileInfo
= e.target.files[0].name.split(".")[1] + "@" + arrBase64[1];
document.getElementById("fileUpload").value = "";
};
} else {
this.notice.errorTips("上传文件不可超过9M");
document.getElementById("fileUpload").value = "";
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate((valid) => {
if (valid) {
let params = {
// advanceUserId: this.userInfo.detail.uuid,
// advanceUserName: this.userInfo.merchantAccountLevel == 4 ? this.userInfo.detail.userName : this.userInfo.detail.merchantName,
// yqMerchantId: this.userInfo.beSuper ? this.fileForm.yqMerchantId : this.userInfo.detail.merchantId,
file: this.fileInfo,
};
orderImport(params).then((res) => {
// console.log(res)
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [
...this.updateList,
{
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: "upload",
// labelText: ''
},
];
handleConfirmImport({ fileName, fileData }) {
let params = {
file: fileData,
};
orderImport(params).then((res) => {
if (res) {
const list = [
...this.updateList,
{
name: fileName,
ifSuccess: false,
uuid: res,
type: "upload",
},
];
this.actionSetDownloadList({ list, type: "updateList" });
this.notice.okTips("上传成功");
this.handleImport();
}
// this.showNum = !!res.failNum
// res.succNum && this.$refs.recordTable.refreshTable()
// if (res.failNum) {
// this.importNum = {
// succNum: res.succNum,
// failNum: res.failNum
// }
// this.exportFailList(res.errorList)
// return true
// }
// this.handleImport()
// this.notice.okTips('上传成功')
});
this.actionSetDownloadList({ list, type: "updateList" });
this.notice.okTips("上传成功");
this.handleImport();
}
});
},
exportTemplate() {
window.open('http://img01.glsx.com.cn/upload/salesexcel/园区店客户订单导入模板.xlsx');
},
handleReset() {
this.searchForm = {
sceneType: 0,
......@@ -1999,30 +1914,4 @@ export default {
margin-top: 40px;
}
.order-list .m-l-md {
margin-left: 20px;
}
// .order-list
.order-list .import-btn {
position: relative;
}
.order-list .import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.order-list .import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
</style>
......@@ -607,63 +607,30 @@
@current-change="handleCurrentChange"
@size-change="handleSizeChange" />
</div>
<d2-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form ref="fileRuleForm"
label-width="120px"
:model="fileForm"
:rules="fileRules">
<el-form-item label="选择门店:" prop="merchantId">
<el-select v-model="fileForm.merchantId"
filterable
:loading="loading"
placeholder="请输入关键字"
remote
:remote-method="remoteMethod"
reserve-keyword
style="width: 280px">
<el-option v-for="(opt, optIndex) in options"
:key="optIndex"
:label="opt.merchantName"
:value="opt.merchantId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input v-model="fileForm.fileName" readonly />
</el-col>
<el-col class="m-l-md" :span="4">
<el-button class="import-btn">
导入文件
<input id="fileUpload"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
class="import-input"
type="file"
@change="importFile($event)" />
<!-- href="http://img01.glsx.com.cn/upload/salesexcel/园区店客户订单导入模板.xlsx" -->
<el-link class="import-template"
icon="el-icon-link"
type="primary"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
<el-form-item v-show="showNum">
<span>
导入成功{{ importNum.succNum }}条,导入失败{{
importNum.failNum
}}条
</span>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate">
<template #prepend>
<el-form-item label="选择门店:">
<el-select v-model="selectedMerchantId"
filterable
:loading="loading"
placeholder="请输入关键字"
remote
:remote-method="remoteMethod"
reserve-keyword
style="width: 280px">
<el-option v-for="(opt, optIndex) in options"
:key="optIndex"
:label="opt.merchantName"
:value="opt.merchantId">
</el-option>
</el-select>
</el-form-item>
</template>
</d2-file-import-dialog>
<!-- 选择分账规则 -->
<ChooseRuleDialog v-if="ruleVisible"
......@@ -764,16 +731,7 @@ export default {
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
fileForm: {},
fileRules: {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }],
// merchantId: [{ required: true, message: '请选择门店', trigger: 'change' }]
},
showNum: false,
importNum: {
succNum: 0,
failNum: 0,
},
selectedMerchantId: "",
fileVisible: false,
waitOrderNum: 0,
statusOpts: {
......@@ -1416,71 +1374,27 @@ export default {
handleImport() {
this.fileVisible = !this.fileVisible;
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields();
},
// 上传文件,转码为base64
importFile(e) {
// console.log(e)
const size = e.target.files[0].size / 1024 / 1024;
if (size < 9) {
this.$set(this.fileForm, "fileName", e.target.files[0].name);
// // 转码base64
const reader = new FileReader();
reader.readAsDataURL(e.target.files[0]);
reader.onload = (event) => {
const imgFile = event.target.result;
const arrBase64 = imgFile.split(",");
this.fileInfo
= e.target.files[0].name.split(".")[1] + "@" + arrBase64[1];
document.getElementById("fileUpload").value = "";
};
} else {
this.notice.errorTips("上传文件不可超过9M");
document.getElementById("fileUpload").value = "";
}
this.selectedMerchantId = "";
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate((valid) => {
if (valid) {
let params = {
// advanceUserId: this.userInfo.detail.uuid,
// advanceUserName: this.userInfo.merchantAccountLevel == 4 ? this.userInfo.detail.userName : this.userInfo.detail.merchantName,
// yqMerchantId: this.userInfo.beSuper ? this.fileForm.yqMerchantId : this.userInfo.detail.merchantId,
file: this.fileInfo,
};
orderImport(params).then((res) => {
// console.log(res)
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [
...this.updateList,
{
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: "upload",
// labelText: ''
},
];
handleConfirmImport({ fileName, fileData }) {
let params = {
file: fileData,
};
orderImport(params).then((res) => {
if (res) {
const list = [
...this.updateList,
{
name: fileName,
ifSuccess: false,
uuid: res,
type: "upload",
},
];
this.actionSetDownloadList({ list, type: "updateList" });
this.notice.okTips("上传成功");
this.handleImport();
}
// this.showNum = !!res.failNum
// res.succNum && this.$refs.recordTable.refreshTable()
// if (res.failNum) {
// this.importNum = {
// succNum: res.succNum,
// failNum: res.failNum
// }
// this.exportFailList(res.errorList)
// return true
// }
// this.handleImport()
// this.notice.okTips('上传成功')
});
this.actionSetDownloadList({ list, type: "updateList" });
this.notice.okTips("上传成功");
this.handleImport();
}
});
},
......@@ -1926,8 +1840,8 @@ export default {
// 模板下载
exportTemplate() {
let params = {};
if (this.fileForm.merchantId) {
params.merchantId = this.fileForm.merchantId;
if (this.selectedMerchantId) {
params.merchantId = this.selectedMerchantId;
} else {
this.notice.warningTips("请选择门店");
return;
......@@ -2101,31 +2015,6 @@ export default {
margin-top: 40px;
}
.order-list .m-l-md {
margin-left: 20px;
}
.order-list .import-btn {
position: relative;
}
.order-list .import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.order-list .import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
.add-dialog {
// margin: 20px 0;
......
......@@ -58,42 +58,11 @@
</div>
</d2-table>
</div>
<d2-dialog :title="'上传文件'"
:is-visible="fileVisible"
@closeDialog="handleBatchImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleBatchImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
<!-- 新增积分记录 -->
<add-dialog :add-visible="addVisible"
......@@ -300,10 +269,6 @@ export default {
handleVisible: false,
recordInfo: {},
params_obj: {},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
fileForm: {},
fileVisible: false,
addVisible: false
}
......@@ -433,48 +398,16 @@ export default {
},
handleBatchImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[e.target.files[0].name.split('.')?.length - 1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过9M')
document.getElementById('fileUpload').value = ''
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
pointImport(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
// const list = [...this.updateList, {
// name: this.fileForm.fileName,
// ifSuccess: false,
// uuid: res,
// type: 'upload'
// }]
// this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips(res)
this.handleBatchImport()
this.$refs.detailListTable.refreshTable()
}
})
pointImport(params).then(res => {
if (res) {
this.notice.okTips(res)
this.handleBatchImport()
this.$refs.detailListTable.refreshTable()
}
})
},
......@@ -516,28 +449,6 @@ export default {
<style lang="scss" scoped>
.points-record {
margin-top: 40px;
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
}
.more-info {
white-space: nowrap;
......
......@@ -87,42 +87,11 @@
</div>
</d2-table>
</div>
<d2-dialog :title="'交付数导入'"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="交付数导入"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
<!-- 新增&修改&详情 -->
<edit-dialog :visible.sync="editVisible"
v-if="editVisible"
......@@ -251,15 +220,11 @@ export default {
merchantList: [],
brandList: []
},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
recordInfo: null,
operationType: "add",
currentPage: 1,
pageSize: 20,
fileVisible: false,
fileForm: {},
editVisible: false,
track_event_code: 'shopConfig_deliver_list',
track_businessParam_key: 'searchForm'
......@@ -470,54 +435,27 @@ export default {
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 10) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[e.target.files[0].name.split('.')?.length - 1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过10M')
}
},
handleImport() {
this.fileForm = {
fileName: ''
}
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
this.fileVisible = !this.fileVisible
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
deliverTargeConfigImport(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
deliverTargeConfigImport(params).then(res => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.$refs.recordTable.refreshTable(false, true)
this.handleImport()
}
})
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.$refs.recordTable.refreshTable(false, true)
this.handleImport()
}
})
},
......@@ -549,27 +487,4 @@ export default {
margin-top: 40px;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
</style>
......@@ -110,49 +110,12 @@
]" :data="scope.scope" />
</d2-table>
</div>
<!-- 导入门店设置 -->
<d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleImport"
@confirmDialog="handleConfirmImport" width="600px">
<slot>
<div>
<el-form :model="fileForm" :rules="fileRules" ref="fileRuleForm" label-width="120px">
<el-form-item label="导入文件:" prop="fileName">
<el-col :span="16">
<el-input readonly v-model="fileForm.fileName" />
</el-col>
<el-col :span="4" class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file" id="fileUpload" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)" />
<el-link type="primary" class="import-template" @click="downLoadTemplate" icon="el-icon-link">
文件下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
<span v-show="showNum">
<div class="upload-statistics">
<div class="quantity">
<div class="success">{{ importNum.successCount }}</div>
<div>有效数据</div>
</div>
<div class="line"></div>
<div class="quantity">
<div class="err">{{ importNum.failCount }}</div>
<div>异常数据</div>
</div>
</div>
<div class="abnormal">
<p>数据异常的可能原因:</p>
<p class="color-33">1. 订单编号不匹配</p>
</div>
</span>
</div>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
template-name="文件下载"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="downLoadTemplate" />
<!-- 收款码 -->
<qrcode-dialog :q-rcode-visible="qRcodeVisible" :info="recordInfo" v-if="qRcodeVisible"
......@@ -667,16 +630,7 @@ export default {
recordInfo: null,
fileVisible: false,
signVisible: false,
showNum: false,
warningVisible: false,
importNum: {
succNum: 0,
failNum: 0
},
fileForm: {},
fileRules: {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }]
},
qRcodeVisible: false,
employeeVisible: false,
flagVisible: false,
......@@ -1236,57 +1190,28 @@ export default {
}
)
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, "fileName", e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(",")
this.fileInfo =
e.target.files[0].name.split(".")[1] + "@" + arrBase64[1]
document.getElementById("fileUpload").value = ""
}
} else {
this.notice.errorTips("上传文件不可超过9M")
document.getElementById("fileUpload").value = ""
}
},
handleImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
handleConfirmImport() {
const that = this
this.$refs.fileRuleForm.validate((valid) => {
if (valid) {
merchantOutputValueTargetImport({ file: this.fileInfo }).then(
(result) => {
if (result) {
// debugger
// 异步处理文件上传 把id传入处理轮询
const list = [
...that.updateList,
{
name: that.fileForm.fileName,
ifSuccess: false,
uuid: result,
type: "upload"
// labelText: ''
}
]
that.actionSetDownloadList({ list, type: "updateList" })
that.notice.okTips("上传成功")
that.handleImport()
handleConfirmImport({ fileName, fileData }) {
merchantOutputValueTargetImport({ file: fileData }).then(
(result) => {
if (result) {
const list = [
...this.updateList,
{
name: fileName,
ifSuccess: false,
uuid: result,
type: "upload"
}
}
)
]
this.actionSetDownloadList({ list, type: "updateList" })
this.notice.okTips("上传成功")
this.handleImport()
}
}
})
)
},
// 收款二维码按钮
......@@ -1623,69 +1548,6 @@ export default {
border: 0;
}
.upload-wrap {
display: flex;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
.m-l-md {
margin-left: 20px;
}
.upload-statistics {
display: flex;
align-items: center;
justify-content: space-between;
margin: 30px 70px;
.quantity {
font-size: 14px;
color: #333333;
text-align: center;
.success {
font-size: 26px;
color: #2cca74;
text-align: center;
margin-bottom: 4px;
}
.err {
font-size: 26px;
color: #eb4e4e;
text-align: center;
margin-bottom: 4px;
}
}
.line {
width: 1px;
height: 56px;
background: #e8e8ea;
}
}
.points-set-form {
display: flex;
align-items: center;
......
......@@ -93,42 +93,11 @@
</div>
</d2-table>
</div>
<d2-dialog :title="'产值导入'"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="产值导入"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
<!-- 新增&修改&详情 -->
<edit-dialog :visible.sync="editVisible"
v-if="editVisible"
......@@ -268,15 +237,11 @@ export default {
},
merchantList: []
},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
recordInfo: null,
operationType: "add",
currentPage: 1,
pageSize: 20,
fileVisible: false,
fileForm: {},
editVisible: false,
track_event_code: 'shopConfig_Output_list',
track_businessParam_key: 'searchForm'
......@@ -467,54 +432,27 @@ export default {
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 10) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[e.target.files[0].name.split('.')?.length - 1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过10M')
}
},
handleImport() {
this.fileForm = {
fileName: ''
}
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
this.fileVisible = !this.fileVisible
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
targeConfigImport(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
targeConfigImport(params).then(res => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.$refs.recordTable.refreshTable(false, true)
this.handleImport()
}
})
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.$refs.recordTable.refreshTable(false, true)
this.handleImport()
}
})
},
......@@ -572,27 +510,4 @@ export default {
color: #43cf7c;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
</style>
......@@ -93,42 +93,11 @@
</div>
</d2-table>
</div>
<d2-dialog :title="'成交率导入'"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="成交率导入"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
<!-- 新增&修改&详情 -->
<edit-dialog :visible.sync="editVisible"
v-if="editVisible"
......@@ -304,15 +273,11 @@ export default {
2: "延保"
},
},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
recordInfo: null,
operationType: "add",
currentPage: 1,
pageSize: 20,
fileVisible: false,
fileForm: {},
editVisible: false,
track_event_code: 'shopConfig_personalConversion_list',
track_businessParam_key: 'searchForm'
......@@ -534,53 +499,26 @@ export default {
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 10) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[e.target.files[0].name.split('.')?.length - 1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过10M')
}
},
handleImport() {
this.fileForm = {
fileName: ''
}
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
this.fileVisible = !this.fileVisible
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
personalConfigImport(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
personalConfigImport(params).then(res => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
},
......@@ -612,22 +550,6 @@ export default {
margin-top: 40px;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
@mixin typeBase {
width: 52px;
......@@ -654,10 +576,4 @@ export default {
color: #43cf7c;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
</style>
......@@ -85,44 +85,17 @@
</div>
</d2-table>
</div>
<!-- 导入文件弹框 -->
<d2-dialog :title="'毛利导入'"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="毛利信息表:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
<p class="tips">请选择需要导入的毛利信息表格</p>
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="毛利导入"
form-item-label="毛利信息表:"
:max-size="10"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate">
<template #tip>
<p class="tips">请选择需要导入的毛利信息表格</p>
</template>
</d2-file-import-dialog>
<!-- 新增&修改&详情 -->
<edit-dialog :visible.sync="editVisible"
v-if="editVisible"
......@@ -269,15 +242,11 @@
4: "二手车"
},
},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
recordInfo: null,
operationType: "add",
currentPage: 1,
pageSize: 20,
fileVisible: false,
fileForm: {},
editVisible: false,
// 保存编辑前的分页状态
savedPageState: null,
......@@ -535,53 +504,26 @@
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 10) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[e.target.files[0].name.split('.')?.length - 1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过10M')
}
},
handleImport() {
this.fileForm = {
fileName: ''
}
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
this.fileVisible = !this.fileVisible
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
importProfit(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
importProfit(params).then(res => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
},
......@@ -613,22 +555,6 @@
margin-top: 40px;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
@mixin typeBase {
width: 52px;
......@@ -660,12 +586,6 @@
color: #5850FFFF;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
.tips {
color: #999999ff;
font-size: 14px;
......
......@@ -76,43 +76,11 @@
</d2-table>
</div>
<!-- 导入 -->
<d2-dialog :title="'上传文件'"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
width="530px">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="上传文件"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
@downloadTemplate="exportTemplate" />
<!-- 导出 -->
<d2-dialog :title="'员工业绩导出'"
:is-visible="exportFileVisible"
......@@ -179,7 +147,6 @@ export default {
return date.getTime() > Date.now() - 24 * 60 * 60 * 1000 * `${days}`
}
},
fileForm: {},
exportFileForm: { // 导出条件
exportYqMerchantId: [],
exportMonth: ''
......@@ -187,9 +154,6 @@ export default {
exportFormRules: {
exportMonth: [{ required: true, message: '请选择导出月份', trigger: 'blur' }]
},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
totalNum: 0, // 已启用商学院员工数量
fileVisible: false, // 导入弹窗
exportFileVisible: false, // 导出弹窗
......@@ -380,51 +344,25 @@ export default {
keyDownGetList() {
this.$refs.staffManageTable.refreshTable()
},
// 导入员工
handleImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过9M')
document.getElementById('fileUpload').value = ''
handleConfirmImport({ fileName, fileData }) {
var params = {
file: fileData
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
importStaffApi(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
importStaffApi(params).then(res => {
if (res) {
const list = [...this.updateList, {
name: fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleImport()
}
})
},
......@@ -584,31 +522,6 @@ export default {
color: #d9646c;
}
}
.staff-list .m-l-md {
margin-left: 20px;
}
.staff-list .import-btn {
position: relative;
}
.staff-list .import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.staff-list .import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
::v-deep .el-tag--info {
max-width: 140px;
overflow: hidden;
......
......@@ -101,36 +101,10 @@
@dialogClose="closePushDialog" />
<!-- 导入更新 -->
<d2-dialog :is-visible="fileVisible"
title="导入"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form ref="fileRuleForm"
label-width="120px"
:model="fileForm"
:rules="fileRules">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input v-model="fileForm.fileName"
readonly />
</el-col>
<el-col class="m-l-md"
:span="4">
<el-button class="import-btn">
导入文件
<input id="fileUpload"
accept=".xlsx,.xls"
class="import-input"
type="file"
@change="importFile($event)">
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<d2-file-import-dialog :is-visible="fileVisible"
title="导入"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport" />
<el-dialog :close-on-click-modal="false"
:show-close="false"
title="提示"
......@@ -280,10 +254,6 @@ export default {
dateVisible: false,
recordInfo: {},
fileVisible: false,
fileForm: {},
fileRules: {
fileName: [{ required: true, message: "请上传文件", trigger: "change" }],
},
dialogVisible: false,
updateStatus: "",
updatePercentage: 0,
......@@ -410,70 +380,25 @@ export default {
// this.$refs.recordTable.refreshTable(false, true)
},
// 上传文件,转码为base64
importFile(e) {
console.log(e, "e");
const file = e.target.files[0];
console.log(file, "file");
if (!file)
return; // 防止取消选择时报错
if (
!file.name.includes(".xlsx")
&& !file.name.includes(".xls")
) {
this.$message({
message: "文件格式不支持",
type: "error",
});
return false;
}
const size = file.size / 1024 / 1024;
// 先清空 input,防止下次无法触发 change
document.getElementById("fileUpload").value = "";
if (size < 10) {
this.$set(this.fileForm, "fileName", file.name);
// // 转码base64
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = (event) => {
this.$set(
this.fileForm,
"fileInfo",
file,
);
// document.getElementById("fileUpload").value = ""
};
} else {
this.notice.errorTips("上传文件不可超过10M");
}
},
handleImport(row) {
this.recordInfo = row;
this.fileForm = {
fileName: "",
};
this.fileVisible = !this.fileVisible;
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate((valid) => {
if (valid) {
this.dialogVisible = true;
const formData = new FormData();
formData.append("file", this.fileForm.fileInfo);
formData.append("key", this.recordInfo.key);
// 调试:打印内容
for (const [key, value] of formData.entries()) {
console.log(key, value);
}
importExcel(formData).then((res) => {
console.log(res, "res");
this.updateStatus = true;
if (res.errId == "-7") {
this.failNum = 1;
this.errMsg = res.message;
}
});
handleConfirmImport({ fileName, fileData }) {
this.dialogVisible = true;
const formData = new FormData();
formData.append("file", fileData);
formData.append("key", this.recordInfo.key);
for (const [key, value] of formData.entries()) {
console.log(key, value);
}
importExcel(formData).then((res) => {
console.log(res, "res");
this.updateStatus = true;
if (res.errId == "-7") {
this.failNum = 1;
this.errMsg = res.message;
}
});
},
......@@ -541,22 +466,6 @@ export default {
font-size: 14px;
color: #999999;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.dialog-content {
text-align: center;
.dialog-tips-big {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!