|
@@ -87,7 +87,7 @@
|
|
|
style="margin-bottom: 20px"
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.totalCount'"
|
|
:prop="'datasource.' + scope.$index + '.totalCount'"
|
|
|
:rules="{
|
|
:rules="{
|
|
|
- required: pageName == 'businessOpportunity' ? false : true,
|
|
|
|
|
|
|
+ required: (pageName == 'businessOpportunity'||taskDefinitionKey=='salesManagerApprove') ? false : true,
|
|
|
pattern: numberReg,
|
|
pattern: numberReg,
|
|
|
message: '请输入数字',
|
|
message: '请输入数字',
|
|
|
trigger: 'blur'
|
|
trigger: 'blur'
|
|
@@ -96,7 +96,7 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="scope.row.totalCount"
|
|
v-model="scope.row.totalCount"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
- :disabled="!!taskDefinitionKey"
|
|
|
|
|
|
|
+ :disabled="!!taskDefinitionKey&&taskDefinitionKey!=='salesManagerApprove'"
|
|
|
@input="getTotalPrice(scope.row)"
|
|
@input="getTotalPrice(scope.row)"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -182,10 +182,11 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="borderrightnone">
|
|
<div class="borderrightnone">
|
|
|
<DictSelection
|
|
<DictSelection
|
|
|
- dictName="质保期单位"
|
|
|
|
|
|
|
+ dictName="保质期单位"
|
|
|
clearable
|
|
clearable
|
|
|
:disabled="!!taskDefinitionKey"
|
|
:disabled="!!taskDefinitionKey"
|
|
|
v-model="scope.row.guaranteePeriodUnitCode"
|
|
v-model="scope.row.guaranteePeriodUnitCode"
|
|
|
|
|
+ @itemChange="(data)=>chaengUnitCode(data,scope.row, scope.$index)"
|
|
|
@change="
|
|
@change="
|
|
|
setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
|
|
setDeliveryDays(scope.row, scope.$index, 'guaranteePeriod')
|
|
|
"
|
|
"
|
|
@@ -224,7 +225,7 @@
|
|
|
style="margin-bottom: 20px"
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.singlePrice'"
|
|
:prop="'datasource.' + scope.$index + '.singlePrice'"
|
|
|
:rules="{
|
|
:rules="{
|
|
|
- required: pageName == 'businessOpportunity' ? false : true,
|
|
|
|
|
|
|
+ required: (pageName == 'businessOpportunity'||taskDefinitionKey=='salesManagerApprove') ? false : true,
|
|
|
pattern: numberReg,
|
|
pattern: numberReg,
|
|
|
message: '请输入正确的单价',
|
|
message: '请输入正确的单价',
|
|
|
trigger: 'change'
|
|
trigger: 'change'
|
|
@@ -234,7 +235,7 @@
|
|
|
v-model="scope.row.singlePrice"
|
|
v-model="scope.row.singlePrice"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
@input="getTotalPrice"
|
|
@input="getTotalPrice"
|
|
|
- :disabled="!!taskDefinitionKey"
|
|
|
|
|
|
|
+ :disabled="!!taskDefinitionKey&&taskDefinitionKey!=='salesManagerApprove'"
|
|
|
>
|
|
>
|
|
|
<template slot="append">元</template>
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
@@ -244,7 +245,7 @@
|
|
|
v-slot:headerSinglePrice="{ column }"
|
|
v-slot:headerSinglePrice="{ column }"
|
|
|
v-if="pageName != 'businessOpportunity' || isSinglePrice"
|
|
v-if="pageName != 'businessOpportunity' || isSinglePrice"
|
|
|
>
|
|
>
|
|
|
- <span class="is-required">{{ column.label }}</span>
|
|
|
|
|
|
|
+ <span :class="{'is-required':taskDefinitionKey!=='salesManagerApprove'}">{{ column.label }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-slot:technicalAnswerName="{ row, $index }">
|
|
<template v-slot:technicalAnswerName="{ row, $index }">
|
|
@@ -496,7 +497,7 @@
|
|
|
type: Boolean
|
|
type: Boolean
|
|
|
},
|
|
},
|
|
|
isCustomerMark: {
|
|
isCustomerMark: {
|
|
|
- default: false,
|
|
|
|
|
|
|
+ default: true,
|
|
|
type: Boolean
|
|
type: Boolean
|
|
|
},
|
|
},
|
|
|
isSinglePrice: {
|
|
isSinglePrice: {
|
|
@@ -578,7 +579,7 @@
|
|
|
prop: 'customerMark',
|
|
prop: 'customerMark',
|
|
|
label: '客户代号',
|
|
label: '客户代号',
|
|
|
slot: 'customerMark',
|
|
slot: 'customerMark',
|
|
|
- // show: this.isCustomerMark
|
|
|
|
|
|
|
+ show: this.isCustomerMark
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
width: 160,
|
|
width: 160,
|
|
@@ -789,6 +790,9 @@
|
|
|
this.$refs.table.reRenderTable();
|
|
this.$refs.table.reRenderTable();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ created(){
|
|
|
|
|
+ console.log('222222222',this.taskDefinitionKey,(this.pageName == 'businessOpportunity'||this.taskDefinitionKey=='salesManagerApprove') ? false : true);
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
openVersion(index) {
|
|
openVersion(index) {
|
|
|
this.$refs.versionRefs.open(index);
|
|
this.$refs.versionRefs.open(index);
|
|
@@ -802,6 +806,9 @@
|
|
|
);
|
|
);
|
|
|
this.$set(this.form.datasource[index], 'technologyRouteId', data.id);
|
|
this.$set(this.form.datasource[index], 'technologyRouteId', data.id);
|
|
|
},
|
|
},
|
|
|
|
|
+ chaengUnitCode(data,row, index){
|
|
|
|
|
+ console.log(data,row, index);
|
|
|
|
|
+ },
|
|
|
setDeliveryDays(row, index, type, isAll) {
|
|
setDeliveryDays(row, index, type, isAll) {
|
|
|
if (isAll) {
|
|
if (isAll) {
|
|
|
this.form.datasource.forEach((item, i) => {
|
|
this.form.datasource.forEach((item, i) => {
|
|
@@ -839,6 +846,7 @@
|
|
|
let guaranteePeriodUnitName = this.guaranteePeriodUnit(
|
|
let guaranteePeriodUnitName = this.guaranteePeriodUnit(
|
|
|
row.guaranteePeriodUnitCode
|
|
row.guaranteePeriodUnitCode
|
|
|
);
|
|
);
|
|
|
|
|
+ console.log(guaranteePeriodUnitName,'===================');
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.form.datasource[index],
|
|
this.form.datasource[index],
|
|
|
'guaranteePeriodDeadline',
|
|
'guaranteePeriodDeadline',
|
|
@@ -858,8 +866,6 @@
|
|
|
: 'second';
|
|
: 'second';
|
|
|
},
|
|
},
|
|
|
setDay(addDay, dateType = 'day') {
|
|
setDay(addDay, dateType = 'day') {
|
|
|
- console.log(addDay, 'addDay');
|
|
|
|
|
- console.log(dateType, 'dateType');
|
|
|
|
|
return dayjs(this.contractStartDate || new Date())
|
|
return dayjs(this.contractStartDate || new Date())
|
|
|
.add(addDay, dateType)
|
|
.add(addDay, dateType)
|
|
|
.format('YYYY-MM-DD');
|
|
.format('YYYY-MM-DD');
|
|
@@ -875,7 +881,7 @@
|
|
|
(v.totalCount * v.singlePrice)?.toFixed(2)) ||
|
|
(v.totalCount * v.singlePrice)?.toFixed(2)) ||
|
|
|
null;
|
|
null;
|
|
|
v.guaranteePeriodUnitName = this.getDictValue(
|
|
v.guaranteePeriodUnitName = this.getDictValue(
|
|
|
- '质保期单位',
|
|
|
|
|
|
|
+ '保质期单位',
|
|
|
v.guaranteePeriodUnitCode
|
|
v.guaranteePeriodUnitCode
|
|
|
);
|
|
);
|
|
|
v.technicalDrawings = v.technicalDrawings ? v.technicalDrawings : [];
|
|
v.technicalDrawings = v.technicalDrawings ? v.technicalDrawings : [];
|
|
@@ -884,6 +890,7 @@
|
|
|
|
|
|
|
|
v.otherFiles = v.otherFiles || [];
|
|
v.otherFiles = v.otherFiles || [];
|
|
|
});
|
|
});
|
|
|
|
|
+ console.log(comitDatasource,'comitDatasourcecomitDatasourcecomitDatasource');
|
|
|
return comitDatasource;
|
|
return comitDatasource;
|
|
|
},
|
|
},
|
|
|
getPrice() {
|
|
getPrice() {
|
|
@@ -927,7 +934,8 @@
|
|
|
[];
|
|
[];
|
|
|
if (productList) {
|
|
if (productList) {
|
|
|
productList.forEach((item) => {
|
|
productList.forEach((item) => {
|
|
|
- item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode + '';
|
|
|
|
|
|
|
+ item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode * 1;
|
|
|
|
|
+ //item.guaranteePeriodUnitCode
|
|
|
// if (item.deliveryDays) {
|
|
// if (item.deliveryDays) {
|
|
|
// item['deliveryDeadline'] =
|
|
// item['deliveryDeadline'] =
|
|
|
// item['deliveryDeadline'] || this.setDay(item.deliveryDays);
|
|
// item['deliveryDeadline'] || this.setDay(item.deliveryDays);
|
|
@@ -951,10 +959,12 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//计算单重
|
|
//计算单重
|
|
|
- singleWeightChange(row) {
|
|
|
|
|
|
|
+ singleWeightChange(row={}) {
|
|
|
if (row && row.singleWeight && row.totalCount) {
|
|
if (row && row.singleWeight && row.totalCount) {
|
|
|
- row.totalWeight = row.singleWeight * row.totalCount || 0;
|
|
|
|
|
|
|
+ return row.totalWeight = (row.singleWeight * row.totalCount).toFixed(2);
|
|
|
}
|
|
}
|
|
|
|
|
+ return row.totalWeight = 0
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
//选择产品
|
|
//选择产品
|
|
|
handParent(row, index) {
|
|
handParent(row, index) {
|