Commit 337cabdd authored by zhengke's avatar zhengke
parents f23df9f0 0e2cb29c
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</el-form-item> </el-form-item>
<el-form-item label="上架状态"> <el-form-item label="上架状态">
<el-switch v-model="addMsg.GoodsStatus" active-color="#409EFF" :active-value="1" <el-switch v-model="addMsg.GoodsStatus" active-color="#409EFF" :active-value="1"
:inactive-value="0"> :inactive-value="2">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -1176,8 +1176,8 @@ ...@@ -1176,8 +1176,8 @@
}, },
butionType(val) { butionType(val) {
this.skuList = []; // this.skuList = [];
this.getSkuData([], 0, this.SpecificationList); // this.getSkuData([], 0, this.SpecificationList);
}, },
// 删除规格模板 // 删除规格模板
DeleteggModule(item, index) { DeleteggModule(item, index) {
......
...@@ -68,12 +68,13 @@ ...@@ -68,12 +68,13 @@
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action=""
:http-request="UploadImage"
:file-list="fileList"
accept='doc,.docx,.xlsx,.xls,.pdf,.pem,.p12' accept='doc,.docx,.xlsx,.xls,.pdf,.pem,.p12'
:on-change="handleChange" :action="importFileUrl"
:multiple="false"
:on-success="successUpload"
:file-list="fileList"
:on-remove="handleRemove" :on-remove="handleRemove"
> >
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">点击上传</el-button>
...@@ -108,8 +109,11 @@ ...@@ -108,8 +109,11 @@
WeChatPayCertificate: "", //微信支付证书 WeChatPayCertificate: "", //微信支付证书
WeChatPayPrivateKey: "", //微信支付私钥 WeChatPayPrivateKey: "", //微信支付私钥
WeChatPayCertificateUrl:'',//微信支付证书 WeChatPayCertificateUrl:'',//微信支付证书
}, },
fileList:[], fileList:[],
importFileUrl: this.domainManager().UploadBlob,
rules: { rules: {
MiniAppId: [{ MiniAppId: [{
required: true, required: true,
...@@ -158,11 +162,14 @@ ...@@ -158,11 +162,14 @@
this.appConfig.WeChatApiSecret = res.data.data.WeChatApiSecret; this.appConfig.WeChatApiSecret = res.data.data.WeChatApiSecret;
this.appConfig.WeChatPayCertificate = res.data.data.WeChatPayCertificate; this.appConfig.WeChatPayCertificate = res.data.data.WeChatPayCertificate;
this.appConfig.WeChatPayPrivateKey = res.data.data.WeChatPayPrivateKey; this.appConfig.WeChatPayPrivateKey = res.data.data.WeChatPayPrivateKey;
if(res.data.data.WeChatPayCertificateUrl!=null){
this.appConfig.WeChatPayCertificateUrl = res.data.data.WeChatPayCertificateUrl; this.appConfig.WeChatPayCertificateUrl = res.data.data.WeChatPayCertificateUrl;
this.fileList.push({ this.fileList.push({
name:res.data.data.WeChatPayCertificateUrl.split('com')[1], name:res.data.data.WeChatPayCertificateUrl,
url:res.data.data.WeChatPayCertificateUrl, url:res.data.data.WeChatPayCertificateUrl,
}) })
}
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
...@@ -189,21 +196,14 @@ ...@@ -189,21 +196,14 @@
} }
}) })
}, },
successUpload(file){
UploadImage(file){ let list = [];
this.UploadFileToTencent(this.FileType().GoodsImg, file.file, res => { list.push({
if (res.resultCode == 1) { name:file.data.Path.split('WeChatApp')[1].replace(/[\\]/g, ''),
this.appConfig.WeChatPayCertificateUrl = res.FileUrl; url:file.data.Path.split('WeChatApp')[1].replace(/[\\]/g, ''),
this.fileList.push({
name:res.FileName,
url:res.FileUrl,
})
}
}) })
}, this.fileList = list;
handleChange(file, fileList) { this.appConfig.WeChatPayCertificateUrl = file.data.Path.split('WeChatApp')[1].replace(/[\\]/g, '')
this.fileList = this.fileList.slice(1);
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.fileList = fileList; this.fileList = fileList;
......
...@@ -7,7 +7,11 @@ ...@@ -7,7 +7,11 @@
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-form-item label="分销商等级选择" prop="Grade"> <el-form-item label="分销商等级选择" prop="Grade">
<el-select style="width:500px;" size="small" v-model="addMsg.Grade" placeholder="请选择"> <el-select style="width:500px;" size="small" v-model="addMsg.Grade" placeholder="请选择">
<el-option v-for="(item,index) in 10" :key="index" :label="`等级${index+1}`" :value="index+1"> <el-option v-for="(item,index) in numList"
:key="index" :label="`等级${index+1}`"
:value="item.Id"
:disabled="item.dis"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -88,7 +92,7 @@ ...@@ -88,7 +92,7 @@
data() { data() {
return { return {
addMsg: { addMsg: {
Id: '', Id: 0,
Grade: 1, Grade: 1,
Name: '', Name: '',
IsAutoUpGrade: 1, IsAutoUpGrade: 1,
...@@ -147,13 +151,23 @@ ...@@ -147,13 +151,23 @@
loading: false, loading: false,
tierInfo: {}, tierInfo: {},
gradeList: [], gradeList: [],
disList:[],
numList:[],
}; };
}, },
created() { created() {
this.numList=[]
for(let i=1;i<101;i++){
let obj={
Id:i,
dis:false,
}
this.numList.push(obj)
}
if (this.$route.query.UserId) { if (this.$route.query.UserId) {
this.GradeId = this.$route.query.UserId; this.GradeId = this.$route.query.UserId;
this.getData() this.getData()
this.getDisList();
} }
this.GetTierInfo(); this.GetTierInfo();
...@@ -205,6 +219,18 @@ ...@@ -205,6 +219,18 @@
this.gradeList = res.data.data; this.gradeList = res.data.data;
}) })
}, },
getDisList() {
this.apipost("/api/user/GetDistributorGradeDropdownList", {}, res => {
this.disList = res.data.data;
this.numList.forEach(item=>{
this.disList.forEach(val=>{
if(item.Id==val.Grade){
item.dis=true;
}
})
})
})
},
}, },
mounted() { mounted() {
......
...@@ -54,7 +54,8 @@ export default { ...@@ -54,7 +54,8 @@ export default {
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
let domainUrl = ''; let domainUrl = '';
//domainUrl = "http://192.168.2.214:8200"; //domainUrl = "http://192.168.2.214:8200"
// domainUrl = "http://192.168.2.65";
// domainUrl = "https://localhost:5001"; // domainUrl = "https://localhost:5001";
domainUrl = "http://mallapi.oytour.com"; domainUrl = "http://mallapi.oytour.com";
...@@ -70,7 +71,9 @@ export default { ...@@ -70,7 +71,9 @@ export default {
//常用提交数据URL //常用提交数据URL
PostUrl: domainUrl + "/api/common/post", PostUrl: domainUrl + "/api/common/post",
ImageUrl: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com', ImageUrl: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com',
UploadFileUrl:domainUrl + '/api/File/LocalFileUploadImport' UploadFileUrl:domainUrl + '/api/File/LocalFileUploadImport',
UploadBlob:domainUrl + '/api/File/UploadBlob',
}; };
return obj; return obj;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment