|
|
@@ -103,6 +103,7 @@
|
|
|
description : "{{$owner->description ?? ''}}",
|
|
|
waring_line_on : "{{$owner->waring_line_on ?? ''}}",
|
|
|
subjection : "{{$owner->subjection ?? ''}}",
|
|
|
+ is_tax_exist : "{{$owner->is_tax_exist}}"=='Y',
|
|
|
},
|
|
|
ownerTemp : {},
|
|
|
customers : [
|
|
|
@@ -489,7 +490,7 @@
|
|
|
if (!this.owner.owner_group_id) error["owner_group_id"] = ["必须选择项目小组"];
|
|
|
if (!this.owner.warehouse_id) error["warehouse_id"] = ["必须选择仓库"];
|
|
|
if (!this.owner.user_workgroup_id) error["user_workgroup_id"] = ["必须选择仓库小组"];
|
|
|
- if (!this.owner.tax_rate_id) error["tax_rate_id"] = ["必须选择税率"];
|
|
|
+ //if (!this.owner.tax_rate_id) error["tax_rate_id"] = ["必须选择税率"];
|
|
|
if (JSON.stringify(error) !== "{}"){
|
|
|
this.errors = error;
|
|
|
return;
|
|
|
@@ -505,6 +506,7 @@
|
|
|
params.waring_line_on !== old.waring_line_on ||
|
|
|
params.phone_number !== old.phone_number ||
|
|
|
params.subjection !== old.subjection ||
|
|
|
+ params.is_tax_exist !== old.is_tax_exist ||
|
|
|
params.description !== old.description){
|
|
|
let result = undefined;
|
|
|
window.tempTip.postBasicRequest(url,params,res=>{
|
|
|
@@ -525,6 +527,7 @@
|
|
|
this.ownerTemp.customer_name = params.customer_name;
|
|
|
this.ownerTemp.owner_group_name = params.owner_group_name;
|
|
|
this.ownerTemp.subjection = params.subjection;
|
|
|
+ this.ownerTemp.is_tax_exist = params.is_tax_exist;
|
|
|
result = true;
|
|
|
});
|
|
|
while (result){
|
|
|
@@ -741,12 +744,8 @@
|
|
|
this.errors = {time_unit_id:["未选择计时单位"]};
|
|
|
return;
|
|
|
}
|
|
|
- if(this.owner.tax_rate_id && this.model.system.tax_rate_id){
|
|
|
- this.errors = {tax_rate_id:["总项税率已存在"]};
|
|
|
- return;
|
|
|
- }
|
|
|
- if(!this.owner.tax_rate_id && !this.model.system.tax_rate_id){
|
|
|
- this.errors = {tax_rate_id:["总项税率不存在,子项税率必填"]};
|
|
|
+ if(this.owner.is_tax_exist && !this.model.system.tax_rate_id){
|
|
|
+ this.errors = {tax_rate_id:["税率不可为空"]};
|
|
|
return;
|
|
|
}
|
|
|
let url = "{{url('maintenance/priceModel/apiStoreSystem')}}";
|
|
|
@@ -774,8 +773,7 @@
|
|
|
if (!this.model.storage.discount_type)error["discount_type"] = ["未选择减免类型"];
|
|
|
if (!this.model.storage.unit_id)error["unit_id"] = ["未选择单位"];
|
|
|
if (!this.model.storage.time_unit_id)error["time_unit_id"] = ["未选择计时单位"];
|
|
|
- if(this.owner.tax_rate_id && this.model.storage.tax_rate_id)error = {tax_rate_id:["总项税率已存在"]};
|
|
|
- if(!this.owner.tax_rate_id && !this.model.storage.tax_rate_id)error = {tax_rate_id:["总项税率不存在,子项税率必填"]};
|
|
|
+ if(this.owner.is_tax_exist && !this.model.storage.tax_rate_id)error = {tax_rate_id:["税率不可为空"]};
|
|
|
if (this.model.storage.isInterval){
|
|
|
if (this.model.storage.amount_interval.length<1 || this.model.storage.price.length<1){
|
|
|
error["amount_interval.0"] = ["未设定数量区间"];
|
|
|
@@ -850,11 +848,8 @@
|
|
|
this.$set(this.errors,"name",["名称不得为空"]);
|
|
|
return;
|
|
|
}
|
|
|
- if(this.owner.tax_rate_id && this.model.operation.tax_rate_id){
|
|
|
- this.error = {tax_rate_id:["总项税率已存在"]};return;
|
|
|
- }
|
|
|
- if(!this.owner.tax_rate_id && !this.model.operation.tax_rate_id){
|
|
|
- this.error = {tax_rate_id:["总项税率不存在,子项税率必填"]};return;
|
|
|
+ if(this.owner.is_tax_exist && !this.model.operation.tax_rate_id){
|
|
|
+ this.error = {tax_rate_id:["税率不可为空"]};return;
|
|
|
}
|
|
|
if (this.model.operation.isDiscount){
|
|
|
let sign = false;
|
|
|
@@ -978,8 +973,7 @@
|
|
|
if (!this.model.express.name)error.name = ["名称不得为空"];
|
|
|
if (!this.model.express.initial_weight)error.initial_weight = ["首重不得为空"];
|
|
|
if (!this.model.express.additional_weight)error.additional_weight = ["续重不得为空"];
|
|
|
- if(this.owner.tax_rate_id && this.model.express.tax_rate_id)error = {tax_rate_id:["总项税率已存在"]};
|
|
|
- if(!this.owner.tax_rate_id && !this.model.express.tax_rate_id)error = {tax_rate_id:["总项税率不存在,子项税率必填"]};
|
|
|
+ if(this.owner.is_tax_exist && !this.model.express.tax_rate_id)error = {tax_rate_id:["税率不可为空,子项税率必填"]};
|
|
|
if (this.model.express.items.length>0){
|
|
|
this.model.express.items.forEach((item,index)=>{
|
|
|
if (!item.province_id)error["item."+index+".province_id"] = ["不存在"];
|
|
|
@@ -1071,8 +1065,7 @@
|
|
|
if (!this.model.logistic.unit_range) error.unit_range = ["区间值不得为空"];
|
|
|
if (!this.model.logistic.other_unit_id) error.other_unit_id = ["单位二不得为空"];
|
|
|
if (!this.model.logistic.other_unit_range) error.other_unit_range = ["区间值不得为空"];
|
|
|
- if(this.owner.tax_rate_id && this.model.logistic.tax_rate_id)error = {tax_rate_id:["总项税率已存在"]};
|
|
|
- if(!this.owner.tax_rate_id && !this.model.logistic.tax_rate_id)error = {tax_rate_id:["总项税率不存在,子项税率必填"]};
|
|
|
+ if(this.owner.is_tax_exist && !this.model.logistic.tax_rate_id)error = {tax_rate_id:["税率不可为空"]};
|
|
|
if (JSON.stringify(error) !== "{}"){
|
|
|
this.errors = error;
|
|
|
return;
|
|
|
@@ -1113,8 +1106,7 @@
|
|
|
let error = {};
|
|
|
if (!this.model.directLogistic.name) error.name = ["名称不得为空"];
|
|
|
if (!this.model.directLogistic.base_km) error.base_km = ["起步公里数不得为空"];
|
|
|
- if(this.owner.tax_rate_id && this.model.directLogistic.tax_rate_id)error = {tax_rate_id:["总项税率已存在"]};
|
|
|
- if(!this.owner.tax_rate_id && !this.model.directLogistic.tax_rate_id)error = {tax_rate_id:["总项税率不存在,子项税率必填"]};
|
|
|
+ if(this.owner.is_tax_exist && !this.model.directLogistic.tax_rate_id)error = {tax_rate_id:["税率不可为空"]};
|
|
|
if (JSON.stringify(error) !== "{}"){
|
|
|
this.errors = error;
|
|
|
return;
|