Browse Source

20241217

java8
qiezi 1 year ago
parent
commit
620ebac09e
  1. 11
      src/views/modules/quote/detail/primary/quoteDetailBom.vue
  2. 9
      src/views/modules/quote/detail/quoteDetail.vue
  3. 11
      src/views/modules/quote/detail/tpCost.vue
  4. 9
      src/views/modules/quote/quoteDetailReport.vue

11
src/views/modules/quote/detail/primary/quoteDetailBom.vue

@ -294,6 +294,7 @@ export default {
}, },
quoteDetailBom:{}, quoteDetailBom:{},
quoteDetailBomVisible:false, quoteDetailBomVisible:false,
preValue:undefined,
} }
}, },
methods: { methods: {
@ -486,10 +487,16 @@ export default {
this.quoteDetailBom = { this.quoteDetailBom = {
...row, ...row,
} }
this.preValue = row.attritionRate;
this.quoteDetailBomVisible = true; this.quoteDetailBomVisible = true;
} }
}, },
handleBlur(row){
if (row.attritionRate === this.preValue) {
this.quoteDetailBomVisible = false;
this.preValue = undefined
}
}
}, },
created() { created() {
if (this.quoteDetail && this.quoteDetail.id) { if (this.quoteDetail && this.quoteDetail.id) {
@ -550,7 +557,7 @@ export default {
<el-link @click="handleJumpToBom(scope.row)">{{ scope.row[item.columnProp] }}</el-link> <el-link @click="handleJumpToBom(scope.row)">{{ scope.row[item.columnProp] }}</el-link>
</template> </template>
<template v-else-if="item.columnProp === 'attritionRate' && quoteDetailBomVisible && scope.row.id === quoteDetailBom.id"> <template v-else-if="item.columnProp === 'attritionRate' && quoteDetailBomVisible && scope.row.id === quoteDetailBom.id">
<el-input-number v-model="scope.row.attritionRate" @change="handleUpdateQuoteDetailBom(scope.row)" style="width: 100%" :controls="false" :min="0"></el-input-number>
<el-input-number v-model="scope.row.attritionRate" @blur="handleBlur(scope.row)" @change="handleUpdateQuoteDetailBom(scope.row)" style="width: 100%" :controls="false" :min="0"></el-input-number>
</template> </template>
<template v-else> <template v-else>
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>

9
src/views/modules/quote/detail/quoteDetail.vue

@ -571,9 +571,10 @@ export default {
</script> </script>
<template> <template>
<div>
<div class="rq">
<el-button type="primary" v-if="!authFlag" :disabled="quote.status === '下达' || !quote.status" @click="handleSaveQuoteDetail(null)">新增</el-button> <el-button type="primary" v-if="!authFlag" :disabled="quote.status === '下达' || !quote.status" @click="handleSaveQuoteDetail(null)">新增</el-button>
<el-table v-loading="queryLoading" border :data="dataList" style="width: 100%;margin-top: 5px" :height="height">
<el-table v-loading="queryLoading" border :data="dataList" style="width: 100%;margin-top: 5px" :height="height">
<el-table-column type="index" width="55" align="center" label="序号"></el-table-column> <el-table-column type="index" width="55" align="center" label="序号"></el-table-column>
<el-table-column <el-table-column
v-for="(item,index) in columns" :key="index" v-for="(item,index) in columns" :key="index"
@ -693,10 +694,6 @@ export default {
</template> </template>
<style scoped> <style scoped>
.el-table /deep/ .cell{
height: auto;
line-height: 1.5;
}
.auto /deep/ .el-form-item__content{ .auto /deep/ .el-form-item__content{
height: auto; height: auto;

11
src/views/modules/quote/detail/tpCost.vue

@ -37,6 +37,15 @@ export default {
this.$message.error(error); this.$message.error(error);
}) })
}, },
alignIsNan(key,arr){
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
if (isNaN(item[key])){
return 'left';
}
}
return 'right';
},
flexColumnWidth (str, arr1, flag = 'max') { flexColumnWidth (str, arr1, flag = 'max') {
str = str + '' str = str + ''
let columnContent = '' let columnContent = ''
@ -124,7 +133,7 @@ export default {
<template> <template>
<div> <div>
<el-table :data="dataList" border :height="height" v-loading="queryLoading"> <el-table :data="dataList" border :height="height" v-loading="queryLoading">
<el-table-column v-for="key in objectKeys" header-align="center" :width="flexColumnWidth(key,dataList)" :key="key" :prop="key" :label="key"></el-table-column>
<el-table-column v-for="key in objectKeys" :align="alignIsNan(key,dataList)" header-align="center" :width="flexColumnWidth(key,dataList)" :key="key" :prop="key" :label="key"></el-table-column>
</el-table> </el-table>
</div> </div>
</template> </template>

9
src/views/modules/quote/quoteDetailReport.vue

@ -640,8 +640,9 @@ export default {
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-table :data="inquiryDataList" v-loading="queryPropertyLoading" height="19vh"
style="margin-top: 10px;width: 1000px" border>
</el-tab-pane>
<el-tab-pane name="property" label="询价单属性">
<el-table :data="inquiryDataList" v-loading="queryPropertyLoading" height="36vh" border>
<el-table-column label="属性编码" header-align="center" min-width="100" prop="itemNo"></el-table-column> <el-table-column label="属性编码" header-align="center" min-width="100" prop="itemNo"></el-table-column>
<el-table-column label="属性名称" header-align="center" min-width="160" prop="itemDesc"></el-table-column> <el-table-column label="属性名称" header-align="center" min-width="160" prop="itemDesc"></el-table-column>
<el-table-column label="属性类型" header-align="center" min-width="80" prop="valueType"></el-table-column> <el-table-column label="属性类型" header-align="center" min-width="80" prop="valueType"></el-table-column>
@ -720,10 +721,6 @@ export default {
</template> </template>
<style scoped> <style scoped>
.el-table /deep/ .cell {
height: auto;
line-height: 1.5;
}
.auto /deep/ .el-form-item__content { .auto /deep/ .el-form-item__content {
height: auto; height: auto;

Loading…
Cancel
Save