|
@@ -8,10 +8,10 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="rate">
|
|
|
<!-- <el-col :span="24" class="tip"><span>关于长途运费:若是改成 他运且想根据设置的不同方式进行计算 需要重新生成订单,目前还无法处理这种情况</span></el-col> -->
|
|
|
- <el-col :span="6" class="rateMoney">税前应收:{{ cost1 }}</el-col>
|
|
|
- <el-col :span="6" class="rateMoney">税后应收:{{ cost2 }}</el-col>
|
|
|
- <el-col :span="6" class="rateMoney">税前实收:{{ cost3 }}</el-col>
|
|
|
- <el-col :span="6" class="rateMoney">税后应收:{{ cost4 }}</el-col>
|
|
|
+ <el-col :span="6" class="rateMoney">税前应收:{{ cost.cost1 }}</el-col>
|
|
|
+ <el-col :span="6" class="rateMoney">税后应收:{{ cost.cost2 }}</el-col>
|
|
|
+ <el-col :span="6" class="rateMoney">税前实收:{{ cost.cost3 }}</el-col>
|
|
|
+ <el-col :span="6" class="rateMoney">税后应收:{{ cost.cost4 }}</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="12" class="form">
|
|
|
<el-form ref="form" :model="detailForm" label-width="90px">
|
|
@@ -197,24 +197,24 @@ export default {
|
|
|
//税率列表
|
|
|
rateList: [],
|
|
|
//方式列表
|
|
|
- wayoptions: [],
|
|
|
- cost1: 0,
|
|
|
- cost2: 0,
|
|
|
- cost3: 0,
|
|
|
- cost4: 0,
|
|
|
- name: '',
|
|
|
- treatyValue: '',
|
|
|
- routeValue: '',
|
|
|
- wayValue: '',
|
|
|
- priceOptions: [],
|
|
|
- prNumber: '',
|
|
|
wayList: [],
|
|
|
- //单价列表
|
|
|
- priceList: [],
|
|
|
- number1: 0,
|
|
|
- weight: 0,
|
|
|
- volume: 0,
|
|
|
- projectObj: {},
|
|
|
+ // cost1: 0,
|
|
|
+ // cost2: 0,
|
|
|
+ // cost3: 0,
|
|
|
+ // cost4: 0,
|
|
|
+ cost: {},
|
|
|
+ name: '',
|
|
|
+ // treatyValue: '',
|
|
|
+ // routeValue: '',
|
|
|
+ // wayValue: '',
|
|
|
+ // priceList: [],
|
|
|
+ // number1: 0,
|
|
|
+ // weight: 0,
|
|
|
+ // volume: 0,
|
|
|
+ // projectObj: {},
|
|
|
+ // priceOptions: [],
|
|
|
+ // prNumber: '',
|
|
|
+ // wayoptions: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -253,9 +253,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//查项目
|
|
|
- async searchProject() {
|
|
|
- let goods = this.detailForm.goods;
|
|
|
- const res = await this.projectQuery({ treaty: this.treatyValue });
|
|
|
+ async searchProject(data) {
|
|
|
+ // let goods = this.detailForm.goods;
|
|
|
+ // console.log(goods);
|
|
|
+ // const res = await this.projectQuery({ treaty: this.treatyValue });
|
|
|
+ const res = await this.projectQuery({ treaty: data });
|
|
|
// if (res.data.length == 0) {
|
|
|
// this.projectList = [];
|
|
|
// this.routeList = [];
|
|
@@ -271,8 +273,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//查线路
|
|
|
- async searchRoute() {
|
|
|
- const res = await this.routeQuery({ item: this.routeValue });
|
|
|
+ async searchRoute(data) {
|
|
|
+ const res = await this.routeQuery({ item: data });
|
|
|
if (res.data.length == 0) {
|
|
|
this.routeList = [];
|
|
|
this.detailForm.route = '';
|
|
@@ -282,9 +284,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//查计费方式列表
|
|
|
- async searchWay() {
|
|
|
+ async searchWay(data) {
|
|
|
let test1 = [];
|
|
|
- const res = await this.modeQuery({ route: this.wayValue });
|
|
|
+ const res = await this.modeQuery({ route: data });
|
|
|
// console.log(res.data);
|
|
|
if (res) {
|
|
|
this.$set(this, `wayList`, res.data);
|
|
@@ -373,10 +375,10 @@ export default {
|
|
|
num7 = _.round(num7 + Number(val.sq_ss), 2);
|
|
|
num8 = _.round(num8 + val.sh_ss, 2);
|
|
|
}
|
|
|
- this.$set(this, `cost1`, _.round(num1 + num5, 2));
|
|
|
- this.$set(this, `cost2`, _.round(num2 + num6, 2));
|
|
|
- this.$set(this, `cost3`, _.round(num3 + num7, 2));
|
|
|
- this.$set(this, `cost4`, _.round(num4 + num8, 2));
|
|
|
+ this.$set(this.cost, `cost1`, _.round(num1 + num5, 2));
|
|
|
+ this.$set(this.cost, `cost2`, _.round(num2 + num6, 2));
|
|
|
+ this.$set(this.cost, `cost3`, _.round(num3 + num7, 2));
|
|
|
+ this.$set(this.cost, `cost4`, _.round(num4 + num8, 2));
|
|
|
},
|
|
|
//税前应收
|
|
|
inputChange(val, index) {
|
|
@@ -414,8 +416,9 @@ export default {
|
|
|
},
|
|
|
//合同改变
|
|
|
async treayChange(data, mm) {
|
|
|
- this.treatyValue = data;
|
|
|
- await this.searchProject();
|
|
|
+ // this.treatyValue = data;
|
|
|
+ // console.log(data);
|
|
|
+ await this.searchProject(data);
|
|
|
if (mm) return;
|
|
|
this.detailForm.item = '';
|
|
|
this.detailForm.route = '';
|
|
@@ -434,8 +437,8 @@ export default {
|
|
|
},
|
|
|
//项目改变 项目改变就有税率
|
|
|
async projectChange(data, mm) {
|
|
|
- this.$set(this, `routeValue`, data);
|
|
|
- await this.searchRoute();
|
|
|
+ // this.$set(this, `routeValue`, data);
|
|
|
+ await this.searchRoute(data);
|
|
|
const res = this.projectList.find(f => f.id == data);
|
|
|
if (res) {
|
|
|
const { taxes } = res;
|
|
@@ -461,8 +464,8 @@ export default {
|
|
|
},
|
|
|
//线路改变
|
|
|
async routeChange(data, type) {
|
|
|
- this.wayValue = data;
|
|
|
- await this.searchWay();
|
|
|
+ // this.wayValue = data;
|
|
|
+ await this.searchWay(data);
|
|
|
if (type) return;
|
|
|
for (let item of this.detailForm.goods) {
|
|
|
item.mode = '';
|