|
@@ -515,8 +515,8 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="分佣方式" prop="brokerageType" disabled>
|
|
|
|
|
- <el-radio-group v-model="form.brokerageType">
|
|
|
|
|
|
|
+ <el-form-item label="分佣方式" prop="brokerageType">
|
|
|
|
|
+ <el-radio-group v-model="form.brokerageType" disabled>
|
|
|
<el-radio label="1" >每盒</el-radio>
|
|
<el-radio label="1" >每盒</el-radio>
|
|
|
<el-radio label="2" >总价</el-radio>
|
|
<el-radio label="2" >总价</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -915,9 +915,68 @@ export default {
|
|
|
};
|
|
};
|
|
|
this.resetForm('form')
|
|
this.resetForm('form')
|
|
|
},
|
|
},
|
|
|
|
|
+ //所有的日期控件校验
|
|
|
|
|
+ checkDate(){
|
|
|
|
|
+ const currentDate = new Date();
|
|
|
|
|
+ //营业执照证
|
|
|
|
|
+ const businessLicenseExpireEndDate = new Date(this.form.businessLicenseExpire[1]);
|
|
|
|
|
+ if (businessLicenseExpireEndDate < currentDate) {
|
|
|
|
|
+ this.$message.warning('营业执照证已过期,无法提交');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ //药品经营许
|
|
|
|
|
+ const drugLicenseExpiryEndDate = new Date(this.form.drugLicenseExpiry[1]);
|
|
|
|
|
+ if (drugLicenseExpiryEndDate < currentDate) {
|
|
|
|
|
+ this.$message.warning('药品经营许可证已过期,无法提交');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ //2类
|
|
|
|
|
+ if(!!this.form.medicalDevice2 && !this.medicalDevice2ExpiryValue){
|
|
|
|
|
+ if(!this.form.medicalDevice2Expiry){
|
|
|
|
|
+ this.$message.warning('2类医疗器械备案有效期不为空!');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ const medicalDevice2ExpiryEndDate = new Date(this.form.medicalDevice2Expiry[1]);
|
|
|
|
|
+ if (medicalDevice2ExpiryEndDate < currentDate) {
|
|
|
|
|
+ this.$message.warning('2类医疗器械可证已过期,无法提交');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ //3类医疗器械备案
|
|
|
|
|
+ if(!!this.form.medicalDevice3 && !this.medicalDevice3ExpiryValue){
|
|
|
|
|
+ if(!this.form.medicalDevice3Expiry){
|
|
|
|
|
+ this.$message.warning('3类医疗器械备案有效期不为空!');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ const medicalDevice3ExpiryEndDate = new Date(this.form.medicalDevice3Expiry[1]);
|
|
|
|
|
+ if (medicalDevice3ExpiryEndDate < currentDate) {
|
|
|
|
|
+ this.$message.warning('3类医疗器械可证已过期,无法提交');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ //食品经营许可证
|
|
|
|
|
+ if(!!this.form.foodLicense && !this.foodLicenseExpiryValue){
|
|
|
|
|
+ if(!this.form.foodLicenseExpiry){
|
|
|
|
|
+ this.$message.warning('食品经营许可证/备案凭证有效期不为空!');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ const foodLicenseExpiryEndDate = new Date(this.form.foodLicenseExpiry[1]);
|
|
|
|
|
+ if (foodLicenseExpiryEndDate < currentDate) {
|
|
|
|
|
+ this.$message.warning('食品经营许可证/备案凭证已过期,无法提交');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+ },
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+ if(!this.checkDate()){
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
// 营业执照是必填项,直接进行校验
|
|
// 营业执照是必填项,直接进行校验
|
|
|
businessLicenseCheck({ imageUrl: this.form.businessLicense }).then(checkResponse => {
|
|
businessLicenseCheck({ imageUrl: this.form.businessLicense }).then(checkResponse => {
|
|
|
if (checkResponse.data.flag === false) {
|
|
if (checkResponse.data.flag === false) {
|
|
@@ -1015,13 +1074,11 @@ export default {
|
|
|
updateStore(formData).then(response => {
|
|
updateStore(formData).then(response => {
|
|
|
this.msgSuccess('修改成功')
|
|
this.msgSuccess('修改成功')
|
|
|
this.open = false
|
|
this.open = false
|
|
|
- this.getList()
|
|
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
addStore(formData).then(response => {
|
|
addStore(formData).then(response => {
|
|
|
this.msgSuccess('新增成功')
|
|
this.msgSuccess('新增成功')
|
|
|
this.open = false
|
|
this.open = false
|
|
|
- this.getList()
|
|
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|