提交 3139d880 编写于 作者: changdi.hao's avatar changdi.hao

Merge branch 'testing/inspect' into 'release'

Testing/inspect

See merge request com.pica.cloud.education.frontend/pica.cloud.web-education-admin!471
......@@ -184,7 +184,7 @@
/>
</div>
<div class="space-between flex-c">
<div>法人姓名:{{ detail.legalName }}</div>
<div>法人姓名:{{ detail.legalName }}</div>
<div>法人身份证号:{{ detail.legalCertNo }}</div>
<div>
法人身份证有效日期:{{ detail.legalValidDateBegin }}
......
......@@ -1176,6 +1176,23 @@
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="送检地址管理" class="warehouseAdress-wrap" v-if="formData.storeType < 3">
<p class="warehouseAdress-tip">(该地址用于机构回寄样本地址,请准确填写)</p>
<el-button type="success" class="warehouseAdress-add" size="small" v-if="!formData.tradeStoreDetectionAddress.receiverMobile" @click="createDetectionAdress(0)">+新增地址</el-button>
<div class="detectionAddress" v-if="formData.tradeStoreDetectionAddress && formData.tradeStoreDetectionAddress.receiverMobile">
<div class="warehouseAdress-item">
<span class="warehouseAdress-main">
<span class="warehouseAdress-msg">{{formData.tradeStoreDetectionAddress.receiver}}</span>
<span class="warehouseAdress-msg">{{formData.tradeStoreDetectionAddress.receiverMobile}}</span>
<span class="warehouseAdress-msg">{{setAddress(formData.tradeStoreDetectionAddress)}}</span>
</span>
<span class="warehouseAdress-do">
<el-button class="btn-small" @click.prevent="createDetectionAdress(1)">编辑</el-button>
<el-button class="btn-small" @click.prevent="deleteDetectionAdress">删除</el-button>
</span>
</div>
</div>
</el-form-item>
<el-form-item label="退货支持的物流公司" class="required-label" v-if="formData.storeType < 3">
<el-radio-group v-model="formData.expressLimitFlag" @change="changeExpressLimitFlag">
<el-radio :label="0">无限制</el-radio>
......@@ -1436,6 +1453,7 @@ export default {
imgUrlC1Date:'',
repotList:[//仓库地址
],
tradeStoreDetectionAddress:{}, // 送检地址
selectedKey: '', //默认收货地址
expressLimitFlag: 0, //是否限制物流公司
repotExpressList:[], //支持的物流公司
......@@ -1699,6 +1717,7 @@ export default {
orgScopeLIST:[],
certifyStatus: '',
idCardError:false,
isDetection:false, // 是否是创建送检地址
};
},
computed: {
......@@ -1844,13 +1863,14 @@ export default {
storeType,
storeOwner,
storePhone,
storeQualityUrl
storeQualityUrl,
} = this.storeData.tradeStore;
this.formData.storeLogo = storeLogo;
this.formData.storeName = storeName;
this.formData.storeQualityUrl=storeQualityUrl;
this.formData.storeDescription = storeDescription;
this.formData.storeType = storeType;
this.formData.tradeStoreDetectionAddress = this.storeData.tradeStoreDetectionAddress || {}
if (storeType == 1) {
this.formData.compainName = storeOwner;
this.formData.phoneNum = storePhone;
......@@ -2615,9 +2635,58 @@ export default {
}
this.formData.adminList.splice(index, 1);
},
// 创建或编辑地址 type
// 创建地址
createDetectionAdress(type){
this.isDetection = true;
this.warehouseAdressType = type;
this.warehouseAdressFormTitle = type ? '编辑地址' : '添加地址';
this.warehouseAdressIndex = 0;
if (type) {
this.formData.tradeStoreDetectionAddress.addr = this.formData.tradeStoreDetectionAddress.address;
Object.assign(this.warehouseAdressForm,this.formData.tradeStoreDetectionAddress);
this.getCitiesList();
this.getCountiesList();
this.getTownsList();
} else {
this.warehouseAdressForm = {
receiver: '',
receiverMobile: '',
provinceId: '',
cityId: '',
countyId: '',
townId: '',
provinceName: '',
cityName: '',
countyName: '',
townName: '',
addr: '',
address:'',
key: ''
}
}
this.warehouseAdressFormVisible = true;
},
deleteDetectionAdress(){
this.$confirm('确定要删除这条地址信息么?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '',
type: 'error'
}).then(() => {
this.formData.tradeStoreDetectionAddress = {}
this.$message({
type: 'success',
message: '删除成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
// 编辑第几条数据 index
createAdress(type,index) {
this.isDetection = false;
this.warehouseAdressType = type;
this.warehouseAdressFormTitle = type ? '编辑地址' : '添加地址';
this.warehouseAdressIndex = type ? index : '';
......@@ -2805,12 +2874,18 @@ export default {
const { repotList } = this.formData;
this.$refs['warehouseAdressForm'].validate((valid) => {
if (valid) {
if (warehouseAdressType) {
if(this.isDetection){ // 送检地址
this.formData.tradeStoreDetectionAddress = JSON.parse(JSON.stringify(warehouseAdressForm))
this.formData.tradeStoreDetectionAddress.address = this.formData.tradeStoreDetectionAddress.addr
} else { // 仓库地址
if (warehouseAdressType) {
repotList[warehouseAdressIndex] = JSON.parse(JSON.stringify(warehouseAdressForm));
} else {
warehouseAdressForm.key = repotList.length + Math.round(Math.random()*1000);
repotList.push(JSON.parse(JSON.stringify(warehouseAdressForm)));
} else {
warehouseAdressForm.key = repotList.length + Math.round(Math.random()*1000);
repotList.push(JSON.parse(JSON.stringify(warehouseAdressForm)));
}
}
this.$message({
type: 'success',
message: `${warehouseAdressFormTitle}成功!`
......@@ -2829,7 +2904,8 @@ export default {
// 格式化地址
setAddress(arg) {
let townName = arg.townName || '';
return arg.provinceName + arg.cityName + arg.countyName + townName + arg.addr;
console.log(arg,arg.addr, arg.address);
return arg.provinceName + arg.cityName + arg.countyName + townName + (arg.addr || arg.address);
},
// 获取退货物流
getCompanyList() {
......@@ -3225,7 +3301,7 @@ export default {
color: #FFFFFF;
border-color: #449284;
}
.warehouseAdress-list {
.warehouseAdress-list,.detectionAddress {
display: block;
margin-top: 20px;
border: 1px solid #DCDFE6;
......@@ -3276,6 +3352,12 @@ export default {
}
}
}
.detectionAddress{
padding: 0;
height: 50px;
line-height: 50px;
overflow-y: hidden;
}
}
.warehouseAdress-input {
width: 500px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册