|
@@ -211,6 +211,13 @@
|
|
|
max-height="500px"
|
|
max-height="500px"
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
|
align="center"
|
|
align="center"
|
|
|
|
|
+ :tooltip-config="{contentMethod:({row,column})=>{
|
|
|
|
|
+ if(column.title==='附加项'){
|
|
|
|
|
+ return ''
|
|
|
|
|
+ }
|
|
|
|
|
+ }}"
|
|
|
|
|
+ show-footer
|
|
|
|
|
+ :footer-method="footerMethod"
|
|
|
:column-config="{resizable: true}"
|
|
:column-config="{resizable: true}"
|
|
|
:edit-config="type == 3 ? {} : { trigger: 'click', mode: 'row' }">
|
|
:edit-config="type == 3 ? {} : { trigger: 'click', mode: 'row' }">
|
|
|
<!-- ///////////////////////////////////////////////////////////////////////////////////////////// -->
|
|
<!-- ///////////////////////////////////////////////////////////////////////////////////////////// -->
|
|
@@ -273,16 +280,11 @@
|
|
|
label-in-value
|
|
label-in-value
|
|
|
v-model="row.select_all_id"
|
|
v-model="row.select_all_id"
|
|
|
@on-change="
|
|
@on-change="
|
|
|
- handleSelectProductMetail(
|
|
|
|
|
- row,
|
|
|
|
|
- rowIndex,
|
|
|
|
|
- $event,
|
|
|
|
|
- scope
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ handleSelectProductMaterial($event,rowIndex)
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
|
<Option
|
|
<Option
|
|
|
- v-for="item in product_metailList"
|
|
|
|
|
|
|
+ v-for="item in product_materialList"
|
|
|
:tag="item.key"
|
|
:tag="item.key"
|
|
|
:value="item.key"
|
|
:value="item.key"
|
|
|
:label="item.title"
|
|
:label="item.title"
|
|
@@ -291,19 +293,7 @@
|
|
|
</Select>
|
|
</Select>
|
|
|
</template>
|
|
</template>
|
|
|
<template #default="{ row }">{{
|
|
<template #default="{ row }">{{
|
|
|
- row.is_metal
|
|
|
|
|
- ? getSelectedLabel(
|
|
|
|
|
- row.select_all_id,
|
|
|
|
|
- product_metailList,
|
|
|
|
|
- "key",
|
|
|
|
|
- "title"
|
|
|
|
|
- )
|
|
|
|
|
- : getSelectedLabel(
|
|
|
|
|
- row.select_all_id,
|
|
|
|
|
- product_metailList,
|
|
|
|
|
- "key",
|
|
|
|
|
- "title"
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ row.select_all_title
|
|
|
}}</template>
|
|
}}</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
|
|
|
|
@@ -447,19 +437,13 @@
|
|
|
<vxe-column field="total_num" title="数量" min-width="80" :edit-render="{}"
|
|
<vxe-column field="total_num" title="数量" min-width="80" :edit-render="{}"
|
|
|
>
|
|
>
|
|
|
<template #edit="scope">
|
|
<template #edit="scope">
|
|
|
- <Input
|
|
|
|
|
- v-if="!scope.row.is_metal"
|
|
|
|
|
|
|
+ <Input
|
|
|
v-model="scope.row.total_num"
|
|
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)"
|
|
@on-change="(e) => changeEditMetalNum(e, scope.row)"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- {{ scope.row.is_metal ? scope.row.num : scope.row.total_num }}
|
|
|
|
|
|
|
+ {{scope.row.total_num }}
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
<!-- ///////////////////////////////////////////////////////////////////////// -->
|
|
<!-- ///////////////////////////////////////////////////////////////////////// -->
|
|
@@ -512,7 +496,7 @@
|
|
|
label-in-value
|
|
label-in-value
|
|
|
size="small"
|
|
size="small"
|
|
|
v-model="ext_detail.id"
|
|
v-model="ext_detail.id"
|
|
|
- @on-change="(e) => changeEditExt(ext_detail, e, scope.row,scope.row.extArray,idx)"
|
|
|
|
|
|
|
+ @on-change="(e) => changeEditExt(e,idx,scope.rowIndex)"
|
|
|
style="width: 100px"
|
|
style="width: 100px"
|
|
|
>
|
|
>
|
|
|
<Option
|
|
<Option
|
|
@@ -533,9 +517,7 @@
|
|
|
@click="
|
|
@click="
|
|
|
handleExtraDele(
|
|
handleExtraDele(
|
|
|
scope.row.extArray,
|
|
scope.row.extArray,
|
|
|
- ext_detail,
|
|
|
|
|
- idx,
|
|
|
|
|
- scope.row
|
|
|
|
|
|
|
+ idx
|
|
|
)
|
|
)
|
|
|
"
|
|
"
|
|
|
color="#FF5E5C"
|
|
color="#FF5E5C"
|
|
@@ -544,7 +526,7 @@
|
|
|
type="md-remove-circle"
|
|
type="md-remove-circle"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<Tooltip
|
|
<Tooltip
|
|
@@ -562,10 +544,7 @@
|
|
|
<div style="display:flex;justify-content: space-between;">
|
|
<div style="display:flex;justify-content: space-between;">
|
|
|
<div style="width:120px">
|
|
<div style="width:120px">
|
|
|
{{
|
|
{{
|
|
|
- extList.filter((v) => v.id == _item.ext_id).length > 0
|
|
|
|
|
- ? extList.filter((v) => v.id == _item.ext_id)[0]
|
|
|
|
|
- .title
|
|
|
|
|
- : ""
|
|
|
|
|
|
|
+ _item.title
|
|
|
}}
|
|
}}
|
|
|
</div>
|
|
</div>
|
|
|
<div style="width:80px">数量:{{ _item.num }}</div>
|
|
<div style="width:80px">数量:{{ _item.num }}</div>
|
|
@@ -577,7 +556,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</span>
|
|
</span>
|
|
|
- {{
|
|
|
|
|
|
|
+ <span>
|
|
|
|
|
+ {{
|
|
|
scope.row.extArray
|
|
scope.row.extArray
|
|
|
? scope.row.extArray
|
|
? scope.row.extArray
|
|
|
.filter((v) => v.type == 2)
|
|
.filter((v) => v.type == 2)
|
|
@@ -585,6 +565,8 @@
|
|
|
.join("/")
|
|
.join("/")
|
|
|
: ""
|
|
: ""
|
|
|
}}
|
|
}}
|
|
|
|
|
+ </span>
|
|
|
|
|
+
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
@@ -846,6 +828,7 @@
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ extList:[],
|
|
|
processOption:{value:'id',label:'title'},
|
|
processOption:{value:'id',label:'title'},
|
|
|
productList:[],//modal里面产品的下拉
|
|
productList:[],//modal里面产品的下拉
|
|
|
fax:0,//客户的折扣金额;
|
|
fax:0,//客户的折扣金额;
|
|
@@ -864,7 +847,7 @@
|
|
|
part_type_total:[],
|
|
part_type_total:[],
|
|
|
measure_total:[],
|
|
measure_total:[],
|
|
|
bpp_list:[],
|
|
bpp_list:[],
|
|
|
- product_metailList:[],
|
|
|
|
|
|
|
+ product_materialList:[],
|
|
|
type:'',
|
|
type:'',
|
|
|
formSetTableData: [
|
|
formSetTableData: [
|
|
|
{
|
|
{
|
|
@@ -1023,7 +1006,14 @@
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
tableData:[
|
|
tableData:[
|
|
|
- { id: 10001, name: 'Test1', nickname: 'T1', role: 'Develop', sex: '0', sex2: ['0'], num1: 40, age: 28, address: 'Shenzhen', date12: '', date13: '' ,is_metal:false},
|
|
|
|
|
|
|
+ { id: 10001, name: 'Test1', nickname: 'T1', role: 'Develop', sex: '0', sex2: ['0'], num1: 40, age: 28, address: 'Shenzhen', date12: '', date13: '' ,is_metal:false,extArray:[{ num: 0,
|
|
|
|
|
+ price: 0,
|
|
|
|
|
+ total_price: 0,
|
|
|
|
|
+ type:2,
|
|
|
|
|
+ remark: "",
|
|
|
|
|
+ title: "",
|
|
|
|
|
+ id: "2",
|
|
|
|
|
+ is_metal: true,}]},
|
|
|
// { id: 10002, name: 'Test2', nickname: 'T2', role: 'Designer', sex: '1', sex2: ['0', '1'], num1: 20, age: 22, address: 'Guangzhou', date12: '', date13: '2020-08-20' },
|
|
// { id: 10002, name: 'Test2', nickname: 'T2', role: 'Designer', sex: '1', sex2: ['0', '1'], num1: 20, age: 22, address: 'Guangzhou', date12: '', date13: '2020-08-20' },
|
|
|
// { id: 10003, name: 'Test3', nickname: 'T3', role: 'Test', sex: '0', sex2: ['1'], num1: 200, age: 32, address: 'Shanghai', date12: '2020-09-10', date13: '' },
|
|
// { id: 10003, name: 'Test3', nickname: 'T3', role: 'Test', sex: '0', sex2: ['1'], num1: 200, age: 32, address: 'Shanghai', date12: '2020-09-10', date13: '' },
|
|
|
// { id: 10004, name: 'Test4', nickname: 'T4', role: 'Designer', sex: '1', sex2: ['1'], num1: 30, age: 23, address: 'Shenzhen', date12: '', date13: '2020-12-04' }
|
|
// { id: 10004, name: 'Test4', nickname: 'T4', role: 'Designer', sex: '1', sex2: ['1'], num1: 30, age: 23, address: 'Shenzhen', date12: '', date13: '2020-12-04' }
|
|
@@ -1074,6 +1064,12 @@
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created(){
|
|
created(){
|
|
|
|
|
+ // 获取附加列表
|
|
|
|
|
+ this.axios.get("/api/project_ext_list").then((res) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ this.extList = res.data.data;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
//获取部件分类
|
|
//获取部件分类
|
|
|
this.axios.get("/api/basics_parts_index").then((res) => {
|
|
this.axios.get("/api/basics_parts_index").then((res) => {
|
|
|
res.data.data.map((v, k) => {
|
|
res.data.data.map((v, k) => {
|
|
@@ -1131,6 +1127,96 @@
|
|
|
this.getProducts();
|
|
this.getProducts();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getMaterialName(row){
|
|
|
|
|
+ console.log(row)
|
|
|
|
|
+ },
|
|
|
|
|
+ handleSelectProductMaterial(e,index){//选择产品名称五金
|
|
|
|
|
+ this.tableData[index].select_all_title = e.label
|
|
|
|
|
+ let obj = {
|
|
|
|
|
+ select_all_id: "", //产品五金ID
|
|
|
|
|
+ product_id: "", //产品ID
|
|
|
|
|
+ type_name: "", //展示用产品名称
|
|
|
|
|
+ position: "", //位置
|
|
|
|
|
+ over_price: "", //超标单价
|
|
|
|
|
+ over_price_total:"",//超标总价
|
|
|
|
|
+ unit_price: "", //单价
|
|
|
|
|
+ ext_price: "", //附加金额
|
|
|
|
|
+ price: "", //总金额
|
|
|
|
|
+ remark: "", //备注
|
|
|
|
|
+ measurement: "", //测量字段拼接
|
|
|
|
|
+ total_num: "", //数量
|
|
|
|
|
+ num: "", //核算数量
|
|
|
|
|
+ num_formula: "", //核算数量公式
|
|
|
|
|
+ url_number: "", //图号
|
|
|
|
|
+ url: [], //图纸
|
|
|
|
|
+ unit: "", //单位
|
|
|
|
|
+ title: "", //产品名
|
|
|
|
|
+ process: "", //工艺属性拼接
|
|
|
|
|
+ procedure_properties: {}, //工艺属性对象
|
|
|
|
|
+ overdraft: [], //超标公式
|
|
|
|
|
+ measure: this._measure, //测量字段数组
|
|
|
|
|
+ support_remark: this.support_remark, //备注列表
|
|
|
|
|
+ is_metal: false,
|
|
|
|
|
+ extArray: [
|
|
|
|
|
+ {
|
|
|
|
|
+ num: 0,
|
|
|
|
|
+ price: 0,
|
|
|
|
|
+ total_price: 0,
|
|
|
|
|
+ type: 2,
|
|
|
|
|
+ remark: "",
|
|
|
|
|
+ title: "",
|
|
|
|
|
+ id: "",
|
|
|
|
|
+ is_metal: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ // process_obj: JSON.parse(JSON.stringify(this.process_obj)), //工艺属性含选项对象
|
|
|
|
|
+ };
|
|
|
|
|
+ this.tableData.push(obj);
|
|
|
|
|
+ },
|
|
|
|
|
+ footerMethod({ columns, data }) {
|
|
|
|
|
+ return [
|
|
|
|
|
+ columns.map((column, columnIndex) => {
|
|
|
|
|
+ if (columnIndex === 0) {
|
|
|
|
|
+ return "合计";
|
|
|
|
|
+ }
|
|
|
|
|
+ if (column.title == "附加金额") {
|
|
|
|
|
+ let sum = 0;
|
|
|
|
|
+ data.map((v) => {
|
|
|
|
|
+ sum += v.ext_price?v.ext_price * 1:0;
|
|
|
|
|
+ });
|
|
|
|
|
+ return sum;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (column.title == "总金额") {
|
|
|
|
|
+ let sum = 0;
|
|
|
|
|
+ data.map((v) => {
|
|
|
|
|
+ sum += v.price?v.price * 1:0;
|
|
|
|
|
+ });
|
|
|
|
|
+ this.info.predict_price = sum.toFixed(2);
|
|
|
|
|
+ return sum.toFixed(2);
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }),
|
|
|
|
|
+ ];
|
|
|
|
|
+ },
|
|
|
|
|
+ handleExtraDele(arr,index){
|
|
|
|
|
+ arr.splice(index,1)
|
|
|
|
|
+ },
|
|
|
|
|
+ handleExtraAdd(array, type) {
|
|
|
|
|
+ array.push({
|
|
|
|
|
+ num: 0,
|
|
|
|
|
+ price: 0,
|
|
|
|
|
+ total_price: 0,
|
|
|
|
|
+ type,
|
|
|
|
|
+ remark: "",
|
|
|
|
|
+ title: "",
|
|
|
|
|
+ id: "",
|
|
|
|
|
+ is_metal: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
|
+ },
|
|
|
|
|
+ changeEditExt(e,idx,index){
|
|
|
|
|
+ this.tableData[index].extArray[idx].title = e.label
|
|
|
|
|
+ },
|
|
|
getProducts() {
|
|
getProducts() {
|
|
|
this.axios("/api/product").then((res) => {
|
|
this.axios("/api/product").then((res) => {
|
|
|
this.productList = res.data.data;
|
|
this.productList = res.data.data;
|
|
@@ -1140,7 +1226,7 @@
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
this.axios("/api/get_select_all").then((res) => {
|
|
this.axios("/api/get_select_all").then((res) => {
|
|
|
- this.product_metailList = res.data;
|
|
|
|
|
|
|
+ this.product_materialList = res.data;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
addressChange(e){
|
|
addressChange(e){
|
|
@@ -1327,9 +1413,16 @@
|
|
|
handleRemarkCreate(){
|
|
handleRemarkCreate(){
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
- changeExtPrice(){
|
|
|
|
|
|
|
+ changeExtPrice(e, product){
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ product.ext_price = e.target.value * 1;
|
|
|
|
|
+ product.price =
|
|
|
|
|
+ (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
|
|
|
|
|
+ (product.over_price_total * 1 || 0) +
|
|
|
|
|
+ (product.ext_price * 1 || 0);
|
|
|
|
|
+ product.price = product.price.toFixed(2);
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
handleMetailPriceChange(){
|
|
handleMetailPriceChange(){
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -1498,4 +1591,14 @@
|
|
|
top: 0px;
|
|
top: 0px;
|
|
|
color: red;
|
|
color: red;
|
|
|
}
|
|
}
|
|
|
|
|
+::v-deep .vxe-table--render-default .vxe-body--column.col--ellipsis>.vxe-cell {
|
|
|
|
|
+ padding: 0!important;
|
|
|
|
|
+ max-height: none;
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+/deep/.ivu-tooltip-rel {
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|