|
@@ -155,43 +155,49 @@
|
|
|
resolve(true)
|
|
|
}
|
|
|
(this as any).$refs.ruleForm.validate((valid:any) => {
|
|
|
- if (valid) {
|
|
|
+ if (valid && (this as any).parentValue.provinceCode) {
|
|
|
resolve(true)
|
|
|
} else {
|
|
|
- if(!parames || !parames.noMsg || !(this as any).parentValue.provinceCode){
|
|
|
+ if(!(this as any).parentValue.provinceCode){
|
|
|
(this as any).byAreaSlot = true;
|
|
|
(this as any).$message({
|
|
|
message: '验证未通过,请检查!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
}
|
|
|
+ if(!parames || !parames.noMsg){
|
|
|
+ (this as any).$message({
|
|
|
+ message: '验证未通过,请检查!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
reject()
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
}
|
|
|
setValue(data: any){
|
|
|
- console.log(data);
|
|
|
- // if(e.name){
|
|
|
+ // console.log(data);
|
|
|
(this as any).$nextTick(()=>{
|
|
|
- var val = (this as any).$lodash.cloneDeep(data);
|
|
|
- (this as any).ruleForm = val;
|
|
|
- (this as any).ruleForm.thirdSysName = 'GEEKPLUS';
|
|
|
- if((this as any).ruleForm.isThird==null){
|
|
|
- (this as any).ruleForm.isThird = 0
|
|
|
- };
|
|
|
- (this as any).$set((this as any).parentValue, 'province', (this as any).ruleForm.province);
|
|
|
- (this as any).$set((this as any).parentValue, 'provinceCode', (this as any).ruleForm.provinceCode);
|
|
|
- (this as any).$set((this as any).parentValue, 'city', (this as any).ruleForm.city);
|
|
|
- (this as any).$set((this as any).parentValue, 'cityCode', (this as any).ruleForm.cityCode);
|
|
|
- (this as any).$set((this as any).parentValue, 'region', (this as any).ruleForm.region);
|
|
|
- (this as any).$set((this as any).parentValue, 'regionCode', (this as any).ruleForm.regionCode);
|
|
|
- (this as any).$set((this as any).parentValue, 'street', (this as any).ruleForm.street);
|
|
|
- (this as any).$set((this as any).parentValue, 'streetCode', (this as any).ruleForm.streetCode);
|
|
|
- (this as any).$refs.byArea.setValue((this as any).parentValue);
|
|
|
- // }else{
|
|
|
- // (this as any).clearValue();
|
|
|
- // }
|
|
|
+ if(JSON.stringify(data)!='{}'&&data){
|
|
|
+ var val = (this as any).$lodash.cloneDeep(data);
|
|
|
+ (this as any).ruleForm = val;
|
|
|
+ (this as any).ruleForm.thirdSysName = 'GEEKPLUS';
|
|
|
+ if((this as any).ruleForm.isThird==null){
|
|
|
+ (this as any).ruleForm.isThird = 0
|
|
|
+ };
|
|
|
+ (this as any).$set((this as any).parentValue, 'province', (this as any).ruleForm.province);
|
|
|
+ (this as any).$set((this as any).parentValue, 'provinceCode', (this as any).ruleForm.provinceCode);
|
|
|
+ (this as any).$set((this as any).parentValue, 'city', (this as any).ruleForm.city);
|
|
|
+ (this as any).$set((this as any).parentValue, 'cityCode', (this as any).ruleForm.cityCode);
|
|
|
+ (this as any).$set((this as any).parentValue, 'region', (this as any).ruleForm.region);
|
|
|
+ (this as any).$set((this as any).parentValue, 'regionCode', (this as any).ruleForm.regionCode);
|
|
|
+ (this as any).$set((this as any).parentValue, 'street', (this as any).ruleForm.street);
|
|
|
+ (this as any).$set((this as any).parentValue, 'streetCode', (this as any).ruleForm.streetCode);
|
|
|
+ (this as any).$refs.byArea.setValue((this as any).parentValue);
|
|
|
+ }else{
|
|
|
+ (this as any).clearValue();
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
//获取数据
|
|
@@ -207,12 +213,12 @@
|
|
|
data.street = (this as any).parentValue.street;
|
|
|
data.streetCode = (this as any).parentValue.streetCode;
|
|
|
|
|
|
- if(data.isThird == 0 || data.isThird == null){
|
|
|
- data.thirdSysName = null;
|
|
|
- data.thirdPartnerId = null;
|
|
|
- data.thirdPartnerName = null;
|
|
|
- data.thirdStorehouseName = null;
|
|
|
- }
|
|
|
+ // if(data.isThird == 0 || data.isThird == null){
|
|
|
+ // data.thirdSysName = null;
|
|
|
+ // data.thirdPartnerId = null;
|
|
|
+ // data.thirdPartnerName = null;
|
|
|
+ // data.thirdStorehouseName = null;
|
|
|
+ // }
|
|
|
|
|
|
return (this as any).$lodash.cloneDeep(data);
|
|
|
}
|
|
@@ -236,10 +242,13 @@
|
|
|
// console.log(v);
|
|
|
(this as any).parentValue = v
|
|
|
if(v.provinceCode){
|
|
|
+ console.log(1);
|
|
|
(this as any).byAreaSlot = false;
|
|
|
}else{
|
|
|
+ console.log(2);
|
|
|
(this as any).byAreaSlot = true;
|
|
|
}
|
|
|
+ console.log((this as any).byAreaSlot);
|
|
|
}
|
|
|
clearValue(){
|
|
|
var ruleForm = {
|