|
|
@@ -7,12 +7,13 @@
|
|
|
class="inline-16"
|
|
|
suffix-icon="el-icon-search"
|
|
|
v-model="param.content.where.condition"
|
|
|
- placeholder="搜索"
|
|
|
+ placeholder="产品名称,产品编号,品号"
|
|
|
@keyup.enter.native="productData(param.content.pageNumber = 1)"
|
|
|
@clear="productData(param.content.pageNumber = 1)"
|
|
|
clearable>
|
|
|
</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>
|
|
|
<productTableProject v-if="tool.checkAuth($route.name,'productDetails') && data.status === '新建' && disabled && data.quotedpricetype === '项目报价'" :sa_projectid="data.sa_projectid" :type="data.quotedpricetype" class="inline-16" @productAdd="productData"></productTableProject>
|
|
|
<productTable v-if="tool.checkAuth($route.name,'productDetails') && data.status === '新建' && disabled" class="inline-16" @productAdd="productData"></productTable>
|
|
|
</div>
|
|
|
@@ -21,14 +22,16 @@
|
|
|
ref="multipleTable"
|
|
|
:data="list"
|
|
|
style="width: 100%"
|
|
|
+ height="calc(100vh - 500px)"
|
|
|
:header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
|
|
|
:cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
|
|
|
@selection-change="selectionChange"
|
|
|
>
|
|
|
-<!-- <el-table-column
|
|
|
+ <el-table-column
|
|
|
type="selection"
|
|
|
- width="55">
|
|
|
- </el-table-column>-->
|
|
|
+ width="55"
|
|
|
+ fixed>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="产品图"
|
|
|
@@ -56,7 +59,7 @@
|
|
|
width="80"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.marketprice?scope.row.marketprice:'--'}}</span></p>
|
|
|
+ <p><span>{{scope.row.marketprice?tool.formatAmount(scope.row.marketprice,2):'--'}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -122,7 +125,7 @@
|
|
|
width="100"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.discountDifferenceAmount}}</span></p>
|
|
|
+ <p><span>{{tool.formatAmount(scope.row.discountDifferenceAmount)}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -136,33 +139,27 @@
|
|
|
width="180">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="型号"
|
|
|
+ prop="erpitemno"
|
|
|
+ label="品号"
|
|
|
width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.model}}</span></p>
|
|
|
- </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="规格"
|
|
|
- width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.spec}}</span></p>
|
|
|
- </template>
|
|
|
+ prop="standards"
|
|
|
+ label="标准"
|
|
|
+ width="100">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="caliber"
|
|
|
- label="口径"
|
|
|
+ label="型号"
|
|
|
width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.caliber?scope.row.caliber:'--'}}</span></p>
|
|
|
+ <p><span>{{scope.row.model}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="pressure"
|
|
|
- label="压力"
|
|
|
+ label="规格"
|
|
|
width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.pressure?scope.row.pressure:'--'}}</span></p>
|
|
|
+ <p><span>{{scope.row.spec}}</span></p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -283,17 +280,16 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div style="height: 35px;margin-top: 20px">
|
|
|
- <div style="float: left">总金额(元):{{ totalPrice }}</div>
|
|
|
+ <div style="float: left">总金额(元):{{ tool.formatAmount(totalPrice,2) }}</div>
|
|
|
<div style="float: right">
|
|
|
<el-pagination
|
|
|
background
|
|
|
- small
|
|
|
- style="text-align: right;"
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="param.content.pageSize"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
+ :current-page="param.content.pageNumber"
|
|
|
+ :page-sizes="[20, 50, 100, 200]"
|
|
|
+ :page-size="100"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
@@ -334,12 +330,13 @@ export default {
|
|
|
"content": {
|
|
|
"sa_quotedpriceid":'',
|
|
|
"pageNumber": 1,
|
|
|
- "pageSize": 20,
|
|
|
+ "pageSize": 100,
|
|
|
"where": {
|
|
|
"condition": ""
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ itemids:[]
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
@@ -385,15 +382,21 @@ export default {
|
|
|
this.param.content.where.condition = this.search
|
|
|
this.productData()
|
|
|
},
|
|
|
- selectionChange(){},
|
|
|
+ /*批量勾选*/
|
|
|
+ selectionChange(val){
|
|
|
+ this.itemids = []
|
|
|
+ val.forEach((item,index)=>{
|
|
|
+ this.itemids[index] = item.sa_quotedprice_itemsid
|
|
|
+ })
|
|
|
+ },
|
|
|
checkForm(){
|
|
|
this.$emit('checkForm')
|
|
|
},
|
|
|
quoterPrice(id,type){
|
|
|
this.$refs.quoterPrice.queryProduct(id,type)
|
|
|
},
|
|
|
+ /*删除添加的产品*/
|
|
|
async deleteProduct(val){
|
|
|
- console.log(val)
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20221021095603,
|
|
|
"content": {
|
|
|
@@ -404,6 +407,29 @@ export default {
|
|
|
this.productData()
|
|
|
})
|
|
|
},
|
|
|
+ /*批量删除添加的产品*/
|
|
|
+ deleteProducts(){
|
|
|
+ this.$confirm('确定删除已选的产品吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221021095603,
|
|
|
+ "content": {
|
|
|
+ "sa_quotedprice_itemsids":this.itemids //sat_notice_classid<=0时 为新增
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.productData()
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
onChangeNum (val,data,index) {
|
|
|
data.qty = Math.round(val *100)/100
|
|
|
data.amount = Math.round((data.qty * data.price) * 100)/100
|
|
|
@@ -463,12 +489,11 @@ export default {
|
|
|
this.$emit('productData',this.list)
|
|
|
},
|
|
|
onEdit(row){
|
|
|
- console.log(row,'进行编辑')
|
|
|
this.saveShow = true
|
|
|
this.index = row.rowindex
|
|
|
},
|
|
|
async onSave(row){
|
|
|
- console.log(row,'进行保存')
|
|
|
+
|
|
|
row.discountrate = (row.discountrate / 100).toFixed(4)
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20221021095403,
|