|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <el-form ref="form" >
|
|
|
+ <el-form ref="form">
|
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
|
:needPage="false"
|
|
|
@@ -65,14 +65,14 @@
|
|
|
//合同类型 1销售 2采购
|
|
|
type: [String, Number],
|
|
|
default: 1
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
allPrice: 0,
|
|
|
- supplierObj:[],
|
|
|
+ supplierObj: [],
|
|
|
form: {
|
|
|
- discountTotalPrice: 0,
|
|
|
+ discountTotalPrice: 0,
|
|
|
datasource: []
|
|
|
},
|
|
|
|
|
|
@@ -81,7 +81,7 @@
|
|
|
width: 45,
|
|
|
type: 'index',
|
|
|
columnKey: 'index',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 280,
|
|
|
@@ -89,21 +89,21 @@
|
|
|
label: '名称',
|
|
|
slot: 'productName',
|
|
|
headerSlot: 'headerProductName',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 120,
|
|
|
prop: 'productCode',
|
|
|
label: '编码',
|
|
|
slot: 'productCode',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 200,
|
|
|
prop: 'productCategoryName',
|
|
|
label: '类型',
|
|
|
slot: 'productCategoryName',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 120,
|
|
|
@@ -115,10 +115,10 @@
|
|
|
{
|
|
|
width: 200,
|
|
|
prop: 'customerMark',
|
|
|
- label: this.contractBookType == 1?'客户代号':'供应商代号',
|
|
|
+ label: this.contractBookType == 1 ? '客户代号' : '供应商代号',
|
|
|
slot: 'customerMark',
|
|
|
headerSlot: 'headerCustomerMark',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
// show: this.contractBookType == 1
|
|
|
},
|
|
|
// {
|
|
|
@@ -209,7 +209,11 @@
|
|
|
slot: 'pricingWay',
|
|
|
align: 'center',
|
|
|
formatter: (row, column) => {
|
|
|
- return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
|
|
|
+ return row.pricingWay == 1
|
|
|
+ ? '按数量计费'
|
|
|
+ : row.pricingWay == 2
|
|
|
+ ? '按重量计费'
|
|
|
+ : '';
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
@@ -332,7 +336,12 @@
|
|
|
label: '质保期',
|
|
|
slot: 'guaranteePeriod',
|
|
|
headerSlot: 'headerCustomerExpectDeliveryDeadline',
|
|
|
- align: 'center'
|
|
|
+ align: 'center',
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return (
|
|
|
+ (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
|
|
|
+ );
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
width: 200,
|
|
|
@@ -407,17 +416,17 @@
|
|
|
this.requestDict('生产类型');
|
|
|
},
|
|
|
methods: {
|
|
|
- async getSupplierObj(productList, queryName) {
|
|
|
- try {
|
|
|
- let categoryIds = productList.map((item) => item[queryName]);
|
|
|
- return await contactQueryByCategoryIdsAPI({
|
|
|
- categoryIds,
|
|
|
- isQueryEE: 1
|
|
|
- });
|
|
|
- } catch (e) {
|
|
|
- return Promise.resolve({});
|
|
|
- }
|
|
|
- },
|
|
|
+ // async getSupplierObj(productList, queryName) {
|
|
|
+ // try {
|
|
|
+ // let categoryIds = productList.map((item) => item[queryName]);
|
|
|
+ // return await contactQueryByCategoryIdsAPI({
|
|
|
+ // categoryIds,
|
|
|
+ // isQueryEE: 1
|
|
|
+ // });
|
|
|
+ // } catch (e) {
|
|
|
+ // return Promise.resolve({});
|
|
|
+ // }
|
|
|
+ // },
|
|
|
|
|
|
// 返回列表数据
|
|
|
getTableValue() {
|
|
|
@@ -440,21 +449,25 @@
|
|
|
|
|
|
//修改回显
|
|
|
async putTableValue(data) {
|
|
|
- console.log(data,'data')
|
|
|
+ console.log(data, 'data');
|
|
|
let productList =
|
|
|
(data &&
|
|
|
(data.quoteProductList || data.productList || data.detailList)) ||
|
|
|
[];
|
|
|
if (productList) {
|
|
|
this.form.datasource = productList;
|
|
|
- this.allPrice = data.totalAmount || data.totalPrice||data?.contractVO?.totalPrice;
|
|
|
+ this.allPrice =
|
|
|
+ data.totalAmount || data.totalPrice || data?.contractVO?.totalPrice;
|
|
|
if (this.isDiscountTotalPrice) {
|
|
|
- this.form.discountTotalPrice = data.payAmount||data.discountTotalPrice||data?.contractVO?.discountTotalPrice;
|
|
|
+ this.form.discountTotalPrice =
|
|
|
+ data.payAmount ||
|
|
|
+ data.discountTotalPrice ||
|
|
|
+ data?.contractVO?.discountTotalPrice;
|
|
|
}
|
|
|
- this.supplierObj = await this.getSupplierObj(
|
|
|
- productList,
|
|
|
- 'productId'
|
|
|
- );
|
|
|
+ // this.supplierObj = await this.getSupplierObj(
|
|
|
+ // productList,
|
|
|
+ // 'productId'
|
|
|
+ // );
|
|
|
this.$refs.table.reload();
|
|
|
}
|
|
|
}
|