|
|
@@ -1,81 +1,26 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-table
|
|
|
- ref="multipleTable"
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%;"
|
|
|
- size="small"
|
|
|
- stripe
|
|
|
- border>
|
|
|
- <!-- <el-table-column
|
|
|
- type="selection"
|
|
|
- width="55"
|
|
|
- align="center">
|
|
|
- </el-table-column> -->
|
|
|
- <el-table-column
|
|
|
- prop="rowno"
|
|
|
- width="55"
|
|
|
- :label="$t('行号')">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="itemname"
|
|
|
- :label="$t('产品名称')">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="itemno"
|
|
|
- :label="$t('产品编号')">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- :label="$t('型号')">
|
|
|
- <template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.model}}</span></p>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column :label="$t('公称通径')" width="150" prop="caliber" v-if="siteid == 'HY' || siteid == 'YOSTEST1'">
|
|
|
- <template slot-scope="scope">
|
|
|
- <p>
|
|
|
- <span>{{ scope.row.caliber || '--'}}</span>
|
|
|
- </p>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column :label="$t('公称压力')" width="150" prop="nominalpressure" v-if="siteid == 'HY' || siteid == 'YOSTEST1'">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{tool.nominalPressureSet(scope.row.nominalpressure)}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- :label="$t('规格')" v-if="siteid != 'HY' && siteid != 'YOSTEST1'">
|
|
|
- <template slot-scope="scope">
|
|
|
- <p><span>{{scope.row.spec}}</span></p>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- :label="$t(`数量`)">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="type === 'edit' && tool.checkAuth($route.name,'update') && status == '新建' && logistics_qty_editable" size="mini" v-model="scope.row.qty" :min="1" :step="scope.row.orderaddqty" :label="$t(`输入数量`)" @change="qtyChange(scope.row,scope.$index)"></el-input-number>
|
|
|
- <span v-else>{{scope.row.qty}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- :label="$t(`未出货数量`)">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{scope.row.unlogisticsqty?scope.row.unlogisticsqty:scope.row.unlogisticsqty == 0?'0':'--'}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="unit"
|
|
|
- :label="$t('计量单位')"
|
|
|
- width="90">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column v-if="type === 'edit'" width="90" fixed="right" :label="$t('操作')">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" size="mini" @click="deleteOrderProduct(scope.row)" :disabled="!logistics_qty_editable || status != '新建'">{{$t('删 除')}}</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ <tableDetail :layout="tablecols" :data="tableData" :opwidth="200" :custom="true" fixedName="operation">
|
|
|
+ <template v-slot:customcol="scope">
|
|
|
+ <div v-if="scope.column.columnname == 'nominalpressure'">
|
|
|
+ {{tool.nominalPressureSet(scope.column.data.nominalpressure)}}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname == 'qty'">
|
|
|
+ <el-input-number :controls="true" controls-position='right' :step-strictly="true" v-if="type === 'edit' && tool.checkAuth($route.name,'update') && status == '新建' && logistics_qty_editable" size="mini" v-model="scope.column.data.qty" :min="1" :step="scope.column.data.orderaddqty" :label="$t(`输入数量`)" @change="qtyChange(scope.column.data,scope.$index)"></el-input-number>
|
|
|
+ <span v-else>{{scope.column.data.qty}}</span>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname == 'unlogisticsqty'">
|
|
|
+ {{tool.qtyShow(scope.column.data.unlogisticsqty)}}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname == 'unit'">
|
|
|
+ <el-tag size="mini" type="info" effect="plain">{{scope.column.data.unitname}}</el-tag>
|
|
|
+ </div>
|
|
|
+ <div v-else>{{scope.column.data[scope.column.columnname]||scope.column.columnname ==='operation'?scope.column.data[scope.column.columnname] : '--'}}</div>
|
|
|
+ </template>
|
|
|
+ <template v-slot:opreation="scope">
|
|
|
+ <el-button type="text" size="mini" @click="deleteOrderProduct(scope.data)" :disabled="!logistics_qty_editable || status != '新建'">{{$t('删 除')}}</el-button>
|
|
|
+ </template>
|
|
|
+ </tableDetail>
|
|
|
<div style="margin-top:16px;text-align:right">
|
|
|
<el-pagination
|
|
|
background
|
|
|
@@ -110,6 +55,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
+ tablecols:[],
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
time: null,
|
|
|
@@ -178,6 +124,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.tablecols = this.type == 'edit' ? this.tool.tabelCol(this.$route.name).productTable.tablecols : tool.tabelCol($route.name).productTable.tablecols.splice(0,tool.tabelCol($route.name).productTable.tablecols.length - 1)
|
|
|
}
|
|
|
}
|
|
|
|