|
@@ -10,7 +10,8 @@
|
|
|
placeholder="产品名称,产品编号,品号"
|
|
|
@keyup.enter.native="productData(param.content.pageNumber = 1)"
|
|
|
@clear="productData(param.content.pageNumber = 1)"
|
|
|
- clearable>
|
|
|
+ clearable
|
|
|
+ border>
|
|
|
</el-input>
|
|
|
<!-- <product_table style="float: right" :data="data" ref="quoterPrice" @productAdd="productInitialization" ></product_table>-->
|
|
|
<el-button size="small" class="inline-16" :type="itemids.length === 0?'':'primary'" :disabled="itemids.length === 0" @click="deleteProducts">删除</el-button>
|
|
@@ -26,7 +27,7 @@
|
|
|
:header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
|
|
|
:cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
|
|
|
@selection-change="selectionChange"
|
|
|
- >
|
|
|
+ border>
|
|
|
<el-table-column
|
|
|
type="selection"
|
|
|
width="55"
|
|
@@ -43,14 +44,25 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="num"
|
|
|
- label="数量"
|
|
|
- width="160"
|
|
|
- >
|
|
|
+ prop="itemname"
|
|
|
+ label="商品名称"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="itemno"
|
|
|
+ label="编码"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="erpitemno"
|
|
|
+ label="品号"
|
|
|
+ width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="型号"
|
|
|
+ width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>
|
|
|
- <el-input-number :disabled="!saveShow || index !== scope.row.rowindex" v-model="scope.row.qty" size="mini" :min="1" label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index)"></el-input-number>
|
|
|
- </span>
|
|
|
+ <p><span>{{scope.row.model}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -62,6 +74,18 @@
|
|
|
<p><span>{{scope.row.marketprice?tool.formatAmount(scope.row.marketprice,2):'--'}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="num"
|
|
|
+ label="数量"
|
|
|
+ width="160"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ <el-input-number :disabled="!saveShow || index !== scope.row.rowindex" v-model="scope.row.qty" size="mini" :min="1" label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index)"></el-input-number>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
prop="discountrate"
|
|
|
label="折扣(%)"
|
|
@@ -69,14 +93,12 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.discountDifferenceAmount >= 0 ">
|
|
|
- <p v-if="!saveShow || index !== scope.row.rowindex"><span :style="[setTopColor]">{{scope.row.discountrate}}</span></p>
|
|
|
- <span v-if="saveShow && index === scope.row.rowindex">
|
|
|
+ <span v-if="tool.checkAuth($route.name,'productDetails') || data.status == '新建' || disabled">
|
|
|
<el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div v-else-if="scope.row.discountDifferenceAmount < 0 ">
|
|
|
- <p v-if="!saveShow || index !== scope.row.rowindex"><span :style="[setDownColor]">{{scope.row.discountrate}}</span></p>
|
|
|
- <span v-if="saveShow && index === scope.row.rowindex">
|
|
|
+ <span v-if="tool.checkAuth($route.name,'productDetails') || data.status == '新建' || disabled">
|
|
|
<el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -98,14 +120,14 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.discountDifferenceAmount >= 0 ">
|
|
|
- <p v-if="!saveShow || index !== scope.row.rowindex"><span :style="[setTopColor]">{{tool.formatAmount(scope.row.price,2)}}</span></p>
|
|
|
- <span v-if="saveShow && index === scope.row.rowindex">
|
|
|
+ <p v-if="!disabled"><span :style="[setTopColor]">{{tool.formatAmount(scope.row.price,2)}}</span></p>
|
|
|
+ <span v-if="tool.checkAuth($route.name,'productDetails') || data.status == '新建' || disabled">
|
|
|
<el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div v-else-if="scope.row.discountDifferenceAmount < 0 " >
|
|
|
- <p v-if="!saveShow || index !== scope.row.rowindex"><span :style="[setDownColor]">{{tool.formatAmount(scope.row.price,2)}}</span></p>
|
|
|
- <span v-if="saveShow && index === scope.row.rowindex">
|
|
|
+ <p v-if="!disabled"><span :style="[setDownColor]">{{tool.formatAmount(scope.row.price,2)}}</span></p>
|
|
|
+ <span v-if="tool.checkAuth($route.name,'productDetails') || data.status == '新建' || disabled">
|
|
|
<el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -128,33 +150,9 @@
|
|
|
<p><span>{{tool.formatAmount(scope.row.discountDifferenceAmount,2)}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="itemno"
|
|
|
- label="产品编号"
|
|
|
- width="180">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="itemname"
|
|
|
- label="产品名称"
|
|
|
- width="180">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="erpitemno"
|
|
|
- label="品号"
|
|
|
- width="180">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="standards"
|
|
|
- label="标准"
|
|
|
- width="100">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="型号"
|
|
|
- width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.model}}</span></p>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<el-table-column
|
|
|
label="规格"
|
|
|
width="180">
|
|
@@ -170,6 +168,19 @@
|
|
|
<p><span>{{scope.row.material?scope.row.material:'--'}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="standards"
|
|
|
+ label="标准"
|
|
|
+ width="100">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="unitid"
|
|
|
+ label="计量单位"
|
|
|
+ width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}/{{scope.row.axunitname}}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="device"
|
|
|
label="装置"
|
|
@@ -194,36 +205,7 @@
|
|
|
<p><span>{{scope.row.specalnote || '--'}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="brand"
|
|
|
- label="品牌"
|
|
|
- width="200">
|
|
|
- <template slot-scope="scope">
|
|
|
- <p v-for="(item,index) in scope.row.brand">
|
|
|
- <span style="float: left" v-if="index === scope.row.brand.length -1">{{item?item.brandname+'':'--'}}</span>
|
|
|
- <span style="float: left" v-else>{{item?item.brandname+',':'--'}}</span>
|
|
|
- </p>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="itemclass"
|
|
|
- label="类别"
|
|
|
- width="200">
|
|
|
- <template slot-scope="scope">
|
|
|
- <p v-for="(item,index) in scope.row.itemclass">
|
|
|
- <span style="float: left" v-if="index === scope.row.itemclass.length -1">{{item?item.itemclassname+'':'--'}}</span>
|
|
|
- <span style="float: left" v-else>{{item?item.itemclassname+',':'--'}}</span>
|
|
|
- </p>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="unitid"
|
|
|
- label="计量单位"
|
|
|
- width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}/{{scope.row.axunitname}}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
|
|
|
<el-table-column
|
|
|
prop="mindiscountrate"
|
|
@@ -260,7 +242,7 @@
|
|
|
<p v-else>--</p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
prop="operation"
|
|
|
fixed="right"
|
|
|
label="操作"
|
|
@@ -275,9 +257,9 @@
|
|
|
<el-button class="inline-16" slot="reference" size="mini" type="text" :disabled="!tool.checkAuth($route.name,'productDetails') || data.status !== '新建' || !disabled" >删 除</el-button>
|
|
|
</el-popconfirm>
|
|
|
|
|
|
-<!-- <el-button size="mini" type="text" class="inline-16" @click="saveShow = false;index = '';productData()" v-if="saveShow && index === scope.row.rowindex">取 消</el-button>-->
|
|
|
+ <el-button size="mini" type="text" class="inline-16" @click="saveShow = false;index = '';productData()" v-if="saveShow && index === scope.row.rowindex">取 消</el-button>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
</el-table>
|
|
|
<div style="height: 35px;margin-top: 20px">
|
|
|
<div style="float: left">总金额(元):{{ tool.formatAmount(totalPrice,2) }}</div>
|
|
@@ -441,6 +423,7 @@ export default {
|
|
|
}
|
|
|
this.totalPrice = Math.round(this.totalPrice * 100)/100
|
|
|
this.$emit('productData',this.list)
|
|
|
+ this.onSave(this.list[index])
|
|
|
},
|
|
|
onChangeDiscountrate(val,data,index) {
|
|
|
data.specialoffer = 0
|
|
@@ -464,6 +447,7 @@ export default {
|
|
|
}
|
|
|
this.totalPrice = Math.round(this.totalPrice * 100)/100
|
|
|
this.$emit('productData',this.list)
|
|
|
+ this.onSave(this.list[index])
|
|
|
},
|
|
|
onChangePrice(val,data,index){
|
|
|
data.specialoffer = 0
|
|
@@ -487,6 +471,7 @@ export default {
|
|
|
}
|
|
|
this.totalPrice = Math.round(this.totalPrice * 100)/100
|
|
|
this.$emit('productData',this.list)
|
|
|
+ this.onSave(this.list[index])
|
|
|
},
|
|
|
onEdit(row){
|
|
|
this.saveShow = true
|