|
@@ -772,13 +772,17 @@
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column title="门头板" min-width="100" :edit-render="{}">
|
|
|
- <!-- <template #default="scope"> -->
|
|
|
+ <template #default="{row,rowIndex}">
|
|
|
+ <div v-if="row.hasOwnProperty('addMTB')">
|
|
|
+ <span v-show="tableData[rowIndex].addMTB">是</span>
|
|
|
+
|
|
|
+ <span v-show="!tableData[rowIndex].addMTB||!tableData[rowIndex].hasOwnProperty('addMTB')">否</span></div>
|
|
|
<!-- {{
|
|
|
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)"
|
|
@@ -795,7 +799,168 @@
|
|
|
<div></div>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column title="原材料名称" min-width="100">
|
|
|
+
|
|
|
+ <vxe-column
|
|
|
+ field="total_num"
|
|
|
+ title="数量"
|
|
|
+ min-width="40"
|
|
|
+ :edit-render="{}"
|
|
|
+ >
|
|
|
+ <template #edit="scope">
|
|
|
+ <Input
|
|
|
+ v-if="!scope.row.is_metal"
|
|
|
+ v-model="scope.row.total_num"
|
|
|
+ @on-change="(e) => changeEditTotalNum(e, scope.row)"
|
|
|
+ />
|
|
|
+ <Input
|
|
|
+ v-else
|
|
|
+ v-model="scope.row.num"
|
|
|
+ @on-change="(e) => changeEditMetalNum(e, scope.row)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.row.is_metal ? scope.row.num : scope.row.total_num }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="unit" title="单位" min-width="20"> </vxe-column>
|
|
|
+ <vxe-column field="num" title="核算数量" min-width="40"> </vxe-column>
|
|
|
+ <vxe-column title="单价" min-width="80" :edit-render="{}">
|
|
|
+ <template #edit="scope">
|
|
|
+ <Input
|
|
|
+ v-if="!scope.row.is_metal"
|
|
|
+ v-model="scope.row.unit_price"
|
|
|
+ @on-change="(e) => handleProductUnit_priceChange(e, scope.row)"
|
|
|
+ />
|
|
|
+ <Input
|
|
|
+ v-else
|
|
|
+ v-model="scope.row.single_price"
|
|
|
+ @on-change="(e) => handleMetailPriceChange(e, scope.row)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #default="scope">
|
|
|
+ {{
|
|
|
+ scope.row.is_metal
|
|
|
+ ? scope.row.single_price
|
|
|
+ : scope.row.unit_price
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column title="附加项" min-width="150" :edit-render="{}">
|
|
|
+ <template #edit="scope">
|
|
|
+ <div>
|
|
|
+ <div
|
|
|
+ v-for="(ext_detail, idx) in scope.row.extArray"
|
|
|
+ :key="ext_detail.ext_id"
|
|
|
+ :style="
|
|
|
+ idx != scope.row.extArray.length - 1
|
|
|
+ ? {
|
|
|
+ borderBottom: '1px solid #e8eaec',
|
|
|
+ padding: '10px 0',
|
|
|
+ }
|
|
|
+ : { padding: '10px 0' }
|
|
|
+ "
|
|
|
+ v-show="ext_detail.type == 2"
|
|
|
+ >
|
|
|
+ <Select
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ transfer
|
|
|
+ label-in-value
|
|
|
+ size="small"
|
|
|
+ v-model="ext_detail.id"
|
|
|
+ @on-change="(e) => changeEditExt(ext_detail, e, scope.row)"
|
|
|
+ style="width: 100px"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="item of extList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.title"
|
|
|
+ :value="item.id"
|
|
|
+ ></Option>
|
|
|
+ </Select>
|
|
|
+ <Icon
|
|
|
+ style="'margin:0 5px"
|
|
|
+ @click="handleExtraAdd(scope.row.extArray, 2)"
|
|
|
+ color="#32C800"
|
|
|
+ size="20"
|
|
|
+ type="ios-add-circle"
|
|
|
+ />
|
|
|
+ <Icon
|
|
|
+ @click="
|
|
|
+ handleExtraDele(
|
|
|
+ scope.row.extArray,
|
|
|
+ ext_detail,
|
|
|
+ idx,
|
|
|
+ scope.row
|
|
|
+ )
|
|
|
+ "
|
|
|
+ color="#FF5E5C"
|
|
|
+ v-show="scope.row.extArray.length > 1"
|
|
|
+ size="20"
|
|
|
+ type="md-remove-circle"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #default="scope">
|
|
|
+ <Tooltip
|
|
|
+ max-width="600"
|
|
|
+ transfer
|
|
|
+ placement="right"
|
|
|
+ v-if="!scope.row.is_metal"
|
|
|
+ >
|
|
|
+ <span slot="content">
|
|
|
+ <div
|
|
|
+ v-for="(_item, _index) in scope.row.extArray"
|
|
|
+ :key="_item.ext_id + 'ext' + _index"
|
|
|
+ v-show="_item.type == 2"
|
|
|
+ >
|
|
|
+ <div style="display:flex;justify-content: space-between;">
|
|
|
+ <div style="width:120px">
|
|
|
+ {{
|
|
|
+ extList.filter((v) => v.id == _item.ext_id).length > 0
|
|
|
+ ? extList.filter((v) => v.id == _item.ext_id)[0]
|
|
|
+ .title
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div style="width:80px">数量:{{ _item.num }}</div>
|
|
|
+ <div style="width:100px">单价:{{ _item.price }}</div>
|
|
|
+ <div style="width:120px">
|
|
|
+ 金额:{{ _item.num * 1 * _item.price }}
|
|
|
+ </div>
|
|
|
+ <div style="width:160px">备注:{{ _item.remark }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ {{
|
|
|
+ scope.row.extArray
|
|
|
+ ? scope.row.extArray
|
|
|
+ .filter((v) => v.type == 2)
|
|
|
+ .map((v) => v.title)
|
|
|
+ .join("/")
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </Tooltip>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <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>
|
|
|
+ <vxe-column title="总金额" min-width="60">
|
|
|
+ <template #default="scope"
|
|
|
+ >{{ scope.row.is_metal ? scope.row.price : scope.row.price }}
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column title="原材料名称" min-width="100">
|
|
|
<template #default="scope">
|
|
|
<div v-if="!scope.row.is_metal">
|
|
|
<div
|
|
@@ -970,166 +1135,6 @@
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column
|
|
|
- field="total_num"
|
|
|
- title="数量"
|
|
|
- min-width="80"
|
|
|
- :edit-render="{}"
|
|
|
- >
|
|
|
- <template #edit="scope">
|
|
|
- <Input
|
|
|
- v-if="!scope.row.is_metal"
|
|
|
- v-model="scope.row.total_num"
|
|
|
- @on-change="(e) => changeEditTotalNum(e, scope.row)"
|
|
|
- />
|
|
|
- <Input
|
|
|
- v-else
|
|
|
- v-model="scope.row.num"
|
|
|
- @on-change="(e) => changeEditMetalNum(e, scope.row)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #default="scope">
|
|
|
- {{ scope.row.is_metal ? scope.row.num : scope.row.total_num }}
|
|
|
- </template>
|
|
|
- </vxe-column>
|
|
|
- <vxe-column field="unit" title="单位" min-width="70"> </vxe-column>
|
|
|
- <vxe-column field="num" title="核算数量" min-width="40"> </vxe-column>
|
|
|
- <vxe-column title="单价" min-width="80" :edit-render="{}">
|
|
|
- <template #edit="scope">
|
|
|
- <Input
|
|
|
- v-if="!scope.row.is_metal"
|
|
|
- v-model="scope.row.unit_price"
|
|
|
- @on-change="(e) => handleProductUnit_priceChange(e, scope.row)"
|
|
|
- />
|
|
|
- <Input
|
|
|
- v-else
|
|
|
- v-model="scope.row.single_price"
|
|
|
- @on-change="(e) => handleMetailPriceChange(e, scope.row)"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #default="scope">
|
|
|
- {{
|
|
|
- scope.row.is_metal
|
|
|
- ? scope.row.single_price
|
|
|
- : scope.row.unit_price
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </vxe-column>
|
|
|
- <vxe-column title="附加项" min-width="150" :edit-render="{}">
|
|
|
- <template #edit="scope">
|
|
|
- <div>
|
|
|
- <div
|
|
|
- v-for="(ext_detail, idx) in scope.row.extArray"
|
|
|
- :key="ext_detail.ext_id"
|
|
|
- :style="
|
|
|
- idx != scope.row.extArray.length - 1
|
|
|
- ? {
|
|
|
- borderBottom: '1px solid #e8eaec',
|
|
|
- padding: '10px 0',
|
|
|
- }
|
|
|
- : { padding: '10px 0' }
|
|
|
- "
|
|
|
- v-show="ext_detail.type == 2"
|
|
|
- >
|
|
|
- <Select
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- transfer
|
|
|
- label-in-value
|
|
|
- size="small"
|
|
|
- v-model="ext_detail.id"
|
|
|
- @on-change="(e) => changeEditExt(ext_detail, e, scope.row)"
|
|
|
- style="width: 100px"
|
|
|
- >
|
|
|
- <Option
|
|
|
- v-for="item of extList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.title"
|
|
|
- :value="item.id"
|
|
|
- ></Option>
|
|
|
- </Select>
|
|
|
- <Icon
|
|
|
- style="'margin:0 5px"
|
|
|
- @click="handleExtraAdd(scope.row.extArray, 2)"
|
|
|
- color="#32C800"
|
|
|
- size="20"
|
|
|
- type="ios-add-circle"
|
|
|
- />
|
|
|
- <Icon
|
|
|
- @click="
|
|
|
- handleExtraDele(
|
|
|
- scope.row.extArray,
|
|
|
- ext_detail,
|
|
|
- idx,
|
|
|
- scope.row
|
|
|
- )
|
|
|
- "
|
|
|
- color="#FF5E5C"
|
|
|
- v-show="scope.row.extArray.length > 1"
|
|
|
- size="20"
|
|
|
- type="md-remove-circle"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #default="scope">
|
|
|
- <Tooltip
|
|
|
- max-width="600"
|
|
|
- transfer
|
|
|
- placement="right"
|
|
|
- v-if="!scope.row.is_metal"
|
|
|
- >
|
|
|
- <span slot="content">
|
|
|
- <div
|
|
|
- v-for="(_item, _index) in scope.row.extArray"
|
|
|
- :key="_item.ext_id + 'ext' + _index"
|
|
|
- v-show="_item.type == 2"
|
|
|
- >
|
|
|
- <div style="display:flex;justify-content: space-between;">
|
|
|
- <div style="width:120px">
|
|
|
- {{
|
|
|
- extList.filter((v) => v.id == _item.ext_id).length > 0
|
|
|
- ? extList.filter((v) => v.id == _item.ext_id)[0]
|
|
|
- .title
|
|
|
- : ""
|
|
|
- }}
|
|
|
- </div>
|
|
|
- <div style="width:80px">数量:{{ _item.num }}</div>
|
|
|
- <div style="width:100px">单价:{{ _item.price }}</div>
|
|
|
- <div style="width:120px">
|
|
|
- 金额:{{ _item.num * 1 * _item.price }}
|
|
|
- </div>
|
|
|
- <div style="width:160px">备注:{{ _item.remark }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </span>
|
|
|
- {{
|
|
|
- scope.row.extArray
|
|
|
- ? scope.row.extArray
|
|
|
- .filter((v) => v.type == 2)
|
|
|
- .map((v) => v.title)
|
|
|
- .join("/")
|
|
|
- : ""
|
|
|
- }}
|
|
|
- </Tooltip>
|
|
|
- </template>
|
|
|
- </vxe-column>
|
|
|
- <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>
|
|
|
- <vxe-column title="总金额" min-width="60">
|
|
|
- <template #default="scope"
|
|
|
- >{{ scope.row.is_metal ? scope.row.price : scope.row.price }}
|
|
|
- </template>
|
|
|
- </vxe-column>
|
|
|
- <vxe-column
|
|
|
field="remark"
|
|
|
title="备注"
|
|
|
min-width="100"
|
|
@@ -1307,8 +1312,8 @@
|
|
|
<div label="线条:" style="margin-left:20px;width:95%">
|
|
|
<div style="font-size:20px">
|
|
|
<span>线条:</span>
|
|
|
- <span>{{ print_line_data === "" ? "无" : print_line_data }}</span>
|
|
|
- <!-- <span v-if="wood_title_count.length < 1">无</span>
|
|
|
+ <!-- <span>{{ print_line_data === "" ? "无" : print_line_data }}</span> -->
|
|
|
+ <span v-if="wood_title_count.length < 1">无</span>
|
|
|
<span
|
|
|
v-else
|
|
|
v-for="(item, index) in wood_title_count"
|
|
@@ -1319,7 +1324,7 @@
|
|
|
<span v-show="_index < item.measure_str.length - 1">;</span>
|
|
|
</span>
|
|
|
<span v-show="index < wood_title_count.length - 1">;</span>
|
|
|
- </span> -->
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div label="合计:" style="margin-left:20px;width:95%">
|
|
@@ -1764,7 +1769,7 @@
|
|
|
v-for="item of element.change"
|
|
|
:key="item.id"
|
|
|
:label="item.part_title || item.title"
|
|
|
- :value="item.id"
|
|
|
+ :value="typeof(item.id) == 'string'?item.part_id:item.id"
|
|
|
></Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
@@ -1830,11 +1835,11 @@
|
|
|
:key="idx + '555' + element.part_id"
|
|
|
:label="process_detail.name + ':'"
|
|
|
v-show="
|
|
|
- !element.is_metal &&
|
|
|
+ (!element.is_metal &&
|
|
|
element.hide_process &&
|
|
|
!element.hide_process.filter(
|
|
|
(v) => v == process_detail.id
|
|
|
- ).length > 0
|
|
|
+ ).length > 0)||element.addMTB
|
|
|
"
|
|
|
>
|
|
|
<Tooltip style="width: 120px" transfer>
|
|
@@ -1885,7 +1890,7 @@
|
|
|
>拆分</Button
|
|
|
>
|
|
|
<Button
|
|
|
- @click="handlePartsDele(element, idx, modalData.part)"
|
|
|
+ @click="handlePartsDele(element, idx, modalData)"
|
|
|
type="primary"
|
|
|
v-else
|
|
|
v-show="!isCheck"
|
|
@@ -1926,7 +1931,7 @@
|
|
|
style="width: 80px"
|
|
|
/>
|
|
|
</FormItem>
|
|
|
- <FormItem label="面积">
|
|
|
+ <FormItem label="面积(m²)" :label-width='80'>
|
|
|
<Input
|
|
|
@on-change='changeNum(element, idx, modalData)'
|
|
|
size="small"
|
|
@@ -2245,6 +2250,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ lineData:[],
|
|
|
ext_sum:0,
|
|
|
MTBtotal:0,
|
|
|
currency_edit_index: null,
|
|
@@ -2670,8 +2676,8 @@ export default {
|
|
|
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;
|
|
|
+ row.MTBsize = (1*row.long*row.wide)/1000000>=0.3?(1*row.long*row.wide)/1000000:0.3;
|
|
|
+ arr.part[index].MTBsize = (1*row.long*row.wide)/1000000>=0.3?(1*row.long*row.wide)/1000000:0.3;
|
|
|
// arr.part[index].MTBtotal = arr.part[index].MTBsize*arr.part[index].MTBnum*arr.part[index].MTBprice*1
|
|
|
this.changeNum(row,index,arr)
|
|
|
}
|
|
@@ -2682,10 +2688,10 @@ export default {
|
|
|
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;
|
|
|
+ row.MTBtotal = (row.MTBnum*1*row.MTBsize*row.MTBprice).toFixed(2)
|
|
|
+ arr.part[index].MTBtotal = (row.MTBnum*1*row.MTBsize*row.MTBprice).toFixed(2)
|
|
|
+ this.MTBtotal = arr.part[index].MTBtotal*1
|
|
|
+ arr.ext_price = this.ext_sum*1 + this.MTBtotal*1;
|
|
|
arr.price =
|
|
|
(arr.unit_price * 1 || 0) * (arr.num * 1 || 1) +
|
|
|
(arr.over_price * 1 || 0) +
|
|
@@ -2695,7 +2701,7 @@ export default {
|
|
|
}else{
|
|
|
return
|
|
|
}
|
|
|
- console.log(row)
|
|
|
+
|
|
|
},
|
|
|
quoteRoughDraft() {
|
|
|
this.axios
|
|
@@ -2828,7 +2834,7 @@ export default {
|
|
|
v.material_id = v.product_id;
|
|
|
v.ext_id = v.product_id;
|
|
|
});
|
|
|
- console.log(sendList);
|
|
|
+
|
|
|
sendList.length > 0 &&
|
|
|
sendList.map((element, index) => {
|
|
|
element.ext = element.extArray;
|
|
@@ -2843,7 +2849,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- console.log(2);
|
|
|
+
|
|
|
if (!element.measurement) {
|
|
|
element.measurement = "";
|
|
|
}
|
|
@@ -3002,7 +3008,7 @@ export default {
|
|
|
if (elem.type == 1) {
|
|
|
elem.total_num = elem.num;
|
|
|
elem.unit_price = elem.price;
|
|
|
- elem.ext_price = elem.num * elem.price;
|
|
|
+ elem.ext_price = elem.num * elem.price*1;
|
|
|
elem.is_metal = true;
|
|
|
// element.part.push(elem);
|
|
|
} else {
|
|
@@ -3219,13 +3225,14 @@ export default {
|
|
|
this.handleCalcCount();
|
|
|
this.showEditProduct = false;
|
|
|
this.$forceUpdate();
|
|
|
- console.log(this.tableData)
|
|
|
+
|
|
|
},
|
|
|
onCancel: () => {},
|
|
|
});
|
|
|
},
|
|
|
// 合计 、 线条 统计价格
|
|
|
handleCalcCount(type) {
|
|
|
+ console.log(this.tableData,1);
|
|
|
let sum = 0;
|
|
|
this.parts_title_count = [];
|
|
|
this.wood_title_count = [];
|
|
@@ -3437,6 +3444,7 @@ export default {
|
|
|
this.support_remark.push(val);
|
|
|
},
|
|
|
handleMTBClick(row) {
|
|
|
+ console.log(row)
|
|
|
row.addMTB = true;
|
|
|
const _obj = {
|
|
|
is_metal: false,
|
|
@@ -3449,6 +3457,7 @@ export default {
|
|
|
wide: "",
|
|
|
high: "",
|
|
|
hide_measure: [],
|
|
|
+ part_title:'',
|
|
|
process: [],
|
|
|
part_id: '', //门头板ID 没有part_id 通过选择框来确定part_id 就是id
|
|
|
hide_process: ["1", "2", "3"],
|
|
@@ -3470,6 +3479,8 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
};
|
|
|
+ console.log(this.process_obj)
|
|
|
+ _obj.process = JSON.parse(JSON.stringify(this.process_obj))
|
|
|
row.part.push(_obj);
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
@@ -3905,7 +3916,7 @@ export default {
|
|
|
if (elem.type == 1) {
|
|
|
elem.total_num = elem.num;
|
|
|
elem.unit_price = elem.price;
|
|
|
- elem.ext_price = elem.num * elem.price;
|
|
|
+ elem.ext_price = elem.num * elem.price*1;
|
|
|
elem.is_metal = true;
|
|
|
element.part.push(elem);
|
|
|
if (!element.extra) {
|
|
@@ -3999,7 +4010,6 @@ 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("请先选择客户");
|
|
@@ -4039,7 +4049,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;
|
|
@@ -4072,6 +4082,7 @@ export default {
|
|
|
this.showEditProduct = true;
|
|
|
// }
|
|
|
}
|
|
|
+ console.log(this.modalData.part)
|
|
|
break;
|
|
|
case 3:
|
|
|
this.$Modal.confirm({
|
|
@@ -4088,7 +4099,7 @@ export default {
|
|
|
obj = this.deepClone(row);
|
|
|
obj.isCopied = true;
|
|
|
if (row.is_metal) {
|
|
|
- console.log(`123`, 123);
|
|
|
+
|
|
|
} else {
|
|
|
obj.position = "";
|
|
|
obj.measure.map((v) => {
|
|
@@ -4175,7 +4186,7 @@ export default {
|
|
|
this.$Message.error(err.msg || "上传失败");
|
|
|
},
|
|
|
onProgress(e) {
|
|
|
- console.log(e);
|
|
|
+
|
|
|
},
|
|
|
//导入成功
|
|
|
uploadSuccess(res) {
|
|
@@ -4237,7 +4248,7 @@ export default {
|
|
|
return (sum += v.total_price * 1);
|
|
|
});
|
|
|
this.ext_sum = sum
|
|
|
- item.ext_price = this.ext_sum +this.MTBtotal;
|
|
|
+ item.ext_price = this.ext_sum +this.MTBtotal*1;
|
|
|
item.price =
|
|
|
(item.unit_price * 1 || 0) * (item.num * 1 || 1) +
|
|
|
(item.over_price * 1 || 0) +
|
|
@@ -4254,7 +4265,7 @@ export default {
|
|
|
sum2 += element.total_price * 1 || 0;
|
|
|
});
|
|
|
this.ext_sum = sum2*1
|
|
|
- item.ext_price = this.ext_sum +this.MTBtotal;
|
|
|
+ item.ext_price = this.ext_sum +this.MTBtotal*1;
|
|
|
item.price =
|
|
|
(item.unit_price * 1 || 0) * (item.num * 1 || 1) +
|
|
|
(item.over_price * 1 || 0) +
|
|
@@ -4273,7 +4284,26 @@ export default {
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
handlePartsDele(element, index, array) {
|
|
|
- array.splice(index, 1);
|
|
|
+
|
|
|
+ // let data = JSON.parse(JSON.stringify(this.tableData));
|
|
|
+ // data.splice(data.length-1,1);
|
|
|
+ // let state = false;
|
|
|
+ // data.forEach((v,idx)=>{
|
|
|
+ // v.part.forEach(m=>{
|
|
|
+
|
|
|
+ // if(m.part_title.indexOf('门头板')<0){
|
|
|
+
|
|
|
+ // return state=true
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
+ // if(state){
|
|
|
+
|
|
|
+ // this.tableData[0].addMTB = false;
|
|
|
+ // console.log(this.tableData)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ array.part.splice(index, 1);
|
|
|
this.handleCalcCount();
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
@@ -4307,7 +4337,7 @@ export default {
|
|
|
modalData.extArray.map((v) => {
|
|
|
return (sum += v.total_price * 1);
|
|
|
});
|
|
|
- modalData.ext_price = sum;
|
|
|
+ modalData.ext_price = sum*1;
|
|
|
modalData.price =
|
|
|
(modalData.unit_price * 1 || 0) * (modalData.num * 1 || 1) +
|
|
|
(modalData.over_price * 1 || 0) +
|
|
@@ -4344,6 +4374,7 @@ export default {
|
|
|
this.handleCalcCount();
|
|
|
},
|
|
|
changeEditMeasure(e, row, measure) {
|
|
|
+
|
|
|
if (e.target.value) {
|
|
|
row.isEdit = true;
|
|
|
row.measure.map((v) => {
|
|
@@ -4411,11 +4442,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleSelectProductMetail(row, rowIndex, $event, scope) {
|
|
|
+
|
|
|
if ($event) {
|
|
|
const arr = $event.tag.split("_");
|
|
|
let obj = {};
|
|
|
// 分类 1产品 2五金
|
|
|
if (arr[1] == "1") {
|
|
|
+
|
|
|
obj = {
|
|
|
isCopied: row.isCopied,
|
|
|
select_all_id: $event.value,
|
|
@@ -4478,6 +4511,25 @@ export default {
|
|
|
this.changeEditMetal(obj, rowIndex, $event, scope);
|
|
|
}
|
|
|
this.HandleAutoCreateNewLine();
|
|
|
+ // let data = [];
|
|
|
+
|
|
|
+ // data = this.tableData;
|
|
|
+ // data.splice(this.tableData.length-1,1)
|
|
|
+
|
|
|
+ // data.forEach(v=>{
|
|
|
+ // console.log(v)
|
|
|
+ // let arr = [];
|
|
|
+ // v.part.forEach(m=>{
|
|
|
+ // console.log(2)
|
|
|
+ // let obj = {};
|
|
|
+ // if(m.part_title.indexOf('线条')>=0){
|
|
|
+ // obj = m;
|
|
|
+ // }
|
|
|
+ // arr.push(obj)
|
|
|
+ // })
|
|
|
+ // this.lineData = [...arr]
|
|
|
+ // })
|
|
|
+ // console.log(this.lineData)
|
|
|
}
|
|
|
},
|
|
|
changeEditTableData(row, rowIndex, $event, scope) {
|
|
@@ -4493,6 +4545,7 @@ export default {
|
|
|
custom_id: this.info.custom_id,
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
+ console.log(res)
|
|
|
this.process_match_list = res.data.process.list;
|
|
|
this.process_all_list = res.data.process_list;
|
|
|
this.support_remark = Array.from(
|
|
@@ -4500,9 +4553,10 @@ export default {
|
|
|
);
|
|
|
this.bpp_list.map((v) => (row[v.id] = ""));
|
|
|
this.measure_total.map((v) => (row[v.e_title] = ""));
|
|
|
+ row.addMTB = res.data.addMTB?res.data.addMTB:false;
|
|
|
row.url = res.data.url;
|
|
|
row.total_num = res.data.total_num || 1;
|
|
|
- row.ext_price = res.data.ext_price || 0;
|
|
|
+ row.ext_price = res.data.ext_price*1 || 0;
|
|
|
row.unit_price = res.data.price || 0;
|
|
|
row.num = res.data.num || 1;
|
|
|
row.over_price = res.data.over_price || 0;
|
|
@@ -4664,7 +4718,7 @@ export default {
|
|
|
this.pre_process_obj = JSON.parse(JSON.stringify(_temp_obj));
|
|
|
this.modalData.url = res.data.url;
|
|
|
this.modalData.total_num = res.data.total_num || 1;
|
|
|
- this.modalData.ext_price = res.data.ext_price || 0;
|
|
|
+ this.modalData.ext_price = res.data.ext_price*1 || 0;
|
|
|
this.modalData.unit_price = res.data.price || 0;
|
|
|
this.modalData.num = res.data.num || 1;
|
|
|
this.modalData.over_price = res.data.over_price || 0;
|
|
@@ -4856,7 +4910,7 @@ export default {
|
|
|
this.process_all_list = res.data.process_list;
|
|
|
//获取产品
|
|
|
this.modalData.total_num = res.data.total_num || 1;
|
|
|
- this.modalData.ext_price = res.data.ext_price || 0;
|
|
|
+ this.modalData.ext_price = res.data.ext_price*1 || 0;
|
|
|
this.modalData.unit_price = res.data.price || 0;
|
|
|
this.modalData.num = res.data.num || 1;
|
|
|
this.modalData.num_temp_save = res.data.num || 1;
|
|
@@ -4944,7 +4998,7 @@ export default {
|
|
|
v.material_detail_list[0].material_detail_id;
|
|
|
v.material_detail_num = 1;
|
|
|
});
|
|
|
- part.MTBsize = res.data.long*res.data.wide*1;
|
|
|
+ part.MTBsize = (res.data.long*res.data.wide*1)/1000000>=0.3?(res.data.long*res.data.wide*1)/1000000:0.3;
|
|
|
part.MTBnum = res.data.MTBnum?res.data.MTBnum:0;
|
|
|
part.MTBprice = res.data.MTBprice?res.data.MTBprice:0;
|
|
|
part.part_id = part.change_id;
|
|
@@ -4953,13 +5007,14 @@ export default {
|
|
|
part.high = res.data.high;
|
|
|
part.wide = res.data.wide;
|
|
|
part.route_id = res.data.route_id;
|
|
|
- part.process = res.data.process;
|
|
|
+ part.part_title = res.data.part_title;
|
|
|
+ // part.process = res.data.process;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
handlePartChange($event, row, measure, product_num) {
|
|
|
- console.log(row)
|
|
|
+
|
|
|
if (row.addMTB) {
|
|
|
this.handeMTBSelection($event, row);
|
|
|
} else {
|
|
@@ -5114,10 +5169,11 @@ export default {
|
|
|
(product.over_price * 1 || 0) +
|
|
|
(product.ext_price * 1 || 0);
|
|
|
product.price = product.price.toFixed(2);
|
|
|
+ this.
|
|
|
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) +
|
|
@@ -5138,7 +5194,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) +
|
|
@@ -5280,7 +5336,7 @@ export default {
|
|
|
product.part.map((v) => {
|
|
|
if (match_item.e_title == "H") {
|
|
|
if (
|
|
|
- match_item.max > v.long * 1 + product["H"] * 1 &&
|
|
|
+ match_item.max >= v.long * 1 + product["H"] * 1 &&
|
|
|
match_item.min <= v.long * 1 + product["H"] * 1
|
|
|
) {
|
|
|
part_arr &&
|
|
@@ -5295,10 +5351,12 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
+
|
|
|
if (
|
|
|
- match_item.max > product[match_item.e_title] &&
|
|
|
+ match_item.max >= product[match_item.e_title] &&
|
|
|
match_item.min <= product[match_item.e_title]
|
|
|
) {
|
|
|
+
|
|
|
part_arr &&
|
|
|
part_arr.part_detail &&
|
|
|
part_arr.part_detail.map((v) => {
|
|
@@ -5314,7 +5372,7 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
if (
|
|
|
- match_item.max > product[match_item.e_title] &&
|
|
|
+ match_item.max >= product[match_item.e_title] &&
|
|
|
match_item.min <= product[match_item.e_title]
|
|
|
) {
|
|
|
part_arr &&
|
|
@@ -5414,13 +5472,13 @@ export default {
|
|
|
let flag_wide = false;
|
|
|
for (let index = 0; index < product.measure.length; index++) {
|
|
|
const item = product.measure[index];
|
|
|
- if (element.high.indexOf(item.measureCalc) != -1) {
|
|
|
+ if (element.high.toString().indexOf(item.measureCalc) != -1) {
|
|
|
flag_high = true;
|
|
|
}
|
|
|
- if (element.long.indexOf(item.measureCalc) != -1) {
|
|
|
+ if (element.long.toString().indexOf(item.measureCalc) != -1) {
|
|
|
flag_long = true;
|
|
|
}
|
|
|
- if (element.wide.indexOf(item.measureCalc) != -1) {
|
|
|
+ if (element.wide.toString().indexOf(item.measureCalc) != -1) {
|
|
|
flag_wide = true;
|
|
|
}
|
|
|
}
|