feiyue.teng

申报数据编辑添加新商品按钮无响应问题修复

......@@ -130,6 +130,31 @@ export function downloadCertificate(id,filename) {
});
});
}
//下载青岛证书
export function downloadQingdaoCertificate(id,filename) {
return new Promise((resolve, reject) => {
var url = baseUrl + '/bus-customer/customers/getQingDaoCertificate/'+id;
request({
url: url,
method: 'get',
responseType: 'blob', // 确保响应类型为 blob
params: id,
})
.then((res) => {
const aLink = document.createElement("a");
aLink.href = URL.createObjectURL(res);
aLink.setAttribute("download", filename); // 设置下载文件名称
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
resolve(res);
})
.catch((err) => {
reject(err);
});
});
}
// 修改客户数据
/**
......
......@@ -144,9 +144,8 @@
<template slot="optionColumn">
<el-table-column align="left" label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="downloadFile(scope.row)" :disabled="!scope.row.certificare">
下载证书
</el-button>
<el-button type="text" @click="downloadFile(scope.row)" :disabled="!scope.row.certificare">下载证书</el-button>
<!-- <el-button type="text" @click="downloadQingdaoFile(scope.row)" :disabled="!scope.row.certificare">下载青岛证书</el-button> -->
<el-button type="text" @click="update(scope.row)"> 修改 </el-button>
</template>
</el-table-column>
......@@ -163,7 +162,7 @@
</template>
<script>
import { getCustomerList,downloadCertificate } from "@/api/system/customer-ai.js";
import { getCustomerList,downloadCertificate, downloadQingdaoCertificate } from "@/api/system/customer-ai.js";
import { getPortList } from "@/api/system/user.js";
import DialogVue from "./dialog.vue";
export default {
......@@ -323,6 +322,15 @@ export default {
this.alertErrorMsg("证书下载失败,请联系管理员!");
})
},
//下载青岛证书
downloadQingdaoFile(val) {
downloadQingdaoCertificate(val.id,val.certificare).then((res)=>{
}).catch((err)=>{
console.log(err);
this.alertErrorMsg("证书下载失败,请联系管理员!");
})
},
addCustomer() {
this.dialogTitle = "新增客户";
this.editType = "add";
......
......@@ -416,7 +416,7 @@
v-for="(item, index) in $store.getters.dict.PACKAGE_TYPE_CODE"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
:value="item.itemCode"
></el-option>
</el-select>
</Formitem>
......@@ -799,10 +799,20 @@
},
methods: {
mapDicDatas(dicArr, code){
return dicArr.filter(item => item.itemCode == code)[0].itemChineseName
if (code != "") {
return dicArr.filter(item => item.itemCode == code)[0].itemChineseName
} else {
return ''
}
},
mapCurrencyDatas(dicArr, code){
return dicArr.filter(item => item.itemValue == code)[0].itemChineseName
if (code != "") {
return dicArr.filter(item => item.itemValue == code)[0].itemChineseName
} else {
return ''
}
},
//获取客户下拉列表数据
queryCustomerList(){
......
......@@ -349,6 +349,7 @@ export default {
})
.finally(() => {
this.$nextTick(() => {
this.$store.dispatch('setLoadingState', false)
this.$refs.returnStatusPopover.tableLoading = false;
});
});
......
......@@ -415,6 +415,7 @@ export default {
})
.finally(() => {
this.$nextTick(() => {
this.$store.dispatch('setLoadingState', false)
this.$refs.returnStatusPopover.tableLoading = false;
});
});
......
......@@ -322,6 +322,7 @@ export default {
})
.finally(() => {
this.$nextTick(() => {
this.$store.dispatch('setLoadingState', false)
this.$refs.returnStatusPopover.tableLoading = false;
});
});
......
......@@ -337,6 +337,7 @@ export default {
})
.finally(() => {
this.$nextTick(() => {
this.$store.dispatch('setLoadingState', false)
this.$refs.returnStatusPopover.tableLoading = false;
});
});
......
......@@ -331,6 +331,7 @@ export default {
})
.finally(() => {
this.$nextTick(() => {
this.$store.dispatch('setLoadingState', false)
this.$refs.returnStatusPopover.tableLoading = false;
});
});
......
......@@ -362,6 +362,7 @@ export default {
})
.finally(() => {
this.$nextTick(() => {
this.$store.dispatch('setLoadingState', false)
this.$refs.returnStatusPopover.tableLoading = false;
});
});
......