|
@@ -772,13 +772,13 @@
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column title="门头板" min-width="100" :edit-render="{}">
|
|
|
- <template #default="scope">
|
|
|
+ <!-- <template #default="scope"> -->
|
|
|
<!-- {{
|
|
|
scope.row.part.filter(
|
|
|
(v) => v.part_title && v.part_title.indexOf("门头板")
|
|
|
)[0].part_title
|
|
|
}} -->
|
|
|
- </template>
|
|
|
+ <!-- </template> -->
|
|
|
<template #edit="scope">
|
|
|
<div>
|
|
|
<a v-if="!scope.row.addMTB" @click="handleMTBClick(scope.row)"
|
|
@@ -1113,10 +1113,14 @@
|
|
|
</Tooltip>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column title="附加金额" min-width="40">
|
|
|
+ <vxe-column title="附加金额" min-width="40" :edit-render="{}">
|
|
|
<template #default="scope"
|
|
|
>{{ scope.row.is_metal ? scope.row.price : scope.row.ext_price }}
|
|
|
</template>
|
|
|
+ <template #edit="scope">
|
|
|
+ <Input v-if="!scope.row.is_metal" v-model="scope.row.ext_price" @on-change='(e) =>changeExtPrice(e, scope.row)'/>
|
|
|
+ <span v-else></span>
|
|
|
+ </template>
|
|
|
</vxe-column>
|
|
|
<vxe-column field="over_price" title="超标金额" min-width="40">
|
|
|
</vxe-column>
|
|
@@ -1777,6 +1781,8 @@
|
|
|
clearable
|
|
|
:disabled="isCheck"
|
|
|
v-model="element.long"
|
|
|
+ @on-focus='longFocus(idx)'
|
|
|
+ @on-change='changeHigh(element,idx,modalData)'
|
|
|
@on-blur="handleIsSpecialPart(modalData, element)"
|
|
|
style="width: 50px"
|
|
|
placeholder="请输入高"
|
|
@@ -1793,6 +1799,8 @@
|
|
|
<Input
|
|
|
size="small"
|
|
|
clearable
|
|
|
+ @on-focus='wideFocus(idx)'
|
|
|
+ @on-change='changeHigh(element,idx,modalData)'
|
|
|
:disabled="isCheck"
|
|
|
v-model="element.wide"
|
|
|
style="width: 50px"
|
|
@@ -1810,6 +1818,7 @@
|
|
|
<Input
|
|
|
size="small"
|
|
|
clearable
|
|
|
+ @on-focus='highFocus(idx)'
|
|
|
:disabled="isCheck"
|
|
|
v-model="element.high"
|
|
|
style="width: 50px"
|
|
@@ -1898,6 +1907,8 @@
|
|
|
}}</Button
|
|
|
>
|
|
|
</FormItem>
|
|
|
+ <!-- 门头板信息 -->
|
|
|
+
|
|
|
<div
|
|
|
:class="[
|
|
|
'part_detail_form',
|
|
@@ -1905,6 +1916,43 @@
|
|
|
]"
|
|
|
:data-index="idx"
|
|
|
>
|
|
|
+ <div v-show="element.addMTB" style="padding-left:46px">
|
|
|
+ <FormItem label="数量">
|
|
|
+ <Input
|
|
|
+ size="small"
|
|
|
+ @on-focus='numFocus(idx)'
|
|
|
+ @on-change='changeNum(element, idx, modalData)'
|
|
|
+ v-model="element.MTBnum"
|
|
|
+ style="width: 80px"
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="面积">
|
|
|
+ <Input
|
|
|
+ @on-change='changeNum(element, idx, modalData)'
|
|
|
+ size="small"
|
|
|
+ v-model="element.MTBsize"
|
|
|
+ style="width: 80px"
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="单价">
|
|
|
+ <Input
|
|
|
+ @on-focus='priceFocus(idx)'
|
|
|
+ @on-change='changeNum(element, idx, modalData)'
|
|
|
+ size="small"
|
|
|
+ v-model="element.MTBprice"
|
|
|
+ style="width: 80px"
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="金额">
|
|
|
+ <Input
|
|
|
+ disabled
|
|
|
+ class="price"
|
|
|
+ size="small"
|
|
|
+ v-model="element.MTBtotal"
|
|
|
+ style="width: 80px;"
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
<FormItem>
|
|
|
<div
|
|
|
v-for="(ele, idx) in element.part_detail"
|
|
@@ -2197,6 +2245,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ ext_sum:0,
|
|
|
+ MTBtotal:0,
|
|
|
currency_edit_index: null,
|
|
|
measure_total: [],
|
|
|
part_type_total: [],
|
|
@@ -2600,6 +2650,53 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ numFocus(idx){
|
|
|
+ this.modalData.part[idx].MTBnum = '';
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ priceFocus(idx){
|
|
|
+ this.modalData.part[idx].MTBprice = '';
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ longFocus(idx){
|
|
|
+ this.modalData.part[idx].long = '';
|
|
|
+ },
|
|
|
+ wideFocus(idx){
|
|
|
+ this.modalData.part[idx].wide = '';
|
|
|
+ },
|
|
|
+ highFocus(idx){
|
|
|
+ this.modalData.part[idx].high = '';
|
|
|
+ },
|
|
|
+ changeHigh(row,index,arr){
|
|
|
+ if(row.addMTB){
|
|
|
+ if(row.long&&row.wide){
|
|
|
+ row.MTBsize = 1*row.long*row.wide;
|
|
|
+ arr.part[index].MTBsize = 1*row.long*row.wide;
|
|
|
+ // arr.part[index].MTBtotal = arr.part[index].MTBsize*arr.part[index].MTBnum*arr.part[index].MTBprice*1
|
|
|
+ this.changeNum(row,index,arr)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeNum(row,index,arr){
|
|
|
+ if(row.MTBnum&&row.MTBsize&&row.MTBprice){
|
|
|
+
|
|
|
+ row.MTBtotal = row.MTBnum*1*row.MTBsize*row.MTBprice
|
|
|
+ arr.part[index].MTBtotal = row.MTBnum*1*row.MTBsize*row.MTBprice
|
|
|
+ this.MTBtotal = arr.part[index].MTBtotal
|
|
|
+ arr.ext_price = this.ext_sum + this.MTBtotal;
|
|
|
+ arr.price =
|
|
|
+ (arr.unit_price * 1 || 0) * (arr.num * 1 || 1) +
|
|
|
+ (arr.over_price * 1 || 0) +
|
|
|
+ (arr.ext_price * 1 || 0);
|
|
|
+ arr.price = arr.price.toFixed(2);
|
|
|
+ this.$forceUpdate();
|
|
|
+ }else{
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log(row)
|
|
|
+ },
|
|
|
quoteRoughDraft() {
|
|
|
this.axios
|
|
|
.post("/api/update/get_table", {
|
|
@@ -3122,6 +3219,7 @@ export default {
|
|
|
this.handleCalcCount();
|
|
|
this.showEditProduct = false;
|
|
|
this.$forceUpdate();
|
|
|
+ console.log(this.tableData)
|
|
|
},
|
|
|
onCancel: () => {},
|
|
|
});
|
|
@@ -3342,6 +3440,7 @@ export default {
|
|
|
row.addMTB = true;
|
|
|
const _obj = {
|
|
|
is_metal: false,
|
|
|
+ addMTB: true,
|
|
|
isBP: false,
|
|
|
isChoosed: false,
|
|
|
change_id: "",
|
|
@@ -3351,7 +3450,7 @@ export default {
|
|
|
high: "",
|
|
|
hide_measure: [],
|
|
|
process: [],
|
|
|
- part_id: 25, //门头板ID
|
|
|
+ part_id: '', //门头板ID 没有part_id 通过选择框来确定part_id 就是id
|
|
|
hide_process: ["1", "2", "3"],
|
|
|
part_detail: [
|
|
|
{
|
|
@@ -3900,6 +3999,7 @@ export default {
|
|
|
(v) => ((obj[v.id] = ""), (obj.procedure_properties[v.id] = ""))
|
|
|
);
|
|
|
this.tableData.push(obj);
|
|
|
+ console.log(this.tableData)
|
|
|
this.$forceUpdate();
|
|
|
} else {
|
|
|
this.$Message.warning("请先选择客户");
|
|
@@ -3939,6 +4039,7 @@ export default {
|
|
|
this.title_state = 2;
|
|
|
this.isCheck = false;
|
|
|
if (this.type == 1) {
|
|
|
+ console.log(row)
|
|
|
this.showEditProduct = true;
|
|
|
this.modalData = JSON.parse(JSON.stringify(row));
|
|
|
this.currencyIndex = index;
|
|
@@ -4135,7 +4236,8 @@ export default {
|
|
|
item.extArray.map((v) => {
|
|
|
return (sum += v.total_price * 1);
|
|
|
});
|
|
|
- item.ext_price = sum;
|
|
|
+ this.ext_sum = sum
|
|
|
+ item.ext_price = this.ext_sum +this.MTBtotal;
|
|
|
item.price =
|
|
|
(item.unit_price * 1 || 0) * (item.num * 1 || 1) +
|
|
|
(item.over_price * 1 || 0) +
|
|
@@ -4151,7 +4253,8 @@ export default {
|
|
|
item.extArray.forEach((element) => {
|
|
|
sum2 += element.total_price * 1 || 0;
|
|
|
});
|
|
|
- item.ext_price = sum2 * 1;
|
|
|
+ this.ext_sum = sum2*1
|
|
|
+ item.ext_price = this.ext_sum +this.MTBtotal;
|
|
|
item.price =
|
|
|
(item.unit_price * 1 || 0) * (item.num * 1 || 1) +
|
|
|
(item.over_price * 1 || 0) +
|
|
@@ -4515,6 +4618,7 @@ export default {
|
|
|
element.measureCalc = element.e_title;
|
|
|
});
|
|
|
this.tableData.splice(rowIndex, 1, row);
|
|
|
+
|
|
|
this.handleClearExtInfo(row, this.pre_bp_id, res.data.bp_id);
|
|
|
row.get_first_data = false;
|
|
|
this.handleCalcCount();
|
|
@@ -4834,12 +4938,16 @@ export default {
|
|
|
})
|
|
|
.then((res) => {
|
|
|
this.modalData.part.map((part) => {
|
|
|
- if (part.part_id === 25) {
|
|
|
+ if (part.addMTB) {
|
|
|
res.data.sub_part.map((v) => {
|
|
|
v.material_detail_id =
|
|
|
v.material_detail_list[0].material_detail_id;
|
|
|
v.material_detail_num = 1;
|
|
|
});
|
|
|
+ part.MTBsize = res.data.long*res.data.wide*1;
|
|
|
+ part.MTBnum = res.data.MTBnum?res.data.MTBnum:0;
|
|
|
+ part.MTBprice = res.data.MTBprice?res.data.MTBprice:0;
|
|
|
+ part.part_id = part.change_id;
|
|
|
part.part_detail = res.data.sub_part;
|
|
|
part.long = res.data.long;
|
|
|
part.high = res.data.high;
|
|
@@ -4851,7 +4959,8 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handlePartChange($event, row, measure, product_num) {
|
|
|
- if (row.part_id === 25) {
|
|
|
+ console.log(row)
|
|
|
+ if (row.addMTB) {
|
|
|
this.handeMTBSelection($event, row);
|
|
|
} else {
|
|
|
if ($event) {
|
|
@@ -5007,6 +5116,17 @@ export default {
|
|
|
product.price = product.price.toFixed(2);
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
+ changeExtPrice(e, product){
|
|
|
+ console.log(e)
|
|
|
+ product.ext_price = e.target.value * 1;
|
|
|
+ product.price =
|
|
|
+ (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
|
|
|
+ (product.over_price * 1 || 0) +
|
|
|
+ (product.ext_price * 1 || 0);
|
|
|
+ product.price = product.price.toFixed(2);
|
|
|
+ this.handleCalcCount();
|
|
|
+
|
|
|
+ },
|
|
|
handleProductUnit_priceChange(e, product) {
|
|
|
product.unit_price = e.target.value * 1;
|
|
|
product.price =
|
|
@@ -5018,6 +5138,7 @@ export default {
|
|
|
// this.$forceUpdate();
|
|
|
},
|
|
|
handleProductExt_priceChange(e, product) {
|
|
|
+ console.log(product)
|
|
|
product.ext_price = e.target.value * 1;
|
|
|
product.price =
|
|
|
(product.unit_price * 1 || 0) * (product.num * 1 || 1) +
|
|
@@ -5062,7 +5183,7 @@ export default {
|
|
|
change.push({
|
|
|
old_id: item.org_part_id || item.part_id,
|
|
|
new_id: item.change.filter((v) => v.id == item.change_id)[0]
|
|
|
- .part_id,
|
|
|
+ .part_id||item.part_id,
|
|
|
});
|
|
|
});
|
|
|
let list = product.process_obj.map((item) => {
|
|
@@ -5889,4 +6010,8 @@ export default {
|
|
|
/deep/.vxe-table--render-default .vxe-cell {
|
|
|
padding: 0;
|
|
|
}
|
|
|
+
|
|
|
+/deep/.price .ivu-input[disabled]{
|
|
|
+ color: black;
|
|
|
+}
|
|
|
</style>
|